Dual Channel Servo Pulse to H-Bridge Interface

The Interface

The Robot


This feature-packed circuit connects two channels of a radio control receiver to two H-Bridges for use in a “fighting robot”. In the above right picture it is near the center, connected to the radio receiver. The H-Bridge circuit boards are at the far left and right, near each wheel. The motors are 18 volt electric drills with nicad battery packs.

The interface uses a PIC16F876 microcontroller and not much else. It performs channel mixing, current limiting, and noise rejection. Push the stick forward, both motors move forward, move the stick to the left and the robot moves left. It makes the robot very driveable. You can use a wheel transmitter meant for cars to control it, in other words, one channel is throttle(both forward and reverse), the other steering. Speed control is smooth, and the H-Bridge transistors are sensed and protected cycle-by-cycle against over-current. Noise from the receiver, whether the transmitter is on or off, is ignored. Temperature sensing is also possible, but I haven’t incorporated it in this version.

Above, the block diagram shows where the interface fits into a typical system. It is the large rectangle in the center, marked “Servo Pulse to H-Bridge Interface”.

See it in action!
The builder of the robot pictured above, Stan Fidler, has been kind enough to put up a web page with a 15 second video in MPEG(600KB) and Windows Media(200KB) format. Both are the same video, same resolution, so watch the Windows Media file if you have Internet Explorer and Windows 98 or “better”, otherwise watch the MPEG, but it’s a longer download. Please download the video to your computer if possible before viewing. That way if you replay it, the file won’t be sent to you each time you play it. Bandwidth is not free.

Ready to build it?
Schematic diagrams and code on the next page...

Frequently Asked Questions:

Q:

I connected my motors to this circuit but nothing happens.

A:

You can’t hook motors directly to this circuit. It is an interface between a receiver and two H-Bridges. Motors connect to H-Bridges.

 

 

Q:

It only works when I use nicad batteries in my receiver, not alkalines.

A:

Some receivers put out pulses that are low voltage. I’ve seen this in a Hitech FM receiver. The inputs of this interface have Schmitt Trigger thresholds, and when the battery voltage is high, the thresholds are too high for the small pulses coming from the receiver. Either use nicad batteries or build a buffer with a 74LS04 or 74HCT04 chip. Remember the chip is inverters, so use two sections in series for each buffer.

 

 

Q:

Isn’t the PIC16F876 rated for only 5.5 volts? A four cell alkaline pack can be 6.2 volts.

A:

I’ve never had any problem, but use nicad batteries if it’ll make you feel better.

 

 

Q:

I think the deadband is too big / I think the deadband is too small.

A:

The source code is included, so you can modify it, but you will need the PICC compiler from Hi-Tech (not the same as the receiver company!) to compile it. If I get enough comments one way or another I will make a change in my next revision.

 

 

Q:

Is a 19.6608 MHz crystal the only one that will work?

A:

You can use a 20MHz crystal if you have to, but the stick centering will be slightly off because the software is calibrated for 19.6608. You can change settings in the source code and recompile if you want to change things to suit your needs.

 

 

 

[Home] [Services] [TechRef] [Weekend] [Legal] [Contact]

 

 

Copyright © 1995-2002 Bob Blick. All Rights Reserved.
Designated trademarks and brands are the property of their respective owners.

 

bobblick.com