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"

About the Quad Flexpicker system.

A Flexpicker is a type of robot called a parallel robot.  Parallel robots are commercially available from ABB as well as several other manufacturers.  They are known for moving small objects very quickly.  Parallel robots are often used in 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 foodstuff, stack pancakes and much, much more.

This system uses four parallel robots which are fed using 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 belt.  A signal is sent to the robots telling them information such as the color of the object, the belt the object is on and the position of the object on the belt.  When each item gets close enough, the robot reaches out and grabs the item 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!

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 put into a chronological array.  When the object gets close enough, the robot goes through a preprogrammed series of commands based on the information in the next array element. 

THE SIGNAL
The signal is an eight bit binary light signal that takes about 170 milliseconds to transmit.  The master NXT turns 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 decode the message and sends that information to a procedure that does the appropriate tasks with the objects.

The signal is a number such as 132 or 243.  The first digit is the lane.  Possible values are 1 and 2.  The second digit is the robot number and the possible values are 1 through 4 corresponding to the numbers on the NXTs.  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 belt moves precisely at 100 inches per minute so based on this, the position of the item on the belt can be precisely calculated dynamically.

THE MOVEMENTS
The precise kinematics for the movements 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, the error rate is very high.

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 finding 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 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 so 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 at all.  The motor speeds are adjusted dynamically so that the robot moves in the fastest fashion possible.

Since the objects are moving at all times, the robot actually moves to a position where the object will be rather than where it is actually at.  When the robot grasps an object, it doesn’t lift it straight up, but up and forward 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 certain point where it is too far away, it is removed from the queue and will not be picked up by any robot.

THE GRIPPERS
The grippers are each activated using a single pneumatic cylinder.  The cylinder is activated 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.  This is a very effective way of controlling Lego pneumatics with a NXT.

THE AIR SYSTEM
The air system is must be robust because 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 three 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 anywhere 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 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, the sensor immediately switches mode to a color sensor.  That can be seen when the sensor briefly emits an RGB light.  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 known, 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 ms later.  A special signal is sent to tell the robot to adjust the position when the brick comes to be picked up.

THE STRUCTURE
The box structure holding the robots is highly engineered.  The main horizontal member is achieved by layering Technic bricks with plates.  This configuration is very strong and has very little sag.

The two posts in the middle carry most of the weight and do a great deal to stop the structure from swaying and moving while the robots are moving.  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 placed within.  The Technic beams are tied together with studless beams.  The structure is actually completely tied together as one piece, but can be broken down into eight parts for transport.

7 comments:

  1. Grammatical errors or not, it reads really easy and explains the system as it is in its current form.
    Looking forward to the new vid, although the current version of the video of this system shows the meaning of this system quit well. Did you change that much to the structure that it really needs the updated vid accompanied (please make it, I mean, lovel to see systems like this made in Lego).
    With regards,
    Björn

    ReplyDelete
  2. Bjorn,
    The structure is basically identical. The operation is much, much faster. In the previous video, I tricked all the robots to think there was a brick to pick up so the movements were timed. Now there is actually a brick to pick up and the movements appear more random.

    ReplyDelete
  3. wow Great work I'd love to see this.. maybe I'll get across the pond sometime! It looks like you need a loader robot now.. perhaps a simple motor driven 'pez' dispenser might do the trick? Im sure you could load both belts (their own stacks) with just one motor..

    ReplyDelete
  4. I feel like you're spoiling it a bit by showing it as a work-in-progress while so close to completion. It looks great so far and I can't wait to see the final video.

    ReplyDelete
  5. Dan, I should have a video out within a day or so. But believe me, the still pictures don't do it justice.

    ReplyDelete
  6. We pneumatic products manufacture several products, including solenoid valves,air control valves, piston air cylinder, Pneumatic Air Filter and some pneumatic accessories. Most of goods are exported to USA, Europe and Asia. And they are widely used on electronic, pharmaceutical, food processing, packaging, medical and automotive industries. Visit: www.xinyipneumatic.com

    ReplyDelete