Arduino Forum

Using Arduino => Motors, Mechanics, and Power => Topic started by: Destined on Jan 13, 2012, 08:47 am

Title: modding an RC car
Post by: Destined on Jan 13, 2012, 08:47 am
I am trying to mod an RC car to be controlled by the Ardunio. After much reading on the net for tutorials I am pretty confused. I only have basic ardunio skills (hooking up leds/sensors, basic serial communication).

The is a chip in the middle of the RC cicruits which after research appears to control the car. It has 12 pins and i figure some of them must make the car go foward back etc. However I am not sure how to hook it up to the ardunio. I tried just connecting it to a digitial out with a resistor in between and touching each of the pins but none of them seemed to do anything.

Could someone please help me at least get the arduino to start the motor or something? Currently I am just at a deadend and have no idea what to do next.
Title: Re: modding an RC car
Post by: AWOL on Jan 13, 2012, 08:51 am
Quote
a chip in the middle of the RC cicruits which after research appears to control the car.

Care to publish your research for peer review?
Otherwise, we're just playing guessing games.
Title: Re: modding an RC car
Post by: Destined on Jan 13, 2012, 10:01 am
okay maybe the easiest thing is to show a picture

(http://destined.com/Board.jpg)
Title: Re: modding an RC car
Post by: AWOL on Jan 13, 2012, 11:00 am
Any comments about the steering geometry of the vehicle (skid, differential, servo, passive one-way in reverse...), size of motors, where and what the motors are connected to, power source, observed oscilloscope traces of control signals... would be welcomed.
I'm guessing the "5W5RJ" marked components are also connected to the motors.
Title: Re: modding an RC car
Post by: Destined on Jan 13, 2012, 11:37 am
Steering appears to be a servo with left/straight/centre positions only on front. On back is a drive motor which appears to only have one speed and can go forward and back.

The motors are sealed up in the plastic and i was hopefull i wouldn't need to break it open so I don't know what size they are.

For the thing with the 5WR5J both of the motors wires go into that before going to the other board. Both the blue wires to the motors come from the main board. I think are connected to the points labeled "m". The drive motor to the m in the bottom right and the servo motor for an "m" between the 2 metal plate things which is obsured a bit in the picture.

Power source is a 9.6v 750mAH battery.

"oscilloscope traces of control signals" - I don't know how to do this and don't have an oscilloscope.

Note the board also connected via a single black wire that had some headlights that flashed, but I cut it out because It was molded into the plastic top which I was getting rid of. The car still runs fine on remote control.
Title: Re: modding an RC car
Post by: AWOL on Jan 13, 2012, 12:35 pm
You talk about "motor" and "motors" - are you including the steering servo in "motors"?
Is this a simple, encapsulated R/C type servo, or some sort of bare-bones device built into the toy?
Title: Re: modding an RC car
Post by: Destined on Jan 13, 2012, 12:45 pm
I was including the steering servo motor.

There is one drive motor and one steering servo motor. I think it is a simple encapsulated R/C type servo but im not that experienced with this sort of thing as you can tell.
Title: Re: modding an RC car
Post by: cr0sh on Jan 13, 2012, 03:31 pm
Destined - I'm willing to bet that the IC with the sticker on it marked "27" and "2345678901" is actually the RX2 half (16-pin DIP version) of the TX2/RX2 chipset pair. This is a very commonly used chipset in cheap R/C toys; a couple of things would help in making this a firm diagnosis:

1) A much more clear picture of the board (and peel that sticker off too - see what the writing is underneath)
2) A clear picture of the backside of the board, too (so we can see the circuit diagram).

As it is - I can't tell which end is "pin 1" (I can tell if that is a divot at the top of the chip in the pic or what - too much glare).

Likely the two heatsinks at the bottom are part of a 4 transistor or mosfet h-bridge, probably for the main driving motor; the four smaller transistors at the bottom right of the pic are likely for the steering "servo". All of this is just guesswork.

You do still have everything connected, right?

Anyhow - if it is the RX2 of the TX2/RX2 pair - you can find a good datasheet that will explain all about it here:

http://www.et.byu.edu/~bmazzeo/LTR/tech.phtml

But get us those pics, too!

BTW - based on your explanation of hookup - did you happen to connect the grounds (of the Arduino and the car) together? What you should be doing is following the diagram in the app-note on the datasheet (for reference implementation), and perhaps just using a jumper from the positive supply on the -car- to the -input- pins of the chip (follow the diagram on the datasheet - you do this wrong, and you could blow the chip, and who knows what else).

If none of this works out, you can always just rip out the board and hook up external driving circuitry (a couple of L298/L293 h-bridges would likely suffice - an L298 for the drive wheels, and an L293 for the steering would likely be best).

:)
Title: Re: modding an RC car
Post by: DuaneB on Jan 13, 2012, 04:36 pm
Hi,
   A quick mod might want to try is to have a look at the 'turbo' channel, its seems to be an unused channel between the transmitter and receiver in most models using the TX2 (transmitter) RX2 (car) pair of chips. You could use it to operate lights, or a buzzer for a horn as a quick exercise to get familiar with the two chips - I haven't tried this myself, but if it is an unused channel its begging to be used for something.

Until you are familiar with the RX/TX2 I would suggest you don't connect the Arduino to them, I have no idea how much current would be drawn by the car and in the few cars I have opened most of the decoupling capacitors are labelled on the PCB but just not installed I suspect the same goes for flyback diodes. This is probably not a safe environment for to learn in.

One option that might be safer is to start at the transmitter, when I was trouble shooting my sons christmas present I used a jumper wire between the vin pin and the left,right,forwards and reverse pins of the transmitter chip to successfully operate the car. You could use transistors to replace the push buttons in the transmitter and operate them in software using the Arduino.

Have a look at my blog for some other ideas, its mostly Arduino for RC Race cars, but might be interesting to you http://rcarduino.blogspot.com/ (http://rcarduino.blogspot.com/)

Duane B
Title: Re: modding an RC car
Post by: cr0sh on Jan 13, 2012, 05:03 pm

Until you are familiar with the RX/TX2 I would suggest you don't connect the Arduino to them, I have no idea how much current would be drawn by the car and in the few cars I have opened most of the decoupling capacitors are labelled on the PCB but just not installed I suspect the same goes for flyback diodes. This is probably not a safe environment for to learn in.


I don't think any of this would really be an issue; if the car works fine without those parts, it's probably going to work fine with the Arduino in place of the RX2 chip. If there is much concern, just wire in the flyback diodes yourself if they don't exist (you're already hacking the car, what's a few more parts?).

As for the decoupling caps - you don't care about those. Ultimately, the point of the datasheet and the RX2 chip is to identify the pins for ground and the outputs. Once you have these verified and things working, you cut out/desolder the RX2 chip - it's no longer needed (nor are any decoupling caps it might or might not be using). The RX2 chip has a minimum output current of 4.5 mA at 4.0 VDC; I doubt that the maximum goes over 20 mA - but again, if this is a concern, find out what voltage is being used on those outputs (whatever the voltage is powering the chip on the VDD - pin 13), and use that to control the outputs - place a meter in between in current measurement mode, and find out. This is basic stuff here.

The only reason to use the transmitter would be if you want wireless open-loop control (not much use for most robot configurations) - or, you're so paranoid that you strap the transmitter (and batteries) to the car as well (workable, if awkward, I suppose - but then you are still wiring into the "other half" of the pair - what about any concerns there? I'm sure if the car was made cheap, so was the transmitter).

I wouldn't worry about direct connections to the outputs used by the RX2 chip - others have done this successfully if you search this forum (and it is being used by the class I linked before as well); but if there really are concerns, there are ways to address them before even hooking up the Arduino (if you are still worried - drop a 4N25/4N26 optocoupler between the Arduino outputs and the pads on the board, or a hex buffer IC, or a darlington array IC - or any number of other possible TTL buffering schemes).
Title: Re: modding an RC car
Post by: Destined on Jan 14, 2012, 12:30 am
First I would like to thank everyone for the replies especially for a lost new poster like me.

To answer all the questions to the best of my ability
-The chip appears to be an RX-20 lC1081 (shown in picture).
-Everything is still connected except for the lights (i wanted them gone anyway). The car still runs fine by the radio control.
-I haven't connected the grounds (in fact i am not actually sure where the ground is on the car!)
-Yes the car is cheap as. I decieded to get something really cheap to hook up first. Then I could get a more expensive one which has multiple speeds and a servo which does more than just straight, full left, full right.

I am unsure what my next step should be. I just assumed (maybe somewhat stupidly) that I could just basically use the ardunio to switch on the forward/back/left/right/straight by connecting it to the right point on the board.

This page has a diagram of an RX2
http://www.jbprojects.net/projects/wifirobot/ (http://www.jbprojects.net/projects/wifirobot/)

Below are pictures of the front and back in the best quaility i can manage.

