Masih Proses, Mohon Sabar :D
Sponsored By :robotq.blogspot.com.

Senin, 07 Februari 2011

Andrew Miller's 2-Motor Walker Tutorial ( Part 1 )


Preface

The material in this appendix is directly derived from a set of tutorial web pages authored by Andrew Miller. Andrew has since moved on to other pursuits (that pesky "work thing," don'cha know...), so in the interests of education, I "prettied" up his treatment a bit (the original was so rich in font styles, that it was a bit distracting), cleaned up some terminology and spelling, and gave it a home here.
Thus endeth the preface...

How Do I Make A Walker?


Andrew Miller's 2-Motor Walker Tutorial ( Part 2 )

What to do with the circuit

Add LEDs for visibility

The basic circuit is just like a spinal cord without anything attached. You need some sort of clue as to what it is doing, so add low power LEDs to the output of each Nv. This makes it possible for you to see what's going on. You can't drive motors yet but until you are accustomed to the basic stable states of the microcore the motors will make even less sense than the LEDs.


Andrew Miller's 2-Motor Walker Tutorial ( Part 3 )

Leg Mechanics

Editor's Note, Also See: Equalizing Leg Swing (Mechanical Method)




The motors

This is probably the biggest consideration in a microcore walker. The level of success you have with your walker is directly related to the type of motorused. The microcore itself gets an implicit feedback from the motors, this is what gives it the adaptivity.

What to look for in a Motor....

  • Efficiency: This is really important both from a power consumption standpoint (better the motors the smaller the battery you need) and from a power to weight ratio. The better the motor you can get the better your likelihood of success. You should look for a motor with at least a 35% efficiency rating, good cassette motors and pager motors typically fall in this range, Mabuchi hobby motors are WAY off (typically 10%). Much higher efficiencies are possible (up to 88%)but this is usually found in expensive medical grade motors like "Escap" and "MicroMo". Keep your eyes open when perusing the surplus catalogues, these sometimes go on sale for as little as $5.
  • Size: For the most part smaller is better, but it's not as important as efficiency. You also want to consider your own skill level, don't try to work with really small things for your first go at this.
  • Numbers: Buy extras; even the best of us can really mess up a motor.

The gears

You can't build a walker without them. Most DC motors usually run far too fast (1000's of RPM), and don't output enough torque.

What to look for in a gearbox...

  • Efficiency / Size / Numbers: For all the same reasons as above
  • Compliance: This is really critical -- you should be able to grasp the output shaft with a pair of pliers and be able to turn it and have the gears spin back to the motor. If you can't make the motor spin then you have a gear train that is too inefficient (most likely) or too high a ratio. Worm drives are also OUT, they only go one way (motor to gear and not gear to motor) and they tend to choke under high loads.
  • Output RPM: The ideal is about 30 RPM@ 5V. More than that means that you probably won't have enough torque (and if you do the damn thing will jump around so fast it's hard to figure out what it's doing). A lower RPM means that the machine may be moving too slow to be of use as well the ratio may be high enough that the legs can actually bend themselves under the torque load.

Interfacing motor and gears



I STRONGLY suggest you find a factory motor/gearbox combination

If you have to build your own then bear a couple of things in mind......


Materials

Solder is our friend, and the better your materials solder the easier it will be to build a frame. Welding wire or filler rod is the best bet. Copper clad carbon steel rod 1/6" to 3/32" diameter is cheap and available at any welding supply place. An nice shiny option is High Nickel filler rod used for TIG welding cast iron but its MUCH more expensive brass tube and wire found at most hobby shops is a good bet as well. I suggest a solder with an Organic/water soluble flux, "Hydro X" by Multicore is my favorite.

Basic frame layout










This is the basic layout, you want to keep the motors and output shafts lined up front to back and the front motor should be tilted at 30 degrees. This means the front motor will supply lift and push but we'll discuss that more later. You should mount the motors far enough apart to fit all your electronics including batteries in between (usually about 4").

Adding the legs










Leg shape and configuration will vary greatly between machines. A few things to bear in mind are:

  • Contact point: This is the most important aspect of leg design. The shape of the leg is less important as where it touches the ground. By placing you robot on a sheet of graph paper as shown here you can get symmetrical contact points.
  • Width: Try to make the legs at least 2/3 the length of your robot, this of course will depend on the available torque. It has also been shown that making the back legs slightly wider than the front helps in stability.
  • Connection: Make sure that your legs are connected with something structurally sound, krazy glue doesn't cut it. If you can't solder the legs directly to the output shaft then try and find some sort of locking ring or set screw that will fit. Look for brass gears or pulleys that have their own set screw and then you can solder the legs directly to the brass. You can also use Junction Strips and Terminal Blocks to screw the legs to the motors shaft.
  • Angle: By angling the legs slightly forward the legs will have the ability to "ratchet" over obstacles

Your legs will change shape several times before you are done so its best to make a set of "test"legs that are easily recoupable before you use the good materials. 12 or 14 gauge household copper wire makes for effective reconfigurable "Gumby" legs.


Making it walk

