Friday, October 28, 2011

Strobe Attack

The bad thing about having tinyKart around is that we will just keep driving it until something breaks.


Besides drifting the tires off, the only reliability problem I've seen so far with tinyKart is the motors. Electromagnetically, the Turnigy SK-6374-170's are very good. But mechanically, they suck. We already had to replace the left motor at Maker Faire because the entire rotor was loose and would shift axially until the motor locked up. Last week, the right motor suffered the same fate.

Additionally, the outside rotors are out of balance and the sound like they are going to detonate at full speed (7,500rpm). The vibrations are so bad that the entire kart needs to be clamped to a table to do a no-load test, lest it resonate like the giant aluminum flexure it is. And I'm sure all that vibration would eventually lead to more problems.

tinyKart was originally designed with the larger "melon-class" 80mm motors in mind, but the 63mm "grapefruit-class" with KBS36101 controllers is a better match for its size, weight, and performance. When we built it over the summer, the SK-6374-170 was the only 63mm or 80mm motor in stock, so we didn't have much choice. (Well, okay, we could have dropped $360 on Hacker A60's...) But now there is a new line of inexpensive Hobby King motors called SK3, and there are quite a few 63mm ones:

SK-6374-170 (left) and SK3-6364-190 (right).
They look very nice, and the construction quality is definitely improved. The SK3 has a large radial bearing on the shaft side of the rotor, making it far less prone to shaking itself apart violently at high speeds. It should also help better-constrain the rotor axially. My only real problem with the SK3 63mm motors is that they are not actually 63mm:


The outer diameter is 59mm. The stator is proportionally smaller. And because of the can bearing, the active length is reduced as well. The shaft is also smaller: 8mm instead of 10mm. They don't look much different in the pictures but if you held one in each hand you'd clearly be able to tell that the SK3 is a shrunk-down model, probably to cut materials costs while still passing it off as a 63mm motor.

All of this I would be fine with if it was as good, electromagnetically, as the old SK. But the first indication that it is not is the line-to-line resistance: 37mΩ for the SK3-6364-190 as opposed to 23mΩ for the old SK-6374-170. Normally, it wouldn't be fair to compare a 190rpm/V motor to a 170rpm/V motor. But in my testing, the old SK actually was closer to 190rpm/V anyway, so they have virtually the same back EMF constant. So, for a given amount of current, you get the same torque from each, but the new SK3 generates 60% more heat.

Maybe it's not a big deal. After all, the comparable Hacker A60 is 59mm and 32mΩ. Even at 37mΩ, the power lost to winding resistance at 80A is only 237W per motor, or about 10% of the peak power input. If, with more robust motors, the speed can be increased past the 75% please-don't-blow-up limit its been at so far, the peak power might even go up. And tinyKart has never had motor overheating problems. So, it's worth a try. Swapping motors will mean changing the pulleys to 8mm bore, but that's easy. The bigger problem is the Hall effect sensors...


Because the can diameter is 4mm smaller, the sensors are now 2mm farther from the rotor can. They're already relying on the small amount of field leaking out of the side of the can, so every millimeter counts. It turns out they have no trouble picking up the field from the larger distance and I could still time the motor in the normal way. 

But, reverse sucks.

When timed correctly for forward commutation, the reverse is awful. I didn't recall this being the case on the old SK's, but a further test with them confirmed that forward and reverse have always been asymmetric. The extra distance between the sensors and the rotor can, and possibly a thicker rotor can on the SK3, seem to exaggerate the problem. I wasn't 100% sure it was a sensor problem, though. So, I went to borrow a strobotach from the Edgerton Center:

Borrowing a strobotach from the Edgerton Center is kind-of like borrowing an airplane from the Wright Brothers Museum...
This strobotach is an old-school box of vacuum tubes with a giant dial that can adjust the strobe rate. One way to use it is to point the strobe at something spinning at a constant rate and dial the knob until it appears to stop moving. Then, you can read the rpm off the dial. But, I was interested in using the external trigger, which flashes the strobe in response to an electronic signal. I tied this in to one of the Hall effect sensors. The signal bias is 54V for some reason that I'm sure has to do with the vacuum tubes, so I had to make a quick transistor trigger circuit so it would run off the 5V Hall effect signal.


