modding an RC car

Hi Cr0sh, Destined,

I just wanted to point out to avoid confusion that while I have been asking questions in this thread, I am not the original poster. I trust this is not a problem for anyone as the questions are relevant and also relate to a radio controlled car.

Just to clarify why I am looking for an input buffer, my receiver operates on around 6v, at present I have this connected to an Arduino interrupt through a 1K resistor. It works very well, noise from the FETs and Motor is not a problem however I am concerned about putting 6V into an Arduino Pin. I did try a quick and dirty work around with a series diode to drop some of the voltage but would like a cleaner long term solution.

In looking through the 7400 Series ICs, I see many buffers, some that have protection in the form of built in voltage clamping diodes, but they all seem to be designed to buffer demanding outputs rather than buffer/protect inputs, is this because the opto-isolator is the preferred solution in this application ?

Thanks

Duane.

DuaneB:
Hi Cr0sh, Destined,

I just wanted to point out to avoid confusion that while I have been asking questions in this thread, I am not the original poster. I trust this is not a problem for anyone as the questions are relevant and also relate to a radio controlled car.

Actually - a separate thread might be better for all...

DuaneB:
Just to clarify why I am looking for an input buffer, my receiver operates on around 6v, at present I have this connected to an Arduino interrupt through a 1K resistor. It works very well, noise from the FETs and Motor is not a problem however I am concerned about putting 6V into an Arduino Pin. I did try a quick and dirty work around with a series diode to drop some of the voltage but would like a cleaner long term solution.

Hmm - did you measure this output from the receiver, and actually see that it was 6 volts? If so, no - you don't want to do that, even if it looks OK (indeed, if this has been this way for long, you may have already damaged your Arduino...). Instead, what you might try is to set up a voltage divider using a trimmer potentiometer, adjust that for 5 volts maximum on the final output (wiper is final output to Arduino; other two legs go to ground and your output from the receiver).

DuaneB:
In looking through the 7400 Series ICs, I see many buffers, some that have protection in the form of built in voltage clamping diodes, but they all seem to be designed to buffer demanding outputs rather than buffer/protect inputs, is this because the opto-isolator is the preferred solution in this application ?

Your concern here is voltage - not current, because the Arduino will take what it takes on an input, which isn't much BTW. So - you just need something that will take at least 6 volts, but its output remain in the 5V TTL level while supplying say 10-20 mA for the Arduino's input. If there is a buffer IC that will do this, use it. If you want to use an opto-isolator, use it too (but normally, and opto-isolator is meant to isolate completely one circuit from another - especially where there is the chance of high-voltage kick-back spikes occurring; say when you are switching large inductive loads using a microcontroller or similar).

Hey DuaneB I don't mind at all if you post in this, but you might get better answers in your own (however you seem to of got pretty good answers in this one :slight_smile: ).

I have moved through all the steps. My soldering was better than i expected :). I managed to find a black and red wire and using blue for the controls.

The car doesn't appear to have a turbo. Looking at the bottom of the board, the point doesn't appear to go anywhere so this would make sense.

Forward/back/left/right all work and the left and right flick back into position when I remove the probe.

I love the idea of labelling the wires, i haven't done it but I am going to buy some stickers to fold around them because it will really suit my purposes in the long run!

So what should I (we) do next? (by the way I almost have my arduino running with a wifi shield, so looking forward to controlling it from my phone!).

kind of an aside cause we aren't there yet.
Will it be possible to run the motors slower? Will it be possible to turn the wheels in increments rather than just left or right? (I am guessing the answer to the second is definitly no). Will I be able to power the arduino from the cars battery?

What sort of things should I be looking for to be able to do those things? (i bought the cheapest truck i could find in order to test, but if this works out I plan to spend more to get one which can do those things).

Again thank you for your time and patience. You are giving me way more help than I ever expected to get.

Hi,
To get back on topic, you should be able to control the speed of the motor with the Arduino. Here is a nice set of experiments that Oomlout.co.uk provide with their Arduino Starter Kit, it also has a servo which would give you the proportional steering.

http://oomlout.com/products/ARDX/ARDX-experimenters-guide-WEB.pdf

See page 12 for controlling a toy motor of the type in your car and page 14 for controlling a servo which would give you the proportional steering. I am assuming your car doesn't have proportional steering so you would need to buy a small servo from somewhere.

Duane B

Thanks for the link. I am hoping to find an RC car which does this I can mod so I use the base of car (and build a fibreglass covering to make it look like what i want).

