Okay Greg, here is a circuit to control the servo:
R1 and C1 are for the 20mS timing. It is actually
less than 20mS (around 18mS), but that is okay.
Good values for these are: R1= 27k and C1=1uF.
R2 and C2 control the control pulse width.
I designed the pulse width to go full swing 180 degrees.
The values that will give 2.3mS to 0.3mS are: R2=2.9k to 21k and C2=0.1uF.
For standard values on R2 I would use a 15k pot with
a 4.8k fixed resistor. This will give sub full
swing, but enough swing to control the servo.
Here are the audio modifications:
I used a handheld tape recorder for the input.
If you want a bigger response I suggest using
some kind of amp. The max and min you should input should be
< 5V and > 0V. This circuit seems to provide really clean response
an audio signal. You should still be able to hook up your chip to this,
just remember the voltage constraints.
The 10uF cap is just for isolating the circuits
to get rid of any DC levels from the recorder. The 1 uF
cap allows the servo to respond in a way that seems more realistic.
It acts as a signal averager to
keep the mouth open when the sound is continuous. I tried larger
caps (>10uF) and it seemed sluggish. You may want to play with this
cap to get better response if needed.