RC Toddler mini project
Pezi_Pink!
Posts: 32
Greetings all,
So this is my first (mini) project using my Toddler robot. First off say my electronics skill is pretty lacking at present, so on this front I still consider myself to be quite new for a lot of aspects. Considering that, this explanation is aimed more at newbies maybe wondering how to go about adding simple RF control to their robot.
Yesterday I was food shopping at our local Tesco (yawn) with my gf. I noticed a bunch of Tesco RC toy cars which are admittedly quite poor. However I thought it would be interesting to interface the RF receiver unit with my robot thus providing simple control with a nice little remote controller. So given the option there was nice little Subaru Impreza with a controller that has 2 control sticks, one vertical for motion and one horizontal for steering. This cost me £5 so can’t be bad.
The first thing I did was take apart the transmitter to see how it worked. Interestingly the Rf module actually has a band selection switch that allows one of three radio bands to be selected thus allowing up to three of the same cars be used in the same room. The circuit also did not appear to have a coil, but instead just a crystal. I don’t know much about RF so I am assuming that the different bands must be created by filtering/decreasing the signal before it’s transmitted? Other than that it was pretty simple, the control sticks were moving small sliders onto one of three metal contact pads, so basically this is digital output, its either off (centre) or on (left/right up/down). It uses 2xAa batteries for a voltage of ~3v
After putting the transmitter back together, I took apart the car (after playing with it first of course, it was pretty cool actually). The car was using two standard DC motors that you usually see in budget kids RC vehicles. One motor was for rotating the back wheels and providing motion whilst the other was for steering the front wheels. The circuit is powered by three AAA batteries totalling 4.5v.
The PCB was quite simple. It has a VDD and VSS connection, and then a pair of motor outputs both having two outputs for each (left/right, up/down)
The first thing I needed to do was work out what sort of signal they give out. Being a normal DC motor and already knowing the input is digital (as in, on/off) in nature, it would make sense that the signal to the motor would be a strong +(near max) voltage, as there is no need to drive the motors and slower than full speed, and they don't operate with pulses like a sevo does. I’m not sure how the motors work exactly but I would imagine that they need a fair bit of current to operate, hence the 10 or so transistors on the board. I can’t imagine these are all being used for increasing the reception gain and switching.
As the receiver board works with 4.5v I assumed it was a safe bet that it was designed to work with 5v as most digital stuff still is, so I hooked the VSS and VDD connections up to a simple 7805 5v regulator circuit, and used my scope/meter on the outputs. (after soldering new wires onto all the connections because the original ones were total rubbish)
Both outputs for the back wheel motor were giving 0v, and when the controller was pressed the output went straight to 5v, then straight-ish back to 0v when released, as I expected. The steering motor however, was inverse and active low which was a bit bizarre. So the voltage is continually high and then made low when a signal was received. This would need to be taken into consideration when writing the code.
Next up was to write a little test program to see how we are receiving the signals. First I didn’t bother measuring how much current the outputs where pushing, I didn’t really consider it that relevant for this exercise (and hoped it wasn't really high!.) Current limiting resistors should sort out any potential problem there. I also added a pull-down resistor for each input to ensure stable logic readings.
In the code the routine for input is very simple. I have just defined a nibble (one bit for each sensor) and then I read each input pin into the next bit. The results of this program went as expected, showing 1 where a direction is pushed.
Now it was just a matter of incorporating the new sensors with a walking program. For this I used the simple data table approach for basic walking, as this will do for the remote controlling. It is not as important for the toddler to know what it’s doing exactly. I just used some modified example code for this. The program is coded to move forward, backward, left and right. It only does one at a time although it would be simple to implement different manoeuvres if you had say up and left pressed together. You could probably use the BRANCH command to do the same thing but this works for an initial test.
It’s pretty fun walking him around annoying the gf with the remote. It works up to about 15 foot or so.
Well, that concludes it. If you are interested in a way to remote control your robot with minimal cost, see what you can pickup. Most things should be adaptable; it was quite fun working out how the receiver worked even though it is quite simple.
Other possibilities;
A) Use a parallel to serial shift register to allow full control with fewer IO lines? not much gain but something to do
Allow all sensors back on and have the toddler roam, but allow it to be overridden with the RF controls.
C) Use the RF to control the sensors ? Or maybe allow the steering stick to control the pan of a mounted Ping))) for some purpose..
Well, I hope you all enjoyed my mini-afternoon-project; I’m just waiting for the rest of bits from parallax to start work on my main project.
** I have just moved into a new place, and I can’t find my phone data cable anywhere. I have quite a few pics on the phone, so I will upload them once I find the cable or her camera!
So this is my first (mini) project using my Toddler robot. First off say my electronics skill is pretty lacking at present, so on this front I still consider myself to be quite new for a lot of aspects. Considering that, this explanation is aimed more at newbies maybe wondering how to go about adding simple RF control to their robot.
Yesterday I was food shopping at our local Tesco (yawn) with my gf. I noticed a bunch of Tesco RC toy cars which are admittedly quite poor. However I thought it would be interesting to interface the RF receiver unit with my robot thus providing simple control with a nice little remote controller. So given the option there was nice little Subaru Impreza with a controller that has 2 control sticks, one vertical for motion and one horizontal for steering. This cost me £5 so can’t be bad.
The first thing I did was take apart the transmitter to see how it worked. Interestingly the Rf module actually has a band selection switch that allows one of three radio bands to be selected thus allowing up to three of the same cars be used in the same room. The circuit also did not appear to have a coil, but instead just a crystal. I don’t know much about RF so I am assuming that the different bands must be created by filtering/decreasing the signal before it’s transmitted? Other than that it was pretty simple, the control sticks were moving small sliders onto one of three metal contact pads, so basically this is digital output, its either off (centre) or on (left/right up/down). It uses 2xAa batteries for a voltage of ~3v
After putting the transmitter back together, I took apart the car (after playing with it first of course, it was pretty cool actually). The car was using two standard DC motors that you usually see in budget kids RC vehicles. One motor was for rotating the back wheels and providing motion whilst the other was for steering the front wheels. The circuit is powered by three AAA batteries totalling 4.5v.
The PCB was quite simple. It has a VDD and VSS connection, and then a pair of motor outputs both having two outputs for each (left/right, up/down)
The first thing I needed to do was work out what sort of signal they give out. Being a normal DC motor and already knowing the input is digital (as in, on/off) in nature, it would make sense that the signal to the motor would be a strong +(near max) voltage, as there is no need to drive the motors and slower than full speed, and they don't operate with pulses like a sevo does. I’m not sure how the motors work exactly but I would imagine that they need a fair bit of current to operate, hence the 10 or so transistors on the board. I can’t imagine these are all being used for increasing the reception gain and switching.
As the receiver board works with 4.5v I assumed it was a safe bet that it was designed to work with 5v as most digital stuff still is, so I hooked the VSS and VDD connections up to a simple 7805 5v regulator circuit, and used my scope/meter on the outputs. (after soldering new wires onto all the connections because the original ones were total rubbish)
Both outputs for the back wheel motor were giving 0v, and when the controller was pressed the output went straight to 5v, then straight-ish back to 0v when released, as I expected. The steering motor however, was inverse and active low which was a bit bizarre. So the voltage is continually high and then made low when a signal was received. This would need to be taken into consideration when writing the code.
Next up was to write a little test program to see how we are receiving the signals. First I didn’t bother measuring how much current the outputs where pushing, I didn’t really consider it that relevant for this exercise (and hoped it wasn't really high!.) Current limiting resistors should sort out any potential problem there. I also added a pull-down resistor for each input to ensure stable logic readings.
In the code the routine for input is very simple. I have just defined a nibble (one bit for each sensor) and then I read each input pin into the next bit. The results of this program went as expected, showing 1 where a direction is pushed.
Now it was just a matter of incorporating the new sensors with a walking program. For this I used the simple data table approach for basic walking, as this will do for the remote controlling. It is not as important for the toddler to know what it’s doing exactly. I just used some modified example code for this. The program is coded to move forward, backward, left and right. It only does one at a time although it would be simple to implement different manoeuvres if you had say up and left pressed together. You could probably use the BRANCH command to do the same thing but this works for an initial test.
It’s pretty fun walking him around annoying the gf with the remote. It works up to about 15 foot or so.
Well, that concludes it. If you are interested in a way to remote control your robot with minimal cost, see what you can pickup. Most things should be adaptable; it was quite fun working out how the receiver worked even though it is quite simple.
Other possibilities;
A) Use a parallel to serial shift register to allow full control with fewer IO lines? not much gain but something to do
Allow all sensors back on and have the toddler roam, but allow it to be overridden with the RF controls.
C) Use the RF to control the sensors ? Or maybe allow the steering stick to control the pan of a mounted Ping))) for some purpose..
Well, I hope you all enjoyed my mini-afternoon-project; I’m just waiting for the rest of bits from parallax to start work on my main project.
** I have just moved into a new place, and I can’t find my phone data cable anywhere. I have quite a few pics on the phone, so I will upload them once I find the cable or her camera!
Comments
Sweet.
Kudos!
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Just tossing my two bits worth into the bit bucket
KK
·
I have finally found the data cable (in the same box as the camera of course..) excuse the less than magazine quality images, phones were afterall primarily designed for telecommunications. I will use the camera for future pics!
And yes, I actually reduced the size of these by 50%, hope these aren't still too big!
The victim:
Transmitter (EXTREME!) :
Receiver unit :
Toddler walking:
And I was in Tesco again today, and they had some more cars so I couldn't resist! These will be on the chopping block soon :P
Right so I'm STILL waiting for my stuff from Parallax, so I'm currently working on using the exisitng chassis and motors but putting a SX28 brain on them and a few sensors, these should rock! Probably look like the Deleroian form back to the future 3 after Doc rebuilds the schemtaic from the chip that gets blown, and slaps it on the bonnet
(My 100th post!)
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
There is always an answer.
There is always a way.
There is always a reason.··· -SciTech02.