hi. i am using the circuit in the picture with a servo attached as my load. I am hoping someone can point me in the right direction so as to figure out how to wire in a capacitor to help keep the arduino from resetting from to much current draw from battery when mosfet is turned and starts to provide power to the servo. this is for a project that stays asleep till woke up once per day, powers up mosfet and attaches servo to arduino, runs to open and close a gate, detaches arduino, powers off mosfet and goes into sleep mode to conserve battery power.
There's no easy way to say this:
A motor should NOT share a battery with a uProcessor. (for reasons you are already aware of)
Get another battery for the arduino.
I doubt caps will eliminate that problem.
It is simply bad practice to have an inductive
load sharing the battery that powers the uProcessor.
If you want to disconnect servo power then you can only do that high-side (in the + line),
with a PNP transistor or P-channel mosfet.
Second or third diagram here (depending on servo/power).
Leo..
Hi,
Welcome to the Forum.
Ops circuit;
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Including your power source.
Thanks.. Tom..
I am confused. You call it a servo - that refers to a motor module with built in control circuitry - yet your diagram shows a simple motor.
Which are you using? You say the battery is powering the arduino, but that diagram shows a separate supply for the motor and the arduino. So that clearly is NOT the circuit you are using.
Please provide a full schematic of what you're doing, including all connections - we cannot advise you without the schematic. This is why you've gotten three completely different answers so far.
Also, what sort of battery?
raschemmel:
There's no easy way to say this:
A motor should NOT share a battery with a uProcessor. (for reasons you are already aware of)
Get another battery for the arduino.
I doubt caps will eliminate that problem.
It is simply bad practice to have an inductive
load sharing the battery that powers the uProcessor.
I disagree - a motor or other inductive load sharing a battery with a microcontroller requires additional care in the design, sure. But using a separate battery is not necessary, and products which have inductive loads and a microcontroller using the same battery are ubiquitous in our daily lives.
I think it's most likely that the battery is just straight up not sufficient to power the motor, and as soon as it tries to run the motor, the battery voltage plunges and the microcontroller resets for that reason. The noise from the inductive load is of course entirely possible.
Details matter. What servo are you using (if it is a servo and not just a DC motor)? And what battery are you using?
Simple motors can be switched low-side but servos should not. By so doing you are removing the ground reference for the signal coming from the Arduino which can create havoc with the servo's internal control electronics.
Steve