Maker Pro
Maker Pro

How to properly power electronics with a battery

janhrubec

Nov 28, 2023
4
Joined
Nov 28, 2023
Messages
4
Hey everyone,
I'm very new to this whole topic, but I would like to make my first larger project. I would like to make a small tank. Not really sure about any of the details just yet, but I will use an Arduino Nano ESP32 to control the thing. I chose to use two 6V motors with a stall current of 1.1A. To control them I picked the Adafruit DRV8833 (not very sure about that). I will put everything on a non-soldering breadboard. Now, I never really used a battery to power anything and used just a tiny powerbank. How large of a battery will I need? Should I power it all with a single battery or should have two separate, one for the arduino and one for the motors? Also, all the batteries I looked at have some weird connectors. Should I just strip the wire so I can use it on the breadboard?

Any help greatly appreciated. Thanks.
 

Bluejets

Oct 5, 2014
7,054
Joined
Oct 5, 2014
Messages
7,054
I will put everything on a non-soldering breadboard.
Not a good idea for motor connections or anything else on a "permanent" basis.
Breadboards are for testing and definetely not for the higher current of motors and drivers.

LiPo batteries seem to have overrun the older NiMh and NiCd rechargables.
Only thing one has to deal with there, is the concerters required to lower the voltage for some uC's.
If you went 2S (7.4v) you could feed that directly to some Arduino raw inputs and run the motors via pwm with limits on top end speed.
Just be aware LiPo's require close monitoring for charge type and voltage levels and for discharge level as well.
Fortunately this is easily done with add on BMS (battery management system) modules for a few dollars each.

Motors (brushed DC) also require freewheeling diodes for noise suppression.
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Sum the power used by all items then decide how long you want to run it all for without having to recharge.

Choose a battery that can deliver the required power for the required time period.

e.g. Controller (5W), motor (10W), lights (3W) - all imaginary note...... so total = 18W.

At 12V (a common battery voltage) this would demand 1.5A to get the 18W. A 12V 1.5Ahr battery would last 1 hour, a 12V 3.0Ahr battery would last 2 hours etc etc.

Note that none of the calculations take into account inefficiencies so battery sizing should be LARGER by around 50% to be safe. i.e. if you calculated a 12V 3.0Ahr solution then 'up it' by 50% and use a 12V 4.5Ahr battery instead.
 

Bluejets

Oct 5, 2014
7,054
Joined
Oct 5, 2014
Messages
7,054
Problem with using 12v is all that wasted power or need to use converters all over the place.
Note that Op says 6v motors are being used in the design phase.
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,769
Joined
Nov 17, 2011
Messages
13,769

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
Problem with using 12v is all that wasted power or need to use converters all over the place.
Note that Op says 6v motors are being used in the design phase.
You missed the bit:
- all imaginary note.
Choice of battery voltage and/or capacity is to the OP's requirements. All I was doing was illustrating an example of how to do the calcs.
 

janhrubec

Nov 28, 2023
4
Joined
Nov 28, 2023
Messages
4
You are absolutely right in not being sure. This is a stepper motor driver. It is not suitable for DC motors (brushed or brushless).
I don't know, in the product page it said that it can either drive one stepper motor or two DC motors. Is that information incorrect? I meant that I was unsure if it is a good and reliable product.

Which one? Arduino nano <> ESP32.
The official arduino one. It is a remake of the ESP32-S3. link
 
Last edited:

janhrubec

Nov 28, 2023
4
Joined
Nov 28, 2023
Messages
4
Not a good idea for motor connections or anything else on a "permanent" basis.
Breadboards are for testing and definetely not for the higher current of motors and drivers.

LiPo batteries seem to have overrun the older NiMh and NiCd rechargables.
Only thing one has to deal with there, is the concerters required to lower the voltage for some uC's.
If you went 2S (7.4v) you could feed that directly to some Arduino raw inputs and run the motors via pwm with limits on top end speed.
Just be aware LiPo's require close monitoring for charge type and voltage levels and for discharge level as well.
Fortunately this is easily done with add on BMS (battery management system) modules for a few dollars each.

Motors (brushed DC) also require freewheeling diodes for noise suppression.
How should I "split" the battery power? I can't really power the motors through the arduino since they are 6V and the arduino GPIO pins have a max voltage of 5V. Also, how should I connect them, is it a good idea to strip the wires and just solder them to the motor controller directly or do the connectors have some use?
 

Harald Kapp

Moderator
Moderator
Nov 17, 2011
13,769
Joined
Nov 17, 2011
Messages
13,769
in the product page it said that it can either drive one stepper motor or two DC motors.
Right, please excuse this oversight on my part.

The official arduino one.
O.K., I wasn't aware of this one. Be aware that this board has 3.3 V I/O pins (not 5 V). It should work with the driver module you want to use as this module accepts logic levels > 2.7 V.

How should I "split" the battery power?
Connect the Arduino's power directly to the battery (it will accept 6 V ... 21 V at the power input).
Connect the motor driver module also directly to the battery. Make sure both Arduino and motor driver module use the same ground (which they should implicitly when using the same battery).
Conenct the Arduino's digital output pins to the driver module's input pins.
Heed @Bluejets ' hints about correctly charging the battery.
 

janhrubec

Nov 28, 2023
4
Joined
Nov 28, 2023
Messages
4
Right, please excuse this oversight on my part.


O.K., I wasn't aware of this one. Be aware that this board has 3.3 V I/O pins (not 5 V). It should work with the driver module you want to use as this module accepts logic levels > 2.7 V.


Connect the Arduino's power directly to the battery (it will accept 6 V ... 21 V at the power input).
Connect the motor driver module also directly to the battery. Make sure both Arduino and motor driver module use the same ground (which they should implicitly when using the same battery).
Conenct the Arduino's digital output pins to the driver module's input pins.
Heed @Bluejets ' hints about correctly charging the battery.
Great, thanks a lot for the help! So I will just connect the two in parallel to a 7.4V LiPo battery.
 
Top