Difference between revisions of "Crutooth"

From ESE205 Wiki
Jump to navigation Jump to search
m (Protected "Crutooth" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)))
 
(60 intermediate revisions by 2 users not shown)
Line 3: Line 3:
  
 
[https://docs.google.com/presentation/d/15f5jw4oEdeCc9LZ8xzC8i7SxX_0qJVjVVWlBrIs2VXY/edit#slide=id.g3f5155073d_0_5 Initial Presentation]
 
[https://docs.google.com/presentation/d/15f5jw4oEdeCc9LZ8xzC8i7SxX_0qJVjVVWlBrIs2VXY/edit#slide=id.g3f5155073d_0_5 Initial Presentation]
 +
 +
[https://drive.google.com/drive/folders/1FfvIvj6cXfo0aR0Xm9SeYp1kbd0Mol9y?usp=sharing Repository for Project Files]
 +
 +
[https://classes.engineering.wustl.edu/ese205/core/index.php?title=Audio_Input_and_Output_from_USB_Microphone_%2B_Raspberry_Pi#Materials_and_Prerequisites Tutorial Link]
  
 
== Weekly Log==
 
== Weekly Log==
Line 47: Line 51:
  
  
 +
*Total: $185.39 <br />
 +
== Design and Solutions ==
 +
'''Hardware''' <br/>
 +
 +
A major obstacle in creating our product was waterproofing our containers. We eventually succeeded by utilizing O-Rings. An O-Ring is basically a rubber band that, when compressed in a correctly dimensioned groove, expands and blocks entry to the enclosed space. To accommodate this, we found correctly sized O-Rings on McMaster-Carr and 3D printed a container with a properly dimensioned circular groove. This allowed an O-Ring to be placed between the bottom and the lid of the container, sealing it off to outside fluids (water). This approach was used in creating containers for the speakers and the pi-holder.
 +
 +
Additionally, we had to build our own Bluetooth speakers. This proved to be difficult as neither of us had experience wiring electronics. Once we learned how to solder and use a breadboard, wiring was pretty simple. We followed the wiring diagram below.
 +
 +
 +
[[File:Wiring diagram.jpg]]<br/>
 +
 +
'''Software''' <br/>
 +
[[File:CruTooth diagram.JPG]] <br/>
 +
The above diagram shows the layout of the product. There were two main files. The first controlled the audio to speaker part of the project and ran through the Pi. The other is uploaded to the Arduino and controls the stroke rate algorithm (the amount of times a rower strokes in a minute). The audio script was based in Python and used the PyAudio and Numpy libraries to read in audio from a USB microphone and continuously outputted the input to the Bluetooth transmitter. The file also utilized the GPIO and Time Libraries to code in a button that controls when the microphone is on. The Arduino file was coded in C and continuously measures the acceleration of the device. In a boat when a rowers pushes his oar through the water there is a measurable increase in acceleration. When the rower is recovering and brings the oar back to his body there is a measurable deceleration. That creates a peak on the acceleration data that can be measured as a stroke. The code counts the amount of peaks per 2.5s interval and extrapolates how many strokes that would equate to in a minute and displays it to an LCD.
 +
 +
<br/>
 +
'''Pictures'''
 +
<br/>
 +
[[File:IMG-0571.jpg]]<br/>
 +
The above picture is the water-proof casings of our project. The containers on the left are the speaker units. The container on the right holds the Pi and Arduino and also has direct access to the microphone and button for control. The LCD display is available for the user through the hole at the top of the container
 +
 +
<br/>
 +
'''Poster'''
 +
 +
[[File:Webp.net-resizeimage (4).jpg]]
 +
 +
== Results==
 +
 +
After 15 weeks of work, CruTooth was able to achieve all of its functionality goals. The speakers were successfully built to receive audio simultaneously while also waterproof. The audio data was sent to the speakers successfully while also measuring and displaying an accurate stroke rating on a built-in LCD screen. Compared to our objective of "wirelessly connect(ing) all the speakers and sensors in the boat, not only saving the crew team weight but also increasing the reliability of their tools", we feel that we were immensely successful in our task. That being said, there were definite areas for improvement.
 +
 +
==Next Steps==
 +
'''Speakers'''<br/>
 +
The speakers, though fully functional and waterproof, were overly large and transmitted audio at a slight delay. After some testing, we determined that a nicer (and thus more expensive) audio receiver would solve this problem. Upon further research, we found that [https://www.amazon.com/Wireless-Bluetooth-Adapter-QuietComfort-Headphones/dp/B072YS4S8H?ref_=fsclp_pl_dp_5 this] Bluetooth converter would be better suited for our needs. Additionally, it was brought to our attention that connecting the speakers via FM transmitters might work better. Upon further research, this seems like a better alternative to Bluetooth as we can connect more speakers with a larger range and a with less of a delay.
 +
 +
Further improvement is needed to decrease the size of the speaker containers. Upon building our prototypes, we realized that there was much empty space within the containers and we could have very easily made the casings smaller.
 +
 +
After testing our speaker casings rigorously, we found that our use of O-Rings was successful in keeping water out. Therefore our electrical equipment is dry and safe within the containers if ever exposed to water, and this prevents shorting out of components from water exposure. That being said, part of the functionality of the O-Rings is the manner in which their housing grooves are made. Because we used a 3D printed casing, the grooves were not as precise and as circular as would be preferred. Thus, a next step for the Crutooth would be to mill the containers out of a stronger material with more precise tools. <br/>
  
 +
'''CruTooth Box''' <br/>
 +
Though the Crutooth box containing the Pi and the accelerometer successfully completed its desired functionality, it was large and was unable to accommodate all the necessary components, thus making it impossible to waterproof the container. Should we continue with the project, the main priority of ours would be to find a more suitable battery that would be able to fit better into our container. By doing so, we would be able to horizontally stack all the components and thus fit everything into the container and ensure a compact and waterproof design. Furthermore, if we continue Bluetooth use in the future, then a more expensive and higher-end Bluetooth transmitter would be necessary to finish the eventual goal of connecting to 4 to 8 speakers. A possible product to use could be [https://www.crutchfield.com/p_219DN202WT/Denon-DN-202WT.html?awkw=536675315178&awat=pla&awnw=g&awcr=299271465528&awdv=c&awug=9060158&gclid=CjwKCAiA9K3gBRA4EiwACEhFeyjcaMEoG-cE1-8W8wCeX1c8ATsETHsVVFDpmJhcqmCwdE7tIUpubBoC6GoQAvD_BwE this].
  
*Total: $144.53 <br />
+
Additionally, we would like to simplify the inner workings of the CruTooth box. As of now, the accelerometer is controlled through an Arduino and the Raspberry Pi controls everything else. Having these two boards running everything complicates our wiring, the reliability of the device, and drains the battery quickly. To fix this, we would like to wire everything through a single Pi with an attached AD converter.
  
 
== References ==
 
== References ==
 
[https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions Adafruit USB Adapter Setup] <br/>
 
[https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi/instructions Adafruit USB Adapter Setup] <br/>
 
[https://www.instructables.com/id/DIY-Bluetooth-Speaker-PartyBar/ Bluetooth Speaker Setup] <br/>
 
[https://www.instructables.com/id/DIY-Bluetooth-Speaker-PartyBar/ Bluetooth Speaker Setup] <br/>
[https://cdn-learn.adafruit.com/downloads/pdf/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi.pdf 2.8" LCD Screen Tutorial]
+
[https://learn.adafruit.com/character-lcds/wiring-a-character-lcd LCD Screen Tutorial]
 +
<br/>
 +
[https://engineersportal.com/blog/2018/8/23/recording-audio-on-the-raspberry-pi-with-python-and-a-usb-microphone Audio Input] <br/>
 +
[https://people.csail.mit.edu/hubert/pyaudio/docs/ PyAudio Class Documentation] <br/>
 +
[http://razzpisampler.oreilly.com/ch07.html Button Setup for Raspberry Pi]
 
[[Category:Projects]]
 
[[Category:Projects]]
 
[[Category:Fall 2018 Projects]]
 
[[Category:Fall 2018 Projects]]

Latest revision as of 15:46, 17 December 2018

Project Overview

Rowing, often referred to as Crew, is a sport in which a team of people (typically 8,4, or 2 rowers) are tasked with propelling their boat through the water as fast as they can. To do so, this group of people must simultaneously pull their oars through the water, thus moving the boat. To help facilitate this movement, each crew boat has a coxswain: a ninth person with the directive of steering the boat and giving commands to the rowers. An integral part of being a coxswain is being heard and understood by their rowers. To help the rowers hear their coxswain, there is a chain of water-proof speakers lining the underside of the boat. These speakers are connected to a small, watertight, computer that the coxswain talks into and gathers their information from. This computer, a CoxBox, is a deeply flawed piece of hardware. Due to the rigorous movement of the boat, the wiring system that holds all the various speakers and sensors in the boat often comes undone or is corroded by the water that inevitably gets into the boat. To fix this, CruTooth aims to wirelessly connect all the speakers and sensors in the boat, not only saving the crew team weight but also increasing the reliability of their tools.

Initial Presentation

Repository for Project Files

Tutorial Link

Weekly Log

Crutooth Weekly Log

Team Members

Sam Manyak
Pavan Narahari
TA: Chance Bayles
Instructor: Prof. Jim Feher

Objectives

  1. Create a wireless speaker network consisting of at least 2 connected speakers
  2. Create waterproof and buoyant housing for all components
  3. Include an aux. input so as to broadcast other audio throughout the wireless speaker network
  4. Add a wireless network of gyroscopes to tell the rate at which the rowers are taking strokes
  5. Make all relevant information display to a simple LED display

Challenges

  1. Learning Raspberry Pi
  2. Connect Pi to multiple bluetooth speakers
  3. Stream microphone audio to speakers in real time

Gantt Chart

Gantt updated.JPG

Gantt Chart

Budget


  • Total: $185.39

Design and Solutions

Hardware

A major obstacle in creating our product was waterproofing our containers. We eventually succeeded by utilizing O-Rings. An O-Ring is basically a rubber band that, when compressed in a correctly dimensioned groove, expands and blocks entry to the enclosed space. To accommodate this, we found correctly sized O-Rings on McMaster-Carr and 3D printed a container with a properly dimensioned circular groove. This allowed an O-Ring to be placed between the bottom and the lid of the container, sealing it off to outside fluids (water). This approach was used in creating containers for the speakers and the pi-holder.

Additionally, we had to build our own Bluetooth speakers. This proved to be difficult as neither of us had experience wiring electronics. Once we learned how to solder and use a breadboard, wiring was pretty simple. We followed the wiring diagram below.


Wiring diagram.jpg

Software
CruTooth diagram.JPG
The above diagram shows the layout of the product. There were two main files. The first controlled the audio to speaker part of the project and ran through the Pi. The other is uploaded to the Arduino and controls the stroke rate algorithm (the amount of times a rower strokes in a minute). The audio script was based in Python and used the PyAudio and Numpy libraries to read in audio from a USB microphone and continuously outputted the input to the Bluetooth transmitter. The file also utilized the GPIO and Time Libraries to code in a button that controls when the microphone is on. The Arduino file was coded in C and continuously measures the acceleration of the device. In a boat when a rowers pushes his oar through the water there is a measurable increase in acceleration. When the rower is recovering and brings the oar back to his body there is a measurable deceleration. That creates a peak on the acceleration data that can be measured as a stroke. The code counts the amount of peaks per 2.5s interval and extrapolates how many strokes that would equate to in a minute and displays it to an LCD.


Pictures
IMG-0571.jpg
The above picture is the water-proof casings of our project. The containers on the left are the speaker units. The container on the right holds the Pi and Arduino and also has direct access to the microphone and button for control. The LCD display is available for the user through the hole at the top of the container


Poster

Webp.net-resizeimage (4).jpg

Results

After 15 weeks of work, CruTooth was able to achieve all of its functionality goals. The speakers were successfully built to receive audio simultaneously while also waterproof. The audio data was sent to the speakers successfully while also measuring and displaying an accurate stroke rating on a built-in LCD screen. Compared to our objective of "wirelessly connect(ing) all the speakers and sensors in the boat, not only saving the crew team weight but also increasing the reliability of their tools", we feel that we were immensely successful in our task. That being said, there were definite areas for improvement.

Next Steps

Speakers
The speakers, though fully functional and waterproof, were overly large and transmitted audio at a slight delay. After some testing, we determined that a nicer (and thus more expensive) audio receiver would solve this problem. Upon further research, we found that this Bluetooth converter would be better suited for our needs. Additionally, it was brought to our attention that connecting the speakers via FM transmitters might work better. Upon further research, this seems like a better alternative to Bluetooth as we can connect more speakers with a larger range and a with less of a delay.

Further improvement is needed to decrease the size of the speaker containers. Upon building our prototypes, we realized that there was much empty space within the containers and we could have very easily made the casings smaller.

After testing our speaker casings rigorously, we found that our use of O-Rings was successful in keeping water out. Therefore our electrical equipment is dry and safe within the containers if ever exposed to water, and this prevents shorting out of components from water exposure. That being said, part of the functionality of the O-Rings is the manner in which their housing grooves are made. Because we used a 3D printed casing, the grooves were not as precise and as circular as would be preferred. Thus, a next step for the Crutooth would be to mill the containers out of a stronger material with more precise tools.

CruTooth Box
Though the Crutooth box containing the Pi and the accelerometer successfully completed its desired functionality, it was large and was unable to accommodate all the necessary components, thus making it impossible to waterproof the container. Should we continue with the project, the main priority of ours would be to find a more suitable battery that would be able to fit better into our container. By doing so, we would be able to horizontally stack all the components and thus fit everything into the container and ensure a compact and waterproof design. Furthermore, if we continue Bluetooth use in the future, then a more expensive and higher-end Bluetooth transmitter would be necessary to finish the eventual goal of connecting to 4 to 8 speakers. A possible product to use could be this.

Additionally, we would like to simplify the inner workings of the CruTooth box. As of now, the accelerometer is controlled through an Arduino and the Raspberry Pi controls everything else. Having these two boards running everything complicates our wiring, the reliability of the device, and drains the battery quickly. To fix this, we would like to wire everything through a single Pi with an attached AD converter.

References

Adafruit USB Adapter Setup
Bluetooth Speaker Setup
LCD Screen Tutorial
Audio Input
PyAudio Class Documentation
Button Setup for Raspberry Pi