Advice for a noob on adapting an RC car
March 6, 2010
Hi all! Apologies for the essay - thanks in advance if you stick with it all the way to the end! ;)
First of all: great site! Loads of fantastically useful information; I've learned more here than I ever have! Oh, and congrats on a good choice of CMS platforms - I love working with Drupal :)
A couple of years ago I bought a Tamiya Grasshopper and radio transmitter/receiver package - it was a short-sighted nostalgic decision, as I'd always wanted one since I was a kid. I took it out about twice after putting it together and since then it's been gathering a rather thick layer dust!
A while ago, I had the idea of mounting a small CMOS video camera and building a 2.4ghz wireless video send/receive kit, with the possible adaptation of using IR LEDs for "night vision" - therefore, I'd be able to control it remotely even when I could no longer see it. That never really took off - I had more pressing priorities for my money at the time! However after having looked through this site recently, I think that I still want to do this, but try and take this one step further by using the chassis and existing electronics - minus the RC receiver obviously! - as the base for a robotics platform.
Now I know I have a very long way to go, and an awful lot to learn, before I actually get a robot up and running. But if we don't try, we don't learn, right? ;). I do however have some questions that I think might need expert advice.
First of all, it might help to describe the existing electronics. The whole car is powered by a 7.2v RC battery, using the standard "Tamiya" style connector. I plan to use this as the power source for the whole platform, as I've got some pretty beefy batteries (i.e. 3.8Ah) and I can use voltage regulators where a lower voltage is needed. For the testing I just carried out, I had an 8.4v battery connected - I don't use this battery for prolonged use as it's beyond what the components are rated for; it just happened to be the battery that charges quickest! It uses an ESky EK2-0422 RC receiver, a Tamiya TEU-101BK electronic speed controller, an unbranded "racing spec" motor and a Futaba S3003 servo to control the steering. I just took some multimeter readings and found the following voltages at the crucial components (or at least what I thought were the crucial components!):
Battery: 9.38v (even though it's a battery comprised of 7x1.2v cells - 7*1.2 does not equal 9.38??!!)
Power to motor (from speed controller): Full throttle +9v, full reverse -9v
Signal wire for speed controller: idle (i.e., no throttle) 0.26v, full throttle 0.18v, full reverse 0.32v - these readings were taken from the output of the RC unit
Signal wire for servo: idle 0.25v, steering full "left" 0.15v, steering full "right" 0.34v - again, taken from the output of the RC unit
So firstly, would it be a good idea to keep the speed controller, or power the motor directly from a driver circuit? To start with, I don't plan to use the full motor speed as it's very very fast! The speed controller can be calibrated at different throttle levels for forward and reverse - so I can simply calibrate the speed controller to run the motor slower when the "full throttle" signal is applied. Whether this will use the same input voltage, I don't know (but I can easily find out). I would eventually like the unit to be able to vary the speed of the motor right up to full speed; for example, have it slow the acceleration down as it approaches an object and speed up when it clears the object. I have to do some more experimenting on this if I choose to keep the speed controller. At the moment, if the radio transmitter is off, or the speed controller is disconnected from the RC receiver, then the speed controller goes a little "loopy" - the motor twitches and it beeps like crazy! I am hoping that all it looks for is a nominal voltage across the signal wire - based on the readings above, I can then simulate the signal from the RC receiver by simply applying a voltage to the signal wire.
Secondly, is it possible to get the voltage of an output pin of a microcontroller to vary within an upper and lower boundary? If so, I can simply program the microcontroller to output a certain voltage (or level) for idle and vary this for forward/reverse motion. I'm not concerned about the steering servo, as this is a much simpler set up!
Next, which microcontroller should I use? I've narrowed it down to either Arduino, or PicAxe. Picaxe looks very simple to start using, but Arduino seems more flexible (as well as faster) - however Arduino is more expensive as a result... I plan to use at least three to four collision detection sensors and some form of ambient light sensor (to turn on IR illumination LEDs in dark conditions). I'm not sure how many outputs I need at this point.
Next, and possibly last, question: what is the best choice for collision detection sensors? To experiment with, I will probably start by using simple microswitch-based "bump" sensors, and move up to IR or Ultrasound later on. If I use IR proximity sensors, I am guessing these will be overwhelmed by the IR illumination I plan to use for "night vision". Is it possible to adequately compensate for continuous IR illumination, or is ultrasound probably a much simpler choice?
If anyone is interested, the 2.4GHz A/V modules I plan to use are available here: http://www.active-robots.com/products/radio-solutions/av-modules.shtml
Thanks in advance for all your help :)