How do I give a radio control car autonomous control
I am trying to modify a 1/10 scale RC car to carry a microcontroller with the capability of taking over control of the car. The idea is to hook middle school students into Science, Technology, Engineering, Math by creating a vehicle that can perform both under RC and autonomous control. Controlling the servos and the motors is nothing new. I have found nothing of the interface between the radio control receiver and the microcontroller. Anybody have some suggestions?
A couple more details on my vision
Thank you all for your encouragement and suggestions.
My vision is a car that can be raced using the regular RC control on a circuit defined in the basketball court of the middle school gym but then the track leads underneath the fold down bleacher seats. The student running the RC can not see under the stands. Remember that under there on the floor are many supporting structures. The car must avoid these on its own.
A different vision is to have the same track on the gym floor, but including a maze made from, say, cardboard boxes that the car must navigate. We could put Xmas tree lights over each of the exit holes in the boxes. In autonomous mode the car could sense the lights.
RC cars have beautiful model suspensions. They go very fast and are quite indestructible. From the point of view of developing STEM thinking they are missing a formal language and repeatable controls. I are trying to marry the two.
Ken
Racing RC car vs LEGO RSX car
Yes, this idea might work.
My problem is that I do not know the details of the I/O signals of the various parts of these 'bots. With LEGO RCX the outputs to the motors come directly from the encapsulated microcontroller system. The motors are not as powerful as those in a RC car. The commands available to the RCX from the ROBOlab program have seven levels of power.
The RC cars, on the other hand, are driven by a 7.2 volt battery pack through a box called a "speed control". Speed control gets its signal directly from the RC receiver. I think it is treated as a servo. Is this pulse width modulation?
I am hoping to borrow an oscilloscope soon.
Ken
Motor control in my radio control car
Still finding it difficult to find the I/O details of my radio control receiver and my electronic motor speed controller. What is on those three wires (white, red and black) between the receiver and the ESC?? Also what is the information format on the three wires (blue, red and black) between the receiver and the servo?
RC receiver: FUTABA FP-R122JE am 2 channel BEC
ESC: NOSRAM Tomahawk Reverse 93050
motor: MABUCHI RS-540RH/SH
autonomous ex-RC car that goes around the block
The Tech Junkies have this video. They removed the RC control and made the car completely autonomous being guided by the gps satellites.
Their Arduino proto board has a voltage regulator. It produced a 5 volt supply from the 9 volt battery. This would allow me to keep using the 7.2 volt battery pack. I was hoping to keep the speed capability of the RC car.
Ken
The radio receiver PWM signals??
I am new to Parallax. It comes highly recommended.
I wish to build a 1/10 scale hobby level radio control car that can also run autonomously. I think they have a PIC that can do the job. The question is how do deal with the Pulse Width Modulated signals that come from the radio receiver. Presently they go directly into the electronic speed control module and the steering servo. I thought that for my design I could use them as inputs to the PIC.
I hope that I do not have to use PIC code space and compute power to continuously sample the three RC receive channels. Is there some kind of transition detector which can digitize the PWM signals? I assume the PIC input can figure when they change.
If Parallax does not make an appropriate micro to be the central brains of this operation I can use a DPDT switch under PIC control to steer the PWM signals. There has to be a signal from the radio transmitter telling the car which mode is appropriate. That signal has to be interpreted by the micro somehow.
Ken
Comment from the Parallax forum
John,
I got the following from a Mike Green on the Parallax forum. I think he is agreeing with your decision to migrate up from the Basic Stamp.
With my 1/10 hobby car came a three channel RC unit. One for the DC drive motor, one for the steering servo, and a spare. I thought I could use the spare for the auto/RC toggle. This car is just an experiment to get a working prototype. Once that is done I might be able to find some money for a "real" prototype. There is quite a bit to consider in selecting the race car/truck itself. What do I want to teach about suspensions? I'm not sure.
----------Mike wrote----------
"There is no mechanism for the Stamp to automatically sample the RC channels. Typically you'd use a sequence of 3 PULSIN statements, one for each channel. The RC receiver normally receives one channel at a time and the PWM signals occur in sequence and repeat about 50 times a second. There's not much time left to do control functions once you account for timing 3 RC receive channels and 3 servo PWM output channels. It's possible to offload the PWM output functions, but I don't know any ready-to-go PWM input processor.
"I would strongly suggest you look at the Propeller. It can easily do the RC receiver timing and the servo PWM generation with two cogs (processors) and have plenty of processing power to do whatever control functions you need. The Propeller Servo Controller is a compact board that comes pre-programmed with a 16 channel servo controller, but the outputs can also be used as inputs by modifying the control program."
My next step is to examine the Propeller.
Thanks again..
Ken
Maybe we're back to DPDT switched
mackrackit suggested that I use a third RC channel to toggle disconnecting the PIC when under RC control. It does sound like the simplest and maybe the least expensive way to go. Trouble is I do not know how to do this.
Is it as simple as inserting a double pole double throw switch that is controlled by the third channel into the signal line between the RC receiver and the electronic speed control? And another between the receiver and the steering servo?
Will surges and the like kill the electronics? It would be safest if there were a way to guarantee the motor being off and the servo being neutral when toggling. John, mackrackit, what do you think?
Ken
I'll go with the least complicated.
Seems that using DPDT relays is the easiest approach to get this car on the road -er gym.
Parallax has been suggested.
If I go with Parallax I need:
BASIC Stamp 2e Module $54.00
either:
BASIC Stamp 2pe Motherboard $70.00
or
Board of Education (USB) - Full Kit $100.00
From TYCO or, 2 AXICOM V23105 dpdt DC relay ~$5.00 each
Maybe some parts from Radio Shack like 7.5 volt power supply and a USB cable.
What else besides my RC car a work bench and some time?
Ken
I think the DPDT approach is worth further study.
Seems that using DPDT relays is the easiest approach to get this car on the road -er gym.
Parallax has been suggested.
If I go with Parallax I need:
BASIC Stamp 2e Module $54.00
either:
BASIC Stamp 2pe Motherboard $70.00
or
Board of Education (USB) - Full Kit $100.00
From TYCO or, 2 AXICOM V23105 dpdt DC relay ~$5.00 each
Maybe some parts from Radio Shack like 7.5 volt power supply and a USB cable.
I also need a one dimensional light sensor if my BOT is going to find a glowing light bulb on the floor by the exit door.
Parallax has the:
TSL1401 Linescan Imaging Sensor Daughterboard $50.00
What else besides my RC car a work bench and some time?
Ken
Is the TSL1401 too much for my job?
After reading the details of the Parallax
TSL1401 Linescan Imaging Sensor Daughterboard
it seems like overkill. All I want to do is detect that my BOT is pointed at the brightest light in the room. A simple light detector like is used to follow a black line on the floor should be good enough.
Suggestions?
Ken
I want to seek out a bright light.
John,
I only mentioned the follow-a-line to indicate how simple my needs are. The $50 sensor has great pattern recognizing capability. All I need is something to attach to the front of the car which can tell it that it is going in the right direction. If this device had a lens that would be the best design. If it had a reasonably narrow lens angle then once the BOT found the light, it could stay well directed.
Ken