I have a question about powering an Arduino from an external power source. This is a 12v wall wart which is being used to power a motor. This motor is being controlled by an NPN transistor using a PWM port on the Arduino. Currently I am protecting the transistor using a diode across the terminals of the motor. What I am considering is piping the 12v from the power supply into the Arduino's VIN. My concern is that this inductive spike from the transistor turning the motor off will also be piped back into the Arduino. I have attached the proposed circuit layout. Does the diode protect the Arduino? If not, how could the Arduino be protected? Thanks in advance.
I would run the wire from transistor emitter back to power supply GND, not Arduino GND, otherwise, looks OK.
I simplified it for the diagram. Its all setting on a proto shield with a common ground. This should be acceptable? No? Except I am powering the Arduino with USB not the external 12v. Trying to eliminate the need for the PC...
There is no spike if the diode is intact, and the spike is at the collector of the transistor anyway,
its only when the spike is present and destroys the transistor that it will get to the power rail.
The standard way to protect a voltage rail from spikes is with a crow-bar or clamp circuit, typically driving
an SCR to turn on and low the fuse, or a clamp using a zener and transistor to conduct away the spike
but without permanent effect.
There is another issue with spikes causing interference, this will be more important the
higher the motor power (voltage and current), and shielding and EMI prevention measures
may become important.
try one of these ! I use them all the time great little device