Tuesday, May 12, 2015

Final Project Conclusion

Introduction

To recap, Tiffany and I started this project with our initial idea of creating a volume monitor for a classroom of children. We wanted to create something that would measure the volume of a classroom and display some sort of feedback, in our case lights, so that the children would be aware of their noise level. Our first design included a sound sensor, three LED lights, and an Arduino board. We originally wanted to program the lights so that they would blink in different ways, depending on the volume measured by the sound sensor. 

However, after consulting with the director of the children, we realized that the blinking lights would be too distracting for the children. So, our design became a traffic light sort of thing, where the green light indicates a good volume, the yellow light indicates that the volume is a little loud, and the red light indicates that the volume is too high. We also added a potentiometer, or a dial, so that the teacher would be able to adjust the noise tolerance depending on what kind of activity the children are doing. And thus, our foam model:

Our physical design was to have a panel of delrin, to which our LED lights, sound sensor, and potentiometer would be attached. There would also be a box at the bottom of the panel to hide the wires.

Making the Box

After creating our foam model, we proceeded to create the delrin pieces that would make up the box on SolidWorks. In our final design, we moved the box to the back of the panel so that all of the wires and electronics could be hidden in a more aesthetically pleasing way. 

The box would be put together using tabs and notches. Also, we wanted the back panel to have a hinge so that the Arduino board or battery pack in the pack can be removed. We planned to make the hinge using piano wire. Our sketch of the pieces in Solidworks is shown below:



























The back panel and one of the side walls had to be split into two so that the pieces would not be too tall to use on the drill for piano wiring.

After cutting the delrin with the laser cutter and doing the piano-wiring, we had our box! Some of the tabs and notches did not fit very well, so we had to use hot glue to secure some corners.




Programming

Next, the programming part.
Using an Arduino board and a breadboard, we hooked up the sound sensor, the potentiometer, and six LED lights to the Arduino. We created the following program:



The program consists of four functions. The first function takes the position of potentiometer and determines if the noise level tolerance is low, medium or high. The next three functions make a certain light light up based on the sound sensor reading. Each of the three have different sound sensor reading ranges for which each light, green, yellow or red, light up. Depending on the position of the potentiometer, the program will go to the specified function of low, medium or high.

After a lot of testing with the sound sensor readings, we realized that human voices fluctuate quite a bit, and as a result, the lights kept flickering between two colors. So, in the program, we created gaps in the sound reading ranges so that for example in the medium setting, the yellow light will go on at readings 5 to 15, but red will go on at readings above 30. This, along with slowing down the rate at which the sensor takes readings, reduced the flickering of the lights.


Finishing touches

And finally, we had to take this jumbled mess of lights and wires and sensors,


And turn it into this


               

We did this by drilling holes into the front panel so that the wires of the lights and the sensors could fit through. Then, we soldered the wires to be long enough to reach through the hole to the breadboard. The lights and sensors were secured to the delrin with hot glue. The Arduino board and battery pack were secured in the box with hot glue, as well. We also cut pieces of colored film to lay over the lights, and looped string through the top of the box so that we could hang it up if we wanted to.





Improvements

Overall, I was pleased with how the project turned out, considering the time limit. The most time consuming part was testing the sound sensor readings, as the actual creation of the program was not extremely difficult. We managed to slow down the bouncing back and forth of the lights, but it is still there. An improvement that I would make if given more time would be to create a loop in the program that takes the average of a number of sound sensor readings to reduce the flickering even more. 

The potentiometer was a good aspect to the design. I liked how it made the product adjustable. If this were to be a real product, I would perhaps create more settings of noise level tolerance with the potentiometer. This way, the teacher would have more control of the desired noise level of the room.  

Also, I would find LEDs that are more bright, or colored films that are more sheer, as the lights did not light up as brightly as I would have liked.

I think that the box worked nicely. The front looks clean and simple, and the wires are hidden in the back. The back panel can swing open for someone to change out the batteries or make adjustments to the wiring. Since the box is designed to be hung on to the wall, I do not think that the easy opening/closing of the lid would be a problem for the children. One thing I would add to the box would be to paint it black or cover the box with black paper, This would allow a better contrast between the lights and the box.

I had fun doing this project with Tiffany! I'm happy with what we created.






Monday, May 4, 2015

Final Project Week 3

We made a lot of progress on the project this week! We cut the delrin with the laser cutter, built the delrin box, and tweaked the Arduino program. 


Putting the box together

First, we cut out our Solidworks file on the laser cutter. As described in the last post, our delrin box has notches and tabs for the panels to fit together. The LED lights will go on the outside of the front panel of the box, while the wires, Arduino board and battery pack will go inside the box. The back of the box has a panel that has two hinges, which are piano-wired, so that the battery pack can be taken in and out. The back panel had to be split into two halves so that it would not be too tall to drill.


Tabs and notches

Hinge -- piano wired
Hinge -- piano wired
Inside of box
Back panel


Tabs and notches were extremely tight and therefore had to be hammered in. We sanded down some of the ones that did not fit. Also, we reinforced some places with hot glue.


Drilling and Sautering 

Next, we had solder the lights so that the wires were long enough to go from the front panel to the Arduino board in the box. As a result, we also had to drill holes into the front panel of the board so that we could slide the wires of the LED lights, the potentiometer, and the sound sensor through the front panel and into the box.






Testing the program

We also went to the classrooms to test the range of volumes detected by the sound sensor. We found that because human voices fluctuate a lot, the readings bounced around quite a bit, therefore causing the lights to jump from one color to another. To fix this, we created gaps in the sound sensor ranges in the program. For example, for the high setting, we have the following ranges for the green, yellow and red. 



We also increased the delay for which the sound sensor reads the volume. These actions helped the lights not bounce around as much. This was important, as the flickering lights would be very distracting for the children.

We consulted with the teacher, as well, to make sure that the values we were using were acceptable and realistic volumes that one would find in a classroom of young children. 


Reflection

Unfortunately, even with the gaps in the ranges in the program, the lights still do bounce around sometimes. Charlie suggested that we create a loop to take the average of the sound readings for a certain time interval, and use the average for the reading that the lights respond to. We may look into implementing that next week. 

Also, we realized that some of the LEDs were burning out because we had not connected any resistors to the lights. So, we calculated, using V = IR, that we need 100 kilo-ohm resistors for the lights. We connected the resistors to the ground wire of the lights, so we shouldn't be getting any more burned out lights.

We're almost done! Just need to glue down the lights, potentiometer and sound sensor to the front panel and put the colored film over the lights. We will also try to continue to improve the program.