Step 7Ard-e's sense of hearing and smell: interfacing an old speaker and a VOC sensor with an Arduino
So to make Ard-e hear the world and react very simply to it all you need is an old headphone. Just as a headphone can turn electrical pulses into sound it can turn sound into electrical pulses. All you need to do is hook one of the leads from the headphone to ground and one of them to an analog input on the Arduino. The program to very simply interface this with the Arduino is to make a threshold that is set very low maybe like 2 or 5 and if the analog input is driven higher than this threshold make Ard-e react. You can implement it like the clapper where clapping makes him turn on or off. I was able to use an old headphone in the very preliminary stages of making Ard-e to act as a clapper but by the time that I got Ard-e up and running by himself the headphone no longer functioned as a microphone so I didn't actually make Ard-e interface with it. The microphone/ headphone was proven to work as an input to the Arduino though.
To get finer resolution on Ard-e's ability to hear you might want to use an OPAMP based inverting amplifier with an adjustable gain. I attached a schematic of a circuit that I think would work ideally for this but I didn't test it out so be careful if you choose to attach it to your Arduino.
To get Ard-e to smell is a little pricey though. All it takes is a VOC sensor hooked up to an analog input of the Arduino. The sensors run around $22 a piece though. I'm now going to link you to an instructable that my brother wrote about how to use these sensors with the Arduino but be warned... he never wears a shirt and is sorta a tool. Follow the link with caution:
http://www.instructables.com/id/How-To-Smell-Pollutants/
Once this sensor is attached to the Arduino its a simple matter to write a program that makes it drive to where the concentration of VOC's is the highest and set off an alarm. To easily make an alarm for the Arduino all that I did was take apart an old broken alarm clock take the piezo-electric buzzer and attach it to one of the digital PWM output pins. A simple call of analogWrite(the pin, and a value from around 10-255) produces a very nice alarm noise.
So now Ard-e can see, smell, touch and hear the world around him. He can even produce tones too. These are all really important senses but robots need some other senses that humans don't necessarily need. Lets build Ard-e some sensors so he can have some robot senses.
| « Previous Step | Download PDFView All Steps | Next Step » |
![]() |
Add Comment
|


















































