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.

28 comments:

  1. Really incredible work! It's fascinating to watch all the robots work together so seamlessly. Very impressive building and programming.

    ReplyDelete
  2. Great work,be proud of the result.I like flexpickers.

    ReplyDelete
  3. Congratulations, you make DIYers proud of you!

    ReplyDelete
  4. Absolutely incredible! I can't imagine the time and dedication that must have taken. You seem a bit depressed its done though, rather than ecstatic as I would be. Might I suggest looping the track, and having a 5th bot populate the lines from a bin? Or get really circular and have the newly arranged blocks randomly selected and re-pushed to the line for a never-ending loop. Ideas are easy though, execution like yours is rare. I applaud you sir :)

    ReplyDelete
  5. Thanks, Anon. It did take a lot of time. What you don't see is me tearing it down and rebuilding as well as writing some code over and over to get it just right.

    And as far as adding more robots, I have seriously thought about that, but I had to buy a bunch of stuff to get it this far (which I don't regret) and adding more would get REALLY expensive. Did you check out the hardware list at the end of the video? I didn't own all that stuff 6 months ago.

    ReplyDelete
  6. I just sorted a bazillion pieces into different color stack. I which I had a pick and place for that.... Seeing the video made me think of the Replicators from SG1:)

    ReplyDelete
  7. This is really amazing :) You've done an incredible job and it's great to see someone techincally minded invest so much thought and energy into an interesting project.

    ReplyDelete
  8. Ha! Delighted to see a Lego version of a robot so familiar from the factory floors of solar panel factories - imagine this device almost in reverse - picking matched solar cells out of bins on either side of the line and placing them on a piece of flat glass to be made into a solar module.

    ReplyDelete
  9. Which language did you use to encode the operations? Did you use microcontrollers? I think i know how to do most of what you have done, seems like the meat of this program is just optimizing and using a Analog/digital converter.

    ReplyDelete
  10. Absolutely awesome. Very nice work!

    ReplyDelete
  11. I suggest you secure a platform to the belt, and fill the 48 bins with different lego blocks. Moving the belt back and forth you could use the pickers to place parts onto the platform in order to automatically assemble any object.

    ReplyDelete
  12. Great job :o)

    To prevent some of the movement in the structure, you could add a 'tuned mass damper', such as a container of water on top of the structure, which will help reduce vibrations. As the structure moves, the energy is transferred to the water, and the movement of the water counteracts the movement of the structure. This isn't a 100% Lego solution, and does require your structure being able to handle the extra weight of the water though. Alternatively you could use a weighted pendulum to the same effect.

    Like other have mentioned, it would be great if it was a continuous loop, for displaying at a conventions and such.

    ReplyDelete
  13. I am really impressed by the accuracy, speed and structure of the system.
    This is the cutting edge of toy robotics.
    You have a new fan at Adept Technology!

    ReplyDelete
  14. Totally Awesome!! What are you gonna do until BrickWorld though? Are you bringing a RCX for the Sumo? http://www.brickworld.us/chicago/view/info/27/

    May your bricks stay strong,(Seriosly, don't have it collapse at BrickWorld)

    NeXT-Generation

    ReplyDelete
  15. You got some serious talent mate. Keep it up. It must have been a lot of hard work for you....


    Please visit my blog too and comment.
    http://black1blue.blogspot.com/

    ReplyDelete
  16. I'm super impressed, found you from thenxtstep; caught my eye. Very glad I clicked the link!

    The mechanics are impressive enough, as well as the way you got them to communicate and error checking...very nice. The kicker for me though was the maths for calculating the most efficient path and calculating the end effectors position in Cartesian coords.

    I think I can make one very small suggestion, one bigger one, and one much larger one if you wanted (I'm impressed enough already! :-P ) :

    1) I don't know if it does already, but when it picks up an object you said the gripper moves diagonally upwards in order to make sure it doesn't hit the object behind it (very nice touch). Is the gradient of the diagonal line (ie: how fast the gripper goes forward) based on the speed of the conveyor belt? If not, why not make it so?

    2) Make the speeds of the conveyor belt dynamically change, so that the robots are moving at maximum capacity. ie, if there aren't many objects on the belt, make it move faster, if there are make it move slower. I realise this is much much more complicated than it appears at the start.

    3)The big one. Combine both belts together into one much larger one. Then place something like a "MindSensors Vision Subsystem" above the belt in order to detect the payloads colour, position and orientation. Next modify the gripper so it can rotate, so that it can pick up the payload regardless of orientation.

    I think if you used the MindSensors thing you would need to place two colour spots on the top of each block in order to detect it's position. As it only returns colour blob position and size (I think).


    I'm already amazed at what you've done; the size, Engineering and attention to detail. But I understand what it's like when you finish a project and don't know how to improve it. :-) So if you want, I figure you could probably make it a bit more incredible. :-D

    Will

    ReplyDelete
  17. Excellent blog here! There is a good amount of useful information to be seen here! Thanks for sharing.

    Thanks
    Tom Levens from Robotics India

    ReplyDelete
  18. My name is Moses Thompson, Program Director of the Interactive Technology Experience Center, University of Texas San Antonio. We are trying to develope a similar set as you 4 leg Delta Robot system and are curious about the programing aspects. http://itec.utsa.edu. I'd appreciate some dialog on this. Thank you.

    ReplyDelete
  19. Very inspirational project - thanks for sharing and congratulations on a superb effort. I'm very motivated by this! :)

    ReplyDelete
  20. In the event you looking for one gay sizegenetics and look at some places, you have no guarantee as to whether or not you will definitely actually be ready to get something you are looking for. Furthermore, one is taking a chance. You'll discover an impressive many accessible who prey on gay men if you're thinking of this sort of thing. It's very helpful to get what you dream about, but just as important to perform so safely. This really why you really are during a enhanced way to use an agency to gain whatever you are looking for if you're thinking of a sizegenetics.
    http://buysizegeneticsonline.tumblr.com/

    ReplyDelete
  21. Is there any way I can find the instructions and materials to make this? I am planning on re-vamping a manufacturing class, and I feel this would be an awesome assignment for the students.

    ReplyDelete
  22. Great work,be proud of the result.I like flexpickers.

    ReplyDelete

  23. Get Good Marks 💯

    We provide IGNOU books, IGNOU projects, IGNOU Stutdy Notes, IGNOU solved assignments, ignou solved assignment 2020 , ignou assignment 2020 , IGNOU previus year solved papers and IGNOU Solved guess papers for your guaranteed success . Our goal is to provide a reliable book buying experience with our online book store.

    ReplyDelete