Archive for December, 2012


RageBridge Revision 3: Boost Converters and the Market Survey

Dec 11, 2012 in Motor Controllers

Continuing the story of Ragebridge’s quest to find a stable power converter design, I received the updated version 3 boards earlier last week, and got around to assembling and testing them over the weekend. I think RB is ready, at this point, to enter the release candidate & fine tuning stage of the development process. But first, I had an adventurous time remembering what boost converters did.

First, if you want to skip straight to the RageBridge potential customer & user survey, feel free to just click through.

To summarize, the RB project has seen me move away from a known stable (but not that vintage) power supply design to exploring other ways of generating logic voltage and gate drive voltage in order to push the lowest operating voltage down below about 18 volts. My general setup has been dropping a switching regulator on the battery input and buck converting to 15 volts (gate drive voltage) and then a linear regulator to 5v (logic voltage).

This arrangement has been reliable, but it pretty much limits the working voltage of the controller to greater than 13 volts or so. The switching regulator, a LM2594, can turn entirely on and pass the input voltage, but it has a 1.3 volt saturation voltage penalty. Add to that the other 1 volt or so of diodes (one before and one after), and the gate drive ICs turning off at 10 volts, means that operation down to that level or below is undefined.

My intention is to make this board also useful for 12v lead-acid and 3S lithium systems, of which there are still plenty, and hence I needed a way to make sure the board is logically determinate down to maybe 8 volts. The previous board version, as detailed in its post, explored an integrated buck-boost converter, the LT3433.

Unfortunately, while it could have worked in principle, it turned out the chip couldn’t supply enough current to run everything on the board. At around 20 volts, the output began sagging out of spec.

Turning my attention to a more serial arrangement of components, I decided to take the slightly less efficient (in principle) method of chaining a boost converter after a buck converter. In this case, I was going to convert battery voltage directly to 5v logic, and then from there, boost to 15v gate drive. This keeps the regulators (nominally) separate and out of eachothers’ affairs. The chip used was the LT3460, a small dedicated boost converter controller. There would be no more linear regulator, so I had to pile on the capacitors to keep ripple voltage lower and also added a transient voltage suppressor diode to the 5v bus.

That’s where the design stood as of 3 weeks ago, and the corresponding board layout is:

I pretty much followed the recommended layout of the 3460 exactly. This had better work. I sent out this design to MyroPCB, once again, but in 1oz only (since I was just out to test this converter, more or less) and…

in black. I’ve always wanted black boards – they just look so much more badass. As usual, I placed my Digikey order when Myro notified me of the boards shipping, but that seems to have gotten delayed, so my Digikey order appeared a few days before the boards.

The first thing I wanted to test was the power converter, so it was assembled first thing. It’s important to note here that I also bought a same-footprint-and-pinout equivalent of the LT3460, the MIC2288. The alternate chip has a much higher (1.3A) switch current limit than the 3791 at 300mA. This will become important later.

With the power converter testing out good, I finished one board fully and did a load test with a small 5v fan (0.15A) and a spektrum receiver (0.09 to 0.12A, because what?). This was just to make sure the thing could hold up under load. The gate drive, at this point, was not yet enabled (the receiver was in failsafe mode).

After that was done, it was time to drive motors. I remembered that I had Segfault’s old drive motors, which are CIM motors stirring a hydraulic brake a 27:1 Banebots P80 gearbox filled to the brim with thick grease. This thing draw like 15 amps just running freely, and an overvolted CIM can certainly push enough current  to scare most controllers. One of Überclocker’s batteries provided the bus voltage. Even though testing unknown controllers on a battery (a source of potentially infinite amps) is a bad idea, I did it because..

ouch. The sketchy switching lab supply has that as its output voltage waveform. I thought I was chasing down a noise issue on the board when I realized anything the scope probe touched was displaying this waveform or some linearly transformed version of it! Oops. I had forgotten that switching power supplies are usually pretty bad in terms of voltage ripple and noise, cheap ones especially.

