This week we had to chose one input and make a board to make it work. Instead of using an Attiny 44, I made a Fabduino with a little modification (because I know I'm gonna use it from now on) and a small board with only a microphone and its resistor.
Things I needed:
1 Fabduino
1 Elect Microhpone (from Fab Inventory)
1 10k resistor
Arduino IDE
FabAcademy2014: Input Devices [Microhone and Fabduino] from Alejandra Diaz de Leon on Vimeo.
For this assignment I decided to make a Fabduino and then add the input device. I took the files of the Fabduino and made a change. In the bottom part that is conected to MOSI, MISO and SCK, I added a 6 pin header for making it easy to bootload.
I milled the board successfully and then did the bootloader in the Arduino UNO using my FabISP. [As a remider, my computer doesn't recognize the FabISP so I have to connect it through a PortHub]. I didn't soldered the 8mhz crystal yet so I bootloaded it using the AtMega 168 (internal clock) option
Afterwards, I tested it using the Blink example of the Arduino IDE. The Aleduino is working fine.
Then, I took the microphone board from the Fab Academy webpage as a reference for making the board that I wanted to connect to the Fabduino, but it didn't work as I expected. I couldn't make it work. I did some research and noticed that the microphone would work differently if I connected it to the fabduino. I took the image showed below as a reference for making an new board, milled it and tested it. It works!
Finally, I wired the mic board to the Aleduino. To test it, I used a simple analog read code in the ARDUINO IDE. At the beginning I couldn't make it work but the problem was the my threshold was in 100. It is important to calibrate the treshold depending on where you are. In my case, the microphone could detect sound with a 450-500 threshold.. I also added the Serial.printIn function, to see the word "Listening!" everytime the mic detected sound, and finally, the LED in the pin 13 (default) of the Fabduino, lights up when receiving the mic input.
To watch the video of the microphone sensing the sound, go to the top of this webpage.