Saturday, July 30, 2011

tinyKart: Round 3

The quest for an ultralight go-kart continues...


In the last update, we had assembled the two critical front wheel modules, which allowed us to complete the aluminum plate and 80/20 sandwich that is the front of the chassis. With that, the basic structure of the kart was complete and we could get a look at the full size and shape of tinyKart:

So tempted to throw this on the railroad tracks...
The rear drive modules attach to the rear 80/20 frame using standard t-nuts, though we did have to drill an access hole on the inside of the side rails for the single 1/4-20 screw which holds the rear wheel shafts in place. Each drive module has a single Turnigy SK6374-170 motor driving an HTD 5M-15 belt with a gear ratio of 4.5:1. This will give a top speed of....I have no idea. It depends on the motor's performance under sensored control. More on that to come.


The standoffs and outboard plates for the drive modules have been fabricated, so all that remains are the belt tensioners. We may also modify the motor pulley to have a set screw hub on both sides to leave open the possibility of attaching a second motor to the outboard plate, with the two shafts coupled by the pulley itself. This would not be for the ultralight version, but rather for a high-performance follow-up. With just one motor per side, the peak force at the ground should still be close to 100lbf.

Thus far, the build had been fairly 2D: plates, extrusions, and right angles. The steering linkages and seat mount are where the interesting angles start to come in. Here's one of the tie rods:


Normally, a tie rod would just have one ball joint on each end, the 3D equivalent to a pin joint in a planar mechanism. But here I wanted the steering linkage to go in the 1" gap between the front chassis plates. So, I came up with this Non-Collocated Ball Joint which is really just two pin joints, one in the horizontal plane and one in a vertical plane. Together, they remove the same degrees of freedom as a single pin joint, but they allow part of the tie rod to be completely planar and thus fit in the tight space between chassis plates:

Vertical pin joint.
The horizontal pin joint fits, just barely.
The other end of the tie rod is a straightforward ball joint going to the driving link on the steering column:


The rod itself is 1/4-28 threaded steel rod with a 3/8" aluminum sleeve over it. Bling nuts on either side of the sleeve put the sleeve in compression and the rod in tension. This bit of preload makes the combined rod much stiffer and ensures it won't buckle on the "pushing" side of the steering linkage. Here's the whole linkage:


There are several ways to adjust the linkage: The easiest seems to be to change the length of threaded rod passing through the vertical pin joint block. This can be used to adjust the toe angle and alignment of the front wheels. These dimensions also depend on the angle of the steering column, which is adjustable (for now) by pivoting a block that acts as the bottom bearing for the column itself:

That potentiometer might come in handy...
Still to be fabricated is the second support for the steering column. Once that is in place, an overall fine-tuning and stiffness assessment will be necessary. Some of the pin joints could use a bit of tweaking to take out as much play as possible, but overall it seems like it will do the job. If there is one thing I am still worried about, though, it's the performance of the front wheel systems under load. It all went together too easily...

The seat mount was the last bit of critical structure to add. The bottom of the seat is just bolted to the 80/20 rail that comes across the front of the rear chassis assembly. The back, though, needs to be supported in 3D by a set of braces:


One brace, constructed in a manner similar to the steering linkage, connects the side of the seat to the side rail of the rear chassis. Another brace, a strip of 1/4" aluminum, links the side of the seat to the rear rail.  This provides stiffness in all directions and actually makes the frame itself stiffer as well, since it now has structure outside the plane of the main chassis rails. Okay, so it's not a space frame, but for a group that makes everything out of 80/20 and plate stock, I think we did pretty well in 3D.

The moment of truth: a weigh-in with a makeshift steering wheel (vise grip), the controllers, and the batteries dangling from various frame rails:

Shaaady...

Noticeably absent are the tires and tubes, which should weigh about 3lbs total, the tensioners, the second steering column support, and the wiring. Not noticeably absent but probably the weight killer is minor hardware like controller mounts, switches, etc. I think we will need to take about 2-3lbs off of our current configuration to meet a 50lb target. Otherwise, 53lbs is the weight of one of Cap Kart's old lead-acid batteries, which was also a potential target. I would not be disappointed either way.

Onward...

Thursday, July 21, 2011

tinyKart: Round 2

Round 2 is all about putting together the steering things:

These things.
But first, armed with many more t-nuts, we finished putting together the lightweight 80/20 frame:

