The Continued Tragic Tale of the LOLrioKart

It’s been a while since I mentioned LOLrioKart. Not because I haven’t worked on it or anything, but because  I’ve been with slammed by everything else in life or just didn’t have the motivation or desire to ever  relate anything about it again. You’ll see why.

However, much has happened in terms of kart work in the past month or so. I made and exploded another custom electronic control hack, ran it off a contactor, crashed it, used it to store my mountain of cruft, then pulled it back out to install a new steering gearbox and IGBT half-bridge which has yet to function.

So let’s start at the beginning.

Remember back in the day when I said I would never, ever, ever build another hardware PWM driver?

…Yeah, anyway, let me tell you about this hardware PWM driver I built here.

After investigating a slew of small bike and scooter controllers and discovering that they are in fact very simple creatures, I decided to take a crack at building one myself.

The way most of these things work is through a comparator-based PWM generator circuit. Essentially, half of a dual comparator IC is used to generate a sawtooth or triangle wave. The other half of the comparator…well, compares this time-varying voltage to an input voltage. Whenever the input voltage is higher than this reference wave, the output of the comparator switches states (e.g. outputs +Vcc). When the voltage is lower, it will switch to its normal state.

This is called the intersective method of PWM generation. In this case, the input voltage is provided by the throttle, which is usually potentiometer or magnetic proximity sensor.

Oddly enough, such a circuit is very simple and reliable if all you want is a variable duty cycle PWM output. The difference between this and the last discrete hardware PWM generator I built for the electric scooter project is that the duration and spacing of the pulses didn’t matter as much – for driving a R/C standard input, the length of the pulse carries the information, not the duty cycle.

The output is a normal push-pull arrangement, good for driving power amplifiers.

Of course, if I was going to build my own controller, I couldn’t build a small one. That would be unlike me. I had to go big time.

Luckily, a half-scrapped golf kart controller existed at MITERS. It appears that someone had dismantled it ages ago, but left everything in a sort of Z-state. Some of the power transistors appeared to be fried, which was probably the reason behind the scrapping. Since I had a small bucket of MOSFETs, and the arrangement was very simple, I decided to pull everything off and replace them.

I replaced the existing IRF2807s with my own IRF540s. The current capacity of the 540s are lower, but the maximum voltage is higher. It also has more favorable gate drive characteristics.

Either way, there’s 12 of them. That’s more amps than I care to use.

There’s a TO-220 package dual rectifier every two FETs, acting as freewheeling diodes for electrically-rowdy motors.

Alright, let’s test. I wanted to see how my driver circuitry dealt with the gigantic meta-capacitor that is MOSFET gates. Since I couldn’t put the kart on the workbench, I yanked some equipment down with me.

That’s our smallest oscilloscope. MITERS tends to inherit, scrounge, or otherwise receive for less-than-new value most of it equipment. I swear our other one weighs more than the kart does.

Hmmm, that’s what I want to see, I suppose. PWMing at around 13,000hz (royally overkill) at a 50% duty cycle. The RC characteristic of the switching is pretty clearly visible here. I decided to put a bigger timing capacitor in, reducing the PWM frequency to around 1,500hz, then wrapped it all up and threw it onto the electrical deck.

Naturally, the first thing that happens when I flip the master power switch is a miniature Independence Day fireworks display under my ass. I found pieces of transistor on the ground a foot or two away.

What happened this time? It wasn’t even a bench-to-installation electrical gremlin issue! I literally tested it on the kart!

The best explanation that I and the collective Course 6 minds of several MITERers could come up with was that some of the FETs suffered from gate float as a result of me leaving out a gate resistor that would otherwise have kept them grounded when off. Therefore, if a FET was spuriously, but not fully switched on when I applied power, it would behave as a resistor. With the current dumping ability of the batteries, acting like a resistor isn’t a good thing.

What’s hilarious (and very tragic indeed) about this is that I had such a grounding resistor in the circuit while testing, but somehow it didn’t make it back in while finalizing the wiring.

Regardless, I had one very well baked pseudo-controller.

Sigh.

So what to do now? Simple, put the kart on a contactor.

But Charles, that’s a multipole line switching contactor! It’s not designed for switching high-powered DC motors backed by power sources with instantaneous current output in the hundreds of amps!

Besides, paralleling contactors doesn’t actually gain more switching capability due to the tendency of different contacts to be slightly varied mechanically such that they don’t all close at the same time.

Who cares? At this point, I was sort of convinced that electronics is all black magic. Maybe somehow all the contacts will switch in the same nanosecond.  At least if it welded and sent me off uncontrolled into the nearest approaching semi, it would be a glorious way to go.

