Übercløcker RЭmiχ RЭvived, and SEGFAULT Update 2

In the last Überclocker-related post, I said

this conversion ought to go quickly since I’ve already drilled the new mounting holes to accommodate them.

By this I meant ”

this conversion ought to go quickly since I’ve already drilled the new mounting holes but am swamped with classes, other duties, and a lack of motivation to do anything robot-related so Überclocker has been sitting on a table at MITERS taking up work space for two months

But that’s over now. I charged the Mental Capacitor of Project Motivating (+1) enough to go take apart the drivetrain to stuff the DeWalt motors in. The whole operation actually took about 30 minutes total, by the way, it’s just that the time constant of the MCPM is a semester or so.

Here’s a picture of the robot.

I excavated the carcass of Test Bot SP1 to use as a chew toy for testing ‘clocker. There’s no test video, unfortunately.

I can’t exactly describe the new drivetrain as “Fast”. In fact, I think the HTI motors resulted in an overall higher speed, but not by much. Calculations put the anticipated top speed around 8 to 9 miles per hour. The bot isn’t slow by any means, but it was almost too controllable. I like a bit of unpredictability in robot handling.

For future events, I might consider recutting the intermediate drive gears to act as a speed increaser. 8MPH is nice for small arenas and stages like Dragon*Con, but in a larger arena it is a handicap.

Here’s an overall picture of the robot internals, now featuring DeWalt drill motors mated to undoubtedly overdriven Harbor Freight drill gearbox parts.

Segfault

Alright, so I’m pretty damn sure the project is moving forward now, considering I just dropped big Benjamins on aluminum plates. The project has actually been limbo for a while because I’ve been slammed with everything else that does not pertain to building. As the assignments-and-papers season winds down and OH-GOD-EXAMS-AND-FINAL-PROJECTS season begins, there’s an occasional moment where I can… you know, do other stuff.

I’m also in luck because I have no classes this term which have final exams.

In the last SEGFAULT episode, we left off with a picture of two wheels.

Like before, not exciting at all. Through some more excavation of the archaeological site that is MITERS, I sequestered these 180 watt DC scooter motors, which seemed to have been paired with the wheels at one point in time. They have matching pulley pitches.

The pulleys gave a speed reduction of roughly 6 to 1. Through some crafty mathematics, I backsolved the specs of the motors so I can actually play some numbers games.

The manufacturer, Unite Motor, was kind enough to give some measurements of torque and current for these motors. Real measured numbers are better than theoretical ones, and leaps better than bullshit such as “TURNS” and “WINDS”.  The rated torque (Tr) and rated current (Ir) were 0.7 N-m and 10.6 A, respectively.

This was nice because if you have torque and amps, you can immediately get a critical constant of the DC motor, the torque constant (Kt). The Kt of this motor , Tr/Ir,  is 0.66 Nm / A.

This alone doesn’t tell me much, because I don’t know what the maximum torque of the motor is if I don’t know how many amps it can ultimately pull if stalled. This is not provided by Unite Motor, shame on them.

But fortunately, they also gave a rated speed specification, which occurs (I hope to Robot Jesus on a stick, anyway) at the same point they rated Tr and Ir. This rotational velocity ω at the rated input voltage Vin of 24 volts is 2,600 RPM, or 272.3 radians (rad) per second.

In an ideal motor, power in equals power out. Power is torque (T) * speed(ω) AND also volts (V)* amps(I). Therefore, the crafty relation T/I = ω/V occurs.

Hey, this is convenient, because what it’s saying is that in SI units, torque per amp IS speed per volt. The motor back-EMF constant, Kv, is equal to Kt. So this motor as an ideal model gets 0.66V / rad / s. This is to say that if you turned the motor at 1 radian per second, it would generate 0.66 volts for you. Conversely, running the motor at 0.66 volts will make it turn 1 radian per second. Kv = Kt only works in metricland, by the way.

But real motors aren’t ideal transducers. They have resistance in the windings that turns input power into heat. A real motor can be modeled as a resistor in series with the ideal motor. The resistor drops some voltage across it while the motor is under load, so the ideal motor sees some value below your input voltage.

Luckily, I know that the motor is rated for 24 volts Vin while turning 2,600 RPM or 272.3 rad/s and having a BEMF contstant of 0.66 V/rad/s. This means the voltage the motor is generating by virtue of turning, Vbemf = 272.3 rad/s * 0.66 V/rad/s = 17.97v.