It might be worth iterating to other aspiring secret board ninjas that you DON’T EVER USE A SWITCHING POWER SUPPLY TO TEST SENSITIVE LOGIC CIRCUITS. Linear power supplies, though lower in amperage, supply a much cleaner power rail that can be essential for correct operation of circuits, especially analog ones.

Anyways, after switching to the battery, I realized the noise issue was probably something else. The symptom was, like just about every disease that afflicts motor controllers, frequent and unexplained resetting. Maybe it was some weird positive feedback effect between 2 switching regulators? I tried scoping the 5v and 15v supplies to check for their stability, and it seemed okay. What was weirder was that the behavior was only present if the radio was on and the signal was valid. The board wouldn’t exit failsafe mode.

Leading me closer to the culprit was the fact that the behavior was basically the same as hitting the reset button. It took a little while of sitting and watching the 5V rail, but finally I saw a strange transient:

Wow. That’s my 5 volt bus dipping to about 2.8 volts, then flying back up to 6.5 volts. Something weird was happening.

The critical clue was seeing this transient occur whenever the board entered running mode (i.e. left failsafe mode). It also happened immediately after reset, before the program has a chance to load. The transition from running to failsafe mode was smooth, and by pure accident, I left the USB cable plugged in (while trying to mess with the code to see if I could get the reset to occur elsewhere) and noticed this transient did not occur. I could, in fact, “bootstrap” the board with USB power, then after it enters running mode, unplug the USB. And it will be fine.

It was clear to me now that it was caused by something suddenly wanting a ton of power from 5 volts. But what? The microcontroller doesn’t need that much of a load at the start.

The only thing that happens when the board leaves failsafe mode is that the gate drivers are enabled. Could that be the problem? I began to suspect that the sudden current demand of all the gate drivers enabling at once caused the boost converter chip to go crazy. To test this hypothesis, I ‘staggered’ the re-enabling of the gate drivers into 2 groups, separated by 5 milliseconds.

It was definitely the boost converter beating my 5V buck converter into submission now. The fact that there is a transient whenever the gate drivers turned on was the decisive piece of evidence here. What’s funny is, the board worked fine in this state. It seems the sudden pull from the 5V rail is no longer enough (since only half the gate drivers are demanding current) to reset the chip.

The explanation as to why the gate drives suddenly want a burst of current is that the first thing they do when enabled is turn on the low side FETs on all the H-bridges (i.e. feeding a pretty big capacitor in the form of the gates). The bootstrap capacitor for the high side also charges at the same time. A small dip in voltage occurs on the 15 volt bus as a result.

Because the boost converter is much faster than the buck – 1mHz vs. 150kHz, it responds by pushing more current through the inductor (briefly 1.3 amps worth at least, according to the MIC2288′s rating) and it does so quicker than the buck converter can respond. As a result, by the time the buck converter duty cycle catches up, the transient power demand on the 15v bus has already been fulfilled, so the boost converter backs down output current. Again, because the buck converter is slower to respond, it overshoots and then slowly adjusts itself again. That’s how I think it goes anyway.

So basically, I need a precharge circuit or something for my 15v bus. Well, one way to combat capacitor dumping is with more capacitors:

First, I replaced the small 10uF 16v ceramic output capacitor of the boost with a giant 47uF one. On this board, its brethren are buffering the 5V line.

This had very little effect. It seems that the problem is still the boost slurping from the 5V line when it has a sudden demand on the output (necessitating charging up the inductor with a burst of input current). So I moved it to the other side.

This made the transient less in magnitude, but unfortunately it was still causing the ATMega to brown out.

Facing another potential redesign of the board to add even more capacitors or something, I thought about other bad hacks like isolating the 5V power converter from the rest of the logic with a low-ohm resistor, such that even if the converter itself goes under a little, the local capacitors at the ATMega and current sensors, etc. will keep them afloat briefly.

Then I remembered the LT3460 has a 300mA internal switch current limit. The MIC2288 has a 1.3A limit. I began thinking that maybe putting a converter that can briefly eat 1.3A after one which can only source 0.5A (the LM2594) was a bad idea.

