Difference between revisions of "WTM Sense"

From ESE205 Wiki
Jump to navigation Jump to search
m (Protected "WTM Sense" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(131 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
 +
[[File:finaldock.jpg|400px|thumb|right|Final dock]]
 
Design and construct a docking station for an iPhone 6, that includes the following features:
 
Design and construct a docking station for an iPhone 6, that includes the following features:
 
* Speaker that amplifies the sound
 
* Speaker that amplifies the sound
* Display that shows weather and time
+
* Display that shows weather and time by connecting to the internet
* Motion sensors that use specific hand patterns and motions to turn the speaker on and off, change the volume, and play/pause songs
+
* Motion sensors that use a hovering hand motion to flip the display between weather and time
  
 
== Objectives==
 
== Objectives==
Throughout our Systems Science and Engineering curriculum, our group realized we have had little experience with modeling, 3D printing, and computer programming. For this reason, we decided to take this class and spend the semester learning and constructing a 3D printed model that could be specialized through a developed and scripted code. We brainstormed the first two weeks different products we would like to own and use in our daily lives that would be interesting and rigorously challenging to create.  
+
Throughout our Systems Science and Engineering curriculum, our group realized we have had little experience with modeling, 3D printing, and computer programming. For this reason, we decided to take this class and spend the semester working with a Raspberry Pi, Python, and constructing a 3D printed docking station that could be specialized through a developed and scripted code. We brainstormed different products that we would like to own and use in our daily lives and would also be interesting and rigorously challenging to create.  
  
We decided to create a Speaker Dock design because we have all come across the problem of trying to play a video or song from our phones when the volume is not loud enough for everyone listening to hear. We came up with the idea of creating a speaker that not only amplifies the sound, but also allows for other design features including an easier way to turn the device on and off, and easy access to the time and weather. This speaker would most importantly play the music louder than the average phone as well as present specific information such as the current time and weather.
+
We chose to create a Speaker Dock because we have all come across the problem of trying to play a video or song from our phones when the volume is not loud enough for everyone listening to hear. We came up with the idea of creating a speaker that not only amplifies sound, but also allows for other features including a motion sensor that responds to hand motions to easily access the time and weather on a display.  
  
For our demo, the user can plug their phone into the dock (if they have an iPhone 6) or use a provided iPhone 6, to test out our speaker. They can use the speaker to play a song, look at the time or weather, and most importantly use their hand as a simple tool to adjust and see each of these features.
+
For our demo, the user can plug their phone into the dock (if they have an iPhone 6) or use a provided iPhone 6, to test out our dock. They can use the dock to play a song louder than would be possible through just their phone and easily switch back and forth between the time and the weather by hovering their hand over a sensor on each side.
  
 
== Team Members==
 
== Team Members==
Line 24: Line 25:
 
* Privacy Considerations: The cameras in the leap motion sensor cannot record the room, so the user isn't being 'spied' on
 
* Privacy Considerations: The cameras in the leap motion sensor cannot record the room, so the user isn't being 'spied' on
 
* Learn python and how to code a display
 
* Learn python and how to code a display
* Learn how to integrate raspberry pi with leap motion
+
* Learn how to integrate raspberry pi with leap motion (ultimately unable to integrate)
 +
* Defining hand motions with leap motion to mean specific controls
 
* Learn how to make a circuit using a breadboard
 
* Learn how to make a circuit using a breadboard
 
* Figure out how to get around iPhone's chip that doesn't allow for other products to access controls
 
* Figure out how to get around iPhone's chip that doesn't allow for other products to access controls
Line 31: Line 33:
  
 
== Gantt Chart ==
 
== Gantt Chart ==
[[File:Gantt_just_incase.png|thumbnail]]
+
Weekly Breakdown
 +
<br />
 +
[[File:G_Chart_JustInCase.png|1100px|Gantt Chart]]
  
 
== Budget ==
 
== Budget ==
 
* [http://www.autodesk.com/products/fusion-360/overview Fusion360 Autodesk Program] $0.00
 
* [http://www.autodesk.com/products/fusion-360/overview Fusion360 Autodesk Program] $0.00
* [https://vetco.net/products/3-5mm-4-conductor-plug-solderless-w-screw-teminals 3.5mm 4 Conductor Plug - Solderless w/ Screw Teminals] $6.52
+
* [https://vetco.net/products/3-5mm-4-conductor-plug-solderless-w-screw-teminals 3.5mm 4 Conductor Plug - Solderless w/ Screw Teminals] $13.20
 
* Raspberry Pi $0.00 (Provided by Washington University)
 
* Raspberry Pi $0.00 (Provided by Washington University)
* [http://store-us.leapmotion.com/products/leap-motion-controller Leap Motion Controller] $79.99 +$0.00 shipping
+
* [https://www.sparkfun.com/products/13959 2 Ultrasonic Sensors - HC-SR04] $3.95 +$11.76 shipping
 
* [https://www.amazon.com/REPLACEMENT-SPEAKER-BUTTON-MAGNET-PAPER/dp/B00K5YI0BM/ref=sr_1_36?ie=UTF8&qid=1486153874&sr=8-36&keywords=hobby+speaker 2.25'' speaker 8 Ohms] $3.99 + $4.44 shipping  
 
* [https://www.amazon.com/REPLACEMENT-SPEAKER-BUTTON-MAGNET-PAPER/dp/B00K5YI0BM/ref=sr_1_36?ie=UTF8&qid=1486153874&sr=8-36&keywords=hobby+speaker 2.25'' speaker 8 Ohms] $3.99 + $4.44 shipping  
* [https://www.sparkfun.com/products/11044 Mono Audio Amplifier Breakout] $7.95 + $5.71 shipping
+
* [https://www.sparkfun.com/products/11044 Mono Audio Amplifier Breakout] $7.95 + $5.72 shipping
 
* [https://www.amazon.com/Olivine-Backlight-LCD1602-Display-Raspberry/dp/B01IDPZH3S/ref=sr_1_fkmr0_3?ie=UTF8&qid=1486591553&sr=8-3-fkmr0&keywords=alphanumeric+LCD+modules+python 16X2 Olivine Backlight LCD Display for Raspberry Pi] $7.99 + $0.00 shipping
 
* [https://www.amazon.com/Olivine-Backlight-LCD1602-Display-Raspberry/dp/B01IDPZH3S/ref=sr_1_fkmr0_3?ie=UTF8&qid=1486591553&sr=8-3-fkmr0&keywords=alphanumeric+LCD+modules+python 16X2 Olivine Backlight LCD Display for Raspberry Pi] $7.99 + $0.00 shipping
 
* Breadboard $0.00 (Provided by Washington University)
 
* Breadboard $0.00 (Provided by Washington University)
Line 46: Line 50:
 
* Jumper Cables from lab $0.00 (Provided by Washington University)
 
* Jumper Cables from lab $0.00 (Provided by Washington University)
 
* Flexible Filament for 3D printing $0.00 (Provided by Washington University)
 
* Flexible Filament for 3D printing $0.00 (Provided by Washington University)
Total: $
+
* [https://www.amazon.com/gp/product/B01LXLXSZQ/ref=od_aui_detailpages00?ie=UTF8&psc=1 EBYTOP 20PCS Double Side Prototype Universal PCB Circuit Board for DIY Soldering,with Multiple Sizes] $10.39
 +
Total: $69.89
  
 +
==Design and Solutions==
 +
[[File:dockfusion.png|250px|thumb|3D model from Fusion360]] [[File:prototypeandsensor.jpeg|200px|thumb|Image of final prototype board]]
 +
 +
We designed and constructed a docking station specific for an iPhone6 to amplify music, and use two sensors to flip the display between the time and the weather. This easy access to time and especially weather from hovering one’s hand over the sensor would be much more simple and quicker than clicking through applications on a phone or computer.
 +
 +
'''3D Print Design'''
 +
* From the start of the semester we knew we wanted to design a 3D model as part of our project. We designed the case and base of our dock in the student version of Fusion 360.
 +
* We printed the speaker dock mid semester to work out the kinks and find the best fit for each of the components that sat in the dock. The second and final print of the design was improved to allow for better use of space inside the dock for the wires, breadboard, and Raspberry Pi. It also incorporated a better fit and extrusion holes for the speaker, sensors, display, plug cords, and audio conductor plug. We decided to also create and print a base for the dock to sit the Raspberry Pi on in order to allow a demo day attendee the ability to open the case and understand the intricacies of the connection wires. [http://www.thingiverse.com/thing:2287624 Dock Step and stl File] [http://www.thingiverse.com/thing:2288768 Base Step and stl File]
 +
 +
'''Coding'''
 +
* We coded our sensors, display, and amplifier on the Raspberry Pi and presented them through an LCD display and speaker, using ultrasonic sensors to control the screen. We wrote this code in Python [https://bitbucket.org/WTMSense/wtmsense.git Tutorial]
 +
* A tutorial for the initial connection between the sensors and the raspberry pi can be found [http://classes.engineering.wustl.edu/ese205/Connecting_HC-SR04_sensor_to_Raspberry_Pi here].
 +
* A tutorial on how to connect the LCD display with the raspberry pi and test that it works can be found [http://classes.engineering.wustl.edu/ese205/Connecting_an_LED_display_with_a_Raspberry_Pi#Software here]
 +
 +
'''Circuits and Wires'''
 +
* We connected the sensors and display with the Raspberry Pi by soldering wires into a prototype board.
 +
*We created a separate circuit connecting the amplifier with the speaker, potentiometer, audio plug, and power supply.
 +
* We switched from a breadboard to a prototype board due to space efficiency and more secure connections between the Raspberry Pi and the sensors and display.
 +
 +
[[File:Overall Circuit diagram.png|400px|thumb|Overall circuit diagram showing the connectivity between the pi, LCD display, sensors, and the speaker and amplifier]]
 +
 +
==Results==
 +
'''Initial results'''
 +
* Ariel printed a trial speaker dock with dimensions we believed to be correct as well as to understand the 3D printing process. We expected some minor adjustments would be necessary. (picture of black speaker dock)
 +
* Audrey connected the display to a Raspberry Pi using a breadboard.
 +
* Savannah connected the sensors to a separate Raspberry Pi using a separate breadboard.
 +
* We initially had both the display and the sensors working properly but separately before combining on one breadboard with one pi.
 +
'''Final results''' 
 +
* Ariel printed a second dock with the modifications to fit the speaker, display, sensors, audio jack and necessary holes for plugging the pi and speaker into their power supplies.
 +
* Audrey and Savannah connected the display and the sensors to function with one pi on one prototype board. The final code allowed the sensors and display to communicate. When the sensors measured an object (hand) within an average of 15 centimeters for 5 consecutive measurements on the left sensor, the display would switch to the weather. When this happened on the right sensor, the display would switch to the time.  (picture of both breadboards and pis)
 +
* Audrey built the speaker and amplifier circuit so that the volume could be adjusted using a potentiometer
 +
 +
 +
[[File:finaldock.mov|750px]] [[File:soundofdock.mov|238px]]
 +
 +
'''Comparison to original objectives'''
 +
* We set out to create a speaker dock that could use hand motions to play and pause songs, change the display between weather and time, as well as turn off an alarm. Upon realizing that we could not use a leap motion to understand precise hand gestures, it became clear that these objectives needed to be modified.
 +
* We decided to use the HC-SR04 ultrasonic ranging sensor to change the display between weather and time manually because it's a more appealing user interface than a flashing screen.
 +
*We originally wanted to control the volume of the music with the sensors, however, due to the active nature of the amplifier, we decided to control the volume with the potentiometer, and use the sensors for switching between weather and time.
 +
'''Factors that stopped us from getting a better result'''
 +
* Our final design was slower than we had hoped due to the use of wifi in the gallery as opposed to ethernet in the lab.
 +
* The inability of the leap motion to connect to the pi stopped us from being able to do more with the motion sensor aspect of our project.
 +
 +
==Demonstration Poster==
 +
[[File:Poster_Presentation_WTM.jpeg|1100px]]
 +
 +
==References==
 +
*Weather and clock code adapted from: http://www.rototron.info/raspberry-pi-international-weather-clock/
 +
*Sensor code adapted from: https://tutorials-raspberrypi.com/raspberry-pi-ultrasonic-sensor-hc-sr04/ and https://www.modmypi.com/blog/hc-sr04-ultrasonic-range-sensor-on-the-raspberry-pi
  
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Spring 2017 Projects]]
 
[[Category:Spring 2017 Projects]]

Latest revision as of 16:09, 3 May 2017

Overview

Final dock

Design and construct a docking station for an iPhone 6, that includes the following features:

  • Speaker that amplifies the sound
  • Display that shows weather and time by connecting to the internet
  • Motion sensors that use a hovering hand motion to flip the display between weather and time

Objectives

Throughout our Systems Science and Engineering curriculum, our group realized we have had little experience with modeling, 3D printing, and computer programming. For this reason, we decided to take this class and spend the semester working with a Raspberry Pi, Python, and constructing a 3D printed docking station that could be specialized through a developed and scripted code. We brainstormed different products that we would like to own and use in our daily lives and would also be interesting and rigorously challenging to create.

We chose to create a Speaker Dock because we have all come across the problem of trying to play a video or song from our phones when the volume is not loud enough for everyone listening to hear. We came up with the idea of creating a speaker that not only amplifies sound, but also allows for other features including a motion sensor that responds to hand motions to easily access the time and weather on a display.

For our demo, the user can plug their phone into the dock (if they have an iPhone 6) or use a provided iPhone 6, to test out our dock. They can use the dock to play a song louder than would be possible through just their phone and easily switch back and forth between the time and the weather by hovering their hand over a sensor on each side.

Team Members

  • Audrey Freeman, Sophomore, Bachelors of Science in Systems Science and Engineering, Minor Candidate in Operation Supply Chain Management
  • Savannah Johnson, Senior, Bachelors of Science in Systems Science and Engineering, Minor in Psychology
  • Ariel Stern, Senior, Bachelors of Science in Systems Science and Engineering, Minor Candidate in Operation Supply Chain Management
  • TA: Andrew O'Sullivan

Challenges

  • User safety: The wires and jumper cables we're using to connect the phone to the speaker cannot shock the user
  • Phone safety: We can't send too strong of a current through the Aux cord and 'fry' the user's phone
  • Privacy Considerations: The cameras in the leap motion sensor cannot record the room, so the user isn't being 'spied' on
  • Learn python and how to code a display
  • Learn how to integrate raspberry pi with leap motion (ultimately unable to integrate)
  • Defining hand motions with leap motion to mean specific controls
  • Learn how to make a circuit using a breadboard
  • Figure out how to get around iPhone's chip that doesn't allow for other products to access controls
  • Learn how to use Fusion360 (Autodesk) and how to design a functional model to be 3D printed
  • Figure out how to amplify sound from the headphone jack using an aux cord and amplifier and build a simple circuit connecting it to a speaker

Gantt Chart

Weekly Breakdown
Gantt Chart

Budget

Total: $69.89

Design and Solutions

3D model from Fusion360
Image of final prototype board

We designed and constructed a docking station specific for an iPhone6 to amplify music, and use two sensors to flip the display between the time and the weather. This easy access to time and especially weather from hovering one’s hand over the sensor would be much more simple and quicker than clicking through applications on a phone or computer.

3D Print Design

  • From the start of the semester we knew we wanted to design a 3D model as part of our project. We designed the case and base of our dock in the student version of Fusion 360.
  • We printed the speaker dock mid semester to work out the kinks and find the best fit for each of the components that sat in the dock. The second and final print of the design was improved to allow for better use of space inside the dock for the wires, breadboard, and Raspberry Pi. It also incorporated a better fit and extrusion holes for the speaker, sensors, display, plug cords, and audio conductor plug. We decided to also create and print a base for the dock to sit the Raspberry Pi on in order to allow a demo day attendee the ability to open the case and understand the intricacies of the connection wires. Dock Step and stl File Base Step and stl File

Coding

  • We coded our sensors, display, and amplifier on the Raspberry Pi and presented them through an LCD display and speaker, using ultrasonic sensors to control the screen. We wrote this code in Python Tutorial
  • A tutorial for the initial connection between the sensors and the raspberry pi can be found here.
  • A tutorial on how to connect the LCD display with the raspberry pi and test that it works can be found here

Circuits and Wires

  • We connected the sensors and display with the Raspberry Pi by soldering wires into a prototype board.
  • We created a separate circuit connecting the amplifier with the speaker, potentiometer, audio plug, and power supply.
  • We switched from a breadboard to a prototype board due to space efficiency and more secure connections between the Raspberry Pi and the sensors and display.
Overall circuit diagram showing the connectivity between the pi, LCD display, sensors, and the speaker and amplifier

Results

Initial results

  • Ariel printed a trial speaker dock with dimensions we believed to be correct as well as to understand the 3D printing process. We expected some minor adjustments would be necessary. (picture of black speaker dock)
  • Audrey connected the display to a Raspberry Pi using a breadboard.
  • Savannah connected the sensors to a separate Raspberry Pi using a separate breadboard.
  • We initially had both the display and the sensors working properly but separately before combining on one breadboard with one pi.

Final results

  • Ariel printed a second dock with the modifications to fit the speaker, display, sensors, audio jack and necessary holes for plugging the pi and speaker into their power supplies.
  • Audrey and Savannah connected the display and the sensors to function with one pi on one prototype board. The final code allowed the sensors and display to communicate. When the sensors measured an object (hand) within an average of 15 centimeters for 5 consecutive measurements on the left sensor, the display would switch to the weather. When this happened on the right sensor, the display would switch to the time. (picture of both breadboards and pis)
  • Audrey built the speaker and amplifier circuit so that the volume could be adjusted using a potentiometer


Comparison to original objectives

  • We set out to create a speaker dock that could use hand motions to play and pause songs, change the display between weather and time, as well as turn off an alarm. Upon realizing that we could not use a leap motion to understand precise hand gestures, it became clear that these objectives needed to be modified.
  • We decided to use the HC-SR04 ultrasonic ranging sensor to change the display between weather and time manually because it's a more appealing user interface than a flashing screen.
  • We originally wanted to control the volume of the music with the sensors, however, due to the active nature of the amplifier, we decided to control the volume with the potentiometer, and use the sensors for switching between weather and time.

Factors that stopped us from getting a better result

  • Our final design was slower than we had hoped due to the use of wifi in the gallery as opposed to ethernet in the lab.
  • The inability of the leap motion to connect to the pi stopped us from being able to do more with the motion sensor aspect of our project.

Demonstration Poster

Poster Presentation WTM.jpeg

References