So taking Rory's lab as a point of departure, I decided to add a few elements to spice things up a bit. In this demo, instead of using a potentiometer to control the brightness of the LED, I'll be using sound. That is, the loudness of the sound determines how bright or soft the LED will glow - the louder the sound, the brighter the LED.
I used a simple audio pre-amp that was lying around on my breadboard from a previous project to setup the input. The schematic is shown below.
The output from the pre-amp section (figure 1) goes into a line driver stage (figure 2, optional, just to steady things a bit and in case you want a 3 wire configuration instead of a 2 wire) and then into the analog in of the arduino ( instead of the potentiometer as in Rory's session). The rest of the circuit (from arduino out to LED) and the code is the same as Rory's. Here's the video.
I couldn't find a steady monotone to experiment with (my voice failed miserably and I don't own an oscillator). So in the second part of the video I'm using a sruthi box (the next best thing I could find). Notice the LED on the left of the screen.
Saturday, September 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment