Vax - Till I think of a better name
My entry into the club's (DARC) intelligent bot ball
competition which requires a bot to find orange ping pong balls
and return them to a goal.
My design places the guts of a Black and Decker Hand Vacuum, sometimes
called a dustbuster, onto a mobile platform with a CMUcam for vision
processing to find both the balls as well as the goal once it has
filled up its tube with balls. The cam has a tilt servo so I can
change the angle of view to see both down low where the balls are,
and up higher later to find my goal.
The mobile base is a Sirius model kit from Budget Robotics (www.budgetrobotics.com).
It is a tracked, differential drive platform with 2 servos driving
Rev 2 added a servo controlled "gate" to the tube that
allows the bot to "trap" balls once they're captured.
That way the vacuum can be turned off and the balls still be held.
This saves on battery time. I also added an IR photoreflective sensor
so that the bot knows when it has a full tube.
This project still under construction, but a first pass at the
design and photos seemed in order.
|A before shot. This is the 4.8V model of the hand vac made by black
and decker. Essentially I sawed off everything but the blue part,
and I also sawed off the handle of that.
||This side view shows the blue vacuum part which contains a DC motor
and the air impeller assembly. I kept the blue assembly since the
impeller rotates inside it and all the mechanicals for mounting the
impeller and the motor and the place where the suction does its business
were all there, so i cut away anything i didn't need.
|This rear view shows where I cut away the handle. you can see the
terminals for the motor where i have wired yellow and green wires
that feed to the hand soldered relay control board which is bolted
to the bottom of the vacuum assembly. A DARC board is mounted below
this and provides the brains. You can see the DC motor inside the
housing and the hole in the top where the on/off thumb button was.
||This close up shows where I attached a 3 inch plastic tube cut with
a bevel to get the angle I needed. Some careful usage of duct tape
provides a very effective seal with little loss of suction.
|Close up of the end of the tube. This shows the servo in "gate
closed" position holding a ball. The IR photoreflective sensor
board is bolted to the inside of the tube to get the sensor as close
to the ball as possible. The sensor's output is about 4.95 volts when
no ball is present and about 3.3V when a ball is present. Black electrical
tape on other side from sensor helps to get a good strong voltage
for no ball present. The gate is just some paper clip wire.
||View of the circuit boards. The relay board is the brown board bolted
to bottom of vac assembly. The green DARC board below it controls
via a single digital I/O line. The relay board just turns on/off a
relay to feed battery voltage to the motor. I only rotate the motor
one way, so I only need one relay. I found a transistor switch like
a TIP120 caused some current loss and reduced performance of the vac
suction. So I used a relay instead.
|Theory of Operation: The DARC board sends a serial string
to the camera telling it to track the color of the ping pong balls.
The camera then looks for pixels in a frame of video (26 fps) that
match that color range. For the orange balls in good light this is
an RGB value (Red/Green/Blue) of 240/150/20 or so. You can specify
a range for each so I pad it with +/- 20. The camera then responds
with a serial string that gives an X/Y coordinate for where that color's
center mass occurs in the frame. The software then drives the bot
forward, or turns to close with the ball. Once it is close enough,
the vac is switched on and stays on till the tube is full. Once that
happens, the camera is tilted up so that the bot can see the goal,
navigate to it, line up with the goal hole and the turn off the vacuum.
Gravity does the rest.
|Here is a frame capture from what the camera sees when I have it
tilted to look down the tube.
||This frame capture is taken from the Java GUI which shows where
in the frame the ball occurs.
||This frame capture shows the ball closer, in range for suction.
||Notice the center of mass has moved down the frame and to the center,
and further the bounding box of pixels that match is also larger.
I divide the frame into 9 zones. Three rows (horizontally) and
three columns (vertical). In the first photo, the ball is in zone
1 (top left corner), meaning that the bot has to move forward and
to the left to get the ball near the suction tube. In the next frame
the ball is in zone 7, close to 8. The software will maneuver the
bot to get the ball into zone 8 of the video.
Still a lot of work to do but initial testing is sound. The suction
is very good, enough to grab a ball that is 1 inch away from the
tube, probably even more if I didn't mind waiting longer. This video
shows the bot in scanning mode and picking up balls. Once it has
5 it closes gate, turns off vac, waits a few seconds then opens
the gate. Click here to see a quick
video of the suction action.