Servo/Motor Driver Circuit

This isn’t strictly XOD related, but I thought it might be helpful to anyone else working on mechantronic/robotics projects. I do a fair amount of analog circuit design in addition to software; this is a circuit using an LM386 amplifier IC which converts the PWM output from an XOD pwm-out node at 5 volts to a DC voltage between about 1 volt and 10 volts, proportional to the PWM duty cycle, for driving small servos, motors, etc.

The advantage of this circuit is that it integrates the PWM filter and drive current amp into one system, and the DC output voltage will “settle” on a target value much faster than a simple RC filter, and the output of the IC can source/sink a large amount of current. Also the LM386 is an inexpensive chip which should be readily available just about anywhere in the world, and the circuit is pretty simple with only a few resistors and capacitors needed besides the chip itself. The Schottky diodes on the output aren’t strictly required but are to help protect the IC in case an inductive load such as a motor is suddenly disconnected.