# Controlling power input for different currents and voltages connected to the same power source

I am new to robotics and am struggling with the electronics a bit. I am using two 9 V batteries in series to provide 18 V. I need to power 2 x 12 W DC motors and an Arduino Uno. I need to divide the input power of 18 volts into 3 streams: 2 x (12 V, 1 A) streams for the motors + 1 x (6 V, 0.2 A) for the Arduino.

I thought of using a 1 Ω resistor and a 2 Ω resistor in parallel to get two streams: 12 volts and 6 volts respectively, but I am not sure if that will ensure the right current values will be drawn. I tried looking online but couldn't find a method. How can I go about carrying this out? Any help will be greatly appreciated!

• You can watch this video about robot power. It explains how to power different components of your robot pretty neatly. Mar 2 at 5:55

In addition to the above comment, you will never be able to source that much power from a pair of 9 Volt batteries. If you do use a battery eliminator circuit keep in mind that they operate in the linear regime and are therefor not very efficient. You would be better off using switch mode DC to DC converters and a LiPo battery. There are lots of options, look at spark fun and find the ratings you need. Here is a link to a converter and here are some batteries. If you need to increase the voltage use a boost converter, you dont need to stack these in series.

• That's helpful, thanks. I will try to use the 2 X 9 V batteries, just for experimentation as I am still learning, and switch to LiPo later. I don't want to spend money on LiPo if I don't need to. Mar 9 at 4:17
• With the Lipos being around 10\$, you are going to spend much more blowing through nine volt batteries when trying to pull 2 Amps from them. Mar 11 at 17:12
• BECs can be either: Linear BEC’s versus Switching BEC’s Mar 12 at 19:49

A voltage divider is a bad idea, just for being wasteful if nothing else. How wasteful? Let's consider Ohm's Law:

$$V = IR \\$$

where $$V$$ is voltage in volts, $$I$$ is current in amps, and $$R$$ is resistance in ohms.

Two 9 V batteries in series gives about 18 V total. Your voltage divider is (1+2) = 3 ohms. This means you will have (18 V/3 phm) = 6 Amps of electricity pumping through your voltage divider.

Your bridge configuration would have (6 A * 2 ohm) = 12 volts across the 2 ohm resistor and (6 A * 1 ohm) = 6 volts across the 1 ohm resistor. Considering the power equation,

$$P = IV \\$$

where $$P$$ is power in watts, $$I$$ is current in amps, and $$V$$ is voltage in volts, then you're looking at (6 A * 12 V)=72 watts in the 2 ohm resistor and (6 A * 6 V) = 36 watts in the 1 ohm resistor.

You'll burn up your resistors for one, maybe start a fire if they don't melt first, and even if you got a high-wattage resistor then you'd use up the battery pack very quickly. A typical 9 V battery has about 500 mAh, or 0.5 amp-hours of capacity, so you'd burn through that in (0.5 Ah/6 A) = 0.083 hours, or 5 minutes. That's 5 minutes with just the voltage divider attached, doesn't count the Arduino or motor.

What you should be using instead is an electronic speed controller (ESC) with a "battery eliminator circuit," or BEC. These will use a switching-mode voltage regulator that basically chops the current and smooths the output for a very efficient stepping down of voltage.

Most BECs will output 5V, which you could attach to the Vin pin on your Arduino. This may not be applicable for all models, you can check the documentation here.

#### TL;DR

In order of efficiency (least efficient first), power (or voltage) regulation can be achieved by:

1. Potential divider - there is no real regulation, just a division of potential which can change depending on the load impedance.
2. Linear regulator (see my original answer below)
3. Linear BEC - basically a linear regulator in "fancy dress", with the input and output capacitors included and some other components
4. Switching BEC - as per Chuck's answer

For a comparison of linear and switching BECs, please read Linear BEC’s versus Switching BEC’s.

#### Original answer - Use a regulator

Don't use a voltage divider (i.e. two resistors in series) as it is not particularly efficient and the potential differences can change depending upon load impedance.

Use an IC designed for the job, that is to say, a voltage regulator instead. They will give you a constant voltage for a (relatively) wide range of loads. They are very cheap too.

Here is a 7805, which is a 5 volt regulator:

They come in a range of voltages, where 3.3, 5, 6, 9, 12 and 15 volts are all common values, with the respective model numbers of 7803, 7805, 7806, 7809, 7812, 7815.

You use like this:

You can connect different value regulators (simultaneously) to the same voltage source, to get a range of voltages. That is to say, if you need both 6 V and 12 V then use a 7806 and a 7812, both with their respective Vin pins connected to your 18 V source. Also, as pointed out in proan's comment, use the same, or common, GND, for both regulators (and perpherials/sensors, etc.).

Read the datasheet to get an idea of typical applications. Also check that the regulator can handle the currents that you expect to draw from it - different variations for the same value regulator have different current capabilities.

The capacitor values are typically given by the manufacturer - there is no real need to calculate them. Preferably, one should use electrolytic capacitors.

#### Driving the motors

This seems a little beyond the scope of your question and is probably better asked as a different question. Nevertheless, (again) as pointed out in the comments, it is worth mentioning that you will also need a specific motor driver circuit, for the motors. You can't drive the motors directly from the Arduino - you'll kill the Arduino.

• 3 other comments to add to the good answer here: 1. You don't mention a motor driver circuit, but you'll need one. Otherwise you'll fry your Arduino. 2. Make sure you are using a common ground for all of you components. 3. The battery voltage is only nominally 9V, and in practice will be above or below that value. Do not use battery voltage as any kind of known voltage. Feb 8 at 21:26
• All good points. I'd forgotten about the motors mentioned in the question. Feb 8 at 21:46
• Thank you for your answer. Yeah, I was planning to use a MOSFET to power the motors directly from the batteries...the Arduino would be used to just control when to turn the motors on or off. Overall, I am trying to build an RC car (first time I am building something more comple than just an LED circuit haha). Question however, the voltage regulators will just output the right voltage. Will they output the right current automatically, or do I am I overthinking it? Feb 11 at 22:18