Even better is that this is known to happen while Ir amps are flowing through the windings.  When you have the differential voltage across a resistance and the current flowing through it, you know the resistance R through Ohm’s Law.

So the motor resistance Rm is simple (Vin – Vbemf) / Ir = 0.56Ω.

Now the stall characteristics of the motor can be calculated. When the motor is stalled balls to the wall, Vbemf = 0 because there is no rotation. Rm dissipates all the power you put into the motor, and the only current flowing is therefore Istall.  Through Istall = Vin/Rm I know that the motor will pull a maximum of 42 amps. Then smoke. At 42 amps, the motor can make about 2.75 N-m of torque.

The no-load speed of the motor ideally occurs when the input current approaches 0. In practice this never happens because of Rm, but the NL speed is something that has to be measured. I can only conjecture on how fast the motor will turn with no load by ωnl = Vin * Kv, and assume the motor current to be something small. This usually gets you within 10% or something. The guessed no load speed of these motors is around 345 rad/s, or about 3300 RPM.

Okay, enough DC motor theory.  So now I wanted to find out what the limit is in terms of speed and tilt angle if I used these motors and their matching wheels.

Here’s a (really, really) rough model of me on a balancing vehicle. Segway-type vehicles are a variant of the inverted pendulum, a classical problem in control theory and physics. The actual equations of motion for such a system are a bit convoluted, though rest assured I have been forced at chalkpoint to derive them step by step.

I just want a ballpark number for how fast I can go, so I can gauge the type of helmet I need to prevent too much brain splatter when I fall over. This can be easily approximated in the above system, where you have a point mass approximation of me, tilted out in front of the vehicle by an angle Φ, and away from the center of rotation by a distance d. d is the distance that my center of mass is above the vehicle platform. In a typical human, the CoM / CoG occurs a bit above the hips. I assumed this was 1 meter for sake of argument, since I’m not that tall and this is not very scientific. The vehicle itself is assumed to have no mass yet. This is a very bad thing to assume, and strictly limits this to guessing “steady state” characteristics – i.e. no acceleration of any kind is allowed.

In classic 8.01 fashion, the goal is to keep me-in-a-black-hole from acclerating. That means all forces and torques have to be balanced.

Φ is referenced from the vertical, so the Condensed Matter Charles Equivalent Force Diagram™ is thus. N is provided by the ground – we are assuming I’m on solid ground here, not flying, so the vehicle doesn’t have to generate lift. This may also be bad assumption.

That leaves just F and mg sin Φ to fight it out.  The latter is provided by me existing and also tilting the vehicle forward or backwards. F comes from the torque of the motor and the radius of the wheels: F = T/r. Therefore, mg sin Φ = T/r.

The uber-ballparked approximate steady state model of the vehicle is then given by Φ = arcsin ( T / mgr ). If I have a torque figure, I can estimate the maximum angle of tilt that the motors can sustain while moving at constant velocity. That means if I run over a pebble, it’s all over.

To avoid this scenario, I want to size T to be under half the stall torque of the motors. The reason is that Tω = VI maxes out at one half of any of the input variables. This is the point which the motors make maximum power. If I’m crusing at maximum power, there is no recovery if the unstable system deviates further from the vertical because the motors can’t exert any more torque without slowing down. Which of course will only make the situation worse.

I decided that 33% peak torque was the “safe point”. This gives me some leeway such that the motors can exert a momentary, more powerful shove to counteract my attempts at crossing the critical Φ. The real Segway does something like this – if you try to go too fast, it will start tilting back to save your ass (/face).

33% of stall torque for my two motors driving a 6:1 reduction  on 4″ radius ( 0.1m) wheels is  (2 * 2.75 N-m * 0.33 * 6) = 10.89 N-m. So that gives Φ = arcsin ( T / mgr ) of 9.6 degrees or so.

Decently smooth. 10 degrees is pretty steep for a lean angle during travel, but I was concerned with the peak torque (/force) limiting how quickly the platform could react to a sudden input like me jumping on it. If this is limited, then the whole vehicle will feel sloshy and risk not being able to recover from a sudden disturbance, like hitting a small child.

Okay, so I’m not designing to target small children (honestly!), but things like bumps in the ground, terrain changes, sidewalk seams, door and hallway thresholds, etc. all represent sources of external disturbances.

Having these numbers, I put the motors into the parts bin (i.e. LOLrioKart) and began working on vehicle design.

This is a kewl motor.