There aren’t many pictures of what exactly went on, since it was at night and there were no cameras,  but to be brief…

That’s a sheared universal joint.

And that’s a competely bent-to-hell steering shaft support.

Long story short, I made the mistake of applying “throttle” in the middle of a turn – the kart wheelied and shot in a direction tangential to the radius of curvature. Remembering geometry class, a path tangement to a curve tends to be a straight line – into a hard curbside.

Luckily, it was at an angle steep enough to not quite roll me over, but enough to wreck almost the entire front end.  The force of the impact rammed the steering column upwards and bent the upper steering shaft support. Since I hit tire-first, there was also a torque impulse that exploded the U-joint connecting the two shaft halves.

Also, I twanged up that wheel slightly and bent the half inch bolt being used as a spindle.

Alright, so with no control left to speak of and epic work required to restore it I elected to give up the effort for a while and walk away. Other projects needed attending to, you know, for class. I took the opportunity to clean up the space a bit by piling my crap (which was formerly distributed all over the place) into the kart.

Sad day.

Two and a half weeks pass before a new opportunity arose. Yeah, you probably called it – I couldn’t leave it for long.

What on earth is THAT? It’s a 100 volt, 200 amp brickFET half-bridge, built by a \m/echanical engineering grad student and 2.007 UA. I’ve been eyeing large power FET/IGBT modules for a while now – always thought they would be better at switching electrically-gifted actuators than a row of TO-220s or cluster of surface mount parts, but I never ponied up the cash to buy a few and test them.

Besides, if I did, I probably would have blown them up before actually getting to the kart.

Now I need a kart to mount this thing to.

Taking everything off that needs to be unbent or remade.

Bevel gears, left over from another project.

I toiled for a little while over exactly what I should do for the new steering column. I did not want a horizontal steering wheel. The physical form factor of the kart  – it’s substantially taller than most go-karts  – precluded a direct link to the steering linkage while keeping the steering wheel at a reasonable angle.

Solution? Make the steering wheel axis horizontal. This much more closely approximates the layout of most passenger vehicles. The differerence is that I would still have a vertical shaft, but the wheel would be connected using a set of bevel gears.

The other upside to this is that I gain an actual steering ratio – no more 1:1 through a U-joint with a mile of backlash!

Stiffening up the whole show with another found giant aluminum trunion thing. The bevel gearbox will mount on top of the new topmost bearing block.

Gearbox mount holes drilled into the top bearing block.

But wait, there’s more. A giant steel standoff now connects both blocks. Retained on each end by a 3/8″ cap screw two inches deep, this assembly is going to be stiff. I intend to add shaft collars galore to this such that the front end of the basket has some semblance of structural integrity.

Next, to mod up the gears.

A problem.

While assuming Ghettopost in the boring position, the socket head cap screw that opens and closes the post clamp sheared off. I guess it didn’t like repetitive cycled loading.

I needed a fast workaround that didn’t involve remachining that part of the tool holder. What else can close a clamp around a shaft? Another clamp. It worked spelendidly.

