I plan to power an Arduino from a 12V battery (arduino has its own regulator so that should be ok) BUT the same battery also powers a pretty strong motor (its for an alectric GO KART) and I kinda fear if its ok for arduino to be under "such stress" like one second the motor draws 0 current and in the next a looot more ... and this like 20x a minute ...
Could this be a problem for an arduino? And if so, what could be the solution?
Sorry but im no electrician
Regarding current drawn from the battery: It really shouldn’t matter, until the motor draws so much current, that the voltage dips significantly.
However, electric motors are very noisy, and that could disturb your arduino.
I’ve had a similar problem, and ended up just powering the arduino from a separate 9V battery. It was the easiest thing to do.
You could use a couple of capacitors to filter and smooth the power to the arduino.
Yeah... A couple of things can happen...
If the voltage drops below about 5 or 6V when the battery is "stressed" (especially if it's partially drained) the Arduino could reset.
There is also back-EMF from the motor when the motor driver switches. That's reverse voltage, which could damage the Arduino.
There's a 99% chance that the motor driver takes care of back EMF, but to be safe add a diode in series with the power to the Arduino.
A capacitor between Vin and ground can hold the voltage for a short period of time during a voltage drop or "glitch" (along with the diode to prevent the capacitor discharging into the motor or other circuitry). The capacitor should be rated 16V or more* and I'd use at least 1000uF. The higher the value (uF) the longer it will hold it's charge.
- The voltage rating on a capacitor is it's maximum rating. The actual voltage on the capacitor depends on the applied voltage. A capacitor rated at 25V would give you more safety margin. The only downside to a higher voltage capacitor is that it's physically larger.
Hey guys - thank you for relpies
A question: I know that many of these thing can be done "by myself" or I could buy some "premade" solution for this where I just screw some screws and connect some cables - did you ever see something like this? Cause I dont even know where to start looking for it and the small $$$ difference does not make a big thing for me .. I just want it to be easy and work (as said im no eletrician)
If you use an Uno, power it via the DC socket.
That has a build-in reverse protection diode.
You could use a resistor in series with the battery+ wire.
That, and Uno's onboard 47uF input cap could be enough to kill spikes.
Try 10ohm. That will only drop 1volt@100mA, so shouldn't affect anything.
Add a 500mA inline glass fuse in the battery+ line. You don't want the resistor or wiring to smoke.
I agree with DVDdoug,
“A capacitor between Vin and ground can hold the voltage for a short period of time during a voltage drop or “glitch” (along with the diode to prevent the capacitor discharging into the motor or other circuitry). The capacitor should be rated 16V or more* and I’d use at least 1000uF. The higher the value (uF) the longer it will hold it’s charge.”
Except I would use a super capacitor(s), with a voltage rating above 24volts.
I would also add extra .1uf caps around.
There is also back-EMF from the motor when the motor driver switches. That’s reverse voltage, which could damage the Arduino.
There’s a 99% chance that the motor driver takes care of back EMF, but to be safe add a diode in series with the power to the Arduino.
That is not very well thought out.
The “back EMF” might well appear across the motor (though this is unlikely with permanent magnet motors and non-existent with brushless ones), but thoughtful inspection of the circuit reveals that this only affects the motor controller, not the power supply. If it were possible to have an impulse increase the battery voltage, then a series diode would not provide any protection anyway.
However, the diode is an essential part of your impulse suppression as by putting the extra capacitor after the diode, it buffers the supply to the Arduino (regulator) by preventing whatever causes a “dip” in the battery voltage from discharging the capacitor. In addition, since 12 V is somewhat excessive for the Arduino, the voltage drop of the diode is a benefit.