Wall Following RC car using 16F887

Simplified code is not working…

My toy car has neither toe in nor caster. But it should be able to react. It does not. If you are in a helping mood here is both a (disappointing) video, and a pointer to my code.


http://www.youtube.com/user/kenjones1935#p/c/62187C179BF62508

http://www.employees.org/~kjones/ToyCarKickTurn3.htm

Could the PIC be resetting? Am in a looping loop? The whole thing is only 503 words compiled. My guess is that I am not seeing something is that right in front of my eyes…  I brought the car home and put it up on blocks unaltered.  It worked as I thought I designed using my hands simulating walls.  Hmmm…

Ken

First step of success!!

I changed the 1/10 toy scale radio control car into a robotic round-the-room race car.

Look’t this:

http://www.youtube.com/watch?v=_4Cm-9W2KNs

Please tell me what you think.

Ken

I have added a video

I have uploaded a toy car vs model car race video.  Check out the beginning of this thread.  The progression of this project is depicted in a series of videos. 

At the very end as ask you all for advice.  Please…

 

http://www.youtube.com/watch?v=YtDu5S1XNh8

 

Friday is a good day for brain storming

Hoi Ken,

What are you doing Fridays around 20:00 GMT? I think we could have a very interesting discussion of your project in the LMR Live Show. We could draw some people with fresh ideas into this node (page). Or we could start a fresh node with some clear cut, direct and specific questions.

I think this sounds like a

I think this sounds like a good idea to get you into the show, let’s talk :slight_smile:

LMR live show??

What is the LMR live show?  If I can do the math correctly 20:00 GMT is 3:00PM Eastern  Standard Time.  I think we are five hours behind…  Please correct me if I am not correct.  Yes, Friday afternoon - the day before Christmas - is free for me, but not for many others.  Let’s put this off, whatever ‘this’ is until 2011.

Ken

 

Oops, not everybody knows about the Live Show!

Some of us enjoy talking about robot making and about LMR, ive on a “TV” channel called ustream. You can watch older episode here.

You’re right: Christmas Eve might not be the ideal night to broadcast. Well, night for me (in The Netherlands), afternoon for you. Your timezone conversion seems correct to me. I’ll keep you informed of the most up-to-date schedule. I just saw the Friday after next is New Years Eve.

My next focus

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.

Ken

A better video

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

Pick your audience

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.

Marketing - pick my audience

Thank you, rik.  That is good advice.

Radio Control vehicles make exciting robots

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?

Ken

You are merely scratching the surface

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

or https://www.robotshop.com/letsmakerobots/node/23257 and many others.

UAV and AS WOW!!

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??

Ken

pic vs anychip

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

Very interesting

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.

Bang bang controls for toy level RC cars…

Korel,

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

 

Sorry - a typo

I meant to say that the STEERING wheels have a spring which returns the whells to neutral - not very quickly nor very accurately.

Hi Ken

 

Thanks for your kind and fast reply. My toy car and trucks with big wheels that works the same way as yours,steering and motors. There are a few nodes here on LMR that I saw which gave me a few hints too. PWM and motor drivers seems to be the thing for control. I was thinking of replacing the bang bang steering with a servo and accurate linkages. Here are a few pictures of what I have. One of the truck still have the electronic but no transmiter. Take care my friend happy new year and all the best.

Korel

 

 

 

 

 

 

I’ve actually made three robots.

This morning I realized that I have actually made three different robots.  Three different RC cars with three different physical charcteristics dictated this.

First I built the 1/10 scale model level car based on an HPI SPRINT.  It has detailed miniature suspension and handling features, great speed, and proportional control systems based on pulse width modulation.  My PIC kit for this car is simple because the controls are digital signals.  All that is needed is the PIC and a DPDT switch.  The switch - under PIC control - selects which PWM signals (those from the PIC vs those from the radio receiver) go to the steering and driving electronics.  The PIC code is quite simple because of the car’s capabilities.  At $200 - $300 for the car and my kit this seems too expensive for our public schools.

Second I built a 1/12 scale toy level car.  This is the same as fritsl made only with a solderless proto board.  This car has bang bang controls.  It requires the PIC, the SONARs and four DPDT relays to steer the DC current into the correct connections.    It runs slowly enough for the PIC and the SONARs to keep it within reasonable behavior limits.  It can be stopped in mid ‘flight’  by turning ON the radio transmitter.  The price is right for our schools, but I feel the car is not fast enough nor exciting enough.  It is also too small to carry my KIT under the car skin.

Third I built the 1/10 scale toy car.  This car is much faster than the 1/12 scale toy.  It too has no proportional controls.  The added electronics kit is the same as the 1/12 car, but the code needed adjusting.  ie the 150millisec pulses.  I think the $50 car price is within budget.  My KIT is complex because of the four relays, but hopefully doable by a dedicated teacher and class.  The engineering is interesting because, as one of my videos shows, the behavior is a bit unpredictable.  Maybe if I had some help and a more sophisticated program ------

Ken