(http://destined.com/board2.jpg)
(http://destined.com/board3.jpg)  
Title: Re: modding an RC car
Post by: cr0sh on Jan 14, 2012, 04:22 am
There's a ground on the chip. First - you need to read and understand the datasheet I linked; it has -all- of the information you need to get this working. Looking at the clearer photo of the chip you posted, pin 1 is on the left-hand side, bottom (notice the divot on the left hand side of the chip - that is IMPORTANT). Pins are counted on DIP ICs starting from pin 1, across the "bottom" (ref your pic), then back from the right-top pin to the left (so pin 16 is above pin 1, pin 15 is above pin 2, and so on - understand?).

Now - if you look at the datasheet, the table on page 4 - you will see that pin 2 is ground for the chip - that's your ground. Hook a black wire up to that (trace back from the pin on the underside - remember, pins are reversed! - and find a convenient solder point - or just solder to the black wire from the battery, it should be the same). Now, you want the power pin - that is pin 13 (reference the datasheet!); since pin 9 is on the top-right (again, referencing your picture), pin 13 will be above pin 4. That is the power pin for the chip (VDD). Again, find a convenient solder point nearby and solder a red wire to it.

Now - you should be able to use that red wire (from VDD), and -carefully- apply it, with the car turned on, to pins 10 and 11 (backward and forward respectively), and pins 6 and 7 (right and left respectively) - reference the diagram on page 7 of the datasheet, notice how those are connected in the example circuit. Be careful -not- to short that wire against any other pin, or any other part, or you may damage something! If you must, find solder points from those pins to the rest of the circuit, and bring out wires from those points, then short the wire ends together (this is safer).

Also note pin 12 - that is the "turbo" pin. Setting this pin "high" may enable some mode (typically "fast high speed" when the "forward" pin is brought high).

Note also that sometimes, these pins and such are "reversed" - so that forward is backwards, and right is left, etc. Not sure why, but the manufacturers do this.

Let us know how that goes. That should work. Note that this is all without using an Arduino. You may need to prop up the car to keep it from running away from you. If you get this working, then we can move on to the next step.
Title: Re: modding an RC car
Post by: Destined on Jan 14, 2012, 05:46 am
Again thank you for the help :) I am starting to see where this is going.

I have attached an image to make sure I understand the pins before soldering.

It wouldn't be a good idea to solder on the top would it? just looks to be more space there than trying to solder exactly over the dot

(http://destined.com/board4.jpg)
Title: Re: modding an RC car
Post by: DuaneB on Jan 14, 2012, 06:07 pm
Hi,
   I have a quick question for cr0sh or anyone else who may know.

   I understand that the Hex buffer will take a TTL input and sink or source a larger current and voltage on the output side, is there a common IC that does the reverse i.e. takes a 6,7,8 or more volt input and converts it to TTL on the output side, with some protection in between ? If switching speed is a priority is an opto isolator my best option ?

Thanks
   Duane.
 
Title: Re: modding an RC car
Post by: cr0sh on Jan 14, 2012, 08:46 pm

Again thank you for the help :) I am starting to see where this is going.

I have attached an image to make sure I understand the pins before soldering.

It wouldn't be a good idea to solder on the top would it? just looks to be more space there than trying to solder exactly over the dot

(http://destined.com/board4.jpg)


NO - This is wrong!

Look at your picture above. Pin 1 is at the BOTTOM-LEFT corner. Pin 8 is at the BOTTOM-RIGHT corner. Pin 9 is at the TOP-RIGHT corner. Pin 16 is at the TOP-LEFT corner.

Please re-draw your image - and post it again, so we can make sure you understand.

You do -not- want to solder onto the pins next to the chip -ever- because you may damage it from heat (especially if you are inexperienced - an experienced solderer can do this, but it is still risky).

Instead, look at the bottom of the board (and keep in mind that the pins are reversed when looking from the bottom - this is very important, and it is easy to make mistakes (even experts get confused!). Mark pin one or something with a marker if you have to. Ok - so looking at the bottom, where the chip is connected, you should be able to follow the trace out and away toward another pad (which may have a part in it) - solder to that pad; likely (especially for the pins that control functions of the car), that pad will be the leg of a resistor; the other leg of the resistor will be close by, and connected (likely) to the base of a transistor, as shown on page 7 of datasheet example. You want to solder to that resistor anyway to limit current to the transistor's base - whatever you do, don't solder to the base of the transistor, as you may end up drawing too much current and burn out either the resistor (or the Arduino's port).

That point should give you more room. If it still seems cramped - well, you gotta learn to solder somehow; if you don't want to risk it, then find some other "donor practice PCB" - and practice desoldering and soldering parts on until you are comfortable and make good solder joints. Also - here's a link (and the entire site is an excellent tutorial - especially if you are in the UK or Europe - if you are in the US, they use a slightly different method of denoting resistor values than we do here in the States - so keep that in mind if you decide to try any of the example circuits):

http://www.kpsec.freeuk.com/solder.htm

:)
Title: Re: modding an RC car
Post by: cr0sh on Jan 14, 2012, 09:14 pm

I understand that the Hex buffer will take a TTL input and sink or source a larger current and voltage on the output side, is there a common IC that does the reverse i.e. takes a 6,7,8 or more volt input and converts it to TTL on the output side, with some protection in between ? If switching speed is a priority is an opto isolator my best option ?


Not voltage typically, just current - for buffers and opto-isolators; sometimes you may find parts that will allow for switching slightly higher voltages (it depends on the transistor or mosfet outputs). Also note that many buffers are inverted - that is, you put a logic HIGH on the input, and get a logic LOW on the output. Something else to keep in mind (read the datasheets of the parts in question - always try to read the datasheet for any "active" part if you can - and passives in the cases of diodes or similar) is that a part may require that pins are pulled either high or low, and not left floating; leaving pins floating on certain parts can damage them (or cause the outputs to be wonky).

There are voltage level conversion chips that can take (most commonly) a TTL level (5 volts) and drop it down to TTL 3.3 volts; if you are just needed to drop the voltage to supply power to a part (say you have a 12 volt battery, and need to run a 5 volt motor), then using a voltage regulator (and if needing the current - a bypass transistor; or an adjustable switching regulator) to drop the voltage to run the motor (or circuit - or whatever) can be used. But these aren't typically used to switch voltage to the motor or circuit - you would typically do that -after- the regulator or whatever.

Opto-isolators are most useful for, well, isolating a circuit; say on one side of the circuit you have a beefy motor, with transistors switching a lot of current, and with possibly voltage spikes being introduced by switching. You don't want this getting to the logic side of things, because doing so might cause the logic to behave wonky, reset your microcontroller, or burn something out. So you use an opto-isolator.

Basically, all an opto-isolator is, is an LED sitting next to a photo-transistor. When the LED is lit, the photo-transistor is turned on (note - check the datasheet for the opto-isolator; some have current limit resistors already for the LED, some don't - if it doesn't then you need to check the current and voltage needed for the input/LED in the opto-isolator, then calculate using ohm's law the size of resistor needed to pass that current, so you don't burn out the LED); this photo-transistor then controls the load, or more generally switches a beefier transistor controlling the rest of the circuit.

The key, though, is that with the photo-transistor, you can have -completely- separate grounds and power inputs for the isolated circuit - so that no noise or voltage spikes will travel back into the logic control. Your logic remains safe from the other side (unless you don't pay attention to how you route wires or traces on the board, in which case induced voltages/currents can be set up and cause problems - typically very difficult to diagnose problems, as well).

Now - for this R/C car, you may or may not want the isolation; it seems like (at least in the datasheet on page 7) they already use a transistor for some amount of buffering on the circuit (parts Q4 and Q9 for the forward/reverse, and parts Q10 and Q15 for left/right); if something goes wonky, these would probably burn out first before anything happened to the Arduino. But - a buffer or similar might be a good part to add if you are paranoid. You should also check and make sure that the manufacturer of your car actually put in those transistors (do this by following the traces - a good way to do this is to make a nice scan of the bottom - which you have - then using a paint program to flood fill the traces from part to part, while looking at the top-side and comparing things; make a rough schematic while you're at it if you want - it could be helpful!).

Something else to notice on that example circuit in the datasheet (check out your car to see if it is used): Remember the turbo function (pin 12)? Notice how it is wired in the example circuit: it goes to a transistor (Q3), that then turns on the "forward" function (Q4 - which turns on the h-bridge transistors Q6 and Q7 - making the motor spin in the "forward" direction); this flow also turns on transistor Q2, which switches the full 12 volts (or whatever the upper voltage is) into the motor circuit (instead of the normal 9 volts which is tapped from the battery at the right) - giving you the "turbo boost" function; pretty neat, huh?

Also something else; check out how your car steers - based on what I can see on the circuit board, page 7 is your likely example circuit - but notice that the datasheet lists a very different circuit on page 8 (I am not sure how this is supposed to work, unless "left" and "right" go to pins 6 and 7 or something.

Another thing (always something with me - I should write a book!) - ultimately - once you get this thing working with "probing", and you start to hook in the Arduino, you are going to want to desolder the chip from the board (another reason not to solder to the chip) - this is so the chip doesn't use up any current (you want that to power the robot and the Arduino!), and also so no power is supplied to the radio receiver portion of the circuit (consuming more current, as well as possibly getting interference into the circuit - making your robot do strange things).

Finally - I want to point out that the page 7 example circuit shows the view of the IC from the top down (exactly as I described the pin numbering in my last post) - just look at that to verify things, ok?
Title: Re: modding an RC car
Post by: Destined on Jan 14, 2012, 11:50 pm
I have a board I ripped out of a very old phone to practice on :)

Here is the new diagram

(http://destined.com/board5.jpg)


Also on the solder points are spots B and C acceptable or do I need to be going over the previous solder point like A?

(http://destined.com/board6.jpg)

You said "You want to solder to that resistor anyway to limit current to the transistor's base - whatever you do, don't solder to the base of the transistor, as you may end up drawing too much current and burn out either the resistor (or the Arduino's port)."

Where am i meant to put resistors and what value? or do you mean I should trace it out to the resister and solder to the resistor rather than one of the points off the chip?
Title: Re: modding an RC car
Post by: cr0sh on Jan 15, 2012, 03:03 am

I have a board I ripped out of a very old phone to practice on :)


That's good - practice on it; learn to desolder parts, solder them back in, and solder wires to points (hint: tin the end of the wire first, then solder the tinned wire to the point on the board - if the wire is stranded, after stripping the insulation, twist the strands up tight, then tin the wire end - it will soak it up fairly easily. Once it is cooled, snip off the very tip if there is any excess or extra strands sticking out).

You might also practice making solder bridges between close pads and cleaning them up - this is just something you need to learn, because you -will- make them, and understanding how to clean up a bridge (or make one!) is important. Bridges are made best when the pads are close together, but if the pads are too far apart, you may need to use a piece of thin wire (solid core works best). Surface tension is the key to all soldering; you heat the solder on the pad up (until it is shiny), and if the pad is close to another, the idea is to heat both together and "shove" them together so they form a joint bridge. Then let them cool (don't leave the heat on too long, or blow on the hot solder to cool it too quick, just let it naturally cool - otherwise you run a risk of a "cold joint", which is weak and may be electrically unsound. If you have to use a piece of wire, tin it first, then heat up the pads (you have to be quick - though sometimes you might just need to do one, then do the other, and let the heat flow thru the wire to keep the other end fluid), and shove the wire around until it fits and the solder flows over it, then let it cool. It will take some practice, but you'll get it.

Your first thing though is to learn to desolder parts and solder wires - because that is what you'll need to do on this PCB. You'll solder the wires first, probe around, then once you have everything situated (and label the wires!), you can desolder the IC; desoldering DIP ICs is tricky, though. You'll quickly run out of hands (if you have a vice or can improvise something, it will help). The best way is to use a combination of a solder sucker and desoldering braid to remove most of the solder off the pads (you won't be able to get it all). Then with a small screwdriver under one end, you carefully pry on the IC (not too much force!) while reheating the pins, and "pop" the pins off. Don't spend too much time on any one pad; if it ain't working, move on to the next, and let it cool down; you don't want to lift the pads if you can help it (but it will happen occasionally). If it really isn't working, the move of last resort is to use wire dikes to cut the pins from the IC body (this renders the IC useless, btw), then desolder the pins one-by-one from the board.


Here is the new diagram

(http://destined.com/board5.jpg)


That looks perfect!


Also on the solder points are spots B and C acceptable or do I need to be going over the previous solder point like A?

(http://destined.com/board6.jpg)


You want to solder on pads away from the main pads holding the IC on - because later you will desolder the IC, and you don't want your wires falling off, right? That means the one underneath "B" is most acceptable, and the one on the other end of "C" would be better. Only solder on to the IC pad if you have no other choice (like for instance, you are using a function that the pad represents that -wasn't- brought out on the board), or if you aren't desoldering the IC. You'll know when you need to do what.


You said "You want to solder to that resistor anyway to limit current to the transistor's base - whatever you do, don't solder to the base of the transistor, as you may end up drawing too much current and burn out either the resistor (or the Arduino's port)."

Where am i meant to put resistors and what value? or do you mean I should trace it out to the resister and solder to the resistor rather than one of the points off the chip?


Well - first try to locate the resistors; if you follow the traces from the pads for pins 6 & 7 (right/left) and 10 & 11 (backward/forward), you should end up at a resistor pin (if the manufacturer followed the reference diagram in the datasheet - or something like it). If you end up at a transistor pin, then the manufacturer was flying fast and loose, and you should add a resistor; use the values as given on the datasheet, which is 690 ohms (or something close if you don't have this value). Either way, you want to solder your wire to that pin, and not the IC pin (and remember, the further you can get away from the IC and closer to the h-bridge driver circuit, the better).

Also - once you have your wires in place, and you know their function (and you know they are soldered on good), put a dab of hot glue on and around the joint to provide some "strain relief" so they don't pull off as you experiment. Hot glue is non-conductive, so it won't be a problem.

Finally - may I use your photographs and such that you have posted here for use in an article I want to write up on my website? They are fairly clear, and would save me some time and effort. I think all of this that I have written could be useful to others in the future...
Title: Re: modding an RC car
Post by: Destined on Jan 15, 2012, 04:36 am
Go for it on the photos and if you need any others for your story let me know. I am very appreciative of the help and if that can help you back in some small way I am happy to help!


So now I have the wires in the next step is take the IC out? Why am I taking the IC out? Because the arduino is going to replace it?

Once I have done that what next?
Title: Re: modding an RC car
Post by: cr0sh on Jan 15, 2012, 05:28 am
Go for it on the photos and if you need any others for your story let me know. I am very appreciative of the help and if that can help you back in some small way I am happy to help!


I'll be sure to attribute the photos (and anything else necessary) to you, of course - thank you for your permission!

So now I have the wires in the next step is take the IC out? Why am I taking the IC out? Because the arduino is going to replace it?

Once I have done that what next?


No, the next step is the probing - but first we need to do some sanity checks - read thru all of the following, so you know what is coming up, then start:

1: Verify your soldering connections - make sure you didn't make any bridges, and that the soldering job looks good; if not - fix it first (if you are worried about your soldering job, post a clear sample picture of your work here first, and I'll let you know what I think).
2: You did label your wires? If not, label them!
3: Make sure all the wires are separated from each other (none touching!) and that none are touching anything else on the board.
4: Take your meter (you do have a meter? if not - GET ONE) - set it to voltage measurement (you want a range of 0-10 volts at least) - if your meter auto-ranges, that's ok.
5: Hook your ground probe to the GND wire (pin 2) - use alligator clips or something secure.
6: Hook your positive probe (make sure it is in the voltage measurement plug on the meter!) to the VDD wire (pin 13), again with alligator clips.
7: Turn on the car carefully - put on a stand so all four wheels are off your work surface, but can still turn freely (and steering still works).
8: What does your voltage read? Make note of the voltage!
9: While on the stand, try using the remote to verify everything is still working OK - and that your "stand" isn't interfering with anything.
10: Turn off the remote.
11: Remove the positive probe of your meter from the VDD wire; hook it up to the RIGHT wire (pin 6).
12: Turn on the remote. While watching the meter, send the signal to turn the wheels right - read the voltage, and note it (also note: sometimes manufacturers reverse the order of the wires - so left is right and right is left - if you don't get a reading, try turning the wheels with the remote the opposite way, and see if you get a reading then).
13: Move the positive probe of your meter to the LEFT wire (pin 7) and repeat your testing and notes.
14: Do the same for BACKWARD (pin 10), FORWARD (pin 11), and TURBO (pin 12 - if your car has this option) wires - note the voltages you read.
15: Hopefully - the voltages you read on each of these tests match the read you got from the VDD wire.

If it doesn't - STOP HERE - and let me know what readings you got. Do not proceed. Proceed only if your readings are within 5-10 percent of VDD (there will always be some internal losses in an IC). If the voltages are the same - it means you can use the VDD wire (pin 13) as a probe wire. When probing, only touch it to the wires I have indicated, and not to any others (or any parts on the PCB).

16: Disconnect all the wires from your meter, and from the alligator clips (or whatever you used).
17: Again, make sure all the wires are separated from each other (none touching!) and that none are touching anything else on the board.
18: A good sanity check is in order - try your remote again, then turn it off if everything looks normal.
19: Now - take the VDD wire (from pin 13) - this is your probe wire.
20: Briefly touch it to the RIGHT wire (from pin  6) - did the front wheels angle right? Did they move at all? If not - do they still move with the remote? Do they return to center when you disconnect it?
21: Briefly touch it to the LEFT wire (from pin 7) - how about that?
22: Briefly touch it to the BACKWARD wire (from pin 10) - do the rear wheels spin in reverse?
23: Briefly touch it to the FORWARD wire (from pin 11) - do the rear wheels spin forward?
24: Briefly touch it to the TURBO wire (from pin 12) - do the rear wheels spin forward faster (note: if your car doesn't have a turbo mode, this may do nothing, or do the same as step 23)?

That should be it - if at steps 20-23 (and possibly 24) you don't get an action, try the remote (remember to switch it off afterward). If at any of the steps, you get the "opposite" action of what the wire is marked, it just means the manufacturer has reversed the pins (they also did the same on the transmitter - so no big deal) - just swap your labels around. If you don't get an action from your probe testing - but still do from the remote - that will be odd, and I am not sure what to tell you. If you don't get any action from the remote or the probe, that will be double odd (I don't make any guarantees on any of this - welcome to the joys of hacking).

Once you have performed the above steps, and know this is working OK - you can then proceed to the next step. But let's take this a bit at a time, ok? In these kinds of hack jobs, it is best to take it slow and easy - no rush - otherwise you make a mistake, and POOF - the magic smoke is let out of something.

Good luck!

:)
Title: Re: modding an RC car
Post by: DuaneB on Jan 15, 2012, 06:22 am
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.




Title: Re: modding an RC car
Post by: cr0sh on Jan 15, 2012, 07:01 am

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


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).

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).
Title: Re: modding an RC car
Post by: Destined on Jan 16, 2012, 08:58 am
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 :) ).


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.

Title: Re: modding an RC car
Post by: DuaneB on Jan 16, 2012, 07:19 pm
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 (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

http://rcarduino.blogspot.com/ (http://rcarduino.blogspot.com/)




Title: Re: modding an RC car
Post by: Destined on Jan 16, 2012, 11:27 pm
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?
Title: Re: modding an RC car
Post by: cr0sh on Jan 16, 2012, 11:29 pm

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 :) ).


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.


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:[font=Verdana] DO NOT BRING BOTH PINS/WIRES ON EITHER H-BRIDGE HIGH AT THE SAME TIME[/font]

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.


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?

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.

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

:)



[/quote]
Title: Re: modding an RC car
Post by: Destined on Jan 17, 2012, 12:25 am
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.
Title: Re: modding an RC car
Post by: Destined on Jan 17, 2012, 03:05 am
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.
Title: Re: modding an RC car
Post by: cr0sh on Jan 17, 2012, 04:08 am

Ok success.

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


Congrats! :D


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


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


No - desolder it...


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.

:)
Title: Re: modding an RC car
Post by: Destined on Jan 17, 2012, 04:15 am
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?
Title: Re: modding an RC car
Post by: ajofscott on Jan 17, 2012, 05:17 am
@DuaneB There are a number of Open collector buffers which with use of a external pullup resistor can be used as a logic translator.
Title: Re: modding an RC car
Post by: ajofscott on Jan 17, 2012, 05:23 am
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.
Title: Re: modding an RC car
Post by: cr0sh on Jan 17, 2012, 05:34 am
Kinda did this backward - oh well...  8)

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!).

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.

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