To make a position indicator on the rotor, I passed a fixed current into all six permutations of phase wires and put a tick mark on a piece of yellow tape at whatever fixed position the most was held at by the current. I used three different color tick marks, for A, B, and C phase. There are seven ticks of each color around the motor, since there are seven pole pairs.

The strobe makes it very easy to see where the Hall effect sensor is firing, in forward and in reverse, as well as the physical effect of moving the sensor mount:


The strobe aliases with the video camera's frame rate a bit, but you can definitely see the tick marks. Here are still pictures of the forward and reverse case as well:

Forward.
Reverse.
I had already timed the motor to run properly in the forward direction. So, in forward, the Hall effect sensor (and the strobe) fire almost exactly on a fixed-current motor position (green). A long time ago I convinced myself that this should be the case. But, if it's firing on green in forward, it should be firing 180º electrical out of phase in reverse, or, somewhere about halfway between red and black. Instead, it's firing on the wrong side of black, about 70º away from where it should. The reversing problem is definitely a timing issue, then.

I tried a similar experiment with the old SK, for which the gap between the sensors and the rotor is much smaller, and the reverse mark was still offset from where it should be. But, it was better. Probably enough so that the SK would actually run in reverse, if not happily. I also tried making a flux-concentrating extension for the sensors:

i.e. I glued cap screw heads to the sensors.
This also brought the reverse mark closer to the correct position, but it still was offset by about 60º. I think the problem is due to the Hall effect sensor hysteresis (about 8mT for these sensors). If the field outside the can is weak enough that the total swing is only, say, +/-20mT, then the hysteresis will have a huge effect on the forward/reverse timing.

I could try getting the sensors themselves closer to the rotor, which I think will be better than gluing cap screw heads to them existing ones. I could also try more sensitive Hall effect IC's with a small hysteresis band. Of course, I would not want to have to make bunch of acrylic ones to test all this. Luckily...

Tuesday, October 25, 2011

Melon Checker: Now with more fruits.

I've updated my Hobby King large motor inventory checker:

http://web.mit.edu/scolton/www/aremelons.html

Previously it had only the three "melon"-class motors, so-called because at 80mm OD, they are roughly the size of melons. (So called by whom? What kind of melons? Not watermelons...) These motors haven't been in stock at Hobby King in quite a long time, though they are starting to pop up in other places.

But there are other large motor candidates that are interesting to keep track of, including the brand new shiny SK3 line, which is the new "grapefruit"-class of 63mm motors. Somewhat dissapointingly, the SK3-63xx motors are actually 59mm in outer diameter. (The old 63xx grapefruit-class motors were truly 63mm.)

That said, tinyKart's older-model SK-6374-170 motors are falling apart due to poor construction and lack of a large radial can bearing. (And unrelenting abuse...) I will try replacing them with SK3-6464-190's I bought for a potential tinyKart swap a while ago. They have a  can bearing and should be able to run to higher speeds without shaking themselves apart. They also weigh 1/3lb less, each. But, they have a higher resistance (37mΩ as opposed to 23mΩ), so they will generate more heat and/or less torque. Testing to come soon...

In the large motor category, there is also a durian class and a guava class that are relatively new and nicely-built. If you're interested in inexpensive RC plane motors that can be re-purposed into electric vehicle traction applications, this consolidated inventory list might help you choose.

Wednesday, October 19, 2011

Okay, tinyKart frightens me now.


So it turns out tinyKart was hiding something...


...and by something I mean about half its full power. I know I've had nothing but good things to say so far about tinyKart, but somehow I think I underestimated it. tinyKart. Kicks. Serious. Ass. We need to make more of these things right away and race them against each other.


tinyKart was the Edgerton Center Summer Engineering Workshop's 2011 project. It's an ultralight electric go-kart, something I've dreamed about ever since Cap Kart. The total weight is 55lbs, it fits in the trunk of a car, and it has a trigger throttle. We took it to Maker Faire NY a few weeks ago, and it was a lot of fun. 

But it seems this entire time it's been operating with at least one powered-back controller. The left side Kelly KBS36101 would give a "frequent reset" error and, at high sustained load, cut out entirely, leaving the kart with half power. The right side would also give errors occasionally, but rarely cut out. Then, I tried the parking garage climb and both sides cut out at full throttle. I was getting ready to ditch everything and put in my own controllers.

