shazool:
Hey everyone
I'm just starting out with Arduino and have been working my way through the Vilros starter kit.
I don't quite get circuit 10 (attached)
I understand the purpose of the diode is to handle the voltage spike when the transistor is switched off and the motor's EMF collapses.
No, the purpose is to completely prevent any spike from happening.
But why doesn't the current flow into 5V instead of going in a loop, since the spike's voltage will be much higher than 5?
The current keeps going in the same direction through the inductor or motor, gradually dying
down as the small diode voltage opposes it weakly.
And wouldn't it be easier to just have the motor's negative terminal connected to GND and have the transistor control current flow between the positive terminal and 5V? Wouldn't that let the current drain into GND without a diode?
No, the problem is quite fundamental to any switched inductive load - try to stop the current dead and the energy stored in
the magnetic field will burst out with whatever voltage is necessary to force the current through in the short
term - you have to arrange that the current is reduced slowly, which limits the voltage. With a diode that
limit is 1V or less. Without it there might be a 100V, 1000V, or even more for large inductors.
One last question: if I connected the motor the other way around, so it spins counterclockwise, would it change the resulting voltage spike in any way?
the motor is an inductive load, whichever way you look at it
I'm sensing my understanding of electricity is way off.. thanks in advance for your answers
Inductors store energy in a magnetic field when current is flowing, the energy goes back to the circuit when
the current stops. The rate the energy is transfered depends on the rate the current changes and the amount of inductance.
You can think of the difference between stopping a car using the brakes (slow reduction in speed) or a
concrete barrier (sudden reduction in speed). The energy of the moving car has to go somewhere...