This is from wikipedia (http://en.wikipedia.org/wiki/Transistor%E2%80%93transistor_logic):

"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."

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).

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.

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).

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.

:)
Title: Re: modding an RC car
Post by: cr0sh on Jan 17, 2012, 05:36 am

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...
Title: Re: modding an RC car
Post by: ajofscott on Jan 17, 2012, 01:02 pm
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.
Title: Re: modding an RC car
Post by: DuaneB on Jan 17, 2012, 06:10 pm
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 (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 (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

http://rcarduino.blogspot.com/ (http://rcarduino.blogspot.com/)

Title: Re: modding an RC car
Post by: cr0sh on Jan 17, 2012, 10:27 pm

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

:)
Title: Re: modding an RC car
Post by: Destined on Jan 18, 2012, 05:32 am
Okay well disaster has struck :)

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! :(

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
Title: Re: modding an RC car
Post by: cr0sh on Jan 18, 2012, 06:07 am

Okay well disaster has struck :)

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... :(


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

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).
Title: Re: modding an RC car
Post by: Destined on Jan 18, 2012, 07:19 am
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.
Title: Re: modding an RC car
Post by: cr0sh on Jan 18, 2012, 05:23 pm

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'm sure the motors are fine; like I said - you can keep the chassis, and maybe in the future use it for something else (with separate h-bridges - like a motor shield or two).


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.