I guessed that the problem was bad sensor timing. I've seen it before on KBS controllers. The timing is off enough that the drive voltage and back EMF don't match up, leading to current spikes that trigger the controller's protective features. It's exaggerated by the low inductance of the brushless airplane motors. So, I went to carefully re-position the external Hall-effect sensors...


...or actually the entire sensor mount just disintegrated because I failed to remember that Loctite and plastic parts do not play nicely together. For now, I had no choice but to make a new one and forgo the Loctite, but for the future I am switching over to PCB-mounted sensors:


In addition to fixing the sensors in the correct positions and providing for up to 60º (electrical) of adjustment, the board also has a pair of jumpers which can be used to swap two sensor leads, for easy reversing. Much better than having to dig through the software, anyway. These are the first PCBs I've attempted with internal routing, in addition to the curved outside shape. It was a good opportunity to try out MyRO PCB, since Advanced Circuits does not allow internal routing on their $33 Each or Bare Bones deal. (Advanced Circuits' $33 Each deal does handle complex outside dimensions, though, as evidenced by the so-named 4pcb quadrotor.) I've dealt with MyRO before, and it seems okay. So I ordered six of these boards in a tab-routed panel...

...at least, I think I did.
The process I use for "timing" the motors is pretty simple. I set the throttle limit on the Kelly controllers to 30%, so that I can tune the sensors at a reasonable wheels-up speed without much frame vibration. Then, at max (30%) throttle, I move the sensor mount by hand within its 60º (electrical) of adjustable range until the current going into the controller is at a minimum. If the minimum is at an extreme of the adjustable range, I swap motor leads and/or reverse the direction of commutation and try again. 

Minimum current means the back EMF and drive voltage are as close to in-phase as possible. (At no load / assuming zero inductance, blah blah blah.) With the new acrylic sensor mounts, I did this quickly with my clamp meter, then reset the max throttle to 75% (because the controllers and motors may or may not explode above 40,000 electrical rpm.). 

And...well, a new tinyKart was born, apparently. One that is much more evil than the original one. It will happily give full power on both motors now, right up to the motor current limit (80A per side) or the battery input current limit (60A per side), or the maximum throttle (75%), whichever is lower. It accelerates as fast as Cap Kart and might even hit the same top speed if not for the throttle limit. No more play toy...it recorded a peak input power of 4.1kW on the hill climb. And the motors only eat about 200W each to heating at that power, so it's probably putting out very nearly 5hp now.

With the new, scarier tinyKart, I also took the opportunity to re-balance the two front disk brakes and change the steering ratio to give more travel on the steering wheel, and hence more mechanical advantage over the wheels. As if we had actually planned ahead, this only involved moving some pin joints to pre-drilled adjustment holes:

Drive link gets shorter by moving the ball joints closer to the steering column...

...and follower link gets longer by moving the pin joint away from the kingpin.

The length of the tie rods also changes, but that is adjustable by nuts on a threaded rod. I don't think it could have been any easier.

After that, we took it back to the parking garage (along with some other things) and the video above is the result. With 5hp available, narrow drive wheels, and low-traction parking garage concrete, it would happily lose grip coming out of turns, even while hitting the uphill slopes. That was a little surprising. But what I find amazing is that it actually happily re-finds grip as well. It does what I would expect a go-kart to do when I steer against a drift and adjust the power. This thing that we built with 80/20 and McMaster parts behaves the way I think it should, presumably from some experience driving real go-karts... I like it.

Sunday, October 9, 2011

Singapore Post

I was in Singapore again last week for the Singapore University of Technology and Design's first ever Open House.


When I went to Singapore last year, SUTD had just the two upper floors of a Chinese language school, mostly for administrative offices. Now, it has fully moved in to the interim campus, part of the ITE Dover Campus. We built up a small workshop ("the shed" or Gecko Works) at the interim interim campus, which has now been transplanted to a room at the interim campus:


It was cool to see the shop space I helped put together actually being used by future SUTD students and faculty to work on projects. I was expecting the interim campus to have a full shop, since it was formerly part of a technical institute, but it seems Gecko Works is still the primary fabrication space for SUTD. That makes our trip last year seem like a pretty good investment of time, actually.

As you can see in the above picture, Charles and I significantly increased the number of moving vehicles on campus, as usual. But in fact, some of the future SUTD students have been forming an Electric Vehicle Team of their own, using an electric bike we got from MKP Bikes last year as their first vehicle. It's been converted to a chopper bike, and now runs on a frightening amount of lithium polymer battery. You can see it towing half of the SUTD student population here:



Also featured in the video above are a fire ant-motivated top speed test of Pneu Scooter and Charles taking RazEr Revolution's name literally.

Pneu Scooter's officially-measured fire ant-induced top speed: 21mph.
Pneu Scooter actually took its very first test drive in Singapore last year. I finished building the frame and began testing on my 3ph v3.x line of controllers during my last trip. Unfortunately, the v3.0 controller had serious electrical noise issues, so I redesigned it when I got back and wound up with the v3.1, which has been ultra-reliable for almost a year now...

...and then two of them broke on this trip. I don't really know what happened since both times it was being ridden by someone other than myself. (Not that I would know what exactly caused the failure if I was riding it, but I could at least eliminate some possible causes.) My theories are:
  1. The ambient temperature in Singapore is just that much higher than it is in Boston, and the FETs failed due to thermal overload after basically racing it around all day.
  2. Since replacing the rear wheel a few weeks ago, the motor timing had shifted enough to cause commutation failure, leading to a destructive current spike.
I would weight theory #2 a bit more heavily since both controllers (the original and the spare) had the same phase fail. In any case, having burned through even my spare controller and having neglected to pack an extra IXYS module, I went back to MKP Bikes for Plan B: an off-the-shelf e-bike controller similar to the one I used in Singapore last time when my controller also failed. With that, I was able to get through the Open House. When I got back to Cambridge, I promptly changed the FETs on my controller:

Precision MOSFET removal tool.
All the gate drive was in working order, which is unusual after a FET failure. I re-timed the motor and have been riding it around with no issues, so I still have no idea what the problem was. I am going to pretend that nothing ever happened. But I did buy all the GWM100 IXYS modules remaining on the internet.

Scootering around at the Open House was not the only thing I did in Singapore for a week. Earlier, we visited a place called evHUB, which is a Singapore-based electric vehicle conversion and R&D house. They  have a somewhat hidden EV showroom/dealership with the name FSG Mobility Concepts, where I continued my trend of finding Tesla Roadsters scattered around outside the US.


In addition to the Tesla, FSG also carries the YikeBike. Rather than dedicate a paragraph of this post to describing the YikeBike, I'll just put in a video of us attempting to ride it:


I think the evHUB crew had an easier time learning how to handle Pneu Scooter than I had learning how to ride the YikeBike. Also the YikeBike is more expensive than Pneu Scooter by about the same ratio as the Tesla Roadster is to the YikeBike. So I'll stick with the kick scooters for now.

I also brought over 4pcb, my mini PCB quadrotor. It still doesn't fly spectacularly, but I wanted to bring it because I was meeting up with Ali S. to see his somewhat larger quadrotor in action...

Recursive quadrotors...
The exhibition hall actually turned out to be a perfectly reasonable place to fly a mini quadrotor and a perfectly suicidal place to test the one with 10" blades. For that reason, the mini one got a bit more air time. Here it is taking a few short hops:


It still needs work. After returning, I replaced the one weak motor and it at least hovers level now. But at some point in the near future I will replace the IMU with a different board. Not because I think it will necessarily handle the vibrations better, but because I am just sick of dealing with this one. And because Sparkfun doesn't make this one anymore.

I also got to visit most of my favorite Singaporean hobby shops and industrial centers. (I am such a bad tourist...) So overall, another successful trip to Singapore. I don't know how frequently I'll be going back, but I'm sort-of used to the climate and I seem to have a system for dealing with jet-lag. (I just sleep for the entire 25-hour set of flights.) Soon, there will be actual students and classes at SUTD, so maybe I'll go for an entire semester next year.

Because clearly this is my type of university.
For now, though, I have resolved to stop doing anything resembling a demo/expo/faire/whathaveyou for at least a few months. For one, I'm tired of answering misinformed technical questions from the slightly-more-tech-savvy-than-general public. I might just sound cranky but there's only so many times you can explain that MEMS rate sensors are not the same as flywheel gyroscopes without going crazy. Secondly, I am tired of having my vehicles turned into amusement park rides and then having to repair them after every event. And most importantly, I don't actually get any work done on new projects when I'm constantly exhibiting old ones. It's fun, but I need a break, so no more demos until at least IAP.

Now, what was I working on?...