In the past, I've had problems powering an Arduino with a DC motor or servo directly with a 9V battery (batteries dying quickly, brownouts, multiple components don't have enough current to work simultaneously), and I read:
- That they shouldn't be powered via the Arduino's 5V pin, but with another power source.
- 9V batteries actually suck.
Now I have two projects I want to do, one having a DC motor and another one having solenoids, so I don't want to run in the same problem.
I'm still confused as to -how- I should split power sources, like, should I hook the Arduino to a few AA batteries and motor to some more AA batteries? If so, I don't see how one could create ever tinier devices with tons of hardware features (say a smartphone) while not sitting on a mountain of bulky batteries. I did some research and so I really don't know where to look:
- Using a single battery pack
- Using a voltage divider (appears to be a bad idea.)
- Using a linear regulator (also appears to be a bad idea.)
- Using a switching regulator
The thing is, I'm not advanced enough to understand what is being addressed in the above link for #3 & #4; I looked for some diagrams about LM7805 and I stay clueless. Moreover, I find lots of articles where authors (or comments) mention how most of the tutorials we find online are done by people who don't know what they're doing (like using a 9V battery or having no diode around the motor), so I don't really know what to trust.
For size constraints and circuit simplicity, I hope #1 is the right way to go, but whichever is the right solution, I look forward to the community to share their wisdom and if possible, a circuit diagram.
As for the power needs, I'll be using an Arduino Nano, my motor project would have the motor always running, while for the solenoid one it's just going to be activated for less than a second. The motor would probably be this one