Yeah - you only want to expose the wire needed and no more; the insulation should be right next to the solder point when you are done (also note: welding is a different process from soldering, and forms of welding - most spot welding - are used in the electronics industry; mainly for making battery packs).

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.


You've never said where you are located at (country) - but if you live in the States, or have a good selection of thrift stores nearby - check there first. Nearly every weekend I go to Goodwill stores and scrounge for junk; I almost always walk away with 2 or 3 "junk" R/C cars (I think I even have a few emetec's - but mostly New Bright) that have no transmitter; I only pay a max of $5.00 USD for most of them (some of the larger ones I might pay $10.00 for - I did once find an MGA Tarantula (look it up) for $25.00 - that was more than worth it).

Why do I buy them? Well - I have a plan that I am veeeery slooowly executing...

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.


Well, you learned a lot and had some fun! Good for you! Making mistakes is how we learn; sometimes those mistakes can be very expensive (sometimes, they can be fatal - but I doubt this will be the case with a small robot). In this instance though, you lost a minor bit of kit (and I still urge you to check over the Arduino - just to be sure; hook up an LED with a resistor, and check the digital I/O pins for operation - particularly the ones you used for the experiment; the main reason to test this is because if there is damage, you want to fix that too - because otherwise, you'll be trying to build something with a bad system, and you won't know whether the bug is the Arduino, the wiring, or the program - you need "known goods").

Good luck with your next attempt!

:)
Title: Re: modding an RC car
Post by: Destined on Jan 18, 2012, 11:20 pm
I actually did say where I was from but probably missed in the more important stuff, I am from Sydney Australia. This somewhat limits my choices and initial costs are higher.

I checked over the arduino and did a similar thing to what you suggested. I can't find anything wrong with it. That was the first thing i did in case I needed to order another one because it would take a week to get here.


The one I got was from an aussie chain called Dick Smith Electronics (don't let the name fool you, by electronics it means phones/computers/navagators/TV's etc).

Quick question is I get one operated by AA batteries is it easy to convert to using a rechargeable power source?
Title: Re: modding an RC car
Post by: ajofscott on Jan 19, 2012, 12:17 am
Conversion to rechargable is easy, you have to account for the .25V lesser cell voltage in the recharchable cell types, ie 1.25V vs the 1.5V of carbon-zink and alkaline.
Title: Re: modding an RC car
Post by: Destined on Jan 19, 2012, 06:45 am
okay I have my new car, except things aren't looking so good now I opened it up (by the way it is a new bright).

the IC is new bright 2007 R209-2 0228

Main issue is the back of the board is completely sealed, so no points to solder too on back. I can see they have soldered on the front, but the points are so small I don't think I have the skill to solder on points that tiny or how i would get the IC out.

I am unsure how to proceed.

Note: i realise my numbering is wrong and 1-8 should be on the top not the bottom.

(http://i1065.photobucket.com/albums/u398/DestinedDotCom/boardNB1.jpg)
Title: Re: modding an RC car
Post by: ajofscott on Jan 19, 2012, 01:27 pm
Chip removal is easy. thread a piece of magnet wire behind the legs and pull outward on the wire gently while heating the pins. Once the leads are free the ic can be popped off with an exacto knife if it was glued down.
Title: Re: modding an RC car
Post by: cr0sh on Jan 20, 2012, 03:47 am

okay I have my new car, except things aren't looking so good now I opened it up (by the way it is a new bright).

the IC is new bright 2007 R209-2 0228


This looks real similar to the board posted on that link I originally posted (waay back on page one) - I'll post it here again:

http://www.et.byu.edu/~bmazzeo/LTR/tech.phtml

Not identical - but close...

Main issue is the back of the board is completely sealed, so no points to solder too on back. I can see they have soldered on the front, but the points are so small I don't think I have the skill to solder on points that tiny or how i would get the IC out.


This is a SMT (surface mount technology) based board - more difficult to work with, but not impossible. All the traces are on the front. Once again, though, trace the points to the resistors (which will be SMT too); the pads on the resistors may be "fatter" and easier to solder to. You'll probably want to use 24 gauge or similar wire (wire-wrap wire is perfect for this). Just be sure to tin the end of the wire; use a soldering iron with a fine point to allow you to heat up the small area. Take your time, and you should be able to get just the wires you need put on.

You'll want to re-measure the voltages, too; my only "fear" here, with the SMT parts, is that it could be using 3.3 volt levels for some of the parts (transistors/fets); if this is the case, then some kind of level conversion would be needed (a few diodes to drop the voltage of the Arduino outputs by 2.1 volts could be used). If the output voltage of the Arduino is higher than what you measure, you'll need to do something to drop it.


I am unsure how to proceed.


Slowly and carefully, taking your time, and documenting everything...


Note: i realise my numbering is wrong and 1-8 should be on the top not the bottom.


No - it looks ok to me...?
Title: Re: modding an RC car
Post by: Destined on Jan 20, 2012, 04:20 am
oopps i was comparing to my incorrect one previously. I deleted that so i don't do it again. I did get it correct!


Can i use the VCC in the top right corner as a probe? That is nice and big and easy to solder too.


Can't I just use the 3.3 volts instead of the 5 volts from the arduino then?
Title: Re: modding an RC car
Post by: cr0sh on Jan 20, 2012, 05:24 am

oopps i was comparing to my incorrect one previously. I deleted that so i don't do it again. I did get it correct!

Can i use the VCC in the top right corner as a probe? That is nice and big and easy to solder too.


You could...just be real careful in positioning the probe - the pins are much smaller!


Can't I just use the 3.3 volts instead of the 5 volts from the arduino then?


If you can run your Arduino off 3.3 volts, then sure (the key is the digital outputs of the Arduino should match what the current chip is outputing)...
Title: Re: modding an RC car
Post by: Destined on Jan 20, 2012, 06:40 am
I mean the VCC labeled which is a giant blob in the top right of my picture. It is connected directly to the power source from what i can tell.

Is there an easy way to follow the trace out of the IC?
Title: Re: modding an RC car
Post by: Destined on Jan 21, 2012, 05:13 am
I am a bit stuck. I got my probe out of VCC and tested forward and back okay.

However I probed the left and right which was initally okay, but now it is stuck on right. Even when i switch it off take batteries out, or use the control it automatically goes right. The controller does allow me to go left but then it flicks back right. I didn't really want to do this much cause i figured it was doing something bad.

I figure i must of done something wrong but can't figure what(i don't want to make a mistake again!). Is there anyway i can find the problem/fix this? Should one of the other pins set it back to straight?
Title: Re: modding an RC car
Post by: cr0sh on Jan 21, 2012, 08:03 am

I am a bit stuck. I got my probe out of VCC and tested forward and back okay.

However I probed the left and right which was initally okay, but now it is stuck on right. Even when i switch it off take batteries out, or use the control it automatically goes right. The controller does allow me to go left but then it flicks back right. I didn't really want to do this much cause i figured it was doing something bad.

I figure i must of done something wrong but can't figure what(i don't want to make a mistake again!). Is there anyway i can find the problem/fix this? Should one of the other pins set it back to straight?


Are you sure it isn't a mechanical issue?

Also - did you measure the output voltage of the pins on the RX2 that feed the motor drivers, and compare that to VCC? If the voltage from the pins is lower than what VCC is - then you probably don't want to exceed that voltage by using VCC.
Title: Re: modding an RC car
Post by: Destined on Jan 23, 2012, 01:22 am


I am a bit stuck. I got my probe out of VCC and tested forward and back okay.

However I probed the left and right which was initally okay, but now it is stuck on right. Even when i switch it off take batteries out, or use the control it automatically goes right. The controller does allow me to go left but then it flicks back right. I didn't really want to do this much cause i figured it was doing something bad.

I figure i must of done something wrong but can't figure what(i don't want to make a mistake again!). Is there anyway i can find the problem/fix this? Should one of the other pins set it back to straight?


Are you sure it isn't a mechanical issue?

Also - did you measure the output voltage of the pins on the RX2 that feed the motor drivers, and compare that to VCC? If the voltage from the pins is lower than what VCC is - then you probably don't want to exceed that voltage by using VCC.


I am not sure! :)


However I have gather a number of cheap R/C cars to work on in my attempts to learn (i got this one damaged floor stock for free with another damaged one I got. Both the damage was too the shell but the car still ran).


Anyway this one has the IC covered in black stuff. It appears the surface mounted is the most common and finding that one i destoryed first time was just lucky.