Is the next step to take the move/turn wires and put them into the digital outs of the arduino and set them high and low to switch them on and off? Or will that blow up my arduino?

Destined:
Hey DuaneB I don't mind at all if you post in this, but you might get better answers in your own (however you seem to of got pretty good answers in this one :slight_smile: ).

I have moved through all the steps. My soldering was better than i expected :). I managed to find a black and red wire and using blue for the controls.

The car doesn't appear to have a turbo. Looking at the bottom of the board, the point doesn't appear to go anywhere so this would make sense.

Forward/back/left/right all work and the left and right flick back into position when I remove the probe.

I love the idea of labelling the wires, i haven't done it but I am going to buy some stickers to fold around them because it will really suit my purposes in the long run!

Great! I'm glad everything is working! Regarding labeling of wires - they do make wire labeling kits with labels with numbers, letters, etc; you can find ones meant for home-wiring at Home Depot or other big-box DIY stores, but they aren't as useful for small electronics. Fry's Electronics (if you are in the USA and have one in you area) carries labels meant more for general electronics. You can also find such labels online. Then again, you can probably get by with a roll of masking tape, or other tape you can write on.

Destined:
So what should I (we) do next? (by the way I almost have my arduino running with a wifi shield, so looking forward to controlling it from my phone!).

Well - the next thing is to remove the receiver IC from the board (so you don't get spurious signals from other transmitters, and so the chip doesn't consume power you need for your robot and/or Arduino). Ideally, you would also want to sever any power connections to the RF circuit that feeds the chip (doing this, though, will require some review of the PCB along with a schematic, which you would have to create - to know what parts or traces to cut to remove power from the RF circuit - the circuit, though, will probably follow the general idea of the reference design in the datasheet, so that can help you understand the traces).

After you remove the IC, you should still have the wires in place (btw - did you note what voltage the outputs from the chip were - you never mentioned it?)...

Assuming the voltages from the outputs are TTL-equivalent - you should then be able to hook your ground wire to the Arduino's ground, and the control wires up to various digital pins on the Arduino (be sure to hook the drive motor's wires up to PWM pins - so you can control the speed!). Then in your code, just perform digitalWrite() for the steering controls and analogWrite() for the PWM to the drive motor.

One thing to note: DO NOT BRING BOTH PINS/WIRES ON EITHER H-BRIDGE HIGH AT THE SAME TIME

In other words - don't activate the LEFT and the RIGHT wires (or FORWARD/BACKWARD wires) at the same time (logic HIGH); these h-bridges have -no- protection for this (IIRC) - it will short out the h-bridge (and the magic smoke will be let out). Make sure in setup() to set the pins as outputs, and set their states to LOW.

Destined:
kind of an aside cause we aren't there yet.
Will it be possible to run the motors slower? Will it be possible to turn the wheels in increments rather than just left or right? (I am guessing the answer to the second is definitly no). Will I be able to power the arduino from the cars battery?

As noted before, you can use PWM to control the drive motor; for steering, left and right is likely all you have - replacement with a servo might be possible as other's have noted. As far as powering the Arduino from the car's battery - that depends on the battery's specs - care to share 'em?

Destined:
What sort of things should I be looking for to be able to do those things? (i bought the cheapest truck i could find in order to test, but if this works out I plan to spend more to get one which can do those things).

