Thursday, April 28, 2011

How Robots Solve Mazes

I have never built a robot that can drive through a maze and solve it, but I know that there are some algorithms to do so.  Over at the blog PATRICK MCCABE MAKES, Patrick shows a great, relatively simple algorithm to solve the maze using a technique he calls "left hand on the wall."

The robot travels through the maze once and maps a fairly good portion of it until it gets to the finish.  And then using a system to process the map, he is able to have his robot find a shorter way through the maze.  Then using that information, the robot easily navigates the maze in quick fashion.  It's an easy to read tutorial.  I like it a lot.  I don't think it is the most efficient way to solve a maze, and I think that using this method might not always take the very best route, but it will certainly get to the finish.

Click here to zoom over to his site.

Vintage LEGO Packaging

I ran into a great site that shows all kinds of vintage LEGO packaging.  I love this stuff and I wish I had more.

How Do They Do It? Lego Style

I found a great little video all about LEGO.  Enjoy!



 I know, the picture stinks, but we can look beyond that, can't we?

Saturday, April 23, 2011

How Stuff Works LEGO Quiz

Here's an interesting quiz on our favorite toy, although several questions I pretty much guarantee you won't get.  I thought that I knew a lot and I only got 13 out of 20.

Tuesday, April 19, 2011

Four Lego Delta Robots

Years of development, months of building and programming.  Here it is.



About the Lego Quad Delta Robot System.
This system uses four Lego parallel robots which are fed by two conveyor belts.  As items flow down the conveyor belt toward the robots, each item passes by a light/color sensor mounted on each conveyor.  When the item is detected, a signal is sent to the robots telling them information such as the color of the object, which belt the object is on and the position of the object on the belt.  The robot reaches out and grabs the item from the moving conveyor belt when each item gets close enough and moves it to a location based on the color of the item.

The cell is capable of picking and placing objects at a rate of 48 items per minute.  Each robot can move 12 items per minute, or it can move an item in 5 seconds!

DELTA ROBOTS
Delta Robots, also known as Parallel robots are commercially available from several manufacturers.  They go by names such as ABB Flexpicker, Bosch Paloma D2, Fanuc M-1iA, Kawasaki YF03N, and Adept Quattro s650H.  They are known for moving small objects very quickly, usually at two hundred or more moves per minute.  Parallel robots are often used in many industries such as the food industry where the payload is small and light and the production rates are very high.  Many times a series of parallel robots are used to do things like assemble cookies, package small items, stack pancakes and much, much more.

THE ROBOTS
Each robot operates independently.  The robots receive a signal from the master, which in this case is the NXT that controls the light sensors.  The signal contains information about the color, lane, and position of each object.  When the signal is received, the data is stored in a chronological array.  When the object gets close enough, the robot goes through a preprogrammed series of movements based on the information in the array. 

STARTING UP
At the beginning of each run, all three arms move slowly upward until they each hit a touch sensor.  After all three arms have reached the top they all move down together to a predetermined zero position and the encoders are reset.  At that point all the robots wait for the first signal which will be the master sending the belt speed signal.  The robots can automatically adjust movements such as where they pick up the objects based on the belt speed.

Immediately after the belt speed information has been received, each NXT brick will sound off in a timed sequence with their respective brick number.  This is an error checking technique.  If the operator doesn’t hear the full “ONE, TWO, THREE, FOUR, FIVE, SIX” there is a problem and the run should be terminated and restarted.

THE SIGNAL
The signal is an eight bit binary light signal that takes about 170 milliseconds to transmit.  The master NXT blinks the LEDs that are attached to each robot on and off at an interval about 20 milliseconds each flash.  Each robot is equipped with a Lego light sensor that easily sees the short flashes.  The same signal is sent to all the NXT bricks, but data encoded in the signal determines which robot will move the item.  The robot’s NXT brick decode the message and sends that information to a procedure that does the appropriate movements.

The binary signal is converted to a three digit number such as 132 or 243.  The first digit is the lane.  Possible values are 1 and 2 corresponding to conveyor 1 and conveyor 2 respectively.  The second digit is the robot number and the possible values are 1 through 4 corresponding to each of the four robots.  The third digit is the color of the object.  The possible values are 1 through 6, i.e.  BLACK=1, BLUE=2, GREEN=3. YELLOW=4. RED=5, WHITE=6.  The position of the brick is noted by the time that the light signal is received.  The robots calculate the position of each object by using the time when the signal was received relative to the current, dynamic time.  The belt moves precisely at 100 inches per minute so based on this, the position of the item on the belt can be precisely calculated.