Now this one I have i identified VCC as the lower right circle, the circle around R8 and R9 is left and right, and the remaining circle appears to be forward. However I can't figure where backward is.

The next problem is when I measure it with a multimeter it is running at a little less than 2 volts (1.88) and I don't know how to interface that with the arduino.

PS I have on order, 0.3mm solder and a solder sucker which should arrive tomorrow to make things a bit easier.

(http://i1065.photobucket.com/albums/u398/DestinedDotCom/18BoardA.jpg)
Title: Re: modding an RC car
Post by: ajofscott on Jan 23, 2012, 02:12 am
Don't drive against the original chip's outputs! That is what fried the first one and i was just lucky you didn't fry your ATMega. Those 680 ohm SMD resistors will pop right off with a blade tip on your iron, load it up with a puddle and heat the whole resistor at once.
Title: Re: modding an RC car
Post by: cr0sh on Jan 23, 2012, 02:26 am

Anyway this one has the IC covered in black stuff. It appears the surface mounted is the most common and finding that one i destoryed first time was just lucky.


Yeah - the DIP version is probably only common on older versions, or from manufacturers using up NOS TX2/RX2 stock...


Now this one I have i identified VCC as the lower right circle, the circle around R8 and R9 is left and right, and the remaining circle appears to be forward. However I can't figure where backward is.


Well - if you know where forward is, and you know where the motor leads are, then you can construct a crude schematic of the h-bridge, which should lead you to the other resistor/transistor pair controlling the other "side" of the h-bridge for reverse.


The next problem is when I measure it with a multimeter it is running at a little less than 2 volts (1.88) and I don't know how to interface that with the arduino.


You could try using a small trimmer potentiometer as a voltage divider to reduce the 5 volt TTL signal...


PS I have on order, 0.3mm solder and a solder sucker which should arrive tomorrow to make things a bit easier.


To be honest, at this point it might be easier to go back to your first vehicle, and buy or build h-bridges to control the motors on it. It sounded like that vehicle was a better match for the voltage needs and such of the Arduino. Didn't forward and reverse still work in that one? If so, buy a cheap servo and mount it to control the steering (get rid of all the mechanical/electrical parts for the steering actuator being used currently).
Title: Re: modding an RC car
Post by: ajofscott on Jan 23, 2012, 03:01 am
R4,R5 are forward/reverse R8/R9 are steering. Remove the resistors and map via similar values to the Arduino output pins
Title: Re: modding an RC car
Post by: Destined on Jan 23, 2012, 05:10 am

R4,R5 are forward/reverse R8/R9 are steering. Remove the resistors and map via similar values to the Arduino output pins



correct! I did check it but got no reading. It seems the surface mount parts are very touchy about where you make contact. Is there some sort of spray or something which is preventing good contact for me? Many thanks for pointing that out.


I have opened a few now and it seems they all basically work in the same ways it is just a matter of figuring out where everything is.



I am looking at midrange traxxas like http://www.rcworld.com.au/cars/traxxas-australia/grave-digger-2wd-truck-brushed.html as my base car. However i am a little nervous about how simple it will be to make it work with Arduino. I like the inderpendant suspensions and the stepper motor actually allows more than left/right/centre(center for those americans helping me :D). I looked at the 4WD versions but I thought that might result in extra motors to drive.

Bascially where i am looking to go is have a car which can go over reasonable size rocks slowly with variable turning.

I then plan to load it with sensors, webcam, and control it wirelessly from the ipad (That part i can do :)).


Again thank you for your help, while it make appear my success isn't as great as initially you have helped me a lot to the point I can now figure what is going on. I am confident soon I will be able to share a youtube video of my success.

PS Cr0sh, if you do write the article I would love to read it. I am sure there is plenty I can learn from you.



Title: Re: modding an RC car
Post by: DuaneB on Jan 23, 2012, 06:52 am
Hi Destined,

The truck you have linked is not a very good match to the project you have described.

Reading through the truck specs, its good for 30Mph + and is two wheel drive. Unless I have misunderstood your requirements, you want something a lot slower and ideally 4wd. The type of truck I would think you are looking for is generally called a 'scaler' or 'crawler'. The difference between the two is that a scaler is more of a scale model whereas a crawler sacrifices appearance for 'go anywhere' ability.

Check out some of the scale trucks here http://www.scale4x4rc.org/forums/forumdisplay.php?f=15 (http://www.scale4x4rc.org/forums/forumdisplay.php?f=15) a lot of them are based on the SCX-10 chassis which I posted previously.

Or the crawlers here http://www.scale4x4rc.org/forums/showthread.php?t=66382 (http://www.scale4x4rc.org/forums/showthread.php?t=66382)

I note that you are in Australia, our club is based in Dubai and we order from these guys in Hong Kong, heres the link again - http://www.rcmart.com/rc-axial-scx10-trail-honcho-w24ghz-p-34715.html (http://www.rcmart.com/rc-axial-scx10-trail-honcho-w24ghz-p-34715.html)

Its up to you, but once you get tired of seeing the grave digger on its roof you will wish you had the Axial or a crawler.

Either way, enjoy.

You can see the two trucks I own, a Tamiya CC01 Mitsubishi Pajero and a Tamiya CR01 Toyota FJ40 at the end of this page - http://rcarduino.blogspot.com/p/cars.html (http://rcarduino.blogspot.com/p/cars.html) I don't have the SCX-10 but believe its is a much better truck than the two I currently have.

Duane B

http://rcarduino.blogspot.com/ (http://rcarduino.blogspot.com/)
Title: Re: modding an RC car
Post by: Destined on Jan 23, 2012, 08:06 am

Don't drive against the original chip's outputs! That is what fried the first one and i was just lucky you didn't fry your ATMega. Those 680 ohm SMD resistors will pop right off with a blade tip on your iron, load it up with a puddle and heat the whole resistor at once.


Are you saying I should remove the resistor? Should i be using a resister between the arduino and the car?


Thanks for the link on the truck, i will try find an aussie dealer. Yes I want more of a crawler.
Title: Re: modding an RC car
Post by: cr0sh on Jan 23, 2012, 05:19 pm


Don't drive against the original chip's outputs! That is what fried the first one and i was just lucky you didn't fry your ATMega. Those 680 ohm SMD resistors will pop right off with a blade tip on your iron, load it up with a puddle and heat the whole resistor at once.


Are you saying I should remove the resistor? Should i be using a resister between the arduino and the car?


Thanks for the link on the truck, i will try find an aussie dealer. Yes I want more of a crawler.


I don't think you should remove the resistors, but without having a real (or even a guessed) schematic of the PCB, you can't know for sure; the resistor is there on the base of the transistor to prevent too much current flow from the controlling chip; now - with the RX2 still in the loop (ie - power not cut), it might be possible that it's output (if HIGH) could backfeed into the Arduino; or the Arduino could be shorted to ground via the RX2's pin while it is LOW (more likely). This is why when you know what your inputs and outputs are, you need to remove the RX2 (and I might not have explained this well or forgotten it entirely - my apologies if that is the case; I'll make sure to clarify it when I write the article).

If what you are wanting to do (ultimately) is crawl around on rocks, then 4WD (or more - a few years ago there was a guy at a university who made a small R/C 6WD vehicle with wireless video from traxxas parts; seems like there are a bunch of people doing it now) is pretty much mandatory. You'll also want a nice articulated suspension system. Controlling such a vehicle with an Arduino is fairly painless; steering is handled with regular servos, and the control of the drive motors via ESC (electronic speed controllers) for the brushless motors; power to the Arduino could be done via a BEC (battery eliminator circuit - basically a small device, meant to power the receiver, that converts the battery pack power to 5 volts or so).

To control all of these parts with the Arduino, you can use the Servo library (or, if you wanted to off-load this work, using serial comms to a servo controller like Pololu sells would be ideal).
Title: Re: modding an RC car
Post by: Destined on Jan 25, 2012, 07:55 am
Making good progress :) Have all my wires out and working off the probe in 2 cars.

But have a couple of questions.

1.Should i stick a resistor between the arduino and the R/C board just to make sure I am not running too much current(even if the voltages match)? (wanted to check before hooking it up in case this is why i blew the first one up).

2. Sometimes my solder doesn't seem to stick to the board very until dry. Is there a reason for this?

3. Any tips on how to get a third hand. Wire + solder + iron = 3 and i only have 2 :(. I have tried a number of ways including sticking the wire down in place before soldering but I keep thinking there must be an easier way.

4. With a 4WD car am I going to need more than 4 arduino ports(not sure if that is what to call them) than you need for the standard car?



Title: Re: modding an RC car
Post by: DuaneB on Jan 25, 2012, 09:02 am
Hi,
   Assuming you are looking at hobby grade cars, most 4WD Cars use a gearbox/transfer case to mechanically link the four wheels. There are a few exceptions with rock crawlers and monster trucks which use a front and rear motor, but with more recent dedicated crawler motors your really don't need this.

   All of my trucks use a single motor for four wheel drive, the torque from a rock crawling motor is enough to twist and break axles so you really do not need more than one.

   For toy quality cars, there is no reason why you could not use a motor for each wheel, there would be a real benefit here as the wheels are often oversized for the torque available from toy motors.

   As for the resistors, I would advise always using a current limiting resistor when connecting your Arduino to the outside world. In my own projects I found the RC Components pulled too much current from my Arduino leading to odd results but thankfully no immediate damage.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)







Title: Re: modding an RC car
Post by: cr0sh on Jan 25, 2012, 05:26 pm

Making good progress :) Have all my wires out and working off the probe in 2 cars.

But have a couple of questions.

1.Should i stick a resistor between the arduino and the R/C board just to make sure I am not running too much current(even if the voltages match)? (wanted to check before hooking it up in case this is why i blew the first one up).