Well, for proportional control (which is what it's called), you're unlikely to find it in a cheap vehicle; you'll want to look into a true R/C vehicle - be prepared to spend a bit of money, though. The nice thing it, though, with such a vehicle you can easily control it with the software Servo library.

Destined:
Again thank you for your time and patience. You are giving me way more help than I ever expected to get.

You're welcome; this kind of question comes up often enough, though, that an article on my website I could link to, with all the detail, would be a better solution...

:slight_smile:

[/quote]

I am prepared to spend if i can get it going. Actually i might go down the hobby store and look and ask some questions. I am from sunny Australia so most of the stuff I have to get online or improvise (actually improvise a lot because I want to get this working so I can justify the purchase of more. )

The battery on this car is a 9.6 volt, 750mA NiCd rechargeable. Honestly I am amazed the car came with it at the price. I did measure the voltage, but I can't see it in my notes which probably means I wrote it on a post it note(yeah smart I know)(edit: about 3.5, but it was really hard to measure cause I just had to stick the multimeter in while holding it on which is hard to do without a third hand. I figured holding control in palm still allowed me to hold the probe off multimeter), so I will look it up. Could you explain what TTL equivlent is? (I would rather understand than just do). Currently I am using a 9 volt clip battery for arduino, but I have read the wifi shield I have needs a fair amount of juice and I plan to hook an array of sensors up to it.

I currently don't have a solder sucker, although i might be able to find one to borrow. Is it possible to do it without the sucker?

How do I sever the antenna? It is clearly marked on the board so easy to find.

I already figured I can't turn back and forward on and will write my if statements so it always switches the other one off before starting as a failsafe.

Ok success.

I can now control forward/back/left/right from the arduino, which is what i set out to do.

However when running the PWM pin i run into problems.

running fast like
analogWrite(forwardPin,250); //I am using pin 9
works fine.

Running say 50% like
analogWrite(forwardPin,125);
Works for a while, but then a high pitch tone comes and the motor starts to slow to a stop. I just turn it back to full speed cause I don't want to break it. Does this mean PWM isn't suitable for this motor?

Do I need the probe wire from VDD for anything now?

Note: I haven't taken the IC or antenna out yet, I still wanted the car to be able to run that way for now. So I don't know if the IC is part of the problem.

Destined:
Ok success.

I can now control forward/back/left/right from the arduino, which is what i set out to do.

Congrats! :smiley:

Destined:
However when running the PWM pin i run into problems.

running fast like
analogWrite(forwardPin,250); //I am using pin 9
works fine.

Running say 50% like
analogWrite(forwardPin,125);
Works for a while, but then a high pitch tone comes and the motor starts to slow to a stop. I just turn it back to full speed cause I don't want to break it. Does this mean PWM isn't suitable for this motor?

Strange; what happens at say 75% (192 or so)? I would say it is likely due to the h-bridge driver, though I find this very odd (btw - is this after you have removed the chip?).

Destined:
Do I need the probe wire from VDD for anything now?

No - desolder it...

Destined:
Note: I haven't taken the IC or antenna out yet, I still wanted the car to be able to run that way for now. So I don't know if the IC is part of the problem.

It very well could be! If you don't want to go to the trouble of desoldering the IC completely, just cut the traces (or jumpers) between the IC and your control line points (alternatively, cut the trace going to VDD - this will "turn off" the IC only); but it is best to remove the IC or cut the traces/jumpers between your control wires and the IC.

The reason why could be any number of things, but you have to remember, you are applying a voltage to an output pin on the IC, and it may not like that! There could be some weird short being set up, or the IC might be doing something weird (activating the other output is a possibility - in other words, you PWM forward, and the IC gets confused and starts triggering the reverse pin at the same time).

Try getting that IC out of the loop, so to speak - then retry the PWM stuff.

:slight_smile:

I actually should of said running it at about 30%. Running at 50% seems okay, and 75% is definitly ok. I will report back once i get the ic out.

I will take the IC out since I really have no use for the remote anymore since I can control it from the ipad now.

How do I "cut the trace going to VDD"? Do you just score the board with a blade or something?

@DuaneB There are a number of Open collector buffers which with use of a external pullup resistor can be used as a logic translator.

Just a note on those cheap motor drivers. They are resoundingly sloppy in the linear region and may not tolerate PWM due to high shoot through currents.

Kinda did this backward - oh well... 8)

Destined:
I am prepared to spend if i can get it going. Actually i might go down the hobby store and look and ask some questions. I am from sunny Australia so most of the stuff I have to get online or improvise (actually improvise a lot because I want to get this working so I can justify the purchase of more. )

A quality electric R/C truck (no radio or such), such as a Traxxas will run you around $400.00 USD; just keep that in mind - it isn't a cheap hobby (and combining that with robotics - well, if you have the money - have fun!).

Destined:
The battery on this car is a 9.6 volt, 750mA NiCd rechargeable. Honestly I am amazed the car came with it at the price. I did measure the voltage, but I can't see it in my notes which probably means I wrote it on a post it note(yeah smart I know)(edit: about 3.5, but it was really hard to measure cause I just had to stick the multimeter in while holding it on which is hard to do without a third hand. I figured holding control in palm still allowed me to hold the probe off multimeter), so I will look it up.