(Reason #67,293 I’d get thrown out of a real machine shop)

Scribbling the part you want to make on the stock you’re making it from – a classic tactic of mine.

Carving out a hole that is big enough to pass the larger bevel gear into the gearbox stock, a 3″ square aluminum tube. The layout for the gearbox is slightly odd – the bevel gear is retained by the top bearing block, and the gearbox with pinion attaches to said bearing block. The two gears are not in an integral assembly.

I decided to make it this way since then I had some marginal ability to adjust the amount of backlash in the teeth – just shift the gearbox around.

Gears on their shafts. Like everything else on LOLrioKart, they are retained by ginormous set screws.

Set screws only work under two circumstances – if they have a pre-drilled hole to sit in, or if they’re enormous for the task at hand.

Endcaps for the gearbox. Again, I choose my usual tactic of on-the-fly manufacturying – carving things from giant blocks of aluminum by brute force.

Pinion gear on the steering input shaft. Since I hate retaining rings, I naturally chose to keep everything together axially with a large retaining ring.

The gearbox is installed. The steering wheel pops on and off of the hex shaft (It’s a quick-release, legitimate racing type).

Proper gear mesh is a good thing.

To finish things out, I needed to join the shaft that connects to the steering linkage itself with the one coming out of the gearbox. Since it was 2am and McMaster was closed, I whipped up a quick giant shaft coupler, two piece clamp type, out of some 1″ steel.

And the final product.

Hey, I have 180 degrees of steering travel now! And essentially no backlash to speak of. The only source of it now seems to be between the steering wheel itself and the hex bore – probably because the wheel is metric and the hex shaft is antimetric.

Uh oh, here we go….

All wired up, with my previous gate driver device (beefed up and properly grounded!)

This thing worked just fine on the bench with a smaller motor, so it ought to work now, right?

Besides experience having shown otherwise, I decided to run some continuity and voltage checks on the entire system using a meter.

This is when I discovered that the kart frame is live. It measured exactly 42 volts everywhere.

Bad?

Out of precaution and a desire to keep my own sanity, I elected to not hook up the battery and turn it on.

Ah, electrical engineering black magic. Last time I had frame continuity issues, it was grounded. Now, weeks later, without touching anything, it switches polarities?

Either way, this entails a full teardown of the electrical system. I should probably check the insulation on the batteries – while they have nitrile rubber sheets all around them, I might have missed a spot. A metal mounting screw may be sticking out too far. Something.

Stay tuned for moar!

LOLrioKart Update 15: Kickin’ it Old Skool

This is a brushed Etek.

It is an axial air-gap ironless disc-armature rare-earth permanent magnet DC motor. That’s a mouthful, isn’t it? Thus it is commonly referred to by its acronym, “AWESOME”, which is pronounced “badass”.

I traded in the brushless Etek that I was running before for this thing, mostly because brushless motors require nontrivial power electronics to operate, and we know my luck with nontrivial power electronics.

The brushed DC motor requires… you know, DC. Conveniently supplied by the kilo-asston by large nickel cadnium batteries.

Additionally, the brushed Etek is capable of high power throughput than the new brushless motor. Some times you just need a dose of old-school brute force.

Speaking of nontrivial, I had thought that swapping the motor out would be a 1:1 operation, as the two were designed to be interchangeable.

Sort of. They’re designed to be compatible only if you’re mounting through the face of the motor and nothing else. They are drastically different lengths. This is a bit of a problem when you fit the motor exactly between two walls of aluminum that are now static.

To make life even more interesting, this was the original robot version of the motor – which had a short, 3/4″ diameter shaft instead of the normal longer, 7/8″ shaft. Problem? My sprocket was purchased for a motor with a 7/8″, long shaft.

So it turns out that changing motors was going to be less than trivial. No problem, however, since I’m better at navigating the seas of mechanical nontriviality. In a pinch, you can use a slide rule as a sextant.

The motor mounting spacers would have to be shortened half an inch, and the sprocket would need a bore adaptor to fit it to the 3/4″ shaft. Additionally, I would need a wider key to take up the 1/16″ bore difference.

Here’s the sprocket with bore sleeve. I searched the entirety of MITERS for a 7/8″ OD pipe with a .75″ or smaller ID, but couldn’t find one. So, face with no other options, I bored and turned a solid 1″ bar of steel into a little pipe shape, then slit it on the mill.

Sigh.

The motor spacers each shaved down half an inch. This is necessary such that 1) the aluminum motor casing doesn’t try to intersect the aluminum transaxle superstructure in 3-space, and 2) such that the motor  sprocket can still line up with the differential.

Everything put back. I took the opportunity to move back down to the 11-tooth sprocket, too, for more tire-flaming torque. Unfortunately, this limits my top speed to a mere 36MPH, from 45.

Oh well. Some times in life, sacrifices have to be made. Also, going down to the smaller sprocket allowed me to take a link out of the chain, which was sort of droopy with the 15 tooth sprocket, but was then the *PERFECT LENGTH* when reconnected.

With the motor mounted, it was time to move back to the electrical system.

Observe. These are wire connectors for real men. Man-nectors, if you will. The smallest wire gauge these are designed for is 4 gauge, and the largest is 3/0.  I was actually looking for more of the smaller type seen on the batteries, but then found these suckers. Such a manly motor requires masculine terminals for maximum badassery.

…with the mounting bolt about 1 nanometer from grounding to the frame, just the way I like it.

This was a significant nontriviality in the motor mount that not even moving the motor forward half an inch could help, since the transaxle side thickness is half an inch, and the motor terminals were placed so perfectly as to be covered by the metal both times.

Don’t worry, this will either be insulated or DC arc-sputtered away!

Brushed Etek fully secured!

Okay, enough with making it go – time to figure out how to make it stop.

In a rare turn of events, I designed something else for the kart before making it. The other big item that was pre-designed was the back end transaxle assembly. These parts were all waterjet-cut, and obviously one needs a 2D routed path file to run the waterjet machine – I cannot yet sneeze hard enough to cut aluminum, but when I can, rest assured that I’ll make more flat parts on the fly.

