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 specific hand patterns and motions to flip the display between weather and time
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.
- 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
- 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
- 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
- Fusion360 Autodesk Program $0.00
- 3.5mm 4 Conductor Plug - Solderless w/ Screw Teminals $13.20
- Raspberry Pi $0.00 (Provided by Washington University)
- 2 Ultrasonic Sensors - HC-SR04 $3.95 +$11.76 shipping
- 2.25 speaker 8 Ohms $3.99 + $4.44 shipping
- Mono Audio Amplifier Breakout $7.95 + $5.72 shipping
- 16X2 Olivine Backlight LCD Display for Raspberry Pi $7.99 + $0.00 shipping
- Breadboard $0.00 (Provided by Washington University)
- Transistor $0.50 +$0.00 shipping
- Wall plug $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)
- EBYTOP 20PCS Double Side Prototype Universal PCB Circuit Board for DIY Soldering,with Multiple Sizes $10.39
Design and Solutions
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
- 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 bread board to a prototype board due to space efficiency and more secure connections between the Raspberry Pi and the sensors and display.
- 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.
- 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.
- 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