DC motor circuit - no Arduino yet
|
The basics of running a DC motor is that you would need a diode and a power source. This doesn't even require the Arduino. If you want to also use the Ardiuno then you will also need a transistor. The transister allows you to control the high voltage/high current power source with your low current Arduino. It is basically a digital switch, providing a voltage closes the transistors gate, and allows the higher voltage/current to flow through into the motor. The diode is necessary to protect your transistor from the DC motor.
DC motors are inductors, in that the electrical current being passed through the motor induces a magnetic field. When you turn off the electrical current, by opening the transistor gate, the magnetic field starts to collapse, but the energy stored in the motor will oppose this change in the magnetic field, and so try to generate a current to keep that magnetic field going. This means it's trying to arc over the opened gate in the transistor. This can damage the transistor because this arc can generate a lot of heat, think of lightning.
In order to prevent the damage you add the diode. The diode allows current to flow in one direction only, it's like a dam, water can only flow out of a dam, not up the dam wall. So if you add a diode you can create a circuit such that when the transistor gate is closed no current is flowing through the diode, only the motor, but when the gate opens, the diode allows the induced current to flow through it, rather than causing an arc across the transistor gate. There are still some limitations, if you had a massive motor and used a tiny little diode that wouldn't work well. For a start you could get current still flowing through the diode, as if you apply enough energy to water, you can get it to flow up the dam wall. Doing that to a dam might be ok, but a diode is going to be pretty unhappy.
Circuit diagram, when the switch is open, current generated by DC motor flows through diode |
I'm using a motor similar to this DC Motor, since I kind of guessed at the type of motor I wanted to get when buying my Arduino, this one worked pretty well.