In the future - don't do this; this is bad practice. Instead, solder wires and/or use alligator clips to attach your probes to the circuit in question where you want to measure, with the power OFF. Double check all of your work, make sure nothing it inadvertently shorted, and that you have your probes connected exactly where you want them, and that your meter is set up properly. Then carefully turn the power on, and keep your hands off the probes. Live probing should never really be done, unless there is no choice (and you set things up like I told you to earlier with wires and such); get into this habit. Had this been a high-voltage/high-current circuit, bad things could happen. Learn now, get used to it now, and you may save your life later.

Destined:
Could you explain what TTL equivlent is? (I would rather understand than just do).

This is from wikipedia (Transistor–transistor logic - Wikipedia):

"Standard TTL circuits operate with a 5-volt power supply. A TTL input signal is defined as "low" when between 0 V and 0.8 V with respect to the ground terminal, and "high" when between 2.2 V and 5 V[19] (precise logic levels vary slightly between sub-types and by temperature). TTL outputs are typically restricted to narrower limits of between 0 V and 0.4 V for a "low" and between 2.6 V and 5 V for a "high", providing 0.4V of noise immunity."

Destined:
Currently I am using a 9 volt clip battery for arduino, but I have read the wifi shield I have needs a fair amount of juice and I plan to hook an array of sensors up to it.

