Thursday, May 15, 2014

Larry Version 5.0

In version 5, Larry tried out a set of wheels instead of tracks.  Tracks work better than the wheels and admittedly draw more power; but, they also have much better traction and more precise turning abilities.  Wheels slip and then who knows what direction Larry might go in.  To compensate, I had Larry turning pretty slowly so he doesn't do burnouts on the carpet and thus lose direction.

Larry also had a new configuration in V5.  I've moved the motor that drives his IR sensor into the chassis.  This significantly avoids Larry bumping his "eyeballs" on things he just doesn't see - like totally black walls that absorb all light, or stainless steel that reflects light somewhere except back to Larry's sensor.

In V5, Larry made decisions based on furthest perceived distance.  He'd look left, behind and then right and choose the greatest distance.

At issue is the fact that without making Larry's IR sensor scan 5 or 10 degrees to both sides, he'll have offset head-on collisions with terrifying objects like upholstery and the resulting crash will cause him to go belly up (literally).   The light front end makes it too easy for it to happen.  Larry's last accident is pictured below.

Since I've done the eye scanning thing in a previous version, Larry has ridden his last stretch of carpet.

Thank you Larry for all the entertainment and learning about how to control your motors and read your sensors.  Unlike other things, reincarnation will happen for you.  RIP.  You'll be missed.




Thursday, May 8, 2014

Larry V4.0





So, the point of Larry 4.0 was to work with turning power from the motor 90 degrees.  That was accomplished; although, it's a little clunky.  Gravity is what holds the gears together and the delicate balance is upset by the tension of the sensor cable.  Wrapping it around a post helped.  Also, the torque on the motor is offset by a single pin that prevents lateral movement.  Unfortunately, given the pin points available, this is the only option in this configuration.

In version 4.0, I moved the motors to a vertical configuration.  This was to accommodate a smaller base as the wider base was bending in the middle, giving Larry a very broken appearance.  To make the configuration work, I had to turn the motors around and negate the power values in the programming to make Larry move in the right direction - forward is back and back is forward.

There's only one other thing (right now) that I'd like to work on with Larry.  In V5.0, I would like to move the little motor inboard and vertical.  This will allow me to rotate the IR sensor 360 degrees.  I will re-program Larry to look for a better path, not one that is just 35 degrees off center and go there.  I am also considering playing with the gyroscope and moving Larry to 2 wheels only.

More to come.

Friday, May 2, 2014

Larry V4.0 coming soon

Larry has been undergoing trials and there are some software and hardware changes coming.

Issues are:

*  Larry "steps" though his assignments and doesn't have flow.  This is because I'm programming him to take a step, evaluate, repeat.  There's another way that will allow Larry to move more fluidly.

*  It's clear that the infrared sensor responds differently to stainless steel surfaces and very dark surfaces than it does to light painted surfaces.  As a result, Larry will smash into stainless steel or dark surfaces like they aren't even there.  Looking side to side isn't much help.

*  Turning Larry 1 unit makes him turn about 40 degrees.  This is too much.  There is no way to make a 90 degree turn, or anything close to it.

*  Larry currently turns right, unless he's made 3 previous right turns, then he turns left.  Larry can get trapped still.

The solutions to these problems are a combination of programming and mechanical engineering.

Making Larry's motion more fluid is a programming issue.  And this is addressed in this version.

Dealing with the infrared sensor is also a programming issue.  In this version, Larry adjusts his forward speed based on his perceived distance from an object.  The closer the object, the slower he goes, until he reaches a certain point and needs to turn.  Hopefully this will take care of this problem, otherwise, I'll need to implement a touch sensor.

Getting more precise control over Larry's turns is a mechanical issue.  Currently, the output from the motor goes directly to the track, or a 1:1 ratio.  In version 4.0, a gear train is being implemented with 1CM, 2CM and 3.5CM gears.  This will give a 7:1 gear ratio or 7x better control over his turning.  At issue is the lack of 1CM gears.  The initial kit only comes with 2, and I need 2 per track.  I also need more yellow hubs.  It looks like I'll be looking for Lego store tomorrow to see if I can swing by and grab some.  Otherwise, I'll be ordering them online and waiting a few days.

Redesigning of the tracks with a gear train means I need to adjust how the track mates with the frame.  If I simply re-mount it, the CG will be too far aft.

In this version, when Larry reaches an obstacle, he looks about 45 degrees to each side and turns to the side with the greatest room between him and the next obstacle.

The pic below is the track assembly without a gear train and the new one, with a gear train...




Tuesday, April 29, 2014

Larry V3

Larry did a lot of schooling last night.  He's at version 3.0 now.  He can now play a note, counts to 3 and realizes that zero is a number.  Many problems solved.  Larry is getting smarter and hung up less.  In this pic, he's looking a little peaked.  He's been through lots of testing and two battery packs today.


Notice the low sensor.  Larry won't approach something he can't climb over now.  I haven't tried overhead environments; but, I'll test that sometime later.  Also notice that Larry has a third servo that drives his eyes.  He constantly scans back and forth looking for things he might run into.  At this point, Larry will only get hung up on objects that he approaches at a very shallow angle.

Larry had to learn how to count today.  Up until now, Larry could get trapped in a place where he needed to make a left turn to get out.  So now, every 4th right turn in a row, Larry will make a left turn instead.  When he makes a left turn, the count resets.  He can still get boxed in; but, he's also not making 90 degree turns, so he tends to find his way out after the first couple times around.

Next steps for Larry...

*  Larry simply needs help on his undercarriage.  He should be proud of himself and not have droopy drawers.

*  Larry is going to learn how to pick a direction of travel instead of counting turns.  This will be done by choosing the most open path and a speed appropriate for that path - tighter quarters, slower speed.

Monday, April 28, 2014

Introducing Larry


Larry is my first robot.  I made him with the Lego EV3 kit (review later).

I started working on one of the 5 robots that are suggested by Lego; but, bailed after I got the base done.  I couldn't see any reason to make a tractor robot with  a spinny looking propeller on the front.  By the time I had the tracks together, I was very familiar with the Lego framework and decided I wanted to start playing with the ultrasonic sensor and the programming.

For those firefighters in this blogsphere, Larry is programmed to do a left handed search.  I could put a camera on top of Larry and you would see my house from the perspective of a cat or small dog.  The whole point was to learn how to program the brick to do things.

Larry is in pretty good shape right now; but, there are some problems that need to be overcome in Larry V2, such as:

*  The ultrasonic sensor has a narrow field of vision.  Larry will hit an object not directly in front of Larry; but, in line with one of the tracks.  When that track stops and the other keeps moving, Larry moves toward the object and gets hung up.

*  The ultrasonic sensor will look over an obstacle that is only a couple inches high.  Larry will hit this object with gusto.

*  Larry is not programmed to stop.  He will search until he dies, or gets hung up.  Since Larry also doesn't know what he's looking for, he keeps searching.

*  Larry needs stiffer britches.  His tracks kinda cant inward.

*  Larry has no concept of gravity requiring a surface to move on or injury.  If started on a table, Larry will charge off the end of the table, fully expecting to survive the fall.

Other than that, Larry will do the left handed search pretty well.  V2 will fix the first 2 problems by moving the ultrasonic sensor down, midway between the top and the bottom and if possible, include a turret that allows Larry to look left and right.  I will also adjust the programming so that Larry looks left occasionally to make sure there isn't an open room that needs to be searched prior to continuing forward.