A few signals other than brick information and belt speed are programmed to be sent.  The master can send an emergency shut down message in which all robots immediately stop what they are doing, drop their bricks and go to their home position as well as stop the conveyors.  Signals can also be sent to make the robots dance, play sound files and music files concurrently.

THE MOVEMENTS
The precise kinematics for the movements of the robots are dynamically calculated using detailed formulas that convert the Cartesian coordinates (x,y,z) of the location of the brick into the angles of the servo motors (theta1, theta2 and theta3) and vice versa.   This is the heart and soul of the robot.  Without precise calculations, this project would be nearly impossible.

As the gripper or “end effector” is moved around, it becomes necessary to calculate the best route for it to move.  The best route is usually a straight line.  This is done by locating the start point (x1, y1, z1) and the end point (x2, y2, z2) and then calculating a discrete number of points that lie on the line between the two points.  For each and every movement, the robot first creates an array for all the points in between and then moves nonstop from point to point to point through the array until it reaches the end point.

As the robot moves around, each motor speed is adjusted relative to the other motors speed in a manner that all three motors arrive at their target position at the same time.  This makes all the movements very smooth and the robot doesn’t shake too much.  The motor speeds are adjusted so that the robot moves as fast as possible.

Since the objects on the conveyors are moving at all times, the robot actually moves to a position where the object will be rather than where the object is actually at.  Also, when the robot grasps an object, it doesn’t lift it straight up, but up and forward slightly so that any objects behind the object on the conveyor belt won’t hit the object that is being moved.

It is possible for the robot to be overwhelmed by having too many objects to pick up.  Once an object goes past a limit point where it is too far to reach, it is removed from the queue and will not be picked up by any robot.

As the robots place items in the bins, the release point is shifted slightly so that the items won’t pile up.

THE GRIPPERS
The grippers are each driven using a single pneumatic cylinder.  The cylinder is cycled by a valve equipped with a medium PF motor connected to an IR receiver.  Each NXT is equipped with a HiTechnic IRLink sensor.  The NXT controls the gripper by sending a signal to the motor through the IRLink sensor.  The motor then rotates clockwise or counterclockwise for one quarter of a second to switch the pneumatic valve.  This is a very effective way of controlling Lego pneumatics with a NXT.

THE AIR SYSTEM
The air system must be robust because the pneumatic cylinders on the grippers move about 96 times a minute.  This requires a great deal of air.  The air compressor consists of six pumps (with the springs removed) turned by three XL PF motors.  The pressure is measured using a MindSensors Pressure sensor.  The pressure is kept between 10 and 13 psi to maintain good operational speed and gripping capacity.  The whole system will not start until air pressure is up to a minimum of 8 psi, and an audible alarm sounds if the pressure drops below 8 psi.  At this point, the operator can help the compressor by manually pumping up the system to the required pressure.

The three XL-PF motors are powered using a 9v train controller.  This is done so that consistent power is transmitted to the motors.  Air compressors tend to use batteries very quickly and using a train controller avoids that cost.

There are also six air tanks for storage, a manual pump, a pressure gage, and a pressure release valve to purge the system of pressure.  The manual pump is primarily used to assist the compressor if it can’t keep up.

The compressor motors are turned on and off using a Lego servo motor and a PF switch.  As the pressure sensor senses the pressure going above or below the thresholds, the motor moves the switch back and forth to add air or turn off the compressor.

THE CONVEYORS
The conveyors are controlled by a dedicated NXT brick.  The timing and speed of the conveyors is critical so that the items will be positioned accurately.  The speed of the conveyors is governed by a proportional controller.  They were originally controlled using a PID controller, but it turns out that a proportional control was adequate.   The speed of the conveyor can be vary from zero inches per minute up to two hundred inches per minute, but one hundred inches per minutes is the best for all the robots.

The NXT brick that controls the conveyors reads the same light signal information as all of the robots, but ignores most of the signals.

Each conveyor is ten feet long.