The LT3460 has the exact same footprint, exact same feedback resistor and compensator capacitor needs, and exact same output cap and inductor specs. Alright, why not… I’ll swap it in.

That fixed the problem completely. Even with the “staggered start” removed and the extra 47uF of capacitor gone, there were no startup issues. The transient on the 5v rail had declined to the point where trying to detect it was difficult with the scope’s noise floor.

Above is a picture of the 15v rail under switching conditions, when the gate drive is running. As can be seen, all of the FETs being switched on at once causes a brief dip in the power supply (on the order of 0.2 to 0.3 volts). Meh.

I zoomed way in on the 5V supply and AC-coupled the scope to catch the power converter’s actual output waveform. The 1mhz switching freq. of the LT3460 can be seen over the 150khz switching frequency of the LM2594. The 5V ringing is a bit concerning, but it doesn’t seem to be affecting the controller function.

In the interest of reducing this ripple, I’ve spec’d out a 100uF 6.3v ceramic cap  just for the 5V rail. It has the same package as the 47uF on there now, so it will simply drop into place. I’m also going to add more bypass capacitance at the ATMega and current sensors, upping it from 0.1uF to 1uF.

I waterjet-cut the updated heat sink plate design for RB and laser cut my remaining silpad sheet to make the insulator. This is basically what a stock RB will look like, without an additional fan mount or something. I’ve accepted a quote for punching out the heat sink design from 1/8″ 3003 aluminum, with a silpad die-cut piece bonded to it. The future is exciting.

Here’s a picture of all generations of RB so far!

I’m now going to throw this board into something like Null Hypothesis and ride it around drive it to obtain a reasonable robot drivetrain test for temperature and current draw.

In the mean time, I’d like to rally some help from everyone.


LandBearShark 2 is finished, but it isn’t snowing anymore.

Dec 05, 2012 in Land-Bear-Shark, Project Build Reports

Well, I can’t say that I didn’t already finish LBS2 like 2 weeks ago. I did, in fact, and it’s been around the block a few times already. But sadly, since then, there’s been no snow in the weather forecast. Meaningful amounts, anyway – a few flurries fell here and there last week, but what good is that? Do I really need to take this thing to New Hampshire!?

I was counting on some snowfall to let me combine a little testing video with the rest of the build, but given that seems unlikely to happen, here’s the build in its entirety.

The first step in rebuilding is to retire the old design. Here is LBS pulled out of under-table storage. A little dusty, but it still looks kind of glorious.

The big ATV style crashbar is not returning in the new design, because really, it was just too over the top. It was funny and contributed to the very unique look of the thing, but it also weighed about 10 pounds (made of surplus 1/8″ wall steel tubing…) and the mounting design was very much optimized for the old frame and I couldn’t quite make the design work with the new aluminum one.

Otherwise, electronics aside, many component parts of LBS are being reused. I don’t think I’m quite at the level of the Ship of Theseus yet…

LBS has been reduced to components. I took the opportunity to perform a mass cleaning of all the track parts because they had been subject to substantial dirt and grime buildup. The chains, especially, took a distressing amount of soaking in brake and carb cleaner and like an entire roll of shop towels. Chains are terrible things.

Its former frame was used as a collection bin for most of my other retired aluminum-bodied projects. I was intending on pitching it in a shop’s aluminum recycling dumpster, but ended up putting it up on Reuse (the free stuff mailing list) for people’s amusement. I figured that had I been a happy froshy bunny during this time, I would be so extremely excited, jumpy, and otherwise bunny-like if somebody posted a pile of waterjet-cut aluminum parts to Reuse that I might start building project of my own spurred by the simple fact of possessing these items. That was the plan, anyway. Paying it forward for the next happy bunny that bounces into MITERS.

(Some of it was used immediately in a productive fashion).

One of the first build exercises was spacer and standoff-making. Most of these short ones shown are parts that will go into the motor mount, suspension, and new bogies.