If you are concerned, then go for it (it can't do anything but not work - in that there won't be enough current to activate the transistor) - but if you traced your lines right, you should find a resistor before the base of the transistor involved for the action; note the schematic on the datasheet. Something similar should be on the board. The only difference might be if the chip on board is being run at a lower voltage than the Arduino, then on-board resistor might be sized for that voltage for the current needed (measure the resistor, measure the voltage - then work out the current; once you know that, then knowing the HIGH voltage of the Arduino is 5 volts, you can figure out the needed resistor size for the Arduino at the current needed (don't exceed about 20 ma!) - so if currently there is a 400 ohm resistor on-board for the RX2, but you figure the Arduino needs a 500 ohm resistor, then you just need to add a 100 ohm resistor in front of the first - note that all of those figures are pulled from my rear - you need to measure it all yourself!).



2. Sometimes my solder doesn't seem to stick to the board very until dry. Is there a reason for this?


What do you mean by "until dry"? The only possible reason why the solder might be an issue (I think) is if you are using a different solder from what the board was soldered with (ie, you are using lead-free and the board was done with leaded solder, or vice-versa; note also that lead-free solders have a higher melting point than leaded solders, so it could be technique or your iron; likely technique though, if this is the case).


3. Any tips on how to get a third hand. Wire + solder + iron = 3 and i only have 2 :(. I have tried a number of ways including sticking the wire down in place before soldering but I keep thinking there must be an easier way.


Well, here in the States I use leaded solder, so I have an extra arm growing out of the side of my torso...

;)

Seriously - get some electrical wire like used for house wiring (large guage, single solid core wire) - cut a few lengths of about 10 cm or so (gauge for yourself what you need); on one end, crimp a largish alligator clip; nail or screw the other end to a board. Voila - el-cheapo "third hand". Not quite as good as a PCB vice, but serviceable for many jobs!


4. With a 4WD car am I going to need more than 4 arduino ports(not sure if that is what to call them) than you need for the standard car?


What kind of 4WD car? If it is a hobbyist 4WD car (like a Traxxas), then no - you will only need two pins: one for the speed controller, the other for steering; unless you have extra accessories and such; basically you need one pin for each servo or ESC (electronic speed controller).
Title: Re: modding an RC car
Post by: ajofscott on Jan 26, 2012, 01:54 am



Don't drive against the original chip's outputs! That is what fried the first one and i was just lucky you didn't fry your ATMega. Those 680 ohm SMD resistors will pop right off with a blade tip on your iron, load it up with a puddle and heat the whole resistor at once.


Are you saying I should remove the resistor? Should i be using a resister between the arduino and the car?


Thanks for the link on the truck, i will try find an aussie dealer. Yes I want more of a crawler.


I don't think you should remove the resistors, but without having a real (or even a guessed) schematic of the PCB, you can't know for sure; the resistor is there on the base of the transistor to prevent too much current flow from the controlling chip; now - with the RX2 still in the loop (ie - power not cut), it might be possible that it's output (if HIGH) could backfeed into the Arduino; or the Arduino could be shorted to ground via the RX2's pin while it is LOW (more likely). This is why when you know what your inputs and outputs are, you need to remove the RX2 (and I might not have explained this well or forgotten it entirely - my apologies if that is the case; I'll make sure to clarify it when I write the article).

If what you are wanting to do (ultimately) is crawl around on rocks, then 4WD (or more - a few years ago there was a guy at a university who made a small R/C 6WD vehicle with wireless video from traxxas parts; seems like there are a bunch of people doing it now) is pretty much mandatory. You'll also want a nice articulated suspension system. Controlling such a vehicle with an Arduino is fairly painless; steering is handled with regular servos, and the control of the drive motors via ESC (electronic speed controllers) for the brushless motors; power to the Arduino could be done via a BEC (battery eliminator circuit - basically a small device, meant to power the receiver, that converts the battery pack power to 5 volts or so).

To control all of these parts with the Arduino, you can use the Servo library (or, if you wanted to off-load this work, using serial comms to a servo controller like Pololu sells would be ideal).

What I meant was remove the 680 ohm smd resistors and insert 680 ohm resistors from the non RX chip side of the removed SMD to the arduino port pins.
Title: Re: modding an RC car
Post by: cr0sh on Jan 26, 2012, 04:52 am

What I meant was remove the 680 ohm smd resistors and insert 680 ohm resistors from the non RX chip side of the removed SMD to the arduino port pins.


I'm not sure what the point would be (as the SMD resistors should work OK - provided the voltages are the same), but if you wanted to do that, I suppose you could.
Title: Re: modding an RC car
Post by: ajofscott on Jan 26, 2012, 05:00 am
It was instructed to keep from having collisions and/or the oportunity to cause a shoot through in the h-bridge from conflicting control.
Title: Re: modding an RC car
Post by: Destined on Jan 26, 2012, 05:08 am
Well I had what I thought was going to be my first fully functional car but it doesn't seem to work.

When I attach each of them to my Vcc left/right/forward/back work. It measures 1.88 volts when I switch them.

So I made a crude voltage divider with a 100 ohm and 180 ohm resistor and the voltage coming out is 1.86 (and put an LED in to check of course).

However once i hook it to the arduino and turn the pin on and off nothing happens. Not sure why the probe works and not the arduino.

Title: Re: modding an RC car
Post by: ajofscott on Jan 26, 2012, 05:20 am
You didn't excite any point without a resistor in series did you?
Title: Re: modding an RC car
Post by: Destined on Jan 31, 2012, 09:11 am
I am wondering if the problem in the above is the resisters are stopping enough current being drawn.

On my latest I found putting a resistor between the arduino and the car meant I couldn't switch it on, but taking it away and bam I have all the controls.


Anyway main reason for my posting is again thanking everyone for the help and to let you know your help wasn't in vain. I have a car full working and controlled from ipad via wifi (i used the dfrrobot arduino wifi shield).

One thing I have noticed is I can't make the motors run slow enough. When I do it just creates a high pitch. Is there anyway to run the motor super slow?

Now I need to deciede on my larger truck with the independant suspensions. So hard when I haven't seen them in action/know that much about them.
Title: Re: modding an RC car
Post by: Destined on Feb 01, 2012, 10:15 am
video proof :)

http://www.youtube.com/watch?v=DdzhmM7KtSU&context=C3fa93bdADOEgsToPDskJ_zwQ0ZGDTf5_eb09Ub6Zf
Title: Re: modding an RC car
Post by: DuaneB on Feb 01, 2012, 08:59 pm
Hi,
    Nice to see that you have something up and running. Can you provide a link to the tool kit you are using for the ipad app ?

    On the trucks - you probably don't want independent suspension, its great for high speed but most traction orientated go anywhere vehicles tend to use solid axles.

Check out this SCX-10 video or any other on youtube -

http://www.youtube.com/watch?v=Eg_N1s4654I&feature=related (http://www.youtube.com/watch?v=Eg_N1s4654I&feature=related)

Also check out the cheaper but much less capable Tamiya CC-01, it has independent suspension at the front and a floating solid axle at the rear -

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

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: modding an RC car
Post by: Destined on Feb 02, 2012, 01:43 am
For wireless communication with arduino I used

http://littlebirdelectronics.com/products/wifi-shield-v2-1-for-arduino-802-11-g-n  (probably not the cheapest but I have work related reasons for using them)

Then I used processing the OSCP5 lib to send and recieve OSC messages

http://www.sojamo.de/libraries/oscP5/

and I also used the networking abilities of processing to talk to the wifi shield

And finally I used TouchOSC on my ipad

http://hexler.net/software/touchosc


This does mean you need a computer in the middle with processing running. I may try to talk to the wifi directly from the ipad but for the current scope this setup works great for me. It is will be in a restricted museum type enviroment so computer running is no problem plus I plan to attach a tilt/pan wireless webcam.


Those trucks look interesting. For the me the main thing will be, being able to run it really slow. The current car is way too fast and when I try to slow down the engine stalls.

Title: Re: modding an RC car
Post by: DuaneB on Feb 02, 2012, 06:11 am
Hi,
   To go slowly you can change the motor for one with more torque and less revs, this can give you very precise control, it will also give you more run time from the batteries, doesn't cost a lot and is easy to do.

I have a draft post about motors that I will put up on my blog soon.

In the meantime I am going to check out TouchOSC,

Thanks

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: modding an RC car
Post by: cr0sh on Feb 02, 2012, 06:59 am

For wireless communication with arduino I used

http://littlebirdelectronics.com/products/wifi-shield-v2-1-for-arduino-802-11-g-n  (probably not the cheapest but I have work related reasons for using them)

Then I used processing the OSCP5 lib to send and recieve OSC messages

http://www.sojamo.de/libraries/oscP5/

and I also used the networking abilities of processing to talk to the wifi shield

And finally I used TouchOSC on my ipad

http://hexler.net/software/touchosc


This does mean you need a computer in the middle with processing running. I may try to talk to the wifi directly from the ipad but for the current scope this setup works great for me. It is will be in a restricted museum type enviroment so computer running is no problem plus I plan to attach a tilt/pan wireless webcam.


Those trucks look interesting. For the me the main thing will be, being able to run it really slow. The current car is way too fast and when I try to slow down the engine stalls.




Glad to hear and see you got things working!

:D
Title: Re: modding an RC car
Post by: AdamK on Feb 05, 2012, 07:47 pm
Hi guys,
     Complete n00b here. I just got my first arduino uno and have been playing around with it, with things like musical floppy drives and the standard LED tutorials. Well now I want to control an RC car with the arduino and I found this forum. Great work and explanations have been given here so I hope I can continue in that regard. Basically, I want to control, the controller for the rc car. I figure this way I don't have to hack the car itself and all my RXTX is built in..  The IC inside the controller is an SCTX2B. I have been able to play with it a bit, using probes, and I know all the pin outs for the IC now. But I need some guidance on how I make this work with the arduino. Any guidance would be immensely appreciated! Thanks in advance and please forgive any inadequate info or my lack of etiquitte.
Title: Re: modding an RC car
Post by: Destined on Feb 08, 2012, 11:59 am
I don't have the answers for you. But basically you are trying to mod the radio reciever not the car.

I am looking at a crawler like this http://www.youtube.com/watch?v=7IFGxCFwx18

I am still looking for a lost cost solution if someone has one for a truck which can go nice and slow


This is one is perfect!!!!
http://www.youtube.com/watch?v=UvNli-hEcdQ

and less than 200, but it is sold out everywhere. I don't know if it is still being made.
Title: Re: modding an RC car
Post by: Destined on Feb 13, 2012, 12:55 am
Could you give me your opinion on

http://www.ebay.com.au/itm/NEW-1-8-HSP-RADIO-REMOTE-CONTROL-4X4-4WS-RC-ROCK-CRAWLER-TRUCK-/390383503790?pt=AU_Toys_Hobbies_Radio_Controlled_Vehicles&hash=item5ae4ab89ae

It is in the sort of price range I could get half a dozen. I seem to be really limited in Australia on the rock crawler front. Most hobby stores don't have any or have a single speed/left/right only model.

I belive I might be able to get a losi night crawler as well, but the 1/8 scale is attractive to me since the yard I have to run it on is huge. I realise the 1/10 rock crawlers can be more fun cause of the challenge but that isn't really my purpose.

I think in general the rockcrawlers are much more suitable for me.
Title: Re: modding an RC car
Post by: DuaneB on Feb 13, 2012, 10:22 am
Hi,
I don't have any experience of hsp, the general opinion from scanning through forums is that they are perfectly ok for the money- meaning that as they are roughly half the price of established hobby brands you might experience the occasional dud component and the long term durability might not match up to a Losi or axial.

Looking on YouTube, the crawler looks capable enough, I suggest you try one and if your project works out you can always migrate it to a more capable chassis later on or if the hsp holds up, stay with it.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)


Title: Re: modding an RC car
Post by: Destined on Feb 13, 2012, 11:57 am
Thanks :)

