Hey guys, I'm pretty new to Arduino and I'm working on a medical device application to be used in developing countries.
If you could explain to me the following questions, in fairly simple terms, it would be greatly appreciated. I apologize that my questions might be very basic for most forum users.
-
I have a 12v DC gear motor rated at 60W and 6 amp nominal current. Can I power this from the Vin pin on the Arduino, if my input jack comes from a 12V wall wart?
-
I'd like to control the speed of my gear motor (PWM), with a digital output pin from the Arduino. I assume I'll need a transistor for this. How do I know what transistor to select?
-
I expect that my circuit will need a flyback diode to account for the inductance of the gear motor. How do I go about selecting the type of flyback diode I use?
-
Any other expected dangers / pitfalls that I am grossly overlooking?
Thanks!
[u]Here is a MOSFET driver circuit[/u]. MOSFETs are generally better than regular transistors for high current because they don't heat-up as much.
- I have a 12v DC gear motor rated at 60W and 6 amp nominal current. Can I power this from the Vin pin on the Arduino, if my input jack comes from a 12V wall wart?
You'll have to power it from the wall wart (or other power supply). And of course, the power supply must be able to supply at least 6 Amps.
Hi,
Can I power this from the Vin pin on the Arduino, if my input jack comes from a 12V wall wart?
You need a 12V power supply that provides 6A (and probably more for start-up motor current). You could use that to power the Arduino also, but don't pass that current THROUGH the Arduino external power connector; keep it separate.
The reasons why you shouldn't draw too much current from the Vin pin are: 1. There's a diode between the input jack and the Vin pin (to save the Arduino when you reverse the voltage) that will definitely get destroyed if you try to put 6A through it, and 2. Thin wires, headers or PCB tracks can get pretty hot at these high currents.
I'd also go for a MOSFET. Normal transistors that can handle 6A are not that easy to find, and the reason is that they have quite a high voltage drop across collector and emitter, even when fully on. Since power equals voltage times current, this means that at high currents, they get really hot (dissipate a lot of power).
MOSFETs on the other hand have an internal source to drain resistance of just tens of milliohms, so power dissipation in the MOSFET itself is many times lower, which means that you don't even need a heatsink.
One disadvantage however, is that they need quite a high voltage on their gate to allow high currents. It is important to check this in the datasheet, it's mostly in a graph of gate voltage versus DS-current. If there's no such graph, you can extrapolate it from the gate voltage versus DS-resistance graph.
If the DS-current at 5v is lower than 6A, you'll need an extra optocoupler (or transistor), with the collector directly connected to the 12 input, and its emitter to the MOSFETs gate, to get the gate at a higher voltage. (Also, don't forget the pulldown resistor at the gate, or your motor will start to spin without a reason when the gate voltage starts drifting.)
The LED of the optocoupler can be driven by the Arduino like any ordinary LED (with current-limiting resistor).
Using an optocoupler makes it also possible to completely separate the Arduino's supply from the 12v supply, if you want to.
I've always used normal rectifying diodes (1N4007) as flyback diodes, never had any problems.
6A is a lot of current for a normal power supply, so it may be better to use an ATX (computer) power supply, they can deliver 20-30A @12v. A quick Google or Instructables search will show you how to hack them into a normal power supply.
Even a 1N4001 can be used instead of the 1N4007, but how long will it survive 6A pulses?
MedManEngineer:
Hey guys, I'm pretty new to Arduino and I'm working on a medical device application to be used in developing countries.
If you could explain to me the following questions, in fairly simple terms, it would be greatly appreciated. I apologize that my questions might be very basic for most forum users.
-
I have a 12v DC gear motor rated at 60W and 6 amp nominal current. Can I power this from the Vin pin on the Arduino, if my input jack comes from a 12V wall wart?
-
I'd like to control the speed of my gear motor (PWM), with a digital output pin from the Arduino. I assume I'll need a transistor for this. How do I know what transistor to select?
-
I expect that my circuit will need a flyback diode to account for the inductance of the gear motor. How do I go about selecting the type of flyback diode I use?
-
Any other expected dangers / pitfalls that I am grossly overlooking?
Thanks!
I would not suggest you try to build your own, You should use a professionally designed and built driver board. Pololu makes a bunch of inexpensive drivers
Chuck.
I think that building your own driver is a great exercise. It's not too difficult, the principle is common to all DC amplifiers.
The next step were the H-bridge, which is much more sophisticated.