I wasn’t able to design for too long before another intrepid MITERer mentioned that he crufted some motors out of a lab cleanup.

The deal with lab cleaups here is that the proper response as an engineering student is, as soon as you receive an email containing the words “LAB CLEANUP” or similar, drop everything you are doing and immediately report to the scene to claim cool stuff. Sadly, I don’t make it to many of them, but a surprising majority of cool Reuse stuff goes to MITERS because there are so many of us that at least one person is on guard.

These are Kollmorgen Servodisc motors, renowned in the industry for being flat and pancakey…as well as being extremely power-dense. They are coreless motors. That means there is no big iron thing in the rotor to accelerate, and such motors can reach extremely high angular accelerations. That means they respond to commands fast.

Fast is good. Also, Kollmorgen, being a legit motor manufacturer for legit industries, completely chracterized their motors in the datasheet. Even handily providing me with armature inertia if I care to include that in the system dynamics (hint: No.)

These type U9D-E motors are attached to 10:1 precision spur gearboxen. Convenience in motor form – so I borrowed them on good faith that they won’t be baked or damaged. I sincerely hope this will remain true, because I sure as hell can’t possibly afford these motors in real life.

Running the numbers, I got that the vehicle could achieve almost 30 degrees of forward tilt. This just shot the error margin into low earth orbit, so the ‘morgs win the motor race. When the vehicle is 30 degrees off kilter, shit has gone down anyway. Or is about to go down. Hard.

With these, even if I was completely wrong on the physical modeling, I’d have enough torque capacity to tune the final system to taste.

What to do with kewl moters? Digitize them!

I like motors that are flat colors and prismatic.

Hey, it’s a circle.

I’ve recently taken a liking to the truncated circle profile. This is clearly visible on my 2.007 robot. It’s alot less boring than just plain square sides.

SEGFAULT is built around a 24 inch diameter circle. Having an actual 2 foot circle as a baseplate is excessive, so the ends will be clipped off.

Underside, showing the motor carriers.

The circle is cut where the motor modules end. The overall length is now around 17 inches.

…Okay, just a LITTLE LEAP OF FAITH THERE.  What the hell is that?

I skipped over more screenshots of the CAD work because it was essentially done in one night. That means it sucks and is riddled with flaws. I’m putting this here because it will probably represent the overall shape of the thing, even if details change.

The frame is all 1/4″ and 3/8″ aluminum appropriately waterjetted and T-nutted together. I’m currently on a mission to reduce the sheer amount of metal used in construction. While the whole thing (including stick AND both drive motors!) only weighs 36 pounds, it needs alot of metal. And it’s a waste of the metal, because the plates are totally trussed out and hollow.

What was that I said about it sucking and being done in one night?

The difference between this frame and essentially all the other DIY balancing vehicles is that it has tiny-ass wheels. I mostly chose this route because i already had said wheels. In order to fit components, then, I had to make an “middle deck” above the motors, where most DIYers will just put parts between the motors and under the top platform. A bit convoluted, but I don’t want to go back and redesign everything. Batteries go in the middle deck, along with most controls.

There’s nothing on the stick yet, because I haven’t gotten around to it. At most, there will be a simple panel dashboard showing battery voltage and probably speed, along with a main power switch. And handlebars.

Steering will be performed by tilting the stick left and right, so there’s no conventional grip throttle like on the first generation Segways.

Alright, enough is enough. Time to start on something – pay attention to this space. And I promise that SEGFAULT will get its own page soon!

ω

The Fall 2009 Roundup: Überclocker Updates, RazEr Redux, Analog Antics, and the End of the Tragedy of the LOLrioKart

…wins for the longest post title EVER on this site. That’s because it addresses quite a few topics. I can finally characterize the academic term so far as having entered a steady state, which just means I know which nights I can bumble away safely, so it’s time to step up work on the projects. I’ve devised a list of theoretically attainable goals for the next few months, stretching into the coming winter months.

Überclocker Remix

Let’s start with some pictures of epic motor ownage. I cracked open the toasted HTI gumball machine motors out of curiosity after removing them from the bot. What awaited me inside was a scene of utter devastation.

That doesn’t look very healthy. It appears the commutator decided to just melt off the backing material. This motor actually still ran, just throwing blazing white sparks everywhere. The discoloration of the copper next to the crater attests to the extreme heating that occured.

The brush cap from the left side, which simply failed open circuit at the event. Well, now the reason is clear why it failed open. Half of the brush conductor spring just sort of flew off and melted itself into the other side of the plastic brush holder.