I’ve been gradually liberalizing from my usual hardline t-nutting policies in favor of using material more effectively when the design calls for it. In fact, LBS was one of my last major giant t-nutted plate assemblies (the other being Make-a-Bot). I actually can’t think of anything I built from scratch in 2011 and 2012 which made gratuitous use of plates where they weren’t effective.

I’m thinking it’s about time to update the How to Build your Robot Really Really Fast document I wrote some time in 2010 to be a more thorough treatment of various design for assembly manufacturing methods, rather than a cursory overview of standoffs and t-nuts.

With a few of the necessary spacers done, I turned my attention to assembling my Fake Andymark Gearboxen. I’m a fan of their very inexpensive (compared to industrial suppliers, anyway) hubless spur gears because for most robotics-related purposes, hubbed spur gears add unnecessary bulk and weight if you are just making cluster gears anyway, or using another method of power transmission like splines or direct coupling to the driven member. In fact I’m such a fan that I’ll plug them some more: SPUR GEARS!

(Some mixing and matching may be involved.)

The way my intermediate gear shaft goes together is simple. Take a hex shaft chunk, stuff a bushing into it (drilled and bored on tinylathe), then start piling hex-bore spacers and hex-bore gears onto it. A hex bore custom sprocket is in the middle somewhere. On each end is a bronze thrust washer to keep everything in check axially.

The whole assembly was purposefully made a few thousandths of an inch shorter than the length of the center standoff – involving shaving a bit of material from one of the hex bore spacers – that it could spin freely once lubed up a little, and kept itself in place. Bam, fast-build gearbox without machining complex shafts and retaining features.

I’ll also admit I am a slow convert to the hazardous, addictive, and self-destructive world of hexagonal shafts. They’re just so easy.

The two Fake Andymark Gearboxen completed. These have no mounting bolt pattern – they are hung from the center Big Shaft of the vehicle, and kept from moving by chain tension on one side and the chain tensioner on the other, upon which they brace against.

Onto frame assembly. Did I say I wasn’t going to make T-nutted things any more?

Nah, no way. I’ve not become that unprincipled. There are still a few holding the frame together, but they are no longer the majority contributor to frame rigidity. In this case, it’s pretty much just for making the right angle joint that will be backed up by long threaded rod-and-spacer preloaded columns (see Carly Rae Jepsen’s build style), which can add much more rigidity than an equivalent floppy plate span.

The bogie frames this time are much lighter in section, and maybe a little too flowy looking. The reason is that these never took subtantial structural loads anyway – recall that even in LBS version 1, they were hinged in the center at the Big Shaft. The load path goes from the rider weight into the Big Shaft, where it is met by reaction force coming from the ground, going through the track sprockets and into the track axles. But that load is expressed primarily in torsion (out of plane twisting) of the bogie frame sides, because the suspension is so damn stiff that it’s basically a truss member. LBS has always ‘sagged’ a little as a result of this torsion (think overloaded car), so there was no reason to keep using the huge heavy side plates.

The much lighter cross section of the new bogies saves about 3 pounds and cuts the design down to basically the bare amount needed to connect the dots in terms of mounting points.

Now it’s starting to look like some kind of cracked out Mars rover, or a kinetic sculpture. Everything gets slid onto the Big Shaft at once, secured by shaft collars. I switched to a 3/4″ diameter axle this time – LBS1 had a 20mm one, which is a dimension I have no clue why I picked initially, but 20mm shaft collars are espensive and I needed a few more of them anyway. 3/4″ was the closest size to 20mm that still allowed me some space to clear the CIM motors, and wouldn’t be bendy under rider weight.

After a brief game of Which One-off Spacer Is This?! I began to put the track wheels back on, and also slipped the motors onto the Big Shaft.

Without the outside bogie frames keeping the axles on center, slipping on the track itself was easy – the whole assembly just kind of bent in enough. I did have to spreader-clamp the axles to make all the screws go in, though. Overall, the track tension has increased over version 1, since it was known to be somewhat loose.

After the track pods were slipped back on, the project reached criticality. At this point, with the chains not hooked up yet, I was supermanning it and coasting down the hall – not very far, of course.

