Tag Archives: Robot

The Start of My Robot Army

I successfully took a cast-off toy robot that I got from the thrift store for $5.00, added sensors and a microprocessor and turned it into a self-directed line following robot.  In December, I was browsing the the Arc, looking for something that would make a good project when I found a Robosapien V1.  

At the time, I had no idea what it was or did but it was heavy, shiny and only cost five dollars so I brought him home.   Turns out that it is a fairly high-end, remote controlled robot.  When new, they retailed for around $100.  I figure a 95% discount was a good deal even if it was missing the remote.  

A little Google-fu quickly showed how I could tap into the existing control system and add a second micro-processor.  By adding an Arduino as a Master Controller and soldering a line to the wire that connects to the built-in infrared receiver, I could make the robot think that it was receiving commands from the remote control.  With that, I could make it walk, wave its arms or make various noises. All that was missing was a purpose.  A mission.  What would it be?

Not having anything against people named Sarah Connor, I skipped the whole Travel Back In Time And Change History To Ensure The Rise Of The Machines thing.  Instead, I decided to add some infrared sensors to the feet and turn him into an entry for an upcoming Line Following Robot contest that my employer is hosting.

The first step was to tie in some lines to the existing control system for power, ground and the control signal.  Opening the back and accessing the control board is pretty simple.  Some more Google-fu and a little time with the multimeter let me identify ground, the 6 volt unregulated supply, the 3.3 regulated supply and the control line.  I would like to take a lot of credit for that amazing piece of work but the control board is labeled pretty well so it wasn’t exactly rocket science.  So I soldered in the new lines, drilled a hole in the body for the cable to run through and put him back together.  A dab of hot glue where the cable runs into the body provides strain relief.

Next I had to mount some sensors on the feet.  That wasn’t technically difficult but the placement of the sensor is crucial to his line following performance and the place I wanted to mount them was not structurally viable.  So I had to add a Flexible Support Structure to both feet.  (That’s Big Words for using hot glue to attach a strip of plastic on the front that I could mount the sensors on.)

After that, I was ready to take the lines from the robots innards and the lines from the sensors and hook them up to a suitable micro-controller.  I started with an Arduino Micro since it is easier to work with than the Trinket.  After I got all the bugs worked out, I ported the code to the Trinket.  And as they say, it was just a Small Matter Of Programming and Voila!  It all worked perfectly the very first time.  (For some definitions of “first”)  🙂

The cost for the hardware is very reasonable.  All told, I’m into this thing for maybe $20.  Of course, if you factor in the amount of time I spent working on it, the cost would sky-rocket.  Fortunately, I work cheap when I’m having fun.  It probably shouldn’t have taken as long as it did to build this but I was treading some new ground in my personal knowledge quest and figuring out new things can be very time-consuming.

One of the following videos show the robot standing there looking cool and the other shows him “racing” around the track.  So make some popcorn, pour yourself a soft-drink, send YouTube to the big screen TV and enjoy the show.




Finally – a line follower that works pretty well

This video shows the line following robot I built recently.  There are a few fun things about this one (besides the fact that it works).

1) No microprocessor.  The control circuit is built with a few ICs, some resistors and some capacitors.  No software at all.

2) Pulse Width Modulation using a 555 timer for adjusting the motor speed

3) Sensor sensitivity controlled by a voltage divider potentiometer

There is also some ugliness…  First, it is built on a breadboard.  I haven’t started doing my own printed circuit boards but I will someday. Second, the sensor leads are too long.  Grotesquely long.  Stupid long.  Longer than a three hour staff meeting that starts at 2:30 on a Friday afternoon.  These sensors will eventually go on a different project that will need longer leads and I don’t want to cut them.  And obviously the chassis is not very polished.  Sturdy and functional but not pretty or impressive.  Let’s just ignore the blemishes and focus on the positives, m-kay?


Top-down View with all the wires obscuring the breadboard


The breadboard with all the wires out of the way


View from the front showing the four infra-red sensors

If you are curious about the hardware, read on.  From right to left in the above photos, you can see the following parts.

Stage 1 – Adjustable voltage divider.  This allows me to control the dark/light sensitivity of the sensors.

Stage 2 – A quad comparator is used to compare the four input sensors to the reference voltage described above.

Stage 3 – A quad NOR gate is used to determine whether either sensor on a given side is over the line.  There are two outputs from this chip, one for each side.  If an output is high, it is used to turn off the corresponding motor.

Stage 4 – Motor driver chip, SN754410NE dual H bridge.  The sharp-eyed will notice that I have actually stacked two ICs and soldered them together.  I needed this for an earlier project where the DC motors were drawing more current than a single chip can provide.

Stage 5 – 555 timer and the bits needed to build a PWM circuit.  This lets me tune the motor speed by adjusting the potentiometer on the left.

So am I proud of this?  Meh… it would probably do pretty well in a high school robotics competition but it isn’t exactly Skynet.  But I had a lot of fun and it puts me one step closer to the larger, more capable robot that I want to build one day.  Baby steps? Yes. But the steps are getting bigger.

Stupid Magnetism!

In this week’s installment, we learn how an I-beam, a squat cage and a freestanding heavy-bag frame down in the basement can cause problems for a robot driving around on the first floor.