The carbon brush itself was bouncing around inside the motor.

Another view. That bit of spring must have been pretty hot to instantly melt itself into the plastic.

And another view of the copper droplet that is the commutator. Oddly enough, the windings themselves seemed for the most part to be just fine.

Here’s Überclocker looking decrepit on a table. Since a robot with no motors is akin to a dog with no legs, or a fish with no fins, I began the quest to search for a… well, more legitimate motor. That’s when I remember that I found these, from Way Back.

DeWalt drills are classic musclebot motors. Sadly enough, these were of different voltages (!?), which not only surprised me as to how on earth their previous user expected their creation to move in a straight line, but saddened me because I… well, want mine to.

It was enough to perform a fit test and draw up plans to modify the gearbox to accept these motors while UPS channels their Brownian Motion to get a matched set of motors to me. They are the “new” DeWalt motors, where “new” is relative to 2003 or so. These drills have 3 speeds and are infinitely more of a bitch to mount. So I will only be using the motors in my custom frakenb0xen.

Fit test. The good news is that these motors are roughly the same length as the 700-size HTI motors, but a little fatter. No issue, considering the gearboxes have plenty of wiggle room.

The gearbox modified to accept a DeWalt motor, with its Alien Technology Motor Pinion of neither metric nor Imperial tooth pitch. Needless to say, this will be removed and the HF motor pinion crammed on in place.

So am I over-motoring the HF drill gearbox parts by putting a real motor on them? Perhaps. However, I think it’s a legitimate move in a 30 pound robot, because the laws of physics dictate that I can only put so much power to the ground. I’m mostly after the “real motor” bit, not so much increased drivetrain power, because the robot doesn’t have the traction to use it.

With motors now on the way, this conversion ought to go quickly since I’ve already drilled the new mounting holes to accommodate them. Überclocker should then be able to attend more events.

The (Possibly?) Final Chapter in the Tragedy of the LOLrioKart

So by now all ya’ll have probably heard of this.

While the details surrounding the citation were totally illegitimate and imply a degree of recklessness that was not present at all, the bottom line is that the kart is not going on any more open road adventures until it’s legit. And by legit, I mean registered and insured and fully street legal.

Whatever measure this takes, it will happen. It will simultaneously the most confusing and most glorious thing on the planet.

But the good news is that through two weeks of intense demos and driving during Orientation, the kart didn’t explode. The motor controller, version 6, is more or less stable. That’s huge. That’s like, me doing something right in electronics for once.

Of course, if I actually run the numbers on the electrical characteristics of the power converter, it would probably make real EEs run away to vomit. But the kart has survived more than twenty power cycles without misbehaving, save for the flakey DC-DC converter that caused the initial failure of version 6. A replacement module with better-designed (read: existent) filtering solved the problem.

So I’m satisfied. There will be little active work on LOLrioKart this term, with most of the fleeting effort concentrating on the battery system. After said weeks of operation, two cells in the battery pack are now just resistors. I regularly saw the voltage dipping under 45 volts on acceleration, which is concerning to say the least. Battery management solutions are condensing around me, so I may make the jump to lithium iron phosphate cells.

Now let’s move onto the new shiat.

This is a Xootr Street push scooter.

Gee, that looks kind of like every other push scooter on the planet. You know, like a Razor scooter. I thought you already had one of those? With like… a motor on it, right? That you built? I heard you built a motor. Can you show me how that works? Can you build me one?

… </average_miters_visitor>

Oh, that’s the difference.

As much as I love RazEr when it works, it’s time for me to realize that it’s too freakin’ small. I’ve managed to hit the tiny-but-functional goal, and at the same time the maximum recommended rider weight a few times. With some more scrupulous design, I could probably fit more batteries in there, but otherwise all the useful space is essentially occupied. And while 5 inch wheels are great for shoving your average copier motor core into, they are not great for shoving into your average pothole.

I need something bigger. More legit™. So thanks to MITERS for coming up with an engineering sample of the Xootr Street. I won’t actually be making any mods to this one, since it’s … not mine, and stuff.

This thing measures a bit over 3 feet long when fully deployed. The wheels are 7 inches in diameter and cast aluminum. It’s the smoothest thing ever on the ground because of the large wheel-to-bearing diameter, which minimized rolling friction. And the deck is absolutely enormous….

… and HOLY MAGNESIUM JESUS ON A STICK. It is in fact CNC machined from billet aluminum. These guys are just like me, except with infinitely more style. A scooter? Made from real metal?

