Archive for April, 2012


Hub Motors on Everything: More Chibikart Motor and Frame!

Apr 16, 2012 in Chibikart, Project Build Reports, Reference Posts

hi here is a chibbi kart

….okay, so only sort of, but it’s RIGHT THERE!

I have a newfound respect for 80/20. I’m not sure why I’ve never used it before – possibly because I thought it was immensely expensive (the material isn’t too bad – 1 x 1 is on average $20 for 6 feet [1]) and heavy (which is kind of true). That whole frame came together in around 2 hours net work time, which really means like 4 hours with the amount of MITERS ADD I tend to have. Whats’s expensive about the system isn’t the extrusion, but the accessories – slot nuts, for instance, tend to be $8-10 for 50, and little specialty things like hinges or plate fasteners are way overpriced for what they are. I guess it’s like selling printer cartridges and glossy photo paper to make up for the money that selling printers doesn’t earn. Fortunately I’m in a position to generate my own random interface hardware, like the corner joists.

While a fully t-nutted plate frame of the type I typically make would have gone together faster, it would have been far more expensive (necessitating me buying 4 foot or 3 foot plates of aluminum) and not nearly as adjustable.

Here’s a closeup of the underside of the seat. I discovered that the seat mounting bracket was more like 6″ across than the 5 7/8″ specified, but all that entailed was untightening the two mounting rails and moving them 1/16″ further apart. The seat mounts are 3/8″-24 cap screws – overkill under any circumstance except, you know, the seat coming with those.

And the pedals are now mounted too. It’s beginning to look like something!!!!!!

The adjustability of 80/20 slot nuts were very clearly illustrated when I found the CAD model’s seating and foot rest arrangement was “ergonomically incorrect”. The seat is further forward than its surplus website image led me to believe. Solution? Slide the seat back 2 inches and the foot rest forward an inch or so!

The steering wheel, while still for show, is probably going to be final since I still haven’t moved on buying anything to replace it…

A closeup of the placement changes – reference this drawing. In total, things have moved maybe 3 inches further apart. While Chibikart is clearly not for anyone who is not short and Asian, I will say that this still made a ton of difference in terms of comfort.

back to hub motor work

Last time, I test wound one of the stator teeth for Chibikart’s hot-modded Skatemotors. With that in mind, I now needed to mate the copier motor stators to the center shafts.

While in the 100mm skatemotors’ original designs I had called for a plastic (3d printed, injection molded, what-have-you) hub with an integrated “key” to rotationally constrain the stator, I opted for a little bit of machining time and made some aluminum sleeves with key slots cut through them. Nothing goes into the key slot, but the idea is that the OD of the sleeve is very slightly larger than the stator bore such that pressing it into the stator causes the open slot to compress a little, also gripping the inner shaft in the process.

This worked great for 3 shafts. The fourth was…. a little special, but nothing some Loctite 609 couldn’t fix. With the operation complete, I now have four hub motors ready to wind….


…crap, I actually have to wind it now?

Also seen above is my choice of retaining for both the stator hub and the can bearings. Those are “low profile retaining rings” for 15mm shafting. On each shaft is an inner and outer set of grooves – the inner set is for holding the stator, the outer set for spacing the bearings exactly apart. This system is one that I enjoy so far – the design change from “weird double sided machined stepped shaft” is welcome, and makes the shaft much easier to manufacture. In fact, it’s designed to be the cross section of stock 15mm metric keyed shafting if I need to poop out a few more; the dominant philosophy being if I can make it on a manual machine in 10 minutes, it will take a CNC lathe like 30 seconds.

The center threaded bore was also drilled out for a 1/4″-20 clearance hole, since I will be bolting the shafts to my axle anchor blocks and running them under plenty of preload.

winding and characterizing the motor

I have to do this eventually, so here goes….

…wait! First, I was curious about these copier stators. They have 3 little ‘toothlets’ on each main tooth, presumably so the motor can act as a stepper motor with finer resolution than flat-topped teeth. There were two downsides to this design which makes it a little suboptimal for hub motor use – the raised ‘toothlets’ vs. the valleys between them meant that the effective average airgap between stator and magnet was larger, resulting in less poorer flux coupling (less torque), and the arms themselves were kind of wimpy and thin in cross sectional area compared to the ends of the teeth, meaning they could saturate when the permanent magnetic field and the stator field aligned (i.e. less torque).

So I used FEMM analysis software made a test winding that was representative of one phase – 36 turns per tooth, four teeth wound.

This technically doesn’t have to carry any current, so easy one strand windings were used. The magnet wire was just run straight out through the slot.

Next came the fun part:

MACHINING THE MOTOR WHILE RUNNING! Like the age-old East Asian practice of consuming living seafood, machining the motor while it runs is a….