LIGHT CURTAIN/COLOR READER
The light/color sensors mounted on the conveyor do double duty.  Their default mode is as an ambient light sensor but they are frequently changed to color sensor.  A PF LED light is mounted opposite to the light sensor to give a high value of light detected.  When an item passes between the LED and the light sensor, a low light condition is detected and the sensor immediately switches mode to a color sensor.  This can be seen when the sensor briefly emits an RGB light as a brick passes in front of the sensor.  As soon as the color is correctly read, it immediately switches mode back to an ambient light sensor and waits for the next item.  When the color is determined, the brick then sends a signal to all of the slave bricks and an audible color sound is played.

There is a condition when two bricks pass by both light sensors at the same time.  It is impossible to send two signals at the same time, so the first item to be detected takes priority and the second brick signal is sent 400 milliseconds later.  A special signal is sent to tell the robot to adjust the position timing to account for the 400 ms delay when the brick comes to be picked up.

THE STRUCTURE
The frame structure holding the robots is highly engineered.  The combination of the weight of all the robots as well as the constant movement is a considerable problem.  The main horizontal member is achieved by layering Technic bricks with plates.  This configuration is very strong and has very little sag.  Movement is also minimized, but not completely eliminated.

The two main posts in the middle carry most of the weight and do a great deal to stop the structure from moving while the robots are operating.  The four outside posts help, but are mostly for support.  The diagonal braces are quite small relative to the size of the other members, but actually do a great deal to stop movement.

All of the posts are made from standard Lego bricks with Technic beams attached around to lock them together.  The structure is completely tied together as one piece, but can be broken down into eight parts for transport.

DEVELOPMENT
I have a personal fascination with this type of robot.  I find the movements mesmerizing and extremely interesting. The movements of the actual robots are extremely fast and accurate and defy belief.  I especially like the fact that the location of the end effector can be precisely calculated from the angular location of the three servo motors positioned at one hundred and twenty degrees from each other. 

This is not the first parallel robot that I have built.  My first delta robot was built in 2004 using the Mindstorms RCX and was very crude and not very useful.  After several more attempts, I finally found a design using the Mindstorms NXT system that worked well.  At that time I still hadn’t worked out the kinematics but I found a way to fake the movements by positioning the end effector by hand and reading the encoder values.  Then I used those values to create a series of movements that closely resembled an actual robot.

I have researched for about six years and built this project many times.  This project took about five months to build and program.  It was purely a labor of love for this robot.

I don’t know how to improve on the current design.  As you can tell if you have read this description of the robot, I have exhaustively researched and built to every goal I have.  Sadly, I believe that I have reached the limit of what can be built using only Lego building elements.

Friday, April 15, 2011

Animatronics

I was doing my daily internet browsing this morning and I found a video on Singularity Hub that shows some of the work of John Nolan, who specializes in Hollywood animatronics. But I warn you, some of the shots might take you back for a moment.



If you like that, there are a few more videos on this Singularity Hub post.

Thursday, April 14, 2011

Quad Flexpicker Nearing Completion

I thought I would give you an update on my personal project, the Quad Flexpicker, so here goes…

I started on this thing back in December 2010, so I have a few months into it now and I am actually getting close to finishing it up.  I pretty much have everything tuned in to where I want it.  The robots are much faster and smoother than my original Flexpicker.  In fact, it’s tuned so well it wears me out running it. 

Here’s why.  The conveyor belts run at one hundred inches per minute.  That’s not really all that fast, but it is plenty fast enough to keep the robots busy and the person loading the conveyors too.  You see, each robot is capable of picking and placing twelve blocks per minute, or a block every five seconds.  Multiply that by four robots and you will find that this robotic cell is capable of picking and placing forty eight blocks per minute, or just over a second each block.  The conveyors aren’t long enough (they’re ten feet long!) to be able to stage all the blocks before turning on the robots, so someone has to constantly load the conveyors at a rate of forty eight blocks a minute.  I am here to tell you that is moving fast!

I hope to have some video up pretty soon, but I have a few more things to do.  Here are some pics.

Here's a shot of the whole thing.  As you can see, it takes up two 6 foot long tables.