It's more like 0.75-scale kart.
Next up, pressing 1/2" ID bearings into the steering reinforcement wings, a.k.a. the "cool parts":



Easy so far. The moving assembly includes a front wheel, brake disk, brake caliper, and a control arm (not shown in the above picture because it's between the chassis plates). To hold all of this together, there's a little bit of 1/4" plate jigsaw puzzling:


The control arm doubles as a support for the lower thrust bearing. It, and the upper thrust bearing support, slip (press) into what would normally be called the upright, if it wasn't so short not-upright. I'll just call it the shaft mount. Then, three 4-40 screws pass through the shaft mount, the upper thrust bearing support, the shaft mount again, and finally thread into the control arm.

Like so.
I guess I forgot one important step (in real life, too, the first time): First, the 1/4-20 cap screw that threads into the front wheel shaft must be in place, with its head in the relief cut in the top and bottom thrust bearing supports. So far, so good.  To properly align and stiffen the thrust bearing supports, three countersunk 1/4-20 screws with plastic spacers pass from top to bottom:


The image above also shows the brake caliper mount. The brake calipers will need some shimming, but they're at least located to within a few millimeters axially. No major machining or design mistakes there. Finally, we attached the front wheel shaft. This requires removing one of the screw/spacer combos and shoving a hex key in between the thrust bearing supports. It's kind-of a pain, and we don't want it to come loose ever, so we Loctited the shit out of it.


After the two front wheel assemblies were together, we had to ream the kingpin holes since (a) they were undersized to begin with and (b) there's nothing really aligning the top and bottom thrust bearing supports. Luckily, we bought a 0.499" reamer two years ago for reaming BWD's stators, and it hasn't disappeared.

MillKart
The kingpins were quickly fabricated from 1/2" 7075:


The result is a tight fit to the 0.499" hole, but not so tight that you can't force it back and forth with a rubber mallet. And it's a slip fit in the two "cool part" bearings. Those are the radial bearings that support the bending load on the kingpin, but there are also two needle-roller thrust bearings:


And then the top plates complete the sandwich:




The end result is a nice, stiff steering pivot with radial and thrust bearings on top and bottom.The frame passes the "stand on it" test, though it is a little more flexible than I thought it would be. We'll see how it changes with the added structure from the seat mounts. Total weight of the chassis so far is 21.5lbs. Still have the entire powertrain to add. The good news is that the controllers are a bit lighter than expected, so 50lbs still seems within reach.

Next up: steering linkage, motor mounts, and controller testing.

Monday, July 18, 2011

DirectDrive v1.0: 2.4kVA Test

After my ducted fan load tester turned out to be basically unworkable, I decided to go back to lower-RPM motors. This way I'm not simultaneously testing the controller's basic functionality and the ability of my FOC algorithm to handle greater than 1,000Hz electrical frequency (it can't).

The first candidate: a re-wound and sensored Turnigy 8085-170 motor:


Well this pretty much didn't work at all. There's some issue with the sensors that makes it sound horrible, and also it's too small to be able to sink a lot of power internally.

I decided to stop when the hot glue holding the sensors in started melting.
Anyway, that was just a little distraction before the real show:

Eeeeeteeek.
The Mars PMAC (brushless Etek) is probably my favorite load-test motor. It's so big that you can't really hurt it, at least not in the time scales of a bench test. I put the DirectDrive controller on its edge to give the heat sink a tiny bit of natural convection, but no active cooling for this test. I wanted to see the temperature rise. Nice, steady temperature rise, and no spontaneous FET destruction.

Now here is where it gets interesting. Short of coupling it to a second Etek, there's not much I can do to apply mechanical load to the motor. (At least with the ducted fan, I had a way of doing so.) So, instead, I brought the motor up to speed under ideal timing conditions, i.e. manipulating the phase of the drive voltage until the current draw is at a minimum. Then, at nearly full voltage amplitude, I threw the timing way off so that the motor begins to draw 100A (phase peak).


And I let it sit that way for one minute. The phase voltage is a sine wave with an amplitude of 16V. The phase current is a sine wave with an amplitude of 100A. But...they're not in phase. So the real power is still low, but the apparent power is 2.4kVA (1.5*100A*16V). The good thing about this load is that it can all be run off a bench power supply, no need to break out the giant batteries yet.

But is it actually a representative test of the controller? It doesn't really test anything outside of the bus capacitor, where the DC current is determined by real power only. But what I'm still not sure about is how it looks to the inverter itself. Here's what it comes down to:


The RMS current is the same regardless of the phase angle. The only thing that changes is the phase of the sine wave that the duty cycle traces out. But, the MOSFETs are still either blocking 36V or carrying their share of the current at any given instant. It makes sense, then, that both the conduction losses and the switching losses should be the same regardless of the relative phase of the current with respect to the duty cycle. Anyone care to confirm or refute this?

If that is the case, than I'm happy with the test results. A minute of running at 100A with passive cooling yielded a temperature rise of 15ºC. I would guess that the heat sink mass is about 0.25kg. If it was mostly just absorbing power (with no active cooling and very little temperature gradient, this is true), then a quick estimate of the power dissipated in the inverter is 24W, which is exactly where it should be for 100A.

More testing to come.

Friday, July 15, 2011

DirectDrive v1.0: First Three-Phase Tests

After provisionally solving the first big problem with DirectDrive v1.0, the current sensor coupling, it was time to port my three-phase brushless field-oriented control software over and do some testing on an actual motor. I decided not to bother with Pneu Scooter's hub motor, since at most it could handle 750-1,000W for a short period of time and I'm looking to hit 5-10kW peak. Though really it would be a better intermediate step than what I wound up using...

Nothing about this seems like a good idea now.
"Isn't using an electric ducted fan to load test a motor controller a great idea? It can sink tons of power and it cools itself!" Well, that was the original thought anyway. This is the giant 120mm EDF from Hobby King, which can produce upwards of 4kg of thrust (the same as KM Scooter's eight blower fans...combined). They're meant to be used in model jets, but you could probably do other things silly things with them if you wanted. I bought one specifically for load testing, since they're only $43. Mine uses a this 4030-1100 motor.

With this load tester, I thought I would try something new for sensing rotor position. I printed out an optical encoder disk with eight black and white segments, which I double-side taped to the back of the motor:


And I used a three-phase set of infrared optical reflectance sensors to pick up the signal:



These mimic the function of the Hall effect sensors I would normally use in this application. They differ in a few important and annoying ways, though. For one, they are analog sensors, producing a variable voltage in response to the relative reflectance of the surface in front of them. To get them to act as digital inputs, I have to set them up with a 10k pull-up resistor and put them at about 4mm from the encoder disk. Then, they produce a 4Vpp square-ish wave. But with a 10k resistor, the normal RC filter I would use on the Hall effect sensors won't work, so I had to swap it for one with lower capacitance. The net result is a sensor signal that is less precise and more vulnerable to noise than Hall effect sensors would be.

Back to that in a minute. First, I made the awesome copper heat sink a more permanent feature by drilling and tapping 4-40 mounting holes for it:



Notice that I still have the wires coming straight off the board in the direction that minimizes coupling of the two Hall effect-based phase current sensors. I set up the load test rig on what has become the Table of Load Test Rigs:

Notice the face-to-face dynamometer in the background.
The software on my laptop might look familiar. It's the same GUI and data logging setup I used for Cap Kart and Pneu Scooter - very handy tool. One thing that's nice about DirectDrive is that, for whatever reason, it doesn't cause my USB port to freak out when it's under load. So far I have not had to use the XBee radio to collect data.

I somehow managed to get the right sensor and phase combinations on the first try, and was happy to see that  the motor spun up nicely. The current sensors, temperature sensor, and other bits and pieces seemed to be working properly. But the motor was drawing way too much current, even no-load (with the fan rotor removed). By that I mean it was drawing almost as much current with the fan as without. Now, this is a load test, so in some sense that's good, but I would prefer the majority of the power to get dumped into the air, not the motor.

After a day of debating (grad student-ing), I decided that the most likely cause was the shady optical sensor rig. On a hunch, I took the data I had collected from the test run and did a histogram of the sensor states. There are six: 001, 011, 010, 110, 100, and 101. If everything is working properly, they should all occur with the same frequency.


If instead your sensor histogram is giving you the middle finger, well then you know you have issues. You can even figure out what the issue is with a little bit of logic:


The top set is what the sensor signals should look like if things are working properly. The bottom set has Phase A shifted left a bit. The result adds time to states 3 and 4 and removes time from states 2 and 5. And guess what:

That was exactly the problem.
I was able to tweak the position of the Phase A, and it definitely helped, but I think the motor still draws a lot more no-load current than it could if the sensor timing were more consistent. The edges of the square waves are also pretty soft, and I'm relying on the input pin Schmitt triggers to make it work. It only gets uglier at higher speeds.

Speaking of high speeds, there is another reason why this is a stupid load test. Thus far, the fastest motor I've run with my FOC code is the 40,000rpm 2-pole inrunner from my RC car. But at those speeds, the rotor position estimate starts to become imprecise and unreliable. Now this is a 20,000rpm 8-pole outrunner. The electrical frequency is over 1,000Hz. Trying to fit a sine wave at 10kHz onto 1,000Hz is almost useless. High speed FOC is an interesting problem, but not one that I want to solve simultaneously while load-testing a brand new controller design.

So, sadly, I may have to abandon my new load tester. It can get to high currents, since the motor has such a low resistance. De-tuning the timing by even a few degrees in either direction causes the current to quickly shoot up, even at low speeds. So I ran it at 50A, and nothing seemed to mind, but it's 50A at something like 6V output instead of the 50A at 40V output, which would be a much more interesting test. Unless I can get the fan rotor up above 10,000rpm, which isn't going to happen easily, there's just no way to get any power through it.

Time for a new plan.

Tuesday, July 12, 2011

tinyKart: Round 1

By popular demand, more picture of crazy vehicles, and less math:

Extrude...thin feature...mid-plane...
That's the size of tinyKart. So I don't know, maybe it's not really in the tiny class, more like miniKart. But whatever, we'll still call it tinyKart since it's going to be 1/5th the weight of Cap Kart.

Step one in the tinyKart fabrication adventure is the acquisition of a large amount of waterjet-cut aluminum plate. The front half of tinyKart is a sandwich consisting of two 1/8" plates with 1" 80/20 t-slot extrusion in the middle. In addition to this, the rear frame, motor mounts, steering system, and brake caliper mounts are made of a combination of 1/8" and 1/4" aluminum plate. None of the waterjets that I have access to can handle 30" lengths of plate, so the entirety of the plate stock was sent out to the Big Blue Saw. A week or so later,

Kit Kart!
It's always fun to see your 3D model almost instantly become a real thing.

Maybe we'll get in the 80/20 flipbook again.
The only problem is we ran out of t-nuts. But the frame is together enough to get a feel for the size. It's a good deal smaller than Cap Kart, but it doesn't look tiny. In other words, a reasonable person would probably call it a go-kart, not a tinyKart. But whatever.

The motors also arrived, so of course I took them apart:



I was a little disappointed, but not really surprised, by the overall construction quality. The magnets, which are the source of most of the negative reviews for this particular motor (Turnigy SK6374-170), actually seemed to be pretty well glued. But the windings are very loose and in fact on a couple of the motors, one or two strands of wire were sticking out into the air gap. So while the motors were open, I took the opportunity to epoxy all the windings in place. I also tested the resistance, and they were all right around 23mΩ, line-to-line, which is a lot lower than the specs say. And there were no shorts, so that's good.

The next order of business was to machine the shafts, which Max, et. al., made short work of:


These shafts are made of 6061 aluminum and the entire weight of the kart and driver are transmitted through them. They start as 3/4" stock and are turned down to 17mm to fit the special replacement bearings for the 8" scooter wheels we're using. The rims get sandwiched on and the shafts are bolted to the chassis with a single 1/4-20 cap screw.


The load carrying capacity of this configuration has been verified in simulation and also by the more scientific method of jumping up and down on it:


The rims needed only minor modifications: For the rear wheels, the brake mounting threads were machined off to make the overall width of the kart as small as possible. For the front wheels, the drive pulleys were machined off to save a bit of weight:



And the last little bit of machining for Round 1, boring out the steering reinforcement plates. These are the 1/4" plates that hold the bearings for the steering kingpins. They are probably the coolest-looking parts of the front frame. I decided to bore them out all at once, which Charles and I decided was a 2 on the scale of bad ideas from 1 to Eating at Bullet Train:

Turned out fine.
Here's the frame at the end of Round 1:


It's certainly come a long way since the tape version on the floor. But there's a lot more work to be done on just the mechanicals, including all of the steering system. To get a quick estimate of how we're doing on weight, I hung the frame and a box of many of the parts that are to go on it from my favorite shady hook scale:



17.63kg, or just under 39lbs, including the batteries and motors, and the weight of the milk crate.. What's missing is only the seat, four tires, the two motor controllers, the steering column and wheel, the brake cables and lever, and any other miscellany that we decide we need. So, 50lbs looks tough but still possible.