On this week it was requested to add an output device to a microcontroller board we designed and program it to do something. I decided to use this assignment to test a sound output useful for my final project. The idea is to obtain a sound that origins from a motion through the stretching of a cloth. To generate my output it's enough to me an Audio Transducer (piezo) to which I add a Potentiometer to adjust the frequency.
CLASS WEB PAGE:
http://academy.cba.mit.edu/classes/output_devices/index.html
DOWNLOAD FILES:
EAGLE
| PNG
| IDE
REFERENCES:
'Piezo'
'Potentiometer'
'Arduino Tone Tutorial'
To design my output shield I have to think which components I need to put in it. They are definitely a Potentiometer and a Piezo. Precaution, I chose not to solder directly the components on the shield but I preferred put on it the respective female header and connect them when I need it. To draw the board I used again Eagle Software and Photoshop for png files to generate the rml files to send on the milling machine.
The process to mill the shield is already know. I imported the png files on fabmodules to prepare the rml files. As the Fabkit Board I had trhee files to put in the Machine: one for the traces with 1/64 tip and the holes and interior files with 1/32 tip. Once milled the shield I went to solder the headers.
Before programming the sound output on my shield, I needed to understand the working of my circuit with the help of Arduino Board. Searching an example with both the piezo and potentiometerI found several example that use the 'ARDUINO TONE LIBRARY'. After doing a test with Arduino I used my Fabkit and Output Device to reproduce the same thing. On the pinout of 'Atmega 328' I verified the correspondence of the pins to use.
I programmed the microcontroller board with a simple sketch: a loop of alternate rotations in opposite directions and breaks. I controlled the speed using the PWM pin. IDE Arduino Sketch:
While I was reproducing the output with my Shield, I had some problems with my Fabkit. With the help of a tutor I checked again my Fabkit and I verified that all was ok. So the conclusion is that Arduino Ide not always read my board.