Let's Make Robots!

RC car

Ok, so I'm working on a plan to bring my little brother's little Niko RC car (you know, these models that suddenly break down for no reason at all after three charges) back to life. The plan is:

  1. Yank out old electronics (fun job, done ^^)
  2. Test steering servo and current draw of drive motor
  3. Build new electronics

Step 2 will be done by tonight but I have a few hickups on step three.

Basically, I'm going to refit the remote with two mini-joysticks and an xbee module. Now here's the thing: I've read that the xbee has onboard ADC's and I absolutely love this (no need for a microcontroller in the remote) but I can't seem to find a lot of info on how this whole system transmits it's data. With "transmitting it's data" I mean: what comes out at the receiving end and how can I read the ADC's output with my ARDUINO in the car (first time I'll be using arduino :D). Is there anyone here with any experience in this department?

Also, I've built a design for a simple H-bridge and wanted to know if it looks any good. So if you could comment on that, that would be great!

Thanks a lot guys (and girls)!

AttachmentSize
H-bridge.png56.92 KB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Not exactly, although from a logic/control perspective NPN is switched by a logic HIGH at the base, and PNP is switched by a logic LOW at the base.

This article explains the basic Bipolar Junction Transistor (BJT).

When using BJTs as a switch, an NPN transistor needs the Collector to be at a higher potential (voltage level) than the Emitter. It can then be switched on by a HIGH voltage applied to the Base.

When using an PNP as a switch, you still control the switch with the base. However, the Emitter now needs to be at a higher potential than the Collector. (Notice how the PNP transistors are installed "upside down" in Dan's schematic.) Now the PNP transistor can be switched on by a LOW voltage signal applied to the Base.

Transistors can also be partially saturated (turned on), which allows for them to be used in different ways. For an h-bridge, you are using them as basic switches to allow a low current signal from the microprocessor to control a higher current signal from Collector to Emitter (or vice-versa for the PNP).

I can't help with the xbees, but here are some thoughts on the h-bridges and electronics.

Your schematic doesn't show current limiting resistors on the base inputs to the transistors. These are recommended to protect you processor's outputs in case the circuit tries to draw too much current. What transistors are you using? Will they be able to handle the current of your motors? Same goes for your diodes; make sure they are rate high enough to handle your max motor current. Bigger (more current handling) components won't hurt, but they can save you.

You can measure the stall current of your motors by preventing them from turning while measuring the current at full voltage.

One last thought, have you looked at the original electronics to see what you can use? Chances are the original h-bridge in there is still just fine. At the very least, you may be able to re-use some components, or gain an understanding about what size transistors you need.

 

 

OK, I've found the time to measure the current draw of the 'new' motor (that belongs to the 'new' chassis I found)... It draws about 1.5 A constant without a load. Stall current = 15 A. Now, I guess that I should foresee transistors that are capable of handling 3A. Or should it be more because of the stall current?

I was thinking that I could just install a fuse to prevent the transistors from smoking when stallig, but then again, I'm going to use PWM on this thing so it can draw lots of power when driving slow (correct me if I'm wrong please)

Does any of this makes sense?

Thanks!

The transistors will probably be TIP31 or alike (NPN), depends on the current draw (which I'll measure within the next hour or so). You're right, I forgot about those resistors! Extra question about them: is there a specific rule about them (what value should they be)? If they are just for current limiting they just need be high values, or am I mistaking there?

The original electronics are: one PCB which has a lot of glue-like stuff on it, pretty nasty stuff... not usable, I'm afraid :/

Thanks for the reply!

The main thing, like he said is to limit current draw from your microcontroller chip. For Picaxe, you can have 20 mA max on an output (and 90 mA max for the whole chip).  The Arduinos I have seen allow twice that amount of drain.

A 1K resistor would limit max flow to 12 mA off the 12 volt supply thru the μC to ground (even with a shorted transistor).  Most transistors you would be using will not need that much current to bias their bases, so using a higher value resistor where possible will be even safer.  Check the base current needs of your transistors.

We can call that "fuzzy logic" circuit design...   <grins>  In other words, there is a range of values that will work, as long as you are in the right ballpark.