Friday, April 29, 2016

Twitch X - Did I used to be a MechE?

A combination of FRC season and BattleBots Season 2 got me thinking about how Saturday morning robot blitz building was a staple of my life back in the day, so I'm getting back into robots for a bit. I actually had a major "Battle-ready" redesign of Twitch, Jr. in the works a while ago, but couldn't really fit it into any sort of combat robotics framework and decided it wouldn't really be competitive without making major design sacrifices. That, and I got distracted by many other EE and software projects. Now, though, I've decided to try to remember how to MechE and go ahead and build it exactly the way I want.

There are actually at least three linkage drive robots named Twitch already. The OG version, which was my inspiration, was a 2008 FRC robot by Team 1561. There's also this one that I recently found. I can't find the documentation for it but it looks like it could be a mechanical relative of Twitch, Jr., with more modern electronics. And then there's this clever one (not named Twitch) that uses linkages and gears to achieve a similar wheel trajectory. Other than that I haven't seen any linkage drive robots; it remains a rare and uniquely entertaining drivetrain configuration. I've decided the world needs one more, so I present:

Twitch X

When I first drew up a new version of Twitch, I had in mind creating a wedge+lifter battlebot out of it. I made some rough geometry concepts for an Infiniwedge, which would be a wedge from every angle even if flipped over.

Get it?
This was a cool concept but of questionable competitiveness and legality in any particular league, and ultimately just too big to be practical. The footprint compared to the wheel placement just doesn't make sense. Also, even though it can vector traction into any pushing direction, omniwheels just aren't robust or sticky enough for a sumo match. And in any other type of competition the whole thing would just get exploded anyway. Linkage drive works fine with Colson wheels, if you ditch the 45º-angle omnidirectional state, but I think that would be too much of a compromise on what makes it a neat drivetrain.

I still like the idea of making a ruggedized, closed-wheel version of a linkage drive, though. That addresses the major failure point of Twitch, Jr., which is that if you hit something at high speed (which you will do), the exposed plastic omnis just break. When I break things, I have a habit of overdoing the next version a bit. With that in mind, here's a look at the new drive block:

First off, it uses the newer 4" Vex Pro omniwheels, which look to be much more durable than the previous version, made with fiber-reinforced plastic. These are designed for 130lb FRC bots, so I think they'll handle a ~20lb bot just fine. They're also completely enclosed by the chassis this time. To help increase impact tolerance, I'm attaching the wheels to the motor shaft via a magnetically-coupled hub.

1/2" disk magnets go in the pockets on the wheel and the hub cap. When attached, the hub cap soft-couples the wheel to the hub via the magnets (and friction). I'll probably stuff the inside of the wheel with something soft too so it floats, radially. The magnets should slip at around 20lbs of force, providing rotational and translational shock absorption but still allowing the wheels to break traction with torque to spare.

The gearbox is a Banebots P60 16:1 planetary, similar in size to what's on Twitch, Jr. But, Twitch X uses RS550 motors instead of 370s. Top speed should be around 20fps and it should be able to break traction at around 10A per motor. (So, plenty of overhead for pushing, if ever actually needed.)

The entire drive block rides on a radial and a thrust bearing set similar to what tinyKart uses for its steering. This means the whole bot sandwich can be properly preloaded without binding the linkage. In other words, I'm pretty sure I'll be able to bot-surf on it.

The linkages themselves have also been sized up, cut out of 1/4" plate and using 3/16" steel shoulder screws as pins (versus 1/8" plate linkages with 1/8" brass shoulder screw pins on Twitch, Jr.). You may wonder what massive metal-gear quarter-scale airplane servos are needed to swing these linkages. The answer is...none.

No Servos

While it's still a theory until proven in operation, I figured out some time ago that Twitch really doesn't need separate actuators to steer the linkages, which is great because the RC servos were the second most frequently broken part on Twitch, Jr. It's down to degrees of freedom and actuation. Twitch, being a holonomic drive in some configurations, generally has two translational and one rotational degree of freedom. But it has four independent actuators. There should be, then, one "extra" control mode that can steer the linkages if they're all tied together into one remaining degree of freedom.

As it turns out, this was how Twitch, Jr.'s linkages were originally designed. There is an extra linkage (or two kinematically redundant ones) that I call the sin/cos linkage, that ties the two diagonal wheel sets together. They don't rotate by the same angle - one follows a cosine, the other a sine, but they both go from 0º to 90º. I always considered this linkage optional, since with two servos to steer the diagonal wheel sets anyway, it didn't really do anything. But, in servo-less linkage drive, at least one of the sin/cos links is necessary.

The position of the last degree of freedom will be measured by one or two potentiometers mounted where the servos would have gone. This will go to a feedback-controlled output that gets mixed in with the other three degrees of control. All four control outputs can contribute to each motor's commanded speed through this mixer. It should also more smoothly handle all positions between forward and sideways driving, versus Twitch, Jr.'s discrete states.

Twitch Drive

Since there's only the four motors to control, I could probably have just gone with off-the-shelf H-bridge controllers like I did with Twitch, Jr.. But PCBs are cheap and Cap Kart taught me how to make indestructible H-bridges, so I just did that. I haven't updated the circuit in any way...I just find different ways to redraw the schematic.

It's the same H-bridge design that's running my Tesla coil, just with the normal-sized HCPL-3120s instead of the supersized ACNW-3190s, and normal FETs (IPB014N06 for this build). The optos are wired in reverse parallel with an RC filter, which sets the LED forward current and the deadtime. It's possible, with a logic inverter, to present each phase to the microcontroller as a single tri-state optical input, high for high, low for low, high-Z for off, with hardware-based deadtime. It really doesn't get any simpler...

I jammed the H-bridge module into the corner of board and copy-pasted it three more times.

Each H-bridge gets a pair of low-side shunt current sense through a differential op-amp as well. The FET thermal path isn't very good, but with good current control they should have no trouble driving RS550s on a robot this size with minimal heat sinking. In the middle is an STM32F3 (with its abundance of independent ADCs and Timers), an XBee, and an IMU for feedback control of the rotational degree of freedom (pretty much a necessity for linkage drive).

Parts are incoming just in time for a weekend robot build, I hope!