The Eternal Tragedy of the LOLrioKart

The saga continues.

There are three reasons why I work on the kart more than any sane person world. The first is if I’m not doing anything else at the moment and need a distraction from the tribulations of life. The second is if I’m preparing for an event or situation where it would be publicly seen… after all, a working model is better than a nonfunctional sculpture.

And the third is if I have a neat idea or cool part and it HAS to be implemented NAO.

Like some instrumentation. Because operation of the kart is always a game of power electronic dice, I decided that some kind of readout of system conditions was necessary. It just so happened that MITERS had some old skool panel meters hidden deep within its bowels.  There were a few interesting options, such as a leak rate meter… what on earth does that measure?

I decided to start with a simple battery voltage monitor, since I had no convenient Hall Effect sensor,  shunt, or other low-value resistor (besides the SwapFETs’ incredibly low 2 milliohms) or a real constant current supply to calibrate a current meter.

A semi-known fact is that most ammeters are in fact sensitive voltmeters. While it’s easy to make a loop of wire and a magnet respond to 10,000 volts, it’s not nearly as easy to do with 10,000 amps. So a resistor game is played to turn the 10,000 amps into a very small voltage, like 100 millivolts or something. Enough to tick a needle on a voltmeter that has “10,000 amps” written on it.

You can easily convert an “ammeter” to a voltmeter if the “full scale deflection” voltage and current draw are known.

I settled for this meter for the voltage monitor, since the other one actually says amps on it. This one measures “Current-volts-microns”.

I have no clue what kind of SI unit that is, but it was the winner because of its simple 1-millivolt-per-tick scale.

So let’s convert this 100-mV meter into a 100 volt meter.  To not explode the meter, it should span a voltage of no more than 100 millivolts (0.1V). In a 100 volt system, that means 99.9 volts must be dropped across a resistor in series with it before it’s connected to the circuit under scrutiny.

The meter drew approximately .5 milliamps (0.0005 amps) at full scale deflection. So the resistor in question must drop 99.9 volts while passing 0.0005 amps. Now just pimpslap Georg Ohm and you have the resistance value needed – (99.9 / 0.0005) = about 200,000 ohms. Actally 199800, but I didn’t have one of those, and the kart isn’t going into space or something.


Zip tied to the kart.

Through this meter, I found out that the batteries drooped in voltage under a good hard launch from 61 volts (freshly charged) to about 56. So they’re not too dead.

Or they are, but even being completely fucked are still awesome just by virtue of being cacknormous.

In a continuation of Reason #3, I found a road blinkie. You know, those things on top of orange construction barrels. It contains a few amber LEDs, runs off D-cells, and automatically switches on and off via photocell.

Well that was easy enough. A half inch bolt threaded through a spacer and into the mounting point of the light and I had improved the road safety of the kart hundredfold.

Let’s move onto more imporant things. For the past while, the kart has been randomly cutting out. The 12 volt DC/DC converter has been resetting for apparently little reason – not just under acceleration, but even sitting still. I wasn’t sure what was causing it, but suspected some sort of transient effect scaring the DC/DC unit.

In tearing down the electrical system, I decided that it was a good time to build a more legitimate motor driver.

It was time to get away from the cobbled-together hardware PWM generator. Producing signals in software makes for a much more versatile controller that can be reconfigured easily. I happened to have some Arduini kicking around, and a Protoshield kit leftover from last year’s Überclocker build.

Rounding out the components is an IXYS 6 amp dual gate driver with isolated high side. Using a halfbridge driver like this lets the controller perform regenerative braking. The high side required an isolated power supply, so I yanked out this 12v-12v DC/DC converter-converter from another motor driver board. I wanted some more electrical isolation between the fragile microcontroller and the harsh environment of my non-EE projects, so I salvaged some optocouplers from some weird board that had to have been made in the 80s.

Finished a few hours later.

I was able to use the Arduino language’s built-in PWM command, so the software was extremely simple. Normally it operates at 500Hz – far too slow. But changing the timer/counter initial counts causes the PWMs to run substantially quicker. I ended up going with the 4kHz option.

The two gate outputs are on the bottom side of the board. The left is the high side, and the right is the low side. For now, to keep backwards compatibility, I left the high side unconnected in the kart.

Scoping the gate driver outputs. This was using some test code where I had independent control over each channel. The waveforms look good, except for a bit of twanging in the high side, which I suspect is just a ghetto scope probe.

Making the driver board fully modular meant that the system wiring could be cleaned up substantially. Before, I had a mess of signal wiring and power wiring all meeting at the terminal strip. However, I could now devote the entire terminal strip to power connections. The system DC/DC converter (a 12 volt, 3 amp unit) fans out into 5 outputs now, so I don’t have to try putting two wires into one terminal. Overall, everything became more organized.

So did it work?

No, of course it all blew up. The problem obviously does not lie within the gate driver system, because everything worked fine for about 20 minutes. Then the aforementioned DC/DC converter began repetitively cutting out.When it dies, the entire kart shuts off because the contactor opens up.

I had gotten into the bad habit of curing these brownouts by hard-cycling the battery switch to reset the converter. It worked a few times.

Then when I hit the switch again, the drive FET made a muffled popping noise and the kart jumped for a split second. Then all was quiet.

Okay, so this explosion wasn’t as spectacularly fire-filled as the other 5 or 6, but I still have to remove the whole electrical system to replace the brick. Amazingly enough, the gate driver assembly survived the whole ordeal.

Explanations that my EE friends (who still refuse to just build me a working controller, eh guys?) offered up include transients on the 12v rail resulting from inductive spikes coming from the contactor, or the lack of a local bypass capacitor  on the input side of the converter causing very short voltage dips to shut the converter off.

Either way, the DC/DC unit is now the problem child. The ghetto moves to another part of the city.

At least I got this cool Volvo dashboard gauge cluster  for free at Swapfest. Sort of defeats the purpose of me adding my own voltmeter.