Go Down

Topic: RC Car Robot (Read 12995 times) previous topic - next topic

keeper63



Quote
As far as the speed is concerned, surely I can do some kind of PWM to more finely control it? I've seen other RC cars firsthand that have done so.


PWM'ing won't give you enough low-end torque to move the car, if the gearing
is too high. You'll just have to see how it goes once you get the car.


Ah, right. Ok, well I will take all this information in and report back here! Thanks for the help, everyone.


You might want to read (in full, and carefully - taking notes along the way) this mega-thread:

http://arduino.cc/forum/index.php/topic,86883.0.html

Long story short: It is likely that the car you have has everything you need to start; most of these el-cheapo R/C cars use the TX2/RX2 chipset, and are very easy to interface with once you understand the circuit. Even if it doesn't use such a chip, you can (with a knowledge of electronics and how to draw a schematic) reverse-engineer the on-board h-bridges of the R/C car that control the speed and steering, such that you can find the proper interface points on the PCB to control with the Arduino.

Something else to note: If the car doesn't have what is called "proportional steering" (most of these cheap cars don't), then you may want to replace build-in steering actuator with a standard-sized regular servo (-not- a continuous rotation one), and control it with the Servo library. At that point, though, you might as well cut the card away and use a regular h-bridge with the drive motor. Just make sure you measure the current consumption of the motor (both running and stall current; especially the latter - you need to size the h-bridge such that it can control the stall current plus about 15-25%) before you buy the h-bridge. You might be able to get away with an L298-based device (in bridged mode it can control up to 4 amps of current) - or you might need to purchase something else. Pololu has several suitable devices; there are other manufacturers/vendors as well.

Finally - next time you decide to build a robot using an R/C car, you may want to check thrift stores (like Goodwill or Savers) first; generally you can pick up something just like what you bought (or similar), missing nothing more than the transmitter (which you don't need) - and everything else is working fine (once again, read the thread - I'm pretty sure I covered it there). I've never paid more than 10 or 15 dollars -maximum- for such a regular vehicle (I did once find an MGA Tarantula without it's controller that I ended up buying for $25.00, though).

Good luck with your project!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

mrescude

I agree with cr0sh about the servo, if you use the rated voltage for the front motor (steering), it will over heat because it will have the rotor blocked by the limit of the steering. Or maybe just use low % duty cycle in your PWM signal and don't maintain the top steering for too long.

If the motor has plastic parts they could melt and block the rotor. It happened to me once.

TheWumpus

Note to self: next time, come here *before* buying anything. Really helpful, everyone. I'll look into the car's steering - I may be able to return it if I don't open it.

DuaneB

If you do head back to the shop, try and find your way to a hobby shop where you will find options like these -

http://rcarduino.blogspot.com/p/cars.html

you can then use an Arduino together with or instead of the supplied controls using the techniques outlined throughout

rcarduino.blogspot.com

Duane B
Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

TheWumpus

Alright, the RC car arrived. Neither the forward/backward speeds nor the turning are proportional (i.e., output is all or nothing). I've attached pictures of the motor controller. Does anyone recognize it? Does it look hack-able, or will I need to ditch it and get an Arduino Motor Shield?

Some notes on the attached images: the letters along the bottom of the board (right in the images) are G, B, V+, and F. B and F go to the motor; I'm assuming this indicates backwards and forwards in some kind of H-bridge setup. V+ and G, of course, go to the battery.

holmes4

There is a chip on the small board which is edge on in the photo's - That's the control chip!.

The leads from the 4 chunky things on the right of the photos should go to the main drive motor if so they form the h-bridge.

The 2 small black things with 3 legs just to the left of what I think is the h-bridge are the control transistors for the main drive h-bridge.

The group of 6 small 3 legged black things on the lower left should have leads running to the steering motor. I think they form the h-bridge for the steering motor along with its control transistors.

The rest is the RF stage plus a few bits and bobs.

You need to get the id number of the control chip.

Mark

PS Tanks are much easier to convert than cars!

M

TheWumpus

Thanks for the info! The text on the control chip is incredibly tiny, and reading it reminded me that I'm due for an eye doctor appointment.

Anyway, the ID appears to be SDRX2BDS, and there is a string of numbers beneath it that reads 11120006. I've not yet Googled, but am about to do so.

TheWumpus

