Let's Make Robots!

Wall Following RC car using 16F887

Here are two videos of my hobby level radio control car following the wall around a room.  This car uses channel 3 of the radio control system to toggle between RC control and autonomous control.



The idea is to hook middle school kids (USA grades 7th and 8th.  ages 11 - 14) into Science, Technology, Engineering and Math.  This offers the speed and excitement of RC car
 racing, the trial and error of RC race car design plus the clear thinking and discipline of computer programming.

 THE COMPETITION:  A car race.

 Build an oval race track on a polished wooden gymnasium floor defined on the inside by
 cardboard boxes large enough to echo back a SRF05 sonar proximity detector's signal.

 The race is to lap the track, say, six times;  three by radio control;  three by autonomous control.  Either time trials or multiple cars at the same time.  If the race has multiple cars on the track at one time, some more work must be done on the car to avoid collision.

  I will design and build a PIC kit that attaches to almost any RC car that has Electronic Speed Control (ESC) driving the wheels and a servo driven steering mechanism.  It will use the car's 7+ volt battery, knocked down to 5 volts by the ESC.  There must be a third channel on the RC system to tell the car who is boss.

 I need to borrow, steal, or design a microcontroller programming language that forces the students to think about the signals from the front and side facing sonars and create the corresponding commands to the wheels and the steering.  Presently the 16F887 compiler runs on a WINDOWS PC and communicates to the car via special hardware connected to the USB port.  (Available from MicroChip Inc.)

----------The post below seems to be way ahead of me----------

Author: bendjamin
| Title: I made some similar robots a

I made some similar robots a while ago.  I'll try and post a video of them.  They are designed to race around a track, in other words they are doing wall avoiding so when you make a track with walls on the inside and outside they will go around and around.  I made the robots myself, they are differential steering with a body made from laser cut polycarbonate.  I used the sharp IR rangefinders for navigation and have four on each robot, two forward facing and two side facing. They also have four bumber switches, one pair in front and the other at the rear.

| Link: http://letsmakerobots.com/node/696#comment-43464

What do you all think?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I suspect a major part of getting my robocar into public education is insecurity of the teachers.  We are talking about 'how things work' in 2011.  My 2004 General Motors automobile contains upwards of 20 PICs.  Each tire air valve has a pressure sensor and enough of a computer to maintain a presense on the car internal wireless network.  How did I discover this?  I could not make sense of the little tire pressure warning messages.   A previous owned had rotated the tires.  How many public school teachers can explain that in a hands-on way?

Every tried to explain to a thirteen year old how a microwave oven works?

My  robocars are very hands-on and available.  All the components are visible including the hook up wire.  The little cars react dramatically to programming changes. How do I communicate that to adults schooled in Education, not Engineering or Computer Science.


The LEXUS can parallel park itself.  My robocars can race around the room.  Same thing..
I've put up on youtube a new video which attempts to show the relationships between my autonomous radio control vehicles and the REAL WORLD - in particular the ability of the new LEXUS automobile to parallel park itself.  What do you think? 
Ken Jones

Then pick your message.

Using the Lexus example as an introduction is a good idea. To the teachers it introduces the topic of the lesson. To the kids it connects your "toy robot" to "real robots". After that, your video jumps straight into explaining your car modification to fellow engineers. None of you audiences will appreciate that for 4 minutes. I did, but they won't.

So hooking a teacher to this idea for STEM eduction huh? I think Youtube might be a good way to go. Make a video like the many you produced before, but make it appealing rather than educational. As you are describing the public school system in your home town, I think you should include arguments like "affordable" and "engaging" or "hands on". None of your videos have kids in them. Remember, the teacher's mind is not geared towards 1:10 scale vehicles. It is geared towards kids who cannot get their eyes off of their study. In your case: a car that runs itself.

School administrators will ask you about money straight up. Having no exact answer is not the problem. Failing to volunteer an estimate might cause many of them to lose interest in the first two minutes of you talking to them. Either in person or through Youtube.

Just to make your video close the narrative loop, compare your $100 to whatever it costs to upgrade a Lexus to auto park ability.

Thank you, rik.  That is good advice.

Seems to me that using radio control vehicles as the base from which to build robots is a good idea - at least from an education point of view.  Much of the design is done.  They are exciting.  They are robust. They misbehave.

Today I was thinking of adding a PIC to a electric motor R/C airplane.  At our local RC store I  discovered that it has already been done.  The box claimed the plane had upward looking and downward looking sensors.  With these the PIC could stablize the plane.

Your ideas would be greatly appreciated.  What can I do with a PIC on a 36 inch long GOODYEAR blimp?


Look up DIY UAV. Find http://diydrones.com

or http://letsmakerobots.com/node/23257 and many others.

Thank you rik.  You have opened up a whole world that I did not know existed.  Everybody seem Arduino oriented.  I stumbled upon the Microchip PIC family on solderless protoboard.  Bad decision??


I am not getting myself into that Holy War. Don't open that whole world without some proper Google prep.

Very interesting and educationnal but hard to control I think. I have 3 RC chassis with the back dc motors and dc steering motors but I don't know what to do with them yet. Watching your videos, it seems like when the car is too fast,the sonar's response is too slow. The steering is a 3 states only (left,right or center) not analog. Is there a way to control the speed and steering variations? Would an Arduino board be able to do this? Thanks for posting your great videos and comments and keep up the good work.


I have found a couple ways to deal with the simplistic controls of toy level cars.  Mine have bang bang servos for steering and straight DC motor control for power.

The driving wheels have three states, full power forward, full power reverse, no power at all.  They have a spring which returns the wheels to neutral - not very quickly nor very accurately.

The steering I modulate by giving little bursts.  Toys have no caster effect and no toe in.  I found that it helped to 'kick' them back to straight.  To turn left I give the servo full power left for 150 milliseconds then I give it 100 milliseconds right (which gets them back to neutral)  then nothing.  What this does is put the wheels in full left for a fraction of a second then kicks them back to neutral.

I am planning a video that connects my BASIC code with the car's behavior.  I hope to have it up tomorrow or Friday.

The model level cars have pulse width modulation control systems.  The Microchip 16F887 provides PWM output.  All that I had to do was to calibrate the systems.  The other advantage to the model level car is an isolated radio receiver the output of which my PIC can control.  This allows me (by turning ON and OFF the transmitter) to toggle which device is in control.

Good luck,  Ken