Moving onto electronics, I’ve punched together the electronics box and mounted the switch and cooling fan. Little rubber grommets have been installed in the bottom where the motor wires will enter. I also drilled, tapped the eventual RageBridge mounting holes and installed standoffs.

The box mounts to the frame using these little hanger hooks which interface with bolt heads sticking out of the electronics box. The arrangement is self-securing (the force vector of the box being loaded downwards tends to pull the hooks tighter together), or at least theoretically so – if not, zip ties will rescue it. The rear hooks were swung out, the entire box slid into position and rested on the front hooks, then the rear ones tightened down again.

Much of the wiring was recovered from the old LBS, and I made the RageBridge wiring harness to match it. Here’s one of them mounted to test for fit and wire clearance.

I took some time to finally repair LBS’s somewhat decrepit batteries. These were made 2 years ago and suffered a balancer cable short & fire some time afterwards. Since then, they have been wrapped in bubble wrap and duct tape, charged and discharged without regard to inter-cell balance.

To my surprise the cell banks were at most 50 or so millivolts out from eachother. While still alot, it’s quite a testment to the durability of A123 cells. Too bad the company itself… isn’t very.

I remade the balance harness, this time carefully routing the cables out the side of the pack, then wrapped the entire thing in some foam rubber with Kapton and fiber-reinforced strapping tape. After a night of balance charging, they were all leveled out and ready again.

The two RageBridges were stacked together with some 3/4″ tall standoffs, and linked via a small custom Y-cable going to the receiver. The bottom one powers the cooling fan through the 15V rail (which, incidentally, is going to be missing from RB version 3 to be replaced by a 5v fan output).

Each RB controls only 1 motor per side – the system is set up in mechanical parallel. Hypothetically, if one controller fails, the other can still move the vehicle at 50% power, but it of course depends on the mechanism of failure. If the failed controller becomes a short, then it would be very hard to power against the shorted motor, for instance. There was no intent of providing redundancy, just a convenient means of controlling more current than one Ragebridge can effectively put out.

With no custom software needed, it was drop the batteries in and go. LBS is basically a dumb ROV at this point, no different from one of the battlebots. The RageBridges were put into “mix” mode because the simple 2 channel Hobbyking radio does’t handle any of that fancy stuff.

After putting the other battery in, things started getting…. crowded. Batteries are retained on the bottom with a healthy dose of Velcro, and the virtue of being confined keeps them from jiggling around otherwise.

The wiring harness is admittedly a rat’s nest, but hey, salvaged wiring. It’s also be a good chance to test RB’s robustness under non-ideal wiring conditions.

Closing the top up… I designed this version to be way easier to service in case something goes wrong inside because the electrical box lid is removable through the top, after the board itself is removed.

And here’s the 98% complete shot. At this point, I didn’t yet receive my threaded rod to finish the two standoffs in the front and rear. Without those, the frame bowed a little when I stood on it. But it was functional enough for some superman-style hallway blasting.

There was one problem I discovered during this testing. The motors could exert so much tension on the chain that they were physically bending the rear bogie frame inwards, collapsing the hollow cutout and making the chain jump off the sprocket.

Well, that was dumb. The placement of the chain tensioner was pretty much in the middle of a totally unsupported span. I could, in fact, unbend it with some big channel-lock pliers. I definitely hit copy and paste a few too many times…

To address this issue, the rear bogie frame side was recut to be solid and the tensioner mount itself was made a little fatter and angled.

Here’s a picture of the bottom of the beast, showing the drive chain setup and the batteries. Still, missing standoffs (which have since been added).

I don’t have any testing video yet, since there hasn’t been exciting enough weather to do so. The new arrangement, however, has demonstrably increased torque and better steering response too. The Ragebridges are synchronous rectification drivers, meaning the motors exert a torque against any external changes in speed unless commanded to that speed, so the tracks have increased dragging ability on either side. It can alsofinally turn in place, even with rider weight on it. The top speed is right around 8 or 9 miles per hour.

Once the weather gets more interesting, expect some updates with videos!