PDA

View Full Version : Using sound/audio as a potentiometer?



mekohler
- 5th October 2007, 04:24
I'm currently using a linear pot to control some things in my circuit. Is there any way/component that allows sound to control resistance? For example, the more sound, the more voltage that is output through the pin. I haven't been able to find any information on this.

mister_e
- 5th October 2007, 04:35
Yes there's some several ways and dedicated IC to do it. What do you exactly need to do?

mekohler
- 5th October 2007, 06:32
Well right now I have the Pot connected to ground, voltage, and the output to AN3/RA4 of PIC16f684. I am simply using ADC to read the value of the pot and set that value as a delay in a loop. So when my pot is turned one way, my lights and patterns are changing fast, and when its the other way they slow down. I want to implement that same feature, but with the sound. No sound/quiet would make the patterns (Controlled by the PIC) change slowly, and loud sound change quickly. Since the pot is just controlling resistance, and thus the voltage sent to AN3, I guess I would need some sort of mic/IC setup that would send more voltage in when it's quiet (for this purpose, but I guess I can take whatever and just use the inverse of that value in my program).

T.Jackson
- 7th October 2007, 13:10
Your best bet would be to forget about sound levels altering resistance and modify the schema to work directly with a DC level that is proportional to db. A cheap, readily available 50 cent mic, plus a 741 (or similar) operational amp a long with a handful of passives is all you really need to do the job. The task of the OP AMP is to amplify the very small AC signal from the mic. You'll also need a sample & hold circuit too. Do a google search on VOX projects. This may help point you in the right direction.

T.Jackson
- 7th October 2007, 13:50
VOX circuit (bit overboard but good) <a href="http://www.rason.org/Projects/basicvox/basicvox.htm" target="_blank">Click Here!</a>

Ioannis
- 24th October 2007, 21:53
From the circuit you should throw away Q1. Then put in the place of R9 a 5.1V zener to protect the PIC adc input. The circuit functions as simple rectifier, so the audio level as converted to dc.

The op-amps may need high power supply (of 12 or more volts). Another choice might be LMC662.

Ioannis