Saturday, September 26, 2015

RC car build and trouble with motor driving

Sometime in the early 90s I bought a Taiyo Fast Traxx Pick-up RC car. The special thing about it was, that instead of wheels it had two rubber tracks. It served me well, until one day about 20 years ago the electronics crapped out. I never threw it out in hopes of repairing the electronics some day.
Turns out the electronics were basically all custom parts, or at least with custom markings. I didn't want to start figuring all that out, so I decided to build new electronics from scratch. Basically I just needed two H-bridge motor controllers and a radio receiver.

The motors were running quite poorly after all the years in storage, so I cleaned them by running them in a bath of CRC 5-56. It turned out that the motor had quite low armature resistance (around 0.5 ohms), i.e. they would pull huge currents if stalled (in the order of 20 amperes from the original 9.6V supply). This was surprising as the original controller was just on-off and to handle the stall current the switching device would have needed to have a very low on state resistance.

As the only H-bridge drivers I had in my junk box were L298s, I decided to use one of those. I planned to limit the current to acceptable levels just by limiting the pulse width of the enable signal. Also, the L298 has high saturation voltage in the switching transistors, which also helps to limit the current.

For the receiver, I wanted to use one of my "receiver v3" boards. Those were designed to drive standard servo motors at 50Hz frequency and between 1 and 2 milliseconds pulse widths. This application would need much higher frequency and also higher duty cycles. Due to the way the receiver board was designed, the duty cycle would always be limited to at most 50% when driving two channels, but that was enough for this application and wasn't a problem. The frequency could also be increased easily to 1kHz.

After building everything on a proto board I did the first test. The motors didn't turn. The L298 just couldn't drive the motors. The IC just got really hot even with a large piece of aluminum acting as a heat sink. So back to the drawing board it was...

Figure 1. L298 based dual H-bridge driver, which was a complete failure. Receiver is not in the picture, but it would mount upside down in the black female pin headers.

I decided to go simple with the build. Just a single N channel MOSFET switching the current and perhaps to do the reverse later using a relay. I had some FDD16AN08A0 FETs laying around in my parts bin and wanted to use those, but 3.3V gate-source voltage isn't enough for those. The highest current capability FETs I had that could be driven with 3.3V were CEG8205. They are TSSOP-8 packaged, which makes them really awkward to use on a proto board, so I didn't go with that and instead used two Si2302s in parallel.

First test with the motors goes well, when powered from my lab supply. The motors turn, but not very fast as the lab supply doesn't provide much current. Happy with the way everything is working, I test it out with a battery. Now the motors are running much faster and the whole thing seems like a winner. Then, all of a sudden, flames and smoke. I quickly disconnect the battery. The transistors have gone up in smoke (this incident also took out the processor, the radio module and the 3.3V regulator on the receiver board). I find this odd, as the two Si2302s in parallel were supposed to be able to handle 5A of current.

Figure 2. Burn marks on the phenolic board after the transistors caught fire.

I went back to the CEG8205s, so I bodged them on some SO-8 to DIP breakout boards I had, and soldered those on the proto board. With both channels in parallel they should be good to 9A. Testing on the lab supply again, I slowly turn up the power on the controller and the motors start slowly turning. Then suddenly one of the FETs starts to smoke. It took some time for me to understand how a 2A limited power supply was able to destroy a 9A rated MOSFET, but I think what happened was that when the current limit of the power supply kicked in, the output voltage dropped suddenly. This in turn reduced the gate-source drive voltage of the FET, which then wasn't enough to achieve a low channel resistance. The 2A current through the channel was then enough to destroy it. After this incident, I increased the brownout threshold of the processor to 2.7V, which should still be high enough for an acceptable channel resistance.

After all this and more (for instance playing around with the drive frequency and measuring waveforms), I still couldn't get the thing to work. It would work for a while and then a FET would die. I then got fed up and added a 74HC04 to level shift the drive waveform to 5V and switched to the much larger FDD16AN08A0 FETs. Even still, the FETs would get so hot that the solder would start to melt! I couldn't believe it. This is when I realized that although the average current through the channel was limited to 2A by the power supply, the maximum current could be much higher. This could result in a much higher average power dissipated in the device than what would be inferred from the average current. I was working under the assumption that the motor had significant inductance, and due to it the current would remain approximately constant (or at least not shoot to insane values) during the switching period. I had experimented with rising the switching frequency up to 8kHz, but didn't have any luck with that, so the inductance had to be really small (in fact my poor man's LCR meter measured it at less than 10uH).

I found some high current 100uH inductors in my parts bin and put those in series with the motors and everything just started to work! Motors run faster, FETs run cool. I even tested with the L298 driver board I first made and it is now capable of getting the motors running (however they give too little torque and don't run very fast, so I still can't use that).

Figure 3. The RC car assembly with FPV gear.

Figure 4. Close up on the quality of workmanship. I didn't bother redoing the board after replacing the CEG8205s with the FDD16AN08A0s. I just bodged them onto the breakout boards.

Figure 5. Close up on the 100uH load inductors. Secured down with hot glue.

No comments:

Post a Comment