Technical Papers |
|
| Home>Papers>RC to PWM | |
|
|
Two Channel RC Pulse to PWM converter10/28/00 - Changed the code base to integrate Mixed mode with normal mode operation. This modification uses DB0 jumper to select between normal 2 channel mode and a mode where the A and B channels are mixed to allow one joystick to control two motors for speed and direction. A common problem for hobby robotics is controlling the drive level to a motor. Often hacked R/C servo's are used, but they typically have poor control range. Many micro-controllers don't have built in PWM or the PWM is very slow and makes for lots of motor buzz. This paper describes an AVR chip and software that converts two easily formed R/C pulse signals (often directly supported by inexpensive controllers like the Basic Stamp) and converts them into a PWM signal suitable for driving small motors. This AVR application and the reference board design is very much like the hobby shop ESC (Electronic Speed Controller) for Electric R/C cars, etc. The value of this AVR software application is that one can interface the output signals of the AVR chip to a wide variety of H-Bridge driver chips with a current capacity from 600ma to 5+ amps. Or, it could drive a discrete FET bridge for even higher capacities. The software runs on an Atmel AT90S1200 chip with a 16mhz clock and has the following characteristics: - Converts R/C pulses to 0-100% forward/reverse PWM
signal @ ~1.4 kHz.
I created a reference design board for the chip that uses an sn754410 chip as the output driver. Any H-Bridge motor driver chip or circuit could be driven by this design (within the limits of the converter chip output drive). The TI chip is an improved drop-in replacement for the standard L293D chip. The TI chip has a 1 Amp output capacity per channel with a maximum motor supply voltage of 35v. This users guide describes how the reference board works when loaded with this version of the RCtoPWM.hex file. Here is a Microsoft Word copy of the Users Guide
The software is written for the GNU avr-gcc assembler. The schematic and circuit board were designed using the Eagle cad package. A demo/evaluation copy can be downloaded from www.cadsoft.de. The file rcspeed.zip contains the software, makefile, schematic and printed circuit board design. The primary code file is main.s. The code is very simple and should be easily ported to your favorite development environment (Atmel assembler, ICC, IAR, etc). The software includes two version: Mixed and straight. Mixed mode is intended for applications where one wants to use a single joystick, on R/C radio gear, to steer a differential drive robot (e.g tank). One channel controls forward/reverse and the other channel controls the differential drive between the wheels. Straight mode just does two independent channel conversion. All my designs and code are available for any non-commercial or non-profit use without restrictions. If you want to use them commercially, you need to contact me and get permission. This page last modified 03/15/03 |