And the 10 center-side pockets are just big enough to comfortable seat two A123 26650 cells apiece! How about that. 20 cells yields almost 150 watthours of battery pack energy.

Ground clearance check. The deck height, oddly enough, is almost the same height of the Razor A3 frame. The wheel line is just an inch and a half or so higher to fit the 7″ wheels. Overall, as can be seen, there is about 1.25″ of “fiddle space” from the bottom of the deck (not including the pockets) to the top of the 1.5″ parallel.

This is good, because hiding all the goodies under the vehicle frame contributes to vehicle aesthetics and the illusion that something which is not supposed to be motorized is moving under the directive of an unknown force.

There are no motor drawings or plans for this yet, but the profile of the wheels and their spacious internal diameter make them amenable to stuffing axial flux coreless motors inside, maybe even one per wheel. I’ve been itching to build a real surface-wound (no iron core) pancake motor for a while, but have been put off by their complexity in manufacturing.

As more details condense from the bot-aether, I’ll give this project its own page, category, and possibly a snappy and witty name. This is not a high priority project, as I don’t even have the vehicle yet, and it might spill over into Spring term.

Spring is a better time to blaze around anyway.

Now Announcing Project SEGFAULT

Segways.

A bad pun on the word segue. A fundamentally unstable faceplant-waiting-to-happen of an inverted pendulum. A cool exercise and great demonstration of basic control theory.

DIY balancing personal transporters have been attempted and perfected many times before. It’s almost passè. There’s even instructions on how to do it and code for your choice of microprocessor. All you need is two fat motors, a rate gyroscope, an accelerometer, and determination.

The whole thing about “microprocessors” is what has been putting me off. I like to think I’m familiar with mechanical engineering principles. I’m shake on electronics and EE. But I’m the last person you want to ask about anything software related. I hate software. With a passion. Even though I use it ALL day, I shudder to see what goes on under the glitzy Web 2.0 interface, or under the ultrasonically-welded sealed cap of an Atmel chip.

…so that’s why I want to do it all in ANALOG ELECTRONICS.

That’s correct. Op amps, comparators, linear components, passives… it’s a 6.002 (or 6.101) paradise. I stochastically arrived upon this idea near the beginning of the term, but it took a few weeks before I took it upon myself to do some research on gyros and accelerometers, and sketch out a rudimentary control network composed primarily of rail-to-rail op amps.

Then I remembered that Dale had built an analog balancing robot, so naturally I read the site and discovered I was doing it totally wrong.

I have a sneaking suspicion that a relatively non-chaotic differential equation like the one that governs inverted pendulums can be pretty easily translated to a continuous time control system (analog, as opposed to a discrete time digital control system). The idea as a whole is to have a purely analog, continuous-time front end controlling a Class D amplifier, also known as a switching amplifier or if the output is bidirectional a locked antiphase amplifier. Basically this just means your transducer wiggles back and forth really quickly… but some times more in one direction than another, so the summation of the movements is a velocity.

But Charles, isn’t a switching amplifier a digital thing?!

Yeah, if I implemented a real linear motor driver, I would have a battery life of 30 seconds and require heat sinks the size of Hannah Montana. Sssshh…. don’t tell anybody.

With the plan now more grounded (HURRRRRRRRRR PUN) than before, I’m moving forward with the mechanical details, as I always tend to do first. Once I have a rolling frame, I could conceivably roll analog or digital, or mixed-signal. As always, this entails a trip to MITERS and a few hours of mining for parts.

Yeah, so it’s nothing much yet. I grunged these 9″ pneumatic tires for the project as they were the only two matching wheels in MITERS that weren’t already on something.

9 inches? Isn’t that a bit small (&thats_what_she_said;) ? It is, but there’s nothing fundamentally wrong with having smaller wheels on such a machine. It just makes obstacle negoatiation tougher. If anything, I can get away with having less torquey motors because of the increased mechanical advantage.

The design work continues! After I get my control theory a bit more in line, I’ll sketch up a schematic of what I think should work. There are endless supplies of linear circuit components at MITERS and kicking around the EE labs for experimentation. I have accelerometers and gyros on the way from Sparkfun for experimentation.

…Oh, that’s the other cheat here. Real, modern MEMS sensors. I’m going for the analogginess here, not period-realism.

SEGFAULT will get its own page and category as it develops. This is my number one goal for the end of the term, and I’m actually going to try to get the controller graded. Here goes… something!