Dancing Robot
This Instructable shows how you can make a dancing robot. This circuit can be connected directly to the signal generator and does not need its own power supply or oscillator. You can also connect this circuit to the class D amplifier and make the robot dance with music.
Do not connect this circuit to USB class D amplifier. Those amplifiers provide little power because USB power supplies have limited power output.
There is another Instructable you can create if you want to create your own signal generator:
Supplies
parts: 555 timer or signal generator, Zener diodes - 4, general-purpose diodes - 5, 10-ohm high power resistor, 470 uF bipolar capacitors - 3, wires, matrix board.
tools: wire stripper,
optional materials: solder, 555 timer components, shown in the circuit (if you are making your own signal generator).
optional tools: soldering iron
Design the Circuit
The Zener diode voltage needs to near the maximum voltage of the motor. The 0.7 V voltage drop across the diode is the margin to prevent motor failure if its maximum voltage is exceeded because some low current motors burn at voltages above 3 V. The circuit above is made for 6 V motors, limited output to just 4.7 V + 0.7 V = 5.4 V. The general purpose diodes also prevent the conduction of Zener diodes in forwarding bias direction that will limit the motor voltage to just +0.7 V/-0.7 V. Not only the Zener diodes protect the motor from the power supply (as I just explained) and power supply from the motor discharging currents. You need to connect a few diodes in parallel because some Zener diodes have low power ratings.
Make the Circuit
I used normal diodes instead of Zener diodes because I did not have Zener diodes. I connect the LEDs before the capacitor because the capacitor values are very small and the LEDs would be dim. However, that would mean the second LED might not turn ON is the input voltage does not fall below about -2 V. I used bipolar capacitors.
Test the Circuit
I connected the circuit to sine, square, triangle, pulse varying width and sweep waveforms at a frequency of about 5 Hz.
The circuit is working well.