Ok, a little more information: I don't have access to the back of the chip itself; all I see is whatever material the board is made of. Instead, pertinent inputs and outputs to the chip appear to be broken out (bottom-left of the attached photo). Looking out F, B, V+, and G, I think I can trace back to the pins on the chip that I need. I have a meter I can use to check current and such across all of them in various motor states. Question: can I solder directly to the broken out connections in the bottom-left, or should I make my connections elsewhere?

Here are some more stupid questions: what kind of wire do I need to purchase? Are there any special bits of hardware that I can put on the ends of the wires to enable me to connect them to the Arduino without having to solder anything to it?

I apologize for the pathetically noob-ish questions. Just treat me like a slightly advanced two-year-old and we'll be fine. :)

keeper63


Thanks for the info! The text on the control chip is incredibly tiny, and reading it reminded me that I'm due for an eye doctor appointment.

Anyway, the ID appears to be SDRX2BDS, and there is a string of numbers beneath it that reads 11120006. I've not yet Googled, but am about to do so.


You don't have to - that's the RX2 half of the TX2/RX2 chipset (if you look inside the controller, you'll probably find something labeled "SDTX2BDS" or similar). Now, go to that thread I mentioned, and read it. There's a link in that thread to the PDF of the spec sheet for the chip.

You're first issue is to determine what the power source is for the chip, and what it is outputing as a logic HIGH on it's control outputs. You'll need a multi-meter for that. Once you know both of those things, then you'll be set to go to the next step.

I see that the chip is on a "daughterboard" of a sort. That's both a good thing and a bad thing. Good, because it means you can trace with your multimeter and your eyes the leads from the chip to the pins/holes on the "main" board. Bad, because it makes checking the pins and such a bit awkward (especially those near the main board side). But once you have things traced out, you can then carefully remove the daughterboard, and solder wires in place where the pins went, then supply signals to those pins somewhat directly from the Arduino. You may need to add current limiting resistors in between (if they are on the daughterboard and not the main board; hopefully they are on the main board side). Likely power and ground for the daughterboard come from the main board, so those pins may make things really convenient.

But you first need to figure out those voltages. Likely it will be either 3 volts or 5 volts used for the power to the chip and logic HIGH; if the chip is running on 3 volts, then the logic high will likely be 3 volts or close to it. One way to make a "first guess" is to find out what kind of battery it uses; if it is a 6 volt or greater battery, likely it is running the chip at 5 volts (which makes things much easier to interface with the Arduino). Otherwise it is probably a 3 volt system, which means you'll want to do some level shifting on the outputs (you can do this with resistors or diodes, or you can purchase specialty 3.3V <=> 5V level shifters; Sparkfun, among other vendors, sells them).

If you keep the receiver daughterboard intact, and you label the pins on the edge in some manner - you can use that for other control projects (with the transmitter)...

Just take your time, and be very patient and careful, documenting everything along the way. Read that thread I mentioned; you'll note that the OP of that thread ended up messing up his first car, but then got the second working (though IIRC, that one died too) - so be aware of that possibility. This isn't a "fool proof" operation, but many people have done it.

Good luck!
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

keeper63


Ok, a little more information: I don't have access to the back of the chip itself; all I see is whatever material the board is made of. Instead, pertinent inputs and outputs to the chip appear to be broken out (bottom-left of the attached photo). Looking out F, B, V+, and G, I think I can trace back to the pins on the chip that I need. I have a meter I can use to check current and such across all of them in various motor states. Question: can I solder directly to the broken out connections in the bottom-left, or should I make my connections elsewhere?


As I noted before - once you know what pins do what (and the voltages needed) - REMOVE the daughterboard, then make the connections to those pins (hey, its a convenient breakout, right there). In fact, I would look into getting a breakaway male or female header (like those used on the Arduino, for instance - those are female headers), and solder it in place - then you can easily breadboard and play...!


Here are some more stupid questions: what kind of wire do I need to purchase? Are there any special bits of hardware that I can put on the ends of the wires to enable me to connect them to the Arduino without having to solder anything to it?


I would use some ribbon cable personally (6 inches or so) - put a header to match whatever you put on the board (if you put a female header on the board, put a male header on your ribbon cable, on both ends). Solder it in place, then put some hot glue or such over the connections to make stabilize and insulate it.

Hope that helps.

:)
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

keeper63