Here's a shot of the infeed side of the cell.  I threw on some bricks just to give you some scale. The two conveyor belts would carry the blocks away from you in this photo.  The two sensors mounted on the side of the conveyors are Lego color sensors that act as a light curtain and also retrieve the color of the block.


The air compressor has to be pretty stout.  The cell moves 48 bricks a minute, which means that I have to cycle the pneumatic cylinders about 96 times per minute (once open and once close for each pick.)

As the blocks move down the conveyor they pass by a couple of Lego color sensors.  Here's a shot of how I arranged them.  I put a LED on the opposite side so that the ambient light reading would be high when there is  no brick and low when a brick is passing.  When the brick passes, the sensor reads the color of the block.

And I love this picture.  It's a shot from the top showing all the wiring.  Or should I say "spaghetti."  I have to mark all the wires so I don't get them crossed.

Here's a list of all the electronic elements used in this build...

Lego NXT bricks
6
Lego Servomotors
15
Lego NXT Touch Sensors
6
Lego Legacy Touch Sensors
6
HiTechnic Touch Multiplexers
2
HiTechnic Sensor Multiplexers
2
HiTechnic IRLinks
4
Lego Light Sensors
5
Lego Color Sensors
2
MindSensors Pressure Sensors
1
Lego M-PF Motors
4
Lego XL-PF Motors
3
Lego PF Receivers
4
Lego PF LED
4
Lego PF Switches
1
Lego Train Controller
1


And for those who are interested in the real dirty, nitty gritty details, I have put a lot of details after the break. It's a rough draft, so there are some spelling and grammar errors, so please forgive me.  Click "read more"

LEGO Club Show's Take On Monster Chess.

If you don't know, Lego has a YouTube channel called LegoClubTV. There are lots of cool stop motion videos and such. It's really not geared so much for "our" type, but on this episode they do a little thing on the Monster Chess build done not too long ago.

Sunday, April 10, 2011

5 Axis CNC

I am not sure if I put this video up once before, but if I did, it certainly is worth another look.  It's an incredible 5 axis CNC machining center doing it's thing.

Happy National Robotics Week! April 9-17, 2011

Click here to find out how you can celebrate!

Stair Climbing Robot

Here's a robot that at first I said "that thing is ugly" but after I saw it do what it is designed to do, I changed my mind.  It is in fact one of the more beautiful designs I have ever seen.  This robot uses several linkages to climb over some rather large obstacles very gracefully.  It's from a demonstration in Japan. It's built by Taylor Veltrop, more well known for his work with humanoid robotics, but he also dabbles in Lego.

Robotics Merit Badge for the BSA

This is pretty exciting to me.  The Boy Scouts of America now officially has a "robotics" merit badge.  It's a shame that the "video game" merit badge beat it to the punch, but I'll take it.  I bet there are tons of kids out there who are pretty happy that they can get credit for this great hobby.


Found on Engadget

JPLs "Curiosity" Rover Animation

JPL has released a new animation showing the way their new rover "Curiosity" is going land on the planet Mars. This video is a bit longer and shows a few more details from previous versions.



Found on ieee spectrum

Thursday, April 7, 2011

ABB's Concept FRIDA

For those who are fearful that robots will be taking away human jobs, here's more ammunition for you.  This is ABB's concept robot called FRIDA.  Watching the video, you will get an idea of just the types of jobs it might take.

Wednesday, April 6, 2011

Festo SmartBird - Bird Flight Deciphered

A few days ago I posted a video showing Festo's Smartbird, which is a robotic remotely controlled mechanical bird that flies.  Festo has put out a video showing how they built it plus lots of details about how it works.  It's a great, very professionally made video that's about eighteen minutes long, but it's well worth the time.

Monday, April 4, 2011

Fergie + Lego = Say whaaa?

The other night I watched the Nickelodeon 24th Annual Kids' Choice Awards, but I must not have been playing close attention.  Seems that Fergie, from the band Black Eyed Peas was wearing a dress made from our favorite building material.  I am not exactly sure what I think about it, and I certainly could make lots of adult based comments, but I won't do that, I know I have lots of young readers.  Here's the photo..


I picked this nugget up at Yahoo! News.  That same article mentioned that the singer from the same group, Will.I.Am donned a Lego hat for the American Music Awards in 2010.  I went out and found this photo for you. 

So, do you think Lady Gaga or Justin Bieber will follow suit?