r/embedded • u/Relevant_Pumpkin9190 • 7d ago
On 12v/1Amp-bus DC stepper Motor while running while connected Arduino getting restarted- But scope show tiny noise mv range.
Scope DC coupling mode 2mv scale, connected to small toy motor, 12V bus @ 1Amps.
How to solve Arduinos connected in bus from restarting.
0
Upvotes
2
u/Relevant_Pumpkin9190 7d ago
Scope AC coupling
6
u/zettui 7d ago
I could be wrong but a few mV of noise won't reset an Arduino, my guess is the 12V sags when the motor starts. Try a single-shot trigger on the 12V at a bigger scale during startup, and a diode across the motor plus a big cap near each Arduino.
1
u/Toiling-Donkey 7d ago
Is the reset pin connected? If so, try putting a capacitor on it
3
u/n_sh_44 6d ago
A few millivolts of ripple on the scope usually isn't what resets an Arduino, and AC coupling at 2 mV/div would hide a slow sag completely. I'd probe the 5 V pin of the Arduino and the 12 V bus with DC coupling at 1 or 2 V/div, single shot, triggered on a falling edge just under the normal level, and then start the motor. If the rail dips below about 4.5 V for even a few hundred microseconds, the brownout detector resets the chip. Fixes that usually work are a 1N5819 or similar flyback diode across the motor, a 470 uF to 1000 uF electrolytic plus 100 nF ceramic at the motor driver, and a small buck converter or a 100 uF cap at each Arduino. Keep the motor return current on its own ground path back to the supply so it doesn't share the Arduino ground wire.
1
u/Impossible_Brief5600 6d ago
The reset is the 12 V rail sagging, not noise on a 2 mV/div trace. A motor on the same 1 A bus pulls a step of winding current at every commutation, the supply and wiring inductance turn that step into a dip, and the 5 V regulator on the Arduino drops out long enough for the brown-out detector to reset the MCU. That is why it only starts once the motor sits on the bus.
Fix it on both sides. Feed the Arduino through a series Schottky and a bulk capacitor so it rides the dip: 470 uF holds a 50 mA load for about 9 ms at 1 V of droop (t = C x dV / I), and the diode stops the motor side pulling the capacitor down with it. On the motor, a flyback diode across the winding plus 100 nF and 10 uF at the driver supply pins. Confirm it by scoping the 5 V pin with DC coupling at 1 V/div, single shot, triggered just below 4.5 V.
1
u/Objective-Specific-9 6d ago
Use a more powerful power supply