True's beaked whale.jpg

Western spotted skunk

Hooded skunk

Yellow-throated Marten

Wolverine

Stepper and servo motor control

So I have a box of motors scavenged from old electronic equipment. The first step was figuring out what I have.

I have four identical Pittman servo motors with attached optical encoders. They have two leads for motor control and four leads for the encoders, Vc, Gnd, quadrature A & B signals. So these motors need a sophisticated servo driver that can do PID (Proportional, Integral, Derivative) control. Basically the controller senses motor movement and direction by counting encoder tick marks and then juices the motor in the desired direction using a PWM (Pulse Width Modulation) applied driver voltage.

It’s common to run the these servos with PIC18 chips ($4.50). They have a built in quadrature encoder reader and can be programed to do PID.

Then the low power PWN signal gets run through a power driver like the L298 ($2.60). Here’s a well-documented L298 project. The L298 can driver two servo motors. A LMD18200 H-bridge ($12.50) is another power driver option, used in the Jeffery Kerr boards. Here’s a project using a PIC16 and the LMD18200 driver. The Allegro A3953 is another driver option.

Typically one PIC16 or PIC18 would control each servo motor. The recent dsPIC33 chips ($3.00) have dual encoders and should be able to run two servos. These chips came out in 2008 so I haven’t found any projects on the web describing dual servo projects.

The PIC18 and dsPIC33s are available as DIPs or as SMDs. They can interface to a computer through USB and so can be controlled directly, though connecting them to a programmable controller, a PIC, a BASIC stamp, an Arduino, etc is more common.

Hobby servos are much easier to drive and a single PIC18 can drive several, six to eight depending on the chip variation. Typically a hobby servo would not need a driver as the PWM is its control signal.

Leave a Reply