After this weekend’s successful test drive of the Escalade rover, I wanted to fine-tune the control system by calibrating the compass and associated steering algorithm.  I *thought* that I would be able to do that inside since I only need 15 feet or so to drive in a straight line.  Unfortunately, I was getting very inconsistent results.  Eventually I realized what was causing the problem.


My basement has some very large steel objects in it.  Every time the robot drives over one of them, the internal compass would start getting weird results.  Then the steering system would go nuts and the rover would crash into something.  At first I was doubtful but then I realized that the straight line distance from the first floor to the ceiling of the basement is less than a foot.  Apparently, the “magnetometer on a chip” is sensitive enough that those things throw it off.

It was good to realize what was happening but that slows down my progress if I can’t test inside.  The temperature outside right now is -1 F.  Sure, I’m a manly man and not scared of a little frostbite but the cold is bad for the batteries.  So I think I will turn on an episode of Mythbusters and call it a night.  

Stupid magnetism.


Successful Outdoor Test Drive of the Escalade Robot

This 96 second video shows the first outdoor test of a cheap RC car that I converted to an autonomous rover. I took out the remote control circuit board and added:

– An Arduino Uno microcontroller for control of the motors, steering & sensors
– A Raspberry Pi “computer on a board” for higher-level functions like Guidance and communications
– An Inertial Measurement Unit with a compass, accelerometer and gyroscope
– Additional batteries

Once the Raspberry Pi receives the Go signal from the laptop via wireless, the vehicle is completely autonomous. I am able to monitor telemetry remotely and, if necessary, issue a emergency shutdown command but other than that, the on-board electronics do everything.

The goals of this test drive are very simple. Use the compass to determine the current heading, drive 30 seconds in that direction, turn around and drive 30 seconds on the opposite heading.

You will see the vehicle swerve back and forth a lot during the drive. There are several parameters to the control system that control how quickly it reacts to a course deviation and how large and long the steering response should be. Fine tuning these parameters will make it drive in a straighter line with less of the over-correction that you see in this test.

Once I have the steering smoothed out, I’ll add logic to use the other capabilities of the IMU. This will allow me to build more sophisticated capabilities than what you see here. There’s still plenty of work to do but this vehicle has come a long way in the past month. Stay tuned for more developments.

The $1.00 Robot

While rummaging through the toy section at the Arc the other day, I spied a busted-up remote control car.  It had clearly been stepped on or otherwise abused since parts were missing off the body.  Plus, the remote control unit was nowhere to be found.  So I was I able to get this gem for just one dollar.

ImageOne Man’s Trash…

When I got home, I took off the cracked body, removed the control board from inside, cleaned the battery compartment where the batteries had leaked and made sure that the motors worked.  Then I rubber-banded an Arduino and motor shield to the top and mounted an infrared distance sensor to the front.  A few minutes of programming and voila… what used to be a busted RC toy was now an obstacle-avoiding robot.  Go watch the little guy in action. http://www.youtube.com/watch?v=6C_YUy8C0T8

While it may not look any prettier than when I got it, the result was well worth the dollar I invested.

…is another man’s treasure


The latest version of the rover is called Parkerbot.  Parker’s favorite game is to chase a light across the floor and that is exactly what the rover does now.  However, the rover doesn’t knock over furniture, step on my toes or fling spittle across the room as it moves around.  Maybe I’ll add those features later on.

During my tests last night I had to lock Parker out since he kept jumping right in the middle of the game and chasing the light himself (and stepping on the rover in the process).  Apparently he thinks that the new, funny looking dog shouldn’t have all the fun.  Unfortunately I can’t post any video of these tests since the room had to be pretty dark to give the best results.

Last night I fixed the problem that prevented the wheels from moving.  After that, it all came together easily.  The rover now moves quickly and consistently across hardwood and carpet.  Using two photoresistors mounted in the front, it constantly moves toward the strongest source of light.  From a technical perspective, this is big news since it demonstrates a closed-loop guidance system.

Tonight, my friends at USPS should deliver my new high-capacity battery pack and I can start working on the Mark II version.  Rover B Mark II will have an ultrasonic range finder and the Pi will be hooked in as the master control unit.The rangefinder will allow me to do obstacle avoidance and the Pi, with its wireless connection, will give me a remote override capability.

The First Rover

(Originally posted Oct 20, 2013)

Here’s the almost-completed rover testbed.  The wheels, motors and two black acrylic decks came in a kit and were the starting point.  From there, I soldered in the motor leads and built the white acrylic decks for holding the electronics.  On the first level, you can see the breadboard with a few sensors on it, the Arduino Uno and Motor Shield and then a 4 AA cell battery pack.  On the top level, you see the Raspberry Pi (which isn’t hooked up yet) and an 8 AA cell battery pack.  The 8 pack will be replaced soon with a modular USB battery pack which is supposed to arrive this week.  All the bits and pieces are secured to the decks with Velcro, which should withstand the blistering speeds the rover will reach.


Not shown is the Wireless USB stick that will provide the comm link

Unfortunately, it isn’t quite operational yet.  I can’t get the motor shield to send voltage to the drive motors.  I suspect that I “de-optimized” (i.e. broke) the motor shield as I was soldering and testing it.  I’ll be troubleshooting that this week.  Hopefully it is just a mistake in configuration and I won’t have to buy a new shield.

Once I get this all working, I can start trying out different guidance mechanisms.