# Battery and UBEC how put in the arduino

**URL:** <https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387>\
**Category:** General Guidance\
**Created:** [December 13, 2025, 12:36am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387 "2025-12-13T00:36:43Z")\
**Posts on this page:** 18\
**Page:** 1

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 12:36am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/1 "2025-12-13T00:36:43Z")

</div>

![Captura de tela 2025-12-12 213221](https://europe1.discourse-cdn.com/arduino/original/4X/b/e/f/befbacf034821e16217fe590c847f40c8f7a9e6e.png)  
I am creating an Arduino project using 4 servos connected on a protoboard.  
When I power the system through the USB from my PC, everything works normally.  
However, when I power the Arduino using a battery 7,4 18640 connected to the DC jack, the servos start behaving erratically (“going crazy”).

I believe this is a power issue, and I am not sure how to correctly connect a 5V UBEC to power the servos and the Arduino safely.

Could someone help me understand how to properly use a 5V UBEC with Arduino and servos to avoid this problem?

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [December 13, 2025, 12:44am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/2 "2025-12-13T00:44:39Z")

</div>

Your sketch might show the answer.

---

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 1:04am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/3 "2025-12-13T01:04:55Z")

</div>

I very new im the arduino this is a model not made for me

---

<div class="post-metadata">

**Author:** ![Railroader](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/railroader/32/274550_2.png) [@Railroader](https://forum.arduino.cc/u/Railroader)\
**Post date:** [December 13, 2025, 1:37am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/4 "2025-12-13T01:37:03Z")

</div>

Powering any motors from the controller is No, No. Give them a separate power supply.

Powering the UNO via Vin might be Ok but defenatly not tapping any power from the 5 volt pin. An LED or two but nothing more is allowed.

---

<div class="post-metadata">

**Author:** ![LarryD](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/larryd/32/215550_2.png) [@LarryD](https://forum.arduino.cc/u/LarryD)\
**Post date:** [December 13, 2025, 1:58am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/5 "2025-12-13T01:58:55Z")

</div>

- High currents going through the traces on the Arduino board then powering the servos will cause problems.

- Power your servos from an external supply with external wiring thereby bypassing the Arduino.  
You will of course need an Arduino GND connection going to the servo supply GND.

- Always show us good images of the actual wiring and show us your complete sketch.

---

<div class="post-metadata">

**Author:** ![gilshultz](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@gilshultz](https://forum.arduino.cc/u/gilshultz)\
**Post date:** [December 13, 2025, 5:46am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/6 "2025-12-13T05:46:57Z")

</div>

The fact that your Arduino is working indicates you have had some good luck.  
**Gil's Crispy Critter Rules for Processor Hardware:**

1. **Rule #1:** An Arduino **is NOT** a Power Supply!
2. **Rule #2:** Never connect anything inductive (motors, speakers) directly to an Arduino!
3. **Rule #3:** Avoid connecting or disconnecting wires while the power is on.
4. **Rule #4:** Do not apply power to any pin unless you are certain of what you're doing.
5. **Rule #5:** Do not exceed the maximum voltage or current ratings.
6. **Rule #6:** Many Arduinos cannot power transmitters directly.
7. **Rule #7:** Before powering your project, take a break and double-check the wiring.
8. **Rule #**  **8**  **:** Bad soldering makes for project failure.

**LaryD’s Corollaries:**

1. **Coro #1:** When starting out, add a 220Ω resistor in series with both input and output pins to protect against shorts.
2. **Coro #2:** Invest in a Digital Multi-Meter (DMM) to measure voltages, currents, and resistance.

**Note:** Violating these rules can turn your Arduinos into crispy critters. For optimal performance, keep your wires under 25 cm (10 inches).

**Additional Tips:**

- The L293 motor driver, though common, is inefficient as it can lose around 3V as heat when driving both legs of a motor. Consider using a motor driver with MOSFET outputs to reduce heat loss and conserve battery power.
- Not all motor drivers work with each motor, they have to be compatible.
- The nRF24 radios do not work very well when powered with an Arduino even if the 5V adapter is used.
- For more on powering Arduino boards, explore this guide: [Powering Alternatives for Arduino Boards](https://docs.arduino.cc/learn/electronics/power-pins/).
- Connecting power backwards generally destroys parts in nanoseconds IE faster then fuses.

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [December 13, 2025, 8:04am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/7 "2025-12-13T08:04:24Z")

</div>

Do you still need help with a diagram?

---

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 5:17pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/8 "2025-12-13T17:17:03Z")

</div>

Yes

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [December 13, 2025, 5:56pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/9 "2025-12-13T17:56:18Z")

</div>

Let's make sure yo have the correct batteries and they are connected properly. Are they 186 **50** batteries (not 18640)?

Do you have them in a battery holder like this?

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/e/8/b/e8b3fc0847f384bfd8da323c98c768805a74206f.jpeg)

---

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 6:17pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/10 "2025-12-13T18:17:16Z")

</div>

Yes, it is an 18650 battery; I sent it wrong before. Regarding the battery, I am using this type, but I cut off the connector so that only the wires remain.

 ![Screenshot_20251213_151402_Mercado Libre](https://europe1.discourse-cdn.com/arduino/original/4X/b/7/7/b7776ca482783bcc8d90555381dc4fe8f5b960c9.jpeg)

---

<div class="post-metadata">

**Author:** ![xfpd](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/xfpd/32/1120236_2.png) [@xfpd](https://forum.arduino.cc/u/xfpd)\
**Post date:** [December 13, 2025, 6:31pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/11 "2025-12-13T18:31:15Z")

</div>

> [@mask\_zinhoz](#):
>
> a battery 7,4 18640

> [@mask\_zinhoz](#):
>
> I believe this is a power issue

I believe you are correct... the current required for the servo startup and "idle hold" could make the 7,4vdc battery dip to a voltage too low for the Arduino to stay powered up.. causing erratic behavior.

The servos should be powered by an external power supply with an output the servos require, **not** powered by the Arduino.

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/2/f/d/2fd3190008b111b6510d17f0495ae083e9ad19d7.jpeg)

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [December 13, 2025, 6:42pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/12 "2025-12-13T18:42:37Z")

</div>

OK  
Connect like this:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/5/8/7/5875c121a5dc60da54347515ab366ca651089a51.png)

I only show two servos but can add as many as you want.

---

<div class="post-metadata">

**Author:** ![JCA34F](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jca34f/32/340148_2.png) [@JCA34F](https://forum.arduino.cc/u/JCA34F)\
**Post date:** [December 13, 2025, 6:44pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/13 "2025-12-13T18:44:21Z")

</div>

If you are supplying power through the barrel jack and the servos from the 5V pin that power has to go through the 5V regulator that can only supply about 400mA after dropping 7.4V to 5V. It will over heat and shut down. Can your servos run directly from the battery's 7.4V? What is the servo's rated voltage and current?

---

<div class="post-metadata">

**Author:** ![JCA34F](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jca34f/32/340148_2.png) [@JCA34F](https://forum.arduino.cc/u/JCA34F)\
**Post date:** [December 13, 2025, 6:46pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/14 "2025-12-13T18:46:36Z")

</div>

@jim-p 's diagram is the way to go.

---

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 8:04pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/15 "2025-12-13T20:04:20Z")

</div>

I'm using 4 servos, would that be possible?

---

<div class="post-metadata">

**Author:** ![mask\_zinhoz](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/mask_zinhoz/32/1148397_2.png) [@mask\_zinhoz](https://forum.arduino.cc/u/mask_zinhoz)\
**Post date:** [December 13, 2025, 8:06pm UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/16 "2025-12-13T20:06:04Z")

</div>

I'm using 4 servos, would that be possible?

---

<div class="post-metadata">

**Author:** ![jim-p](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/jim-p/32/922840_2.png) [@jim-p](https://forum.arduino.cc/u/jim-p)\
**Post date:** [December 14, 2025, 7:14am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/17 "2025-12-14T07:14:31Z")

</div>

If the battery and UBEC can supply enough current, 4 will be no problem

You can also use the euro style terminal strips:

 ![image](https://europe1.discourse-cdn.com/arduino/original/4X/7/b/0/7b0a35250ace9deddcde28a71da2b70c11b07b95.jpeg)

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [June 12, 2026, 7:14am UTC](https://forum.arduino.cc/t/battery-and-ubec-how-put-in-the-arduino/1419387/18 "2026-06-12T07:14:32Z")

</div>

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