I was looking at the pictures again - and noticed something - I think all the base resistors for the on-board transistors (for the h-bridges) are all on the main board. For instance, see resistors R2, R3, R4, R5 - they all seem to have the same value (though I can't tell the colors easily, so I'm not positive - but I think 2K ohm?). It seems R3 is driving the base of Q2, and R2 the base of Q1, and R5 the base of Q? (can't see it - maybe Q6?).

Anyhow - I'd be willing to bet that the transistors (or mosfets?) on the right side of your first pic (the large squarish things next to the GS-0020R marking) are the driver transistors for the drive motor. Likely they are being triggered in pairs by Q1 and Q2 (via base resistors R2 and R3 respectively). The other 6 transistors are likely used to drive the steering actuator (likely a simple "bang-bang" full left-right electromagnetic actuator). Two of them will again be for the opposite driver "legs" of the h-bridge (likely Q? and Q9 in the middle, but I don't know for certain).

Whatever you do, -don't- turn on both transistors at the same time, or you'll have a shoot-thru issue which will fry the h-bridges.

Hope this gives a bit more insight. I've always found it fascinating how this chipset has been implemented "in the wild"...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

keeper63

BTW, TheWumpus -

I've been meaning to (for a long time - since that mega thread) to write up an article (for my website, maybe as a PDF or such - not for sale, all free) on all of this; would you mind if I used your photos of your board, plus any other insights you post here - as part of that project? I'm just wanting to make it something more clear and such. I would give you full attribution on the images and anything else, of course...
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

TheWumpus

Wow, thanks again. This is a huge help. I'll read the other thread thoroughly and report back as I make progress.

Also, feel free to use anything I post, and don't bother with crediting the photos. I only took them to extract useful information from you all! In fact, if you want better/clearer shots, let me know.




TheWumpus

Alright, so the battery itself is 7.2 V (this is written on it, and I verified it with the multimeter). I had my wife control the drive motors forwards, and held the positive lead on my multimeter at the point where I believed the chip was outputting high for forward. I put the negative lead of the multimeter on the ground pin on the PCB. When driving forwards, I measured 1.6 V. I then repeated the process for the pin that I believed was reverse, and measured the same. The same was true for left and right turning (though they were closer to 1.7 V), though I believe the labeling on the PCB has right and left reversed for some reason.

So now what? Are these voltages indicative of a 3 V system or a 5 V system? I realize that may be a stupid question, but while the voltages are nearer to 3 V than 5 V, they're not very close to 3, and I wasn't sure if the voltage was being stepped down somehow.

Also, do I need to be checking the current across these as well?


keeper63


Alright, so the battery itself is 7.2 V (this is written on it, and I verified it with the multimeter). I had my wife control the drive motors forwards, and held the positive lead on my multimeter at the point where I believed the chip was outputting high for forward. I put the negative lead of the multimeter on the ground pin on the PCB. When driving forwards, I measured 1.6 V. I then repeated the process for the pin that I believed was reverse, and measured the same. The same was true for left and right turning (though they were closer to 1.7 V), though I believe the labeling on the PCB has right and left reversed for some reason.


Regarding the left/right thing - I have seen this kind of thing before with this chipset; that the implementation is in reverse to what the datasheet says. I am not sure why this is - whether it is the manufacturer (or the car), or the datasheet that is at issue. Just as a long as you realize it, it shouldn't be an issue.


So now what? Are these voltages indicative of a 3 V system or a 5 V system? I realize that may be a stupid question, but while the voltages are nearer to 3 V than 5 V, they're not very close to 3, and I wasn't sure if the voltage was being stepped down somehow.


If you can in some manner, check the voltages without the outputs of the IC connected to the base resistors; likely the rest of the circuit is "getting in the way".


Also, do I need to be checking the current across these as well?


I'm not sure what that means; if you are under the impression that things "output" current, you are mistaken. Current is "pulled" from a device, not "pushed" to it. That's the best layman's way I can put it. It depends on the resistance of the circuit and the supply of the voltage across that resistance - ohm's law - I=V/R - so if you have -zero- resistance (ie, a short) the current effectively becomes "infinite". If you have a break (an open), thus "infinite" resistance, then the current effectively becomes zero.

Now - if you do "cut the trace" between the output of the RX2 IC and the base resistor, and you can stick you meter in between and measure the current flow; that might be helpful (once you know the voltage output) - to know if by hooking up the circuit you'll pull more current than what the Arduino (or whatever you use) can supply (in that case, you might need to include a buffer circuit or something to help supply more current).
I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Go Up