… just kidding, this is Lathe-o-mometer. While I have done drill-o-mometer and ever air-die-grinder-with-an-R/C-car-wheel-o-mometer with previous wheelmotor iterations before, the BRAND NEW MINI-LATHE IN THE IDC MINISHOP!!! is a speed-controlled and stable fixture.

The *-o-mometer procedure is to view the back-EMF waveform of the motor on an oscilloscope while it is being spun by an external speed source. The exact shape of the BEMF, and hence the motor’s potential future torque-producing-hub-like behavior, can be deduced from the peak-to-peak voltage and the measured AC frequency. That is,

I set the scope to average a whole bunch of readings (namely 16)  once the lathe spindle spun up to ‘cruising speed’, so the result is a clear snapshot of the BEMF of one phase. And….. what the hell? Why is it triangular? These things are supposed to be trapezoidal. I know a triangle is like a trapezoid with no flat top, but this is ridiculous. Anyways, the “stairstep” ripple in the waveform is the little toothlets of the stator making themselves visible.

One phase doesn’t tell me very much, besides my motor is not totally bullshit. In a typical BLDC motor, two phases are driven at any one time. So to really get the whole picture, I’d need at least 2 of the phases wound. So I did!

At first, though, I managed to wire up phase B backwards – hence creating a motor which mostly canceled itself. Oops.

That’s more like it. The measured line-to-line voltage is approximately 60 volts, which really means a differential voltage of 30 volts across the two phase leads. This problem has confounded me for a long time, but I only understood why it happens very recently – the scope treats a single-ended measurement as a deviation from zero volts, and its own ground is defined always as zero volts. So even though -30v to 0v and +30v to 0v are both 30 volts differential, the swing of -30v to 30v is “60 volts”. If I had used 2 channels and a true differential measurement (ch1 – ch2) with a common ground, then the waveform would actually be 30 volts peak to peak.

The other important number is “203.3 Hz”, which is the electrical frequency of the motor.

To convert 30 Vpp and 203.3Hz into a useful motor torque constant value in V/(rad/s), I multiply 203.3Hz by 2*pi to obtain a value in electrical rad/s, then divide by 7 to obtain a value in mechanical rad/s (because in a 12 tooth / 14 magnet motor the electrical speed is 7 times the mechanical speed). Then 30v is divided by mechanical rad/s to yield V/(rad/s), and the magical number is…  0.164 V/(rad/s) or Nm/A.

This was pretty promising – 0.164 might have been quite a ways off from the original estimate of 0.23-0.25, but at least it 1. wasn’t outright terrible and 2. showed to me that the stator teeth were not saturating all over the place.

With the motor characteristics verified, it was time to beast the windings:

oh god it looks cancerous

Okay, I give up. Hobbyking, how the hell do you guys do this?

While I thought previously that 36 turns was a reasonable count, that test was done on one tooth, very neatly and patiently arranged, and compacted at the end. It turns out that this is not always possible to do with adjacent teeth, and once the turns pile up even a little bit, the destruction of order is very rapid. This stator shows clear signs of “hobbykinging” in the second sense – the windings almost falling out of the slots because they have been piled so messily during the process.

Really, I was able to stuff only 36 or so turns onto 2 teeth on phase A. Everything else is probably 33 turns or so – I some times could not fit the last few at all. I might have to either rethink the hex-28 gauge winding scheme or reduce the turn count officially (sacrificing Kt even more), or just have more patience while winding. We know the latter isn’t going to happen, so I’ll have to go back to playing with other wire sizes. What’s distressing is that the stator is pretty much totally filled out – I’m not sure what single-strand big wire size will get me the same level of turns.

Nevertheless, I pressed forth with terminating this stator. There’s absolutely no hope of ever installing Hall sensors in these windings, so I’m going to pray to Motor Jesus that Jasontroller can start these under load.

I once again took a page from the ICBM (Inexpensive Chinese Brushless Motor) Design Book and just heat-shrunk a section of my magnet wire pigtails to use as main motor leads. Soldering real wire inside the motor takes up previous space that I’m not certain exists in this design. The “star point” was made by running a small length of jumper wire (the red wire) between the endpoints of the phases.

And once I packed it back up inside the skate wheel, here it is back on Lathe-o-mometer and…. wait, did it get worse? Now it pumps 30 volts but at 277 Hz. That’s a performance decrement of over 36%. This is probably caused by my inability to shove the proper number of turns onto the stator in real life.