Time to make a minor detour here ( you may have noticed we don't have the microcore connected to anything yet ). Move on to the next section, "Interfacing the MicroCore With the Leg Motors".

Andrew Miller's 2-Motor Walker Tutorial ( Part 4 )

The MicroCore / Legs Interface

Rethinking the Nv net

By now you should have familiarized yourself with the basic 6 Nv microcore circuit. But a little math and you'll notice that with two motors and two directions each, 4 Nv's would seem appropriate. For basic walking function only 4 of the 6 available Nv's are needed in a two motor walker (although 6 makes for a whole new set of behaviors), so rebuild the basic circuit so you get this....




Have no fear the other two Nv's will be useful later...

The 74ALS245

The 74ALS245 is an octal bus transceiver designed for data transmission. Well, we're going to use it to drive motors. If you've chosen you motor / gear combination properly then this won't be a problem. If you dig up a TTL data book you'll see that the 245 has 8 bidirectional non-inverting amplifiers each capable of driving 50 mA, a direction pin (Dir) for selecting which way through the chip and an enable pin (E).

If you tie the Dir pin to Vcc and the E pin to ground, you can essentially think of the chip as 8 active drivers going from left to right like this graphic....








A data book will show you more but for the purposes of driving your legs this'll do......

Note that the ALS ve

rsion has been found to be the best for current, feedback, etc. CMOS (HCT, HC, C) will work but they lose a little in the feedback. They do consume less parasitic power so for Solar Powered|solar apps]] they are the better choice.....

If you are building a battery walker use ALS wherever you can (contrary to what some people will tell you you can still get them.... try DIGI-KEY).

Editor's note: the 74ALS245 will only work well with a supply voltage of between 4.5 and 6.0 V -- unless your source is within this range, you'd be well advised to use a 74HC245 instead

Ganging up for

Current

If you've tested your motors you probably find that they need a little more than 50 mA to do anything useful.
[Editor's Note: This will depend on the motors selected for the task]

And with a little math you'll see that there are 2 drivers available for each Nv, so gang them together like so....




The result is four drives capable of 100 ma each. Good but not great....

So if you need more, double your output by stacking a few chips...





The connection

So now you have a 4 Nv loop set up and a 4 channel driver set up. The next step is to glue em together and add the motors. Kinda' like so...








Power Up

Power on the whole thing, stabilize the loop (one process), and you should get this:





If things aren't right change the motor polarity on one of the motors and it should work.


Andrew Miller's 2-Motor Walker Tutorial ( Part 5 )

Convergence, or the subtle art of falling over


Well this is where we try to make your pile of wire and batteries walk -- the counterintuitive part of the whole thing.

Most people are of the misunderstanding that in order for a robot to remain on its feet it has to be balanced at all times. This is the train of thought that leads to so many 6 leg walkers (three legs is a stable platform from which to move your other three). Although this is in some cases successful, it makes for a robot that doesn't adapt well. Walking should be thought of as controlled falling. Static balance is not the key, rather it's dynamic imbalance.....

There are several ways to make your walker stumble around right, all of which are in some way related to the center of gravity of your bug. None is more important then the others, nor is it possible to make it walk without adjusting all of them.

Nv Time value

You'll note that in its raw state the Nv is just an RC time value (but remember it is not a constant, it adjusts itself according to load). So at a base level you can change the duration of rotation of each of the motors. One Meg Ohm is the default value, it is just a good starting point. You can adjust the values as big as 20 Meg Ohm or as low as a few KOhms. By changing the duration of the leg's movement you change where it stops. If you think of the Walker as a first class lever and the feet as fulcrums, you'll see that the position of the leg when it stops is crucial to which direction it tips.

Weight Redistribution

By moving the components from front to back you change the center of gravity. The batteries are a good candidate for this since they are invariably the heaviest thing on the bug.

Leg Shape

This is the thing most likely to change dramatically; by bending the legs back and forth you change the fulcrum point and thus the balance. Remember that contact point is more critical than leg shape (refer to the leg mechanics Section).

Baby Steps

All parents take great joy in watching their children take their first steps. Joy is not usually the emotion that roboticists feel....

Be patient.

What It should be achieving

The easiest way to get an idea about what the legs should be doing is to step through the motions manually.

This is where that compliance thing comes in. If you can't move the legs manually then the motors are not going to provide an appropriate feedback to the microcore.

By twisting the front leg CW about 45 degrees off center and the back leg about 30 degrees CW you have what we'll call start position. The walker should now be balanced with it's front left foot in the air and be just on the verge of tipping forward onto it.

This is where the dynamic imbalance thing comes in, the robot literally falls over onto its front foot.

You should be able to tell if it's at the tip point by giving it's butt a little tap, it should tip to the front foot and stay tipped. If it doesn't, try moving the battery front or back in order to find the balance point (leg configuration will come later). The next step (literally) may or may not be obvious. By moving the back legs CCW you will move the fulcrum back thus making the front tip down and the rear right foot raise off the ground. Keep rotating it until you have moved 60 degrees or so, the front two feet and the back left one should be flat on the ground and the rear right will be just off the ground towards the front of the walker.

The walker has just completed a half a cycle (two Nv processes).

Now by moving the front leg CCW 90 degrees you will provide lift and drive with the front left foot and raise the front right in the air just to the tipping point. Now its time for the rear to produce the drive forward that tips the walker forward and raise the rear left foot while stepping. This is done by rotating the rear CW 60 degrees.

TADAA! One walking cycle and a full loop around the microcore.

Now go through that a few times manually with power off and familiarize yourself with what it should be achieving. You may have to move the battery around and change the legs a little. But remember that symmetry is very important. In order for both sides to be doing the same thing you have to have the feet contacting in the same place with respect to the body (how the leg gets there isn't as important). See leg mechanics.

The body should also sit flat when all feet are down and the legs are straight out. If the body leans, then one leg is shorter than the others and your bug will limp (but then, so would you if one leg was shorter than the other).