I made a few sets of these embryonic pedal mounts. One will become the brake pedal, the other will be turned into the accelerator.  They still need things like holes drilled to size and threads tapped.

Like so. Drilling 32 holes in the same place on a bilaterally symmetric part was made easy by the mill stop, since I could pop the part in, lock the vise, drill, open the vise, flip around and drop the part back in the other way.

I call this the Pop-Lock-Flip-it-and-Reverse-it technique.

Missy Elliot and Huey could not be reached for comment.

Welcome to another episode of “I hope the kart never actually ends up in this position during operation”. I decided it was easier to roll it onto its backside to install the pedal mounts from underneath, than to fiddle an allen wrench under the thing.

I discovered this after putting in 3 out of 4 screws.

Testing pedal positions. Part of the downside of designing things 5 seconds after you build them is making sure your parts don’t run into eachother. Here, I’m trying various configurations of pedals and mount to ensure that they still clear the steering tie rods.  This ended up not being a problem since the pedal could never reach this low – part of the mounts acted as a physical stop when everything was secured.

This is the combination cable stop and mount spacing implement. It holds two bike brake cable sheaths securely such that I can route them to the two front wheels.

The actual brake lever that will translate my desperate brake stomps into an ineffective tug on the cables. It set-screws onto the pedal’s pivot shaft (Don’t worry, there’s a spot drill just for this!) and has holes on the other end for putting in cable-clamping screws. The end is rounded off to reduce cable stress.

The triangualar screw hole arrangement was the result of “Hmm, let’s make two independent cable clamps… wait, nevermind, let’s make one locking clamp thing for both cables!)

On the other side of the cable are the two band brakes. Conveniently, each had a little clampy screw built into the levers. Here, the Blocks of Cable Sheath Holding (+1?) are also visible.

Alright, so everything’s hooked up. The springs on the band brakes transmit sufficient intial tension such that I do not need a return spring on the pedal itself.

Good, because I didn’t think of how I could do that.

Here it is, LOLrioKart, now with BRAKES! Front brakes! TWO OF THEM! And they WORK!

Well, mostly. It stops well, but pulls hard to the right – this is an unfortunate characteristic of the dinky little scooter band brakes I used. Like some forms of drum brake, band brakes have a preferred direction in which they will “self-servo“, or bite harder with little application of force. For me, this was a forward rotation of the right wheel. Yes, the left front wheel does brake harder if rotating in reverse.

This is why disc brakes are just awesome in general, since the applied force is always at an right angle to the brake pad surface. There’s no motion which would tend to amplify the frictional force. In fact, new designs of disc brake incorporate small cam mechanisms into the cylinders to simulate this self-servo effect.

Regardless, this was one of the design goals of this project, since I haven’t seen many go-karts that have braking on the front wheels. Rear wheel braking is much easier to accomplish, since often the rear axle is solid and driven by a single large (conveniently disc-shaped) sprocket. I decided this was unnecessary, since I already have an electric motor back there which incidentally acts as a fine brake if you squeeze it right.

Anyways, it can now stop on command. What does this mean? Epic hoonage to come, especially since if you watch my wiring in the above picture closely – the Etek is wired directly across the Hella key switch.

No, it hasn’t welded closed yet.

Yes, it’s incredible. The kart will actually kick up on the two rear wheels on acceleration, which makes the “nose-in-the-air” picture even more potentially reflective of reality.

No, I never expected my set-screw wheels to survive that kind of torque. Video to come soon, I promise!

Hey, contactors! I grunged an armful of industrial contactors from a free parts pile. They are mostly 24 volt coils, but the 4-pole one is a 120 volt coil. Oddly enough, it still trips extremely well on 54v.

I might consider replacing the giant Hella battery switch with one of these later on, after I put a speed controller between the motor and battery.This would get rid of the enormous red cable leading up to the basket, since the system can be switched using a much smaller, more discrete key switch.

While these are certainly not main battery cutoff contactors, the idea is that they should never be switching the maximum current of the battery, i.e. handling any inrush current, with a proper precharge resistor setup. This high resistance is placed in parallel with the contactor such that a small amount of current can flow as soon as the battery is connected. It fills up any capacitors in the circuit, such as in the controller, which otherwise appear as instantaneous dead shorts on a voltage step (such as suddenly turning your switch on).

This prevents a wall of electrons from getting all arc-y on your semiconductors. I suspect the lack of such a resistor was what killed my previous BLDC controller.

I’d have to split the 4-gauge cables into 3 or 4 smaller (such as 10) gauge ones, which is troublesome, so I might just *get* a real battery cutoff contactor.

Anyways, onto more \m/it \m/echanical \m/ayhem!