I ended up getting one for under 200 bucks, which is awesome considering how much more capable it is.

I think it will forfill my needs.

Axial and Losi don't appear to have 1/8 scale on 1/10 which is about 20-25 cm smaller in length. They are also starting at like 400 for bottom of the line in Australia up to like 800. So yeah, way more.
Title: Re: modding an RC car
Post by: Destined on Feb 15, 2012, 08:48 am
Back and confused as normal :D

I found the datasheet for the IC in the reciever (while it is in chinese, the diagram is in english, but they aren't labelled like the RC cars I have taking apart. There is no forward/back etc.

http://www.digchip.com/datasheets/parts/datasheet/922/RSM8196.php

(http://i1065.photobucket.com/albums/u398/DestinedDotCom/newcar.jpg)

This is the image of the chipset in the reciever.

There is also an ESC unit. I don't know if i need to open that up or not buy it requires a tiny screwdriver which I currently don't have.
Title: Re: modding an RC car
Post by: DuaneB on Feb 15, 2012, 09:24 am
Hi,

Stop right where you are !

This is a proportional system that works very differently to your previous systems. I suggest putting everything back together and then interface with the system through the factory installed plugs. Its very simple and there is less chance of you damaging anything.

For the background information on what the signals will look like, see here -

http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html (http://rcarduino.blogspot.com/2012/01/how-to-read-rc-receiver-with.html)

Its the same type of signal for both steering (channel 1 normally) and speed (channel 2)

To output this type of a signal, use the servo library.

The code samples above measure the input in microseconds, you can use servo.writeMicroseconds to pass this signal back out using the servo library. This would be the best starting point for you.

I will give you some guidance on how to physically connect the Receiver/ESC/SERVOS to the Arduino and some sample code to read in a signal and output the same signal through Arduino later today.

In the meantime, have a poke around on my blog, its all relevant to you now that you have a proportional rc system rather than the on/off rx/tx systems you have worked with before.

rcarduino.blogspot.com (http://rcarduino.blogspot.com)

Duane B.




Title: Re: modding an RC car
Post by: Destined on Feb 15, 2012, 11:06 am
Thank you the help is much appreciated!

Is the basic idea going to be skip the whole reciever module and take the 2 pigtails out and interface them with the ardunio? I am guessing I will need a female to open wires to interface with the arduino. I would also ideally like to power the arduino from the car battery which is 7.2 volts i think.

My arduino has a wifi shield so I plan to communicate with the crawler by wifi (you don't need to teach me how to do that :) ).

I am so happy i can interface with the factory connections cause I was dreading trying to solder wires on it!

I had read the RC reciever part of your blog, but that isn't what I am trying to do right?
Title: Re: modding an RC car
Post by: DuaneB on Feb 15, 2012, 11:30 am
Hi,
   
Quote
I had read the RC reciever part of your blog, but that isn't what I am trying to do right?


It kind of is what you will be trying to do. The signals that I describe are the signals that your ESC and Servo will be expecting so you will need to understand them and generate the same type of signals from your Arduino. The Servo library will do this for you. I am guessing that you want to send commands over wifi to have the Arduino generate ESC and Servo signals ?

As for the hardware interfacing, its quite easy. The existing servo and ESC cables should have three wires, black, red and white. You should find that they have the same spacing as standard PCB Headers so you can simply plug two headers into a bread board and connect the ground (black wires) and power (red wires) together with jumpers on the breadboard. For the signal wire to your servo or esc, you want to connect this to whichever pin will generate your signal on the Arduino. For this to work, you will also need to connect the Arduino ground so that it is 'common' with the ground of the car - basically the term common ground refers to two separate power circuits having a common (shared/connected) ground.

I would recommend that you also add a current limiting resistor between the Arduino output pin and the Servo or ESC Signal wire, something around 300 omhs should do.

My approach would be to test the basics before doing anything else, you will understand a lot more and know that your reasoning in later and more complex stages is correct. To my mind your best starting point is to simply read in one of the channel signals using the Arduino connected to the existing receiver and output the same signal using the Arduino to the Servo or ESC, if the car does what you expect great, move on, if not great you only have two things for focus on trouble shooting rather than five.

As for the power, 7.2 might not be enough to reliably power the regulator that gives the Arduino its 5 volts, I would suggest that in the short term you use a PP3 9v Battery.

Duane B
Title: Re: modding an RC car
Post by: Destined on Feb 15, 2012, 11:59 am
"I am guessing that you want to send commands over wifi to have the Arduino generate ESC and Servo signals ?" Yes exactly. But if I can control it just with the arduino then sending the commands part is easy for me. I just plan to make a generic turn and a generic drive function and send it a number which tells it how much to turn or how fast to go forward.


So here is the top view of the car(at bottom of post).

The RC module is on the right and the ESC module on the top middle and then there is the on/off switch(the loose wire is the battery connector but I am sure you didn't need me to tell you that).

So what you are saying is take the 2 connectors out of the RC module and plug them into the breadboard. They appear to be female as opposed to male so I can't plug them straight into a breadboard. I am guessing I can get a double female adapater or just put wires in there for now.

So then both the grounds connect to the arduino ground. I then connect the ground and power together individually for each one.

Then finally each wire with a 300 ohm resistor to an output on the arduino. Are we using PWM or analog?

Then I use the code in the part 1 of your blog post, or do you have something simpler?

Sorry if I am just repeating you, I am just checking I understand! :)
"To my mind your best starting point is to simply read in one of the channel signals using the Arduino connected to the existing receiver and output the same signal using the Arduino to the Servo or ESC"
This I don't understand.What am I reading in? Neither of those wires are connected to the RC reciever so won't the reciever no longer work?


(http://i1065.photobucket.com/albums/u398/DestinedDotCom/CarTop.jpg)
Title: Re: modding an RC car
Post by: DuaneB on Feb 15, 2012, 12:26 pm
Hi,
    If you have any male or female PCB Headers, you can use these to make connections and cables, the pin spacing is the same. You can see where I have used females for my wheel speed sensors and males for connecting a modified receiver cable and an unmodified ESC Cable to the right of the four females. As the pin spacing for RC Equipment and PCB Headers is the same you can cut and splice whatever you need. If I need to join my modified receiver cable to my unmodified ESC Cable I simply use a 3 pin piece of male header to join the two.

(http://4.bp.blogspot.com/-C7sU0KjGLe8/TzuUGb2nn5I/AAAAAAAAAPQ/zm5PdVTVdqs/s1600/tractioncontrolv1.PNG)

Duane B

Title: Re: modding an RC car
Post by: Destined on Feb 15, 2012, 12:44 pm
That is really genius!

Off to get parts in the morning!

Should I be using PWM or analog?
Title: Re: modding an RC car
Post by: DuaneB on Feb 15, 2012, 01:02 pm
Hi,
   So that I don't feel like a fraud, thats the original circuit which I could never get to reliably, the current circuit is -

(http://4.bp.blogspot.com/-0DU-bGpP5Is/TzubVKgKpNI/AAAAAAAAAPY/LDkNTEyr084/s1600/tractionv2.PNG)

I have just updated my original blog post with both circuits here -

http://rcarduino.blogspot.com/2012/01/traction-control-part-13-we-have.html (http://rcarduino.blogspot.com/2012/01/traction-control-part-13-we-have.html)

I suggest you get some decoupling capacitors for cleaning shared power and also some heat shrink tubing for insulating self made cables and connectors on your shopping trip.

For generating the signal, use the servo library on any of the digital pins.

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)
Title: Re: modding an RC car
Post by: Destined on Feb 16, 2012, 03:34 am
Where do you get those connectors(the male triple pin ones that come out of the servo motor and plug into the RC)? I found the male version, but I can't find a thin female version anywhere in my local electronics stores.

The 2 motors are obviously connected to the ESC unit. However the servo motor has the single triple (red/black/white) cord coming out of it. So I am not sure how to set it up so that I can get it power.

I am assuming the power comes from the triple  (red/black/white) wire which connects to the RC unit.

So does that mean I put both the servo wires, and the motor wires on the breadbroad and join the red wires in a powerrail so that the servo can get power? I can't see how else it could get power.


Code: [Select]

#include <Servo.h>

Servo myservo;
int val = 50;

void arm(){
 // arm the speed controller
 Serial.println("Arming");
 setSpeed(50);
 delay(2000); //delay 2 second
}

void setSpeed(int speed){
 // speed is from 0 to 100 where 0 is off and 100 is maximum speed
 //the following maps speed values of 0-100 to angles from 0-180,

 int angle = map(speed, 0, 100, 0, 180);
 myservo.write(angle);  
   
}

void setup()
{
 myservo.attach(8);
 arm();
 //setup serial communication
 Serial.begin(9600);
}


void loop()
{
 while(!Serial.available()==0)
 {  
   val = Serial.read() - '0';
   val = val * 10;
   setSpeed(val);
   Serial.println(val);
 }

 

}  


That is my code for the ESC and appears to work fine.

Now I need to figure the servo! I need help because I am not willing to just randomly try. The only issue is the power, will be easy to control once it has that. I don't want to blow it up, but it has simple as connecting the red wire from the ESC ro the red wire of the servo as I can see how else it gets power. The RC unit appears to get it's power from the ESC red wire.

Title: Re: modding an RC car
Post by: DuaneB on Feb 16, 2012, 08:11 am
Hi,
   The male and female connectors on my board are just male and female PCB Headers cut to size. The headers come in strips around 60 pins long, you just cut off what you need.

   As for the servo power, your electronic speed controller has a BEC, this stands for battery elimination circuit, years ago you would have needed separate power for some of the RC Components but for the past decade or so most speed controllers have included a BEC which supplies power intended to drive servos and RC Receivers. In some speed controllers, the BEC is supplied through the cable that normally runs to the radio, it appears to be this way in your case. So yes, you can use the power available from the red and black wires of the ESC 3 Wire radio connector to supply power to your servo.

I am surprised that the ESC Code works, 0 should be full reverse of full brakes, I would not expect a model to move forwards until 90+ ?

Duane B

rcarduino.blogspot.com (http://rcarduino.blogspot.com)

Title: Re: modding an RC car
Post by: Destined on Feb 16, 2012, 08:21 am
Thanks I will give it a try. I just didn't want to incase it was going to lead to bad results.

I was surprised to, with the research I did thanks to your tips I found 0 was the standard arming.

My code makes the 0-180 become 0-100 (cause I am simple and prefer to work 0-100) and 50 is dead stop. The lower the number goes below 50 the faster it goes in reverse. The the higher the number goes above 50 the faster it goes forward.

so like 40 is slow back, 30 medium speed back, 20 fast back. 10 and 0 don't seem to make it go any faster and like 60 is slow forward, 70 medium speed forward, 80 fast . 90 and 100 don't seem to make it go any faster.

Hitting with 50 arm its for use and makes a little tune to let me know it is done right.
Title: Re: modding an RC car
Post by: DuaneB on Feb 16, 2012, 08:34 am
Hi,
   The extremes of throttle range are often dead zones, my ESCs all reach max current around 85% throttle just like yours.

   Just to be sure, you did follow the manufacturers instructions for initially programming the ESC ?

   I know why you are using 0-100 but if you switch to 1000-2000 with 1500 as the mid point you will be thinking in the same terms as your equipment. At the moment, you are thinking in a made up range - 0 to 100 - which you then convert to another made up range 0-180 which the servo library then converts into yet another made up range 1000-2000 which finally gets converted into the number of timer ticks required to generate the pulse.

   If you start to think in the 1000-2000 millisecond range you eliminating two sets of costly conversions, it will also ensure than you can switch your model between autonomous and manual mode more easily as you would tend to read incoming RC Pulses in milliseconds.

Just a suggestion.

Duane B.

   

Title: Re: modding an RC car
Post by: Destined on Feb 16, 2012, 08:45 am
Thank you :) This was much easier and less messy than the cheap cars :) Works good now.

The ESC came programmed. The manual makes no mention of it at all (perhaps because it was the cheapest 1/8 crawler I could find which had ESC and a servo).

I just have a couple of minor issues  (like working out how to read an integer into arduino rather than the character).

I have noticed I only have 60 degrees of motion each way on the wheels because the chassis gets in the way.


I will change the scale, all suggestions are very welcome. This is the first time for me so I am trying to learn.


I know you advised against using the battery to power the Arduino, but I would really like a one battery solution if you have an suggestions. The arduino will be a mega, have about 8 sensors and a wifi shield.

I also ordered http://littlebirdelectronics.com/products/acs712-breakout which I hope to measure the battery level with. I assumed it would be a simple matter of putting it into VCC and GND, but since you have given me a more intelligent way of doing things I am now not sure how to measure it.
Title: Re: modding an RC car
Post by: DuaneB on Feb 16, 2012, 10:04 am
Hi,
   For the servo movement, thats one advantage of thinking in milliseconds, you can use my monitoring code to read the servo input, output the same value and record how far you can take the servo in each direction using milliseconds. You can then use the same milliseconds values to set software limits in your own code.

As for the battery and charger, I assume that for the money you paid you will have a 7.2 volt nimh battery and the charger is most likely a trickle charger similar to the wall wart power supplies that some use for their Arduino projects.

If this is the case the battery output is not high enough for the Arduino regulator to reliably generate 5V - I am far from expert here and will no doubt soon be corrected if wrong.

You should also be aware that your nimh batteries should never be fully discharged (something tells me this might not be in your instruction manual ?), if this happens the battery chemistry can change so that one or more cells will no longer accept a charge - through negligence I have had this happen to all of my nimh packs. I now use more powerful LIPO Batteries, they can also fail after a full discharge however I have only had this happen once. The down side to LIPOs is that you will need to invest in a different, more expensive charger to use them.

Duane B.
Title: Re: modding an RC car
Post by: Destined on Feb 17, 2012, 11:35 am
Indeed the battery is as you describe.

Is upgrading to lipo hard?

Is there anyway to tell how much juice is left in the battery?


I am really not keen on needing an extra battery for the Arduino.
Title: Re: modding an RC car
Post by: Destined on Feb 17, 2012, 12:46 pm
Okay I have a weird problem.

The arming sequence isn't working much. However if i disconnect the ground it works but i need to reconnect the ground to get back control properly. Clearly this isn't how I shoould be doing things.

I am totally confused as to why it is doing it.
Title: Re: modding an RC car
Post by: cr0sh on Jun 12, 2013, 07:26 am
Posting this here for others - on another thread, another user () has managed to directly interface to the signal input pin on the RX2 chip - so no more hacking of the h-bridge connections and such are needed (if you can live without needed PWM):

http://forum.arduino.cc/index.php?topic=171238

It's a pretty neat hack, actually. I think someone needs to take the code and make a library with it!

Also - another note: In my various wanderings on the internet, I found a couple of other cheapo RC chipsets out there. One's the TX5/RX5, the other is the TX7/RX7. Something to grab the datasheets for - I'm sure they can be found in cheap RC toys.

Title: Re: modding an RC car
Post by: cr0sh on Oct 29, 2013, 06:10 am
Wanted to update this thread with a link to this one:

http://forum.arduino.cc/index.php?topic=196047

Not TX#/RX# related - but does show an interesting relay/mosfet (at least, I suspect this) based "hybrid" h-bridge setup for the drive motor.

Also, I recently purchased a couple of toy RC cars, that were made closer to a hobby RC car than other. 4wd, full independent suspension - but likely "bang-bang" steering, though there does seem to be some kind of feedback (probably limit switches - I haven't delved in deep enough).

Anyhow - the cars are called "Extreme Machines Thunder XX" by Xin Yu Arts Toys Co., Ltd. - there is a 49 MHz and 27 MHz (standard toy RC pair) versions; they look to be 1/10 scale. They use a TX2/RX2 pair - and the h-bridge for the drive motor is a pair of SPST relays (while the steering is done via a discrete transistor or mosfet h-bridge). 9.6 volt NiMH battery, Tamiya connector. Not sure on motor size, but brushed (not brushless).

Cheap, but seemingly effective. All plastic construction, except for drive shafts and such; it must have some good torque, though, because the drive shafts on one of the vehicles I have are twisted slightly. Fairly easy to take apart, re-lube, repair, etc - but as with anything plastic, things tend to easily break or strip out (JB Weld to the rescue!).

Just another vehicle to keep in mind!
Title: Re: modding an RC car
Post by: ALIBE on Nov 26, 2013, 03:07 pm
to the original poster. 
I have a similar project that can be found here : http://alibe.codeplex.com/ (http://alibe.codeplex.com/). I am happy to share my learnings.  But, keep your hot-glue sticks and the hot-glue-gun handy.  it really saved me a ton of fabrication workload.

Title: Re: modding an RC car
Post by: Isaac96 on May 23, 2015, 10:27 pm
Resurrect this thread?
see
http://forum.arduino.cc/index.php?topic=325059.0 (http://forum.arduino.cc/index.php?topic=325059.0)
Title: Re: modding an RC car
Post by: Isaac96 on Jun 13, 2015, 05:50 am
Anybody?
Title: Re: modding an RC car
Post by: cr0sh on Dec 31, 2015, 11:46 pm
I am adding a link onto this thread - I know it is old, but all of you know that I kinda "maintain" and refer others to it.

At the following link, I give a small "tutorial" on how to hack the RX2 board in a (somewhat) typical toy RC car:

http://forum.arduino.cc/index.php?topic=368867.msg2544112#msg2544112 (http://forum.arduino.cc/index.php?topic=368867.msg2544112#msg2544112)

There is a small album of pictures on imgur (the originals were supplied by the OP of that thread):

http://imgur.com/a/kfu19 (http://imgur.com/a/kfu19)

...showing the components, etc of the RX2 board in the car, and the car itself. Hopefully it can help others.

Cheers. :D