I'm working on controlling my old Tamiya Super Blackfoot RC truck with an Arduino Mega ADK.
I'm in the early stages of the project (and Arduino in general) and alot of what I read on the Internet talks about controling the Electronic Speed Control (ESC) to control the backwards and forwards of the car.
Couldn't I just connect a PWM pin to a transistor and control the motor that way?
I think I would also need another PWM pin/transistor connected in the opposite direction to allow reverse?
Even if this would work, would using the ESC be better?
If its a BLDC motor then an ESC is mandatory - however its a truck so its likely
to just be a DC motor.
Since you need forward and reverse you need an H-bridge anyway, and to control
speed a PWM'able H-bridge - that's basically what the ESC is, and they are cheap
compared to making your own H-bridge in practice.
But we don't know how many amps your motor needs, if its tiny a motor driver board
might be enough, but if its a low an RC ESC is likely to be the cheapest way to drive it.
Mr. Tamiya website shows it as a DC brush motor. And I agree with MarkT that an ESC would still be the simplest way to do things; just make sure it's an ESC for brushed motors.
If the ESC is in working order, that's the easiest way to go. If you still want to control speed with the Arduino, use a PWM output from the Arduino to the ESC's input. The ESC needs a logic level, 0.5 to 1.5mS pulse where 0.5 is minimum and 1.5 is max.
Yup, it appears to be just a DC brush motor. However, the truck is so old that I think it has a "speed control" - a servo attached to an arm that moves a contact across an metal plate to vary the speed. That's not an Electronic Speed Control, right?
The book I'm using to learn Arduino basics, Exploring Arduino, has a detailed explanation of how to build an H-bridge. Since, I already bought the parts for that chapter, I'm going to give it a try.
fatweasel:
Yup, it appears to be just a DC brush motor. However, the truck is so old that I think it has a "speed control" - a servo attached to an arm that moves a contact across an metal plate to vary the speed. That's not an Electronic Speed Control, right?
No - that's an old-school rheostat-style speed controller (fairly inefficient, since it bleeds a ton of heat). You want to purchase a "brushed motor ESC" - if that vehicle still has the original Mabuchi RS-540 motor in it; according to wikipedia, that's the motor it originally came with:
Here's the spec-sheet for the motor (note - you didn't say which version you had):
fatweasel:
The book I'm using to learn Arduino basics, Exploring Arduino, has a detailed explanation of how to build an H-bridge. Since, I already bought the parts for that chapter, I'm going to give it a try.
Look at that spec sheet for the motor again - note the stall current ratings for each version of the motor: On the low-end, you have 78.5A (RS-540RH-7522), and on the high-end, 216A (RS-540SH-6527). You would need to design an h-bridge to handle those kinds of currents; likely, though, you could design one to handle the lower "max-efficiency" currents listed (maybe take the highest and double it - and design for that), but honestly, if you have never made an h-bridge before, you will be throwing money away trying to do it. It isn't as easy as slapping some parts together, especially once you go over anything more than a few amps of current handling capability. You will be smoking parts (and depending on what and where you buy them, they may not come cheap, either).
Don't go down that route - at least for this motor; you didn't say what parts you have purchased, but it is unlikely that you will be able to build anything better (or cheaper) than what you can buy. For instance, this ESC would probably do everything you needed, and be simple to control (ie - Servo library):
cr0sh:
Don't go down that route - at least for this motor; you didn't say what parts you have purchased, but it is unlikely that you will be able to build anything better (or cheaper) than what you can buy. For instance, this ESC would probably do everything you needed, and be simple to control (ie - Servo library):