Here's a project I took on some time ago after we bought our son one of those plastic electric cars. There were two problems with it: 1. my son is too young to know how to operate the wheel and pedal and 2. when he did press the pedal the car would launch forward full force giving him a nice whiplash.
I wanted to install a simple ramp up/down circuit that I control with a cable while walking behind the car. That, somehow, morphed into the current implementation that took nearly 2 months to complete and it would have taken longer if not for my loving wife's encouragement in the form of "are you gonna finish that before he's 18???".
Briefly described, the system consists of a 900 Mhz based remote/base control with speed, steering and direction. There are also late add-ons like a horn and headlights. Starting with the base, a visual basic program interfaces the USB joystick and base radio. It shows the car's "speed", steering along with battery voltage and amperage consumption. The program has a loop that reads the joystick position plus several buttons status, builds a protocol packet and sends it to a serial port where the radio is connected via USB. The transmit packet sends speed, forward/reverse, emergency stop, steering position, headlights on/off and horn. There's also a couple of spare bits if needed. The receive packet has voltage, amperage and current steering position along with a few spare bits as well.
On the car side, there's the H-bridge main motor drive built around the Intersil HIP4081A. If I may say, not my favorite chip when used in a 12V battery application. It's doing the job now but it gave me some trouble due to it's board layout and power requirements. It seems to lock up and shoot-thru when going under voltage. I was expecting the UV feature to simply disable the drive. At any rate, it works ok now after eating a few FETs.
The steering drive was built around the Texas Instruments TPIC0108B. This is a very easy to use H-Bridge chip with a 6-18V input range and 5A output. It takes up to 40V input dumps so it's well within it's safe range for this application. It was nice to throw the chip on a PCB with a couple of external components and have it work right the first time.
The main logic board on the remote side has the Wi.232, 900 Mhz ISM radio by Radiotronix. This is a small footprint radio module which is also easy to use. It can be configured to be as transparent as a serial cable. When coupled to the right antenna, the range can be extended to around a mile line-of-sight, possibly more. After a couple of bumps when configuring the radio, I decided to write my own config VB program to make it easier in the future. The radio runs off a 3.3V power source so I added a KA78R33 regulator along with the 5V regulator used in the rest of the circuit.
Also on the main logic board is the microcontroller in charge of keep order around. I'm a big fan of the Atmel ATmega8 which I use for nearly all of my projects. If you're not familiar with the M8, it has onboard ADC, timers, interrupts, I2C, comparator, watchdog, flash, in-circuit programming, bootloader.. the list goes on. All of that for about $4 a piece. Anyway, the ucontroller takes the protocol packet from the radio at 38,400 baud and parses out the control bits. It sends the speed and steering commands to their respective modules and updates the base with voltage and current measurements. It also handles the headlights and horn commands. I wrote a current limiting loop to prevent motor overload/overspeed but it hasn't been used yet. The typical current consumption hovers around 2.5A so all is safe.
Because this car runs on a battery and my son also has another RC car that uses NiCADs, I thought it would be a good idea to build a universal charger. After some researching, I settled on Maxim's MAX1648 chip. I used their reference design, added a thing here and there and cut the PCB. Just when I'm ready to solder their part, I noticed they never actually shipped my order. I called them up and they told me they were pulling the plug on that part and recommended another. I'm not happy at this point. So I had to come up with something useful using what I had already built. I ended up with a working charger for lead acid, NiCad, NiMH.. there's also a profile for Li-ion but I haven't tried that yet. Fixing the charger up with a new circuit and coding the charge profiles proved to be as time consuming as the rest of the project. For one, you have to wait a certain period of time to know if your battery is charging right, etc. Due to the mess of changes made, I don't have an updated schematic for the charger yet. However, I want to note that I used the Analog Devices AD8205 current sensor which is an awesome little part. The current sense resistor ended up being a 6" long piece of #26 wire since I didn't have a 0.02 ohm resistor at hand. Again, an ATmega8 was used to read the current and voltage values and run down through a 3 stage charging profile. No battery temperature sensor was used with this version. The interface is done through a backlit LCD.
Ok so DARPA won't be knocking on my door anytime soon but all in all, it has been a fun project. If I do this again, I'm thinking I'll build a car from scratch. I want something that's faster, with rubber tires and it has suspension. My son may not complain but it can't be much fun to be riding on plastic wheels that rattles your brain that way. My camera was down when I worked on this project and didn't get it fixed after I was done so pictures were taken with the circuits already mounted and are not the best. The video is also poor quality due to compression and what it seems like horizontal distortion lines. I'm posting the schematics and pictures of the project for your reference. I'll reserve from posting the microcode as it would take lots of time to explain and might not make much sense outside my implementation. However, if I can answer any questions on a particular function, etc, please let me know.
Pics on this posting: The VB control program, base radio, battery charger, drive for rear motor, drive for steering motor and steering mechanics. Video and more pics on the next post below.
Best regards and happy new year!
PS: Yes, the project's called "PoopsMobile". Poops is my son's nickname. I gave him that name because when he was smaller he, well, pooped a lot - yes I know you wanted me to share that. I'm sure he'll beat me senseless when he's old enough to be embarrassed by it. 8 - )
On this post: more battery charger pics, the car's new steering mechanism and the main board on the car side.
There's also this video . It shows the car moving around in front of my house. It also shows how my test driver sometimes prefers to get out and push the car and simply run away and having to be fetched. Finally, the car moves around at full speed before entering the garage.
Yes it was a lot of fun and my son loves it which is the important thing. Here's a screenshot of the steering mechanics. This was done in Rhino and the gears were done with the help of a Rhino script called GearGen. That script and others for Rhino can be found in the Thomas Anagnostou webpage.