This new measurement results in a Kt of a little over 0.126. Sadness :(

The resistance of the motor from line to line came out to be about 450 milliohms – I predicted about 400, so this is good to see. However, this could still be too much – say I am running at 20 amps – I’m still losing ((20 amps)^2 * 0.45 ohms) watts to heating! The motor is not going to last long at all being a 200W heater.

But at least it sounds and looks great!

I’m probably going to pull out the Excel spreadsheet or MATLAB script and run some possible combinations of turns vs. wire gauge vs. paralleled strands to see if I can get a reasonable combination of torque production and low core resistance. However, physics constrains me significantly – as packed as the slots are, my losses on average are going to remain the same no matter what. The only thing that will result in more crank is packing more copper into the slots.

The 100mm skate wheel motors have always been underpowered for vehicle moving, but here’s hoping they work out!

Switching Chibis: Chibikart motor and frame work

Apr 13, 2012 in Chibikart, Project Build Reports

I think I’ve formulated a reasonable list of next steps in order to solve my weird magic bootloader problem for Chibicopter, including trying different computers with the same hardware, messing with other USB-serial adapter settings, and learning how to logic analyzer in order to record the exact transmissions that are going into and coming out of my XBees. But right now, I just don’t want to see the damn thing (despite the demo season starting up again… uh oh). Fortunately, I have something mechanical and not software-involving to distract me, and that’s Chibikart!

Chibikart took its first few steps towards realization in the past few days, going from entirely CAD model to…

…oh boy. So let’s be clear: that steering wheel is ridiculously oversized and impractical. It was 10 bucks on the surplus channel, so I couldn’t resist throwing it in for kicks. Chibikart’s design is intended for a fairly normal 10″ wheel, and a 14″ one would result in leg clearance issues.

The seat, though, was what I was waiting on so I could more confidently finish the design. I didn’t know anything about the slope or layout of the bottom beforehand, and receiving it meant I could finally make its mounting bracket:

There’s 2 80/20 rails running under the seat and two little ‘crossbar’ type things which join them and also together form the bolt pattern on the bottom of the seat. It also conveniently shelters the battery. Not shown is the one-piece bottom plate, to be made from 1/8″ polycarbonate or similar. I’ve also taken the liberty of modeling up some 350W-type Jasontrollers. While the design shows four in the back, I’m probably going to locate two in the front to avoid running a few feet of extra motor wire that would not only add more resistance but also potentially mess with the sensorless position-detecting algorithms…if one exists inside Jasontroller at all. Long leads are just good to avoid overall, however.

I got the generic go-kart pedals in, so the first thing I proceeded to do was knock them apart to inspect just how shady they were. I noticed the pedal itself was a little…. wobbly. It turns out they are very shady indeed, but a degree of it which seems to let it retain full functionality. I guess that’s the hallmark of a well-engineered product? How incredibly cheap and shoddy you can make it without nobody noticing that it doesn’t work?!

That little arc segment magnet has a continuously varying radial field strength along its transverse (theta) dimension, so the linear hall effect sensor at the base will put out a varying voltage depending on how much you step on the pedal. The continously varying shitty glue joint gap, as it turns out, does not contribute much to said varying voltage. I legitimately thought the crazily positioned gap was the only thing generating the output voltage, but it doesn’t make physical sense for that to be the case.

Otherwise the pedal itself is somewhat underconstrained – it can wiggle side to side,  but given that this changes the magnet’s position very little relative to the sensor, it is negligible. I’m surprised they even bothered with a tiny PCB to mount the sensor to.

Enough about pedals – how about some motors?

I picked four motors’ worth of parts “from stock” (scary I can say that, right?) and pitched them together. Now, the “stock” wasn’t perfect – remember that I sent off “my” fab drawings with these parts, meaning that the concept of allowance vs. tolerance was not distinguished. If I were to do it again (knowing now that is legit), I would have more carefully specified dimensions such that I don’t have to, say, shave off 6 thousandths on a second operation on each endcap like I had to do. My total neglect of adding tolerances to 3-significant-figure dimensions means that using the accepted practice of 3-digits-means-0.005-deviation, my parts could have been 0.01″ out of whack.  Clearly if these were actual mass production parts, someone would have lost an asston of money.

So for example, given that the can’s inner diameter is nominally 2.650″ and needs the endcap press-fit into it, a reasonable dimension to use would be 2.650 +0.001/-0.0005 for the can and 2.651 +/-0.0005 for the endcap. Notice the asymmetric deviations – the worst-case interference in this case would be 0.002″, and the other worst case only 0.0005. Yes, there are two worst cases – one too tight, and one too loose.

Remember how the other set of magnets in the other can was a perfect fit? The universe lined up for that one, but not for this set! The custom magnets I ordered were made to 0.003″ tolerance in each linear dimension. This means that they could have been 0.003″ too large or too small. The gap is about 0.026 or so, and therefore in this case it’s probably a combination of “slightly too small” and “can was machined with 0.005 allowable deviation in the diameter which resulted in a maximum circumference change of 0.015″.

This is part of the reason why I will move away from whole-circle magnets, actually. If I can’t be guaranteed a perfect closed circle every time, it’s not really worth bothering with. An installation jig wouldn’t take that much more time, and could deal more easily with slight magnet size variations.

Something like half of all mechanical engineering is based on consistently manufacturing parts/products to minimize deviations and rejection/failure rates, and designing systems which can handle manufacturing variations. The takeaway lesson is that making things on a large scale totally sucks ass. I’m not going to be making 3.6 million of these per day any time soon, but if I’m having this much fun with just 4, then there is clearly room for improvement!

And don’t even get me started on the miserable failure of a bearing fit the endcaps all exhibit. Oops.

And now, a change of pace:

Look at the nice thing! I made myself a miniature Hobbykinging rig using laser-cut acrylic. I hereby christen this the “REEL DEAL”.

The Reel Deal holds six (or up to 9 in this version) little magnet wire spools from which a string of parallel wire emerges for me to wind the stators with. Some zip ties sandwiched between the black frame and the reels adds a bit of tensioning friction. There wasn’t that much friction, though, so I’m still having a bit of fun with occasionally losing a wire off the side – as the reel is used up, this will become less of an issue.

We now move on to a picture more typical of one of my build updates: infinite waterjet! I think this might actually be the first (possibly second) time I’ve waterjetted something this entire semester. What the hell? Aren’t I supposed to do this every other day?

This batch of parts was made from the pile of metal plate that was going to become Super Make-a-Bot before that project was (effectively) abandoned. There were a multitude of reasons for the death of sMAB, one of which was the lack of any real innovation above the field to justify it being really fucking expensive. I estimate that I dumped about $500 into the project and still had to go $5-600 more, for something which isn’t much better than a Replicator (which my research group bought one of recently anyway – more on that when it gets here!).

I executed one of my tightest packings ever on that plate, mostly because I only had one. This was not done in one shot like I usually do, though. My usual procedure of manually routing each part in sequence takes about an hour or so of just staring at OMAX Layout while clicking buttons. This time, I tried the “other” way of routing one part and then nesting them through OMAX Make, right before I fire it off. This worked pretty well a few times (check the 8-piece array of corner trusses), but then things started going wrong.

Almost inexplicably, I started having head-dragging problems, where the machine would mysteriously carry the whole plate, fixture weights and all, an inch or so, destroying the part coordinate system and ruining that area of the stock. I couldn’t locate the source of the problem at first – it’s usually caused by a part or scrap floating up and catching the nozzle as it traverses, but I had all things which could float tabbed in (Hint: “Create Tab” is awesome). Through frustrating recuts and space hunting, I discovered:

  • The aluminum started warping. This plate must have had asymmetric residual stresses from rolling or something, but after the first few parts came off, the whole thing was bending up almost an eighth inch from corner to corner. I’ve actually not encountered this before. This might have caused some head bumping problems, but not as much as…
  • …1:1 aspect ratio hole centers. By this, i mean the little donut-hole left over when the machine finishes cutting a circle. If its cross-section diagonal is about the same as the ID of the finished hole, then it could turn sideways and stick up from the surface of the part as the machine blasts the last bit of connecting material away. I only discovered this after picking up a scrapped part and finding such a sideways hole plug sticking up with a huge gouge mark from the head. This is also something which, oddly enough, I have not experienced before.

I’m going to write alot of this off to forgetting little details of machine operation from not doing it in a while, but the end result is that after the next few part sets, I was down to cutting one-by-one in any possible space which would host the part.

After cleanup.

So this plate is actually 5052 alloy, more commonly found on boats and truck-mounted tool boxes than machine parts, but I bought it for sMAB because it was cheaper than 6061 and 3d printers really don’t need that much beef (it’s about 75% as strong as 6061). The perk to it, though, is that it’s shiiiiiiiiiiiiiny. I’m not sure if it’s just a polished finish or if it actually has a pure aluminum (“Alclad”) coating, but damn is it shiny. Looks way better than the typical streaky mill finish of 6061.

The good news is that all the tabs and slots fit (Yes! Haven’t lost that skill yet…). The bad news is that I inch ever closer to having to finally wind all four of those motors…

That’s it for now! I’ve also prepared the shafts for the motors, which also needed a little bit of material shaved off for a reasonably tight but slideable fit. This whole ‘real manufacturing’ thing sucks. Hmph. I was almost better off making the four motor cases from scratch this time.

I’m working on a system for mechanical braking which reuses the fender brakes from standard Razor A scooters. This will be put on the back wheels so I have a backup when the Jasontrollers’ regenerative braking fai….. wait, they don’t have any, that’s right!

Next: Cutting 80/20!

Okay, Internet, tell me more about wireless bootloading.

Apr 09, 2012 in Chibicopter, Project Build Reports

One of my perennial bad electrical engineering habits is black-boxing electronics and software – not making much of an effort to understand how a (usually software) system works, just accepting that a solution is available and not extensively exploring it unless needed. Historically, I did this to electronic hardware too, coming from a more R/C hobbyist background (I don’t really consider the battlebots to be “robotics”) where things like “Receiver” and “Motor Controller” were considered atomic components as much as screws – they could not, and should not, be decomposed further. I’ve gotten a bit better at that, what with making entire motor controllers and all, but embedded programming is still one of my sour spots.

This is part of the reason why I like Arduino so much – it’s easy, reasonably well featured, and I don’t have to think about diddling registers and setting bits – 6.115 taught me to never do that again if I could avoid it – just to toggle an output pin. It makes the software experience just a little more like high level application programming, the kind I did before getting into hardware and actually all through high school (Did you know that I was CS before I was EE or ME?). Convenience is of the utmost importance, absolute code efficiency and running speed less so. Probably because I just haven’t done a complicated enough motor controller yet, or a flying thing with enough axes. Granted, I’ve also gotten slightly better at that, since there are just some things which are easier to do, like changing the PWM frequency of analogWrite(), by breezing through the manual and just doing the annoying bit shift thing, or enabling a regular interrupt so some part of my code runs with a fixed delta-time for control calculations. In summary, I favor trying and modifying existing solutions first in order to solve the high level problem of make thing work. Which is another great thing about Arduino and the general OSHW community – someone has probably done it already. Including build a smaller quadrotor, but that’s besides the point.

But I think I’ve reached the end of reasonable high level probing, because Chibicopter is not wanting to program wirelessly at all.

Here’s the rundown. I’m using the Adafruit Solution for wireless code uploading to the ATmega328-turned-arduino. There are some differences between my exact circuit and the “community solution” in this case – I’m running 3.0v logic power and my reset line is coming out of D6 instead of D3. The Little Purple Wire hacks are documented here. Otherwise, the level shifter/buffer circuit (which I feel isn’t really necessary) is the same, and for the first few attempts, the settings for my XBee Series 1 radios were also exactly the same as directed.

So here’s what’s been going on:

The Symptom: The remote reset always worked, but the program transmission itself has a success rate of maybe 5 to 10% at most. The most common symptom is hanging – the RSSI LED on the transmitting Xbee goes out, and the ‘Uploading” stage of the Arduino IDE never completes until it times out with an Out of Sync error. A few times, I’ve had programs make it all the way through and complete, but only once or twice, and then it becomes completely up to chance again. The successful attempts seemed to require uncorrelated “adjustments” such as exact location in room (possible radio bad spots or WiFi interference) and orientation of radio, which at such close range I find implausible to be the problem.

The fixes:

1. Complete hardware swap. I ordered more XBee Adapters because my one remaining unit was clearly showing reliability problems – I had to seat the XBee in the headers in a specific half-out fashion to get the power and associate LEDs to turn on, so to rule out the possibility of bad contacts or intermittent power, I made some new boards up. This did not result in any appreciable change in the operation – the vast majority of uploads still failed.

2. More radio power and XBee swap To test the interference theory, I borrowed Shane’s XBee Pro units which transmit at something like 150mW, which tends to outpower every 2.4ghz device around it. This did not affect the success rate of upload, but in this process one of my transmitting XBees was found out to be damaged. It was replaced with another of my radios (the one which had been handling LandBearShark’s load cell reading telemetry), to no appreciable change. I then borrowed two brand new radios, also to no appreciable difference.

3. Reduction to Tx/Rx only with stock XBee settings I removed the reset circuit’s digital I/O pin function so the pin did not toggle. The programming was then done just by hitting the reset button while uploading with only Tx and Rx active. This got me 2 or 3 consistent uploads (variations of Blink.ino), but after that, it once again become unreliable. I completely refreshed the settings a few times, changing only the baud rate to 57600 8-N-1.

4. Possible undervoltage operation problems The XBee is rated to operate between 2.8 and 3.5 volts. I’m running 3.0v, technically not really “3.3v”, so it could be that the XBee is being underpowered. Testing on real 3.3 volts provided by a bench power supply, using variations of Blink.ino only resulted in the discovery of the “uncorrelated adjustments” like Shane standing 5 feet to my left vs. next to my right, or using the back half of MITERS vs. the front, and turning my wireless LAN/Bluetooth off on my laptop vs. on. I do not believe any of those environmental factors are truly the cause of the problem.

5. Power Supply instability. Xbees, being high powered digital devices, draw current in bursts. I have very little 3.0v capacitance, so maybe little dips on the power supply was causing problems such as when the receiving end sent back start/stop flags. I piled a ridiculous amount of caps on the XBee pins directly during the above power supply runs, to no appreciable gain.

6. Trying a known working board. The 2.007 Nano carrier can wirelessly program using the “community solution” or using bone-stock settings on the XBees and manually pressing the reset button. This was demonstrated several times by Shane, but I could not get any of my hardware to reliably work with it either! This was eye opening, and pointed me to the fact that the problem may not lie with Chibicopter’s board. The full battery of tests – my Xbee adapter with both my radios and his radios, the XBee Pro, his own XBee USB dongle… none of them worked reliably if my computer was involved!

7. Messing with virtual COM port settings I tried the established solution (SET RTS ON CLOSE) with no other changes, changing the baud rate explicitly to 57600bps, and even installing a fresh, new FTDI cable to talk to the XBee adapter (thus installing an entirely new virtual COM with no possible previous changes). While the latter change appeared to result in success (4 reliable uploads), it stopped being reliable again thereafter. So promising ;-;

8. Literally trying wires. Hooking up transmitting TX to receiving RX, and vice versa, with GND bridged. This was literally plugging wires in and out of XBee sockets, and it worked without issue every time. This means the issue lies strictly between how the XBees interact with my computer and with eachother – once I literally bridged the connection, there were no communication problems.

Possible explanations we gathered:

1. Some hardware level difference between computers. While this seems to be a stretch, Shane’s Dell notebook can program Chibicopter with much higher reliability such that the random interference, voltage dip, and noise explanations begin to be plausible, and the Nano carrier essentially flawlessly. My HP DV7 can do neither. I’m not up to date on integrated computer peripheral hardware, but I do want to try the exact same parts on a Macbook – if it works on a Mac, then that would explain why there are so few complaints about it, given the Arduino and OSHW community demographic…

2. I am actually missing something very fundamental and stupid. Given that the uploads are so reliably unreliable, this seems almost like the most plausible explanation. Did I really forget to ground something? Are my traces actually soldered? They must be, because I can definitely program the damn thing over 3 wire serial! Are my XBees just cancerous? They’re both  Series 1 whip antenna types with the latest 10ED firmware now.

I’m willing to rerun some of the tests and provide more verbose error message logs, as well as COM port settings and XBee settings. But what the ass?







Upgrading the 100mm Skatemotor for Chibikart

Apr 05, 2012 in Chibikart, Project Build Reports

The “skatemotor” design that ended up in the RazErBlades is kind of abysmal in terms of performance. They were wound with maximum torque per amp (Kt, the torque “constant”) in mind, but the result of winding so many single turns on the stators is that their winding resistance was very high. There weren’t many amps to be had afterwards. I pulled the left skate back out to measure the resistance of the motor, and it was about 1.28 ohms. Entire, single digit ohms. It just meant that I was losing one watt for every amp that was going through them. Since the DEC Modules were limited to 10 amps per motor and the system was 22.2 volts, I was losing potentially more than half of the maximum power to winding resistance.

Clearly this was not going to be acceptable if I was going to run them at 32 volts. The skatemotor windings were single turns of 24 gauge wire – not very conductive by high powered motor winding standards – and 36 turns of it per tooth came out to a torque constant of about 0.25 Nm/A. I aimed to hit this value again, but with bigger wire for less resistance.

First step was to check out what copier motors I already had. I picked my favorite part numbers – RK2-0614 is on the left and RH7-5219 on  the right. I didn’t get pictures of the ‘before’ windings, but they were sufficiently dense to make me wonder if they were hand-wound. Given that these are all made in China anyway, it wouldn’t be surprising. The right one was particularly interesting, since it already used multi-wire parallel windings, and is actually the same tooth geometry that I used in the skatemotors originally. The left one has narrower teeth – potentially detrimental for high torque production since the small cross section of iron may saturate if I put too many turns on it. Only a pass with FEMM will tell me for certain.

Because I had four of the left (RK2-0614) and only one of the right, the choice to design with that one in mind was clear. I began running some rough numbers on just how many turns of larger wire I can reasonably stuff into the much wider slots. 36 turns of #24 AWG wire fit into the right with a fair margin, and I discovered that I could reasonably get about 30 turns of single #20 wire or doubled #24 wire into the slots. That would be really Adrianing it and being super-clean, too.

RazEr rEVolution was wound with double #22 wire, but making sure the wire laid flat and didn’t cross over eachother was difficult to keep track of, and by the end I was running out of patience. When the wires crossed, the advantage of packing is lost – as a result, the sides of the windings tended to be much fatter and messy than the ends.

The converse tactic to being careful in laying the wire strands adjacent to eachother to maximize packing volume is “Hobbykinging it”…so called because…

That’s 8 turns? Yep, that is the inside of the typical 80mm “melon” motor. Those things are wound with something like 90 parallel strands of very fine wire each maybe the width of a hair or so – possible #40 AWG or equivalent. Smaller wire is much more flexible and packs relatively easily, and to a degree you can get better results by packing more parallel strands of a smaller wire together.

There is a limit, however – the smaller the wire, the smaller the copper-to-insulation area gets. Even those 90 strands of #40 wire can only amount to a ~#20 gauge equivalent. In terms of circular mils of copper area, the former is (cite) 9.65 * 90 = 868 circular mils, and the latter single 20 gauge wire is still over 1000. I bet I could put several parallel #20 wires in a melon rewind and get even less resistance in it, because the larger copper wire is still enclosed by the same thin layer of insulation.

But the main reason they do it is for ease of winding – bigger wire is tough to form and bend, while a billion small strands can be wound by anyone, and in a production system which involves low skilled migrant workers the task must be accomplishable by anyone.

…including me!

I tried a hex-28 gauge winding here, and I like it alot. Through some crafty decision making, I decided that six strands of #28 wire was a place to start with polystrand winding experiments. That, and MITERS has a 20,000 mile spool of #28 wire, or so it seems. Six parallel strands of #28 yield an equivalent of #21 wire, which is certainly a step up from #24 – a doubling of copper area.

I loved how easy this was to wind. All I had to do, really, was pull tightly, and the wire would just flatten and spread itself. As a result, that is a full 36 turns of hex-28 (so that caption is completely and utterly inaccurate). While I finished 30 turns successfully, the last layer ended on the outer diameter of the stator, and so I carefully wound back towards the inside diameter again, stuffing more turns on. A run through with a popsicle stick flattened the sides well enough that the whole coil seems to pack neatly under the teeth.

I strongly approve. Hex-28 is probably going to be the winding of choice for Chibikart’s 100mm skatemotors…. not just because we have like 20,000 miles of it. I swear. 36 turns would yield essentially the same back-EMF constant, so what I get is a torquier and more efficient motor since it can suck down more amps (more torque) but not heat up as much (less resistance losses). The resistance of that one coil with excessively long pigtails is about 51 milliohms. Four of those in series make a single phase, and eight of them make for one set of powered windings (two phases are switched at any one time in a conventional BLDC motor), so the total “line to line” resistance of the motor will hopefully be only 0.4 ohms! That means for the same amount of resistance heating, I should be able to stuff 1.8x the current through: sqrt( 1.3 ohms / 0.4 ohms) since dissipated power is proportional to current squared.

At this point, I’m just waiting on parts. I’ve ordered all the magnets, just 20 x 5 x 2mm bricks for now, from superdupermagnetgeorge. I’ve also went ahead and ordered some spare 98mm skate wheels since I’m sure if this thing actually works I will instantly drift and brake the current skate wheels into dust very quickly.



Hub Motors on Everything: ChibiKart

Apr 04, 2012 in Chibikart, Project Build Reports

The year of the tiny, chibi, and cute projects continues!

So here’s the backstory. I’m sitting on top of a veritable mountain   pile small cardoard box full of 100mm-class hub motor parts that I commissioned on a whim last fall to test out the workflow on, of being even lazier than I am already and hiring my machining work out to shady Chinese backwater CNC machine shops (because those exist). I discovered that Chinese job shops seem to be every bit as legitimate as American ones, and will definitely hold the tolerances you are not used to holding for your own parts made with your own drawings. And even though the pricing is inexpensive for such machined parts, I am still just hiding several hundred dollars of shiny precision machined electric motor parts in a box.

Not very productive – I’d rather that money be either put into builds or making me more of itself. That doesn’t mean I’m going to start selling motors left and right just yet – I have none of the other support parts at the moment, including important aspects of a wheelmotor such as the wheel – right now, I’m still just carving the center out of 100mm skate wheels. Add to that the amount of actual completion detail that needs to go into a motor such as proper windings and termination, rotor magnets (those things are getting expensive) and possibly even sensor boards and Hall Effect sensors (which would need to be designed, sent for fabrication, and assembled), all of which comprises several hours of manual work, and the case is still not very strong for my immediate entering into the dubious market of small personal transportation implements. Yet. Product development takes real time commitment, something which I have yet to convince myself is worth pursuing.

But to counter that, I am more inclined now to take custom commissions than I was before, like for your Air Trek skates or electric suitcase or nanosegway or whatever. The main reason is that I lied just a little above – I do have a potential source of stators for both the 100mm-class “skate motor”, and the 125mm wheel Razor scooter sized motor. The stator, as I’ve explained before, is pretty much the hardest thing to get custom made for you if you are buying in volumes with less than like six figure units, and it’s harder than I thought to just “buy a few” stock/premade ones. However, this part investigation is still forthcoming – the other reason is that I’ve found several “islands of stability”, or at least islands of reliable part numbers, in my everlasting quest to catalog the stator sizes of all extant copier motors. Yes, that document exists!  Use it for your own hub motor building endeavours.

I’ve literally spent hours sitting on eBay hunting for new part numbers to buy and catalog. Tearing motors apart to make other motors is not a mass production method, but for my one-offs, it’s an acceptable compromise. This means that I also have an asston of random copier motors hanging around, several of which have stators which fit the original 100mm skatemotor design, and I would be totally unsurprised to learn that all my random eBay binging has resulted in more sunk money.

Poetic waxing aside, the combination of too many motor parts and too many random stators means that I need to build something to use them. I’ve pretty much made a pledge to not build any vehicle that is not propelled by hub motors from here on, since doing otherwise would mean I put off development of the motors to something reasonably resembling a product even more, while my surplus parts continue to build up.


Here it is!

…well that’s not very exciting.

This thing is already going to be comically small – that frame rectangle is only 30″ long by 18″ wide – with even more comically small wheels. Coincidentally, 30 x 18 is the exact dimension of the front half of tinykart. Part of this build is also fueled by go-kart envy. Ever since the venerable LOLrioKart was officially decommissioned, I’ve not had a four wheeled rideable object. Two tracks is kind of okay, but not really quite the same. But for me to just build a copycat kart is not very enlightening. Thus, Chibikart.

Four wheel drive, maybe four wheel steering (those corner pods are symmetric in case I pursue it), and really really small.

…and possibly with only slightly more horsepower than the Razerblades, since I’ll literally be using the same kind of motor.

Alright, maybe now there is a better sense of scale. That seat is not a couch or bus seat or something, but a riding lawn mower seat from Surplus Center. Yep, this contraption will be on the same length scale as Amy’s profoundly awesome SAM, but definitely a bit longer.

The seating position right now is “legs out” with a front bumper or other structure out beyond the 30 x 18 and the foot pedals, and a steering linkage vertical immediately next to the front 80/20 bar. During this session, I discovered how pleasant CADing with 80/20 extrusion was. After I figured out, of course, that there were only two narrow perpendicular faces on each side to constrain to.

The pedals are generic Chinese electric kart pedals, sold around the Internet using some form of the name “Simple Hall Foot Pedal” or similar. I’ve yet to receive the ones I ordered, but luckily TNCScooters had reasonable dimensions on their drawings (interpolation, estimation, and “screen calipering” aided in completion of the CAD model too). One of them will have a linkage extension to actuate cable brakes – the actual mechanical braking method is yet to be designed, and might just end up being scooter fenders with rigged cable linkages. Hey these are scooter wheels.

I’ve made a few changes here. First, the pedals have been moved inboard. I’ve decided on a significantly more “cab-over” driving position, again similar to SAM (but not QUITE that much…). The steering linkage will be planar and located below the main frame rails. Overall ground clearance is slightly under 1.5 inches – the wheels are not mounted on center in the 80/20, more like 3/8″ under, but the linkage will take out some of that.

Through careful ergonomic studies involving sitting on a block of foam  on the floor of MITERS, I added the foot brace bar that crosses in front of the pedals. In practice I’d put most of my weight on that and be able to tap the pedals instead of hovering over them while trying to hold your leg steady.

Most of the front end mechanicals are done now. I added a reverse cowcatcher/bumper/whatever it is – either way, makes the thing look a little less hilarious. There’s some mechanical design (read: lengths of 80/20 to copy and paste) still to come such as the seat mount proper and battery/controller/electronics mounts, but I will hold off until the parts arrive.

What’s going to be powering this thing? The orange battery is an A123 special that will remain generically orange and prism-shaped for the time being, since I’m fairly certain it’s Not Supposed to Exist Yet. Bottom line, the vehicle will have a 32 volt (10s LiFe) electrical system, a fairly chunky battery.

Powering the motors will be four of my most favorite alignments of Chinese manufacturing probability, 350W class Jasontrollers! I’m taking a major risk by going all sensorless with this thing, but the Jasontrollers have proven themselves in being able to start high torque hub motor vehicles. I’m hoping that with four of them there’s never going to be a “twitching equilibrium” moment. The downside is no regenerative braking (and no, the E-STOP wire doesn’t count – tried that already on Melonscooter, almost died), but someone has the ability to fix that if only he’d write a startup routine, right?

Chibikart will be a test to see if the skate hub motors can push any reasonable power. Combined with the Jasontrollers, they will hopefully form a reasonable system which in my mind is more product-able than just discrete parts alone – because what the heck are you going to do with just a motor can or a raw unwound stator?

If it turns out they don’t – well, who knows, maybe I’ll just stuff them back in the RazErBlades somehow, or build an updated version of them – after all, they needed more power.