
Bu projeyi gerçekten kurmak istersen parçaları hobidevre.com'dan temin edebilirsin →
Build it for real
To build this project for real, get the parts from hobidevre.com → hobidevre.com →
More build guides: hobidevre.com/blog
How to recognise a supply dip
The signature is repeatable: the board restarts exactly when a motor begins to turn or a relay clicks. Setup runs again, a startup message appears again in the monitor, and variables return to their initial values. A software fault rarely lines up so precisely with a physical event.
Watch the onboard LED or the first serial line. If it appears again at the moment of the click, the controller has restarted. That observation alone tells you where to look: the power path, not the loop. It saves hours of reading code that is actually correct.
Why a motor pulls the rail down
A motor needs far more current than a controller pin can supply, and the surge at startup is higher than the running current. When both the controller and the motor share one small supply, that surge drags the rail below the level the controller needs. The controller responds exactly as if power had been removed, because for a short moment it had been.
Relays and solenoids behave the same way. The coil draws a sharp pulse when energised. Even a supply rated high enough on paper can sag if its wiring is thin or its connections are loose, so check the whole path, not only the label on the adapter.
Use a separate supply for the load
The reliable arrangement is two supplies: one for the controller and one sized for the motor or relay. The controller then sees a stable rail regardless of what the load does. Choose the load supply from the motor voltage and its starting current, with a comfortable margin above the running value.
If you must use one supply, make sure it can deliver the combined worst-case current and add a capacitor or a small reservoir near the load. This is less robust than two supplies but works for small loads. Never power a motor directly from a digital pin; the pin is a signal, not a source.
Connect the grounds together
Two supplies still need one common reference. Connect the ground of the motor supply to the ground of the controller. Without that connection, the control signal has no defined voltage relative to the driver input, and the motor may behave unpredictably or not respond at all.
This surprises beginners who expect separate supplies to be fully independent. They are independent for power but must agree on zero volts. A missing ground link is a common cause of a motor that twitches while the controller resets.
Add a capacitor near the load
A capacitor placed close to the motor terminals supplies the first burst of current locally, so the surge does not travel back through the controller wiring. A larger value is used across the motor supply and a smaller one near the driver logic. Keep the leads short; distance reduces the benefit.
A capacitor does not replace an adequate supply. It smooths short spikes but cannot feed a motor that runs over the supply rating indefinitely. Treat it as the final touch after the power budget and the wiring are already correct.
Check the wiring and connections
Thin jumper wires and loose breadboard contacts add resistance, which makes a voltage dip worse. Use a wire thick enough for the motor current and check that each connection is firm. A connector that warms up during a test is a sign of resistance that needs to be fixed.
Route motor wires away from sensor and signal wires. A changing magnetic field beside a sensor cable can add noise to readings, which is a different symptom but often appears in the same project. Physical separation is a cheap and effective fix.
Confirm it is not the code
Run the motor from a minimal sketch that does nothing else and prints a startup marker. If the marker reappears when the motor starts, you have confirmed a power problem. If the controller stays up but the motor misbehaves, look at the driver input and the step or speed command instead.
Software can cause a restart through a watchdog or an accidental reset of a control pin, but those events do not line up with the mechanical motion. Matching the timestamp of the restart to the motion is a simple way to separate the two classes of cause.
Once the supply is fixed, add features back gradually. A project that works with one motor may reset again when a second is added, because the shared budget has changed. Recalculate the power needs whenever the load grows.
- Separate supply sized for the motor
- Grounds joined between supplies
- Capacitor close to the motor
- Wires thick enough for the current
Get the parts
Motor supplies, capacitors, driver modules and thicker wires are available from hobidevre.com.
Frequently asked questions
Why does the board restart only when the motor starts?
The starting surge drops the supply below the controller operating level for a short moment.
Do two supplies really need a shared ground?
Yes. The control signal needs a common reference to the driver input.
Will a capacitor fix an undersized supply?
It smooths brief spikes only. The supply still has to cover the running current.