-
Notifications
You must be signed in to change notification settings - Fork 0
Audio
For audio amplification, I originally tried a LM386N Low Voltage Audio Power Amplifier. These chips are easy to wire up and don't use much current - but it was really noisy with lots of static. I suspect it came from sloppy grounding and power. If I knew more, I probably could have done something to isolate and improve the power.
Instead, I bought a PAM8406 MiNi Amplifier Board Module(5W+5W) D Class Amplifier Board. This module cost less than $10, was also easy to wire up and provided two channels at five watts apiece.
For input, I've connected the Raspberry Pi audio to the PAM8406.
For output, I've connected:
- One channel to a small speaker inside the circuit box.
- The other channel is used to provide a signal to drive the mouth. This signal goes to an op amp, which then drives the motor. I can control the sensitivity of the mouth by changing the volume of the audio amplifier.
Having a stereo audio amplifier allows me to control the volume separately from the sensitivity of the mouth.
I also use the microphone built into the Logitech web cam.
In order to synchronize the movement of the head and tail with the words being spoken, I need to know if the fish is actually speaking. Since the audio is being supplied via the Raspberry Pi, I'll know something is happening. But it's going to be handy to have hardware confirmation.
As of December 2016, I've grabbed the signal to the mouth motor as it comes off of the op-amp. The TL082 has two op amps in the package and I use the second op-amp to isolate the signal which then feeds into the RPi GPIO.