with R1 as a 10K resistor and C1 as a 10 µF cap, then
experiment with capacitor values. Since you will have a
variety of audio frequencies, I don’t have an immediate
answer as to the optimal values for the resistor or cap, so I
would be experimenting as well.
When you sample the circuit, you will get a variety of
amplitude values. Use these values to adjust the pulse width
of the servo control. By changing the sample rate, you can
also modify the response time of the servo to the sounds.
A loud sound opens the “mouth” wider
than a quiet sound.
You may find that your RC integrator
won’t discharge fast enough to sample
your voice as well as you want. In this
case, you can optionally add R2 to
discharge your integrator faster. I would
start with a 100K value and experiment.
You’ll find this will do what you want really
well for a single servo. If you want more
complicated than that — like moving eyes
and such — I recommend that you create a
script file that is timed to your audio
output that simply issues commands to the
servos you are controlling in sync with the
audio. You’ll have to fiddle with the circuit until it does
what you want – but hey! Isn’t that what learning to do
something new is all about?
Well that’s it for this month. I’m going to get busy
making plans and task lists now. How about you? As usual,
if you have a question, please send me an email at
email@example.com. Keep building robots, keep
learning new things, and above all keep smiling! SV
16 SERVO 07.2014