A couple things - that battery has enough voltage to run your Arduino via the barrel jack, which is OK for now, but I would do something different about the battery. It has a fairly low "run level" - that is, a battery is measured in amp-hours (AH) - that is, a 1 amp-hour battery can supply 1 amp for one hour (or 500 mA for 2 hours, or 2 amps for .5 hours - see how that works? In practice, you'll never see these numbers in real life, but that's the idea - I won't elaborate here on why). Your's is smaller than 1 amp-hour, though - a larger battery will be better.

Look at hobby shops and the like for 9.6 VDC R/C packs - NiMH are a good option, but LiPo packs are starting to become popular as well (just be aware that such packs, while lightweight, pack a helluva punch - there are videos online of what can happen if they should be accidentally shorted, or overcharged - though I think with a proper charger you should be OK); get something around 2-3 AH (2000-3000 mAH). That way you'll have a longer run-time for the car, with the Arduino and anything else you add.

The next step would be to bypass the 5V regulator on the Arduino (it wastes a lot of power as heat, being a linear device), but I would save that for your real R/C truck; for that, you can use a 5V BEC (Battery Eliminator Circuit) - do some research on these, they are basically switch-mode DC-DC converters, to efficiently take the voltage of the battery down to the level needed by an R/C receiver (but you'll power the Arduino with its output).

Oh - something else to keep in mind: In the R/C world, the battery may have a different connector that what you have on your current R/C truck - so you may have to do some improvisation here, too (and, you'll need to parallel the barrel connector in some manner as well; the best way would be to solder it to the PCB - trace the battery connections on the PCB, and find a convenient solder point for power and ground).

Destined:
I currently don't have a solder sucker, although i might be able to find one to borrow. Is it possible to do it without the sucker?

You could try solder wick, but really, your toolkit should have a solder sucker -and- solder wick (I actually have a plunger-type solder sucker, a bulb-type solder sucker, and solder wick of various types - but I've been playing with electronics for a couple of decades now). Sometimes one works better than the other in certain cases; generally the solder sucker is good for the bulk of the work, and the wick for final cleanup of any extra.

Destined:
How do I sever the antenna? It is clearly marked on the board so easy to find.

It's not just the antenna - you have to sever the power to the RF circuit. You'll need to trace the battery positive and/or the ground to the circuit, and this may take making a rough schematic (while comparing it to the datasheet's example schematic for that portion - which was located in the upper-left part of the schematic); it may or may not be easy to do. It may take some time. Ultimately, it might not even be worth it for this stage of the project (it likely doesn't consume very much power, and if you upgrade the battery pack, it won't make that large of a difference anyhow).

Destined:
I already figured I can't turn back and forward on and will write my if statements so it always switches the other one off before starting as a failsafe.

Well - the thing is, on some h-bridge designs you can; it allows you to set the motor in "brake" vs "freewheel" mode - but it is a good design in your code to do these checks; put them in functions, that way you don't have to worry about them, and can just call the function you need, and you'll know it works (for that matter, put the "set all outputs LOW" in a function as well - call it something like "initOutputs()" - then call that function from setup(), before loop() is entered).

Something I forgot to mention in the last post, in regards to cutting traces: To cut a trace, you can either scrape the copper away with a hobby knife (x-acto or similar), or use a dremel-type tool with a diamond point burr cutter or similar. Just remove enough of the trace so you see the PCB material underneath, leaving about a 1-2 mm gap.

:slight_smile:

ajofscott:
Just a note on those cheap motor drivers. They are resoundingly sloppy in the linear region and may not tolerate PWM due to high shoot through currents.

That is very true, too - I had forgot that those h-bridges may have left off the flyback diodes (you might try looking into adding some in - which may or may not be very easy - four per h-bridge would be needed); even that may not cure things...

A simple bridge rectifier module with the AC terminals on the motor legs and the DC outputs tied to the motor DC supply is in effect the same thing.

Hi,
As you will know if you have looked at my blog, I am a huge fan of the Tamiya M03 radio controlled car, it also has a large following in your part of the world, check http://www.rc-mini.net/joomla/index.php

Its not the fastest, it definitley won't go far off road, but its a great fun little car.

You might be better off with a scale truck for projects though, they are slower and will take you on and off road. If I didn't already have so many cars I would get one of these - http://www.rcmart.com/rc-axial-scx10-trail-honcho-w24ghz-p-34715.html look up 'trail honcho' on your favorite video site to see if this type of truck is for you, check out the 'Tamiya M03' while your there.

Duane B

ajofscott:
A simple bridge rectifier module with the AC terminals on the motor legs and the DC outputs tied to the motor DC supply is in effect the same thing.

My BS meter is pegging on that, but I am always open to learning something new; would you care to supply a schematic or a link to one detailing what you are talking about...?

:slight_smile:

Okay well disaster has struck :slight_smile:

I went to bed with it working and my ardunio program working. Took the battery out to recharge cause the front wheels weren't responding that well and i assumed it was the battery.

Today the car is pretty much dead. If i move the probe around the right a bit it will eventually go right other than that dead. The remote doesn't work.

I am guessing i need to go buy another to start again! :frowning:

I am wondering if maybe my right and left wires accidentally touched at some point because they are very close on the board.

edit:the probe wire doesn't work

Destined:
Okay well disaster has struck :slight_smile:

I went to bed with it working and my ardunio program working. Took the battery out to recharge cause the front wheels weren't responding that well and i assumed it was the battery.

Today the car is pretty much dead. If i move the probe around the right a bit it will eventually go right other than that dead. The remote doesn't work.

Well that stinks... :frowning:

Destined:
I am guessing i need to go buy another to start again! :frowning:

I am wondering if maybe my right and left wires accidentally touched at some point because they are very close on the board.

Could be anything. I would verify a number of things first:

1: Verify that your Arduino is still working ok (I know it probably has nothing to do with anything - but it is an expensive part of the project)
2: Verify all of the connections - use your meter to do some continuity tests on the wires; keep the car turned off, set the meter to measure resistance, then touch the probes to the ends of the wire and where you soldered it. You might also try one probe on the first part lead on the board and the end of the wire. The resistance should measure 0 ohms if continuity is good; "infinite" ohms if it is bad.

Although you do say the remote no longer works...so it could be that the h-bridges are dead. Keep the chassis anyhow, if you are sure this is the case; cut the PCB away from the car - likely the on-board motor and steering motor/actuator work OK; you might be able to use the chassis with a separate h-bridges (measure the current needs for the motor(s) first, though - likely you will need to use L298 h-bridges or better, because of the amperage needs).

Finally - next time - never have a bunch of dangling wires with bare ends flopping around while any source of power is connected; before connecting power, you want to secure and make certain that nothing is touching anything that you haven't decided to let touch. Anything that has to dangle, put a piece of electrical tape over (or, if the wire is thick enough - a small wire nut) - so that it is insulated and can't short out anything.

Consider it a cheap lesson learned, and move on with another vehicle (or purchase h-bridges/drivers for this one) and try again. You were real close with chassis; I think the next one will end up being a success (btw - what brand was the vehicle you used? New Bright is a brand that typically uses the RX2/TX2 chipset, so keep an eye out for those).

I think the motors are fine by the fact i can occasionally get the front motor to go right and stay right until i switch it off.

I have learnt a lot, i have certainly made some mistakes I won't do again. Like when i cut the wires i left way too much exposed at the bottom when welding.

I think the truck was emetec. I will probably try to get the same one although it was on sale in the new year. I think im not ready to buy the $400 one yet, so i might buy another el cheapo one in case i destroy it again.

That said it has been a lot of fun, and for the short period i was controlling it from my ipad was very exciting. For now I am going to work on getting the sensors to show up on my ipad and go buy another one tomorrow.