-1
\$\begingroup\$

Can I use voltage divider to reduce voltage from a set of battery connected in series which is 115 volt dc to 5 volt DC to use it as an input to a microcontroller and compare the value to turn on or off a UBS device?

What are the losses and is this possible without causing the resistors to heat up?

\$\endgroup\$
7
  • \$\begingroup\$ \$P=VI\$, and \$I=\frac{V}{R}\$, gives us \$P=\frac{V^2}{R}\$. So let's say you use \$R_1 + R_2 = 10 Ω\$. You'll get 1.3kW, that's not good at all. Maybe \$R_1 + R_2 = 100k Ω\$. You'll get 132 mW, that's much better, I'd go for \$R_1 + R_2 = 1M Ω\$. \$\endgroup\$ Jul 22 '17 at 14:38
  • \$\begingroup\$ @HarrySvensson tried to salvage what there is to salvage of my comment to an answer. Will delete my comment to avoid further confusion, sorry. \$\endgroup\$ Jul 22 '17 at 14:51
  • \$\begingroup\$ not a very efficient way to extract 5V \$\endgroup\$ Jul 22 '17 at 16:29
  • 2
    \$\begingroup\$ @TonyStewart.EEsince'75 this question is inefficient. \$\endgroup\$ Jul 22 '17 at 17:56
  • 1
    \$\begingroup\$ also it is insufficient. \$\endgroup\$ Jul 22 '17 at 18:07
3
\$\begingroup\$

Yes you can but only if the microcontroller ground is connected to the battery ground. This may or may not be a good idea in your application. Make sure that fault currents can't find a return path to the battery through your micro.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Voltage divider circuit comprising R1 and R2.

You can calculate the power dissipated using \$ P = VI \$ or it's variants \$ P = I^2R \$ or \$ P = \frac {V_2}{R} \$. Choose a resistor with an adequate power rating.

It is worthwhile reading the resistor datasheet to understand what temperature the the resistor will be at in still air at that power dissipation. For example, I remember a colleague being delighted to find a compact wirewound resistor rated for 4 W. Great was his surprise when he realised that 4 W would cause the temperature to rise to over 200°C!

Note that if R2 becomes disconnected at either end you will be putting 110 V DC into your GPIO and this will destroy it.

\$\endgroup\$
1
\$\begingroup\$

To pick up what Harry started:

So let's say you use R1+R2=10Ω. You'll get 1.3kW, that's not good at all. Maybe R1+R2=100kΩ. You'll get 132 mW, that's much better, I'd go for R1+R2=1MΩ.

Assuming your MCU input current is above a couple µA:

you can't go for \$R_1+R_2=1M\Omega\$, because you cannot let the resistive divider be a loaded one; the "standby" current \$I_0\$ through \$R_1\$ needs to be much larger than the current draw of the microcontroller.

Now, assuming \$I_{MCU}=1\text{mA}\$ , and thus\$I_0 = \frac{110\text V }{R_1} \gg I_{MCU}\implies R_1 \ll \frac{110\text V }{I_{MCU}}=110\text{ kΩ}\$. Your \$R_1\$ must then be much smaller than 110 kΩ, and thus, your losses become ugly, as they will be significantly above 132 mW – depending on the voltage stability your microcontroller needs, you won't end up with less than ¼ W. And that already demands for relatively power-fast resistors.

Now, more likely: The input current is significantly below 1 mA, so Harry's approach is fine.

\$\endgroup\$
1
  • \$\begingroup\$ @ThePhoton oh. Sorry. Where was my mind. \$\endgroup\$ Jul 22 '17 at 15:46
1
\$\begingroup\$

I'm going to go off the deep end and provide a different option to consider.

A few things strike me immediately about the stated problem:

  1. Voltages are high enough that they can damage the microcontroller.
  2. High accuracy doesn't appear to be required.
  3. It probably does not need to work down to zero volts at the battery.

So I'd like to opto-isolate here, rather than use a resistive divider (for some reasons that have been discussed already.) But I also don't want something that might draw a lot of current from the batteries nor do I want a lot of complexity, either. I'd like it relatively "invisible" to the batteries (very low load) and cheap and to use readily available parts. I also want an easy-to-interpret signal for the microcontroller with adequate precision.

This is probably what I'd design for it:

schematic

simulate this circuit – Schematic created using CircuitLab

The two dashed boxes show the isolation regions.


The circuit is just a relaxation oscillator.

On the left side is \$R\$ (represented by the sum of \$R_1\$ and \$R_2\$) and the \$C\$ (just \$C_1\$.) So \$C_1\$ charges up through that resistor pair. As it does so, the rest of the circuit (not including the microcontroller portion) monitors that capacitor voltage and self-triggers to discharge it when the voltage across \$C_1\$ gets large enough. In effect, it is a self-triggering SCR.

Ignoring the microcontroller side of things, a behavioral model would be something like this:

schematic

simulate this circuit

Drawing from the earlier schematic: \$Q_1\$, \$D_1\$, \$R_5\$, \$R_6\$, and \$R_8\$ make up the voltage trigger. \$Q_2\$, \$D_2\$, \$R_7\$ and \$Q_3\$ make up the SCR. \$C_2\$ is the positive feedback needed to pull harder on the base of \$Q_1\$ and hold the trigger ON long enough to get the job done.


Returning to the first schematic again...

As drawn, average power draw from the battery system will be in the single-digit milliwatts range, even at full input voltage applied; with current draw in the tens of microamps.

I used two resistors (both \$R_1\$ and \$R_2\$) here just in case of an accidental short (with a screwdriver, or something.) That pair can be turned into a single resistor, though.

There's little dependence on specific values, it is more about relative values. While \$C_2\$ is needed for its positive feedback, it also isn't critical. Anything from ten times smaller to ten times larger and it won't hurt that much. (The circuit is pretty robust. But with some of these high valued resistors, it is possible to put enough dirt and grime into it and cause problems. Just keep it relatively clean, if possible.) Making it bigger will widen the low-going pulse. Making it smaller will narrow it.

The 6N137 is a nice opto-coupler part, sourced from multiple manufacturers, has very good isolation (differs depending on whose part is used), and is probably over-kill. But it is cheap and widely used, so I dropped it in. This galvanically isolates the higher voltage battery system from the microcontroller.

\$R_3\$ is a current-limiter part. The 6N137 needs more than \$7.5\:\textrm{mA}\$ per pulse. But the trigger and scr switch just dump all the charge in \$C_1\$, so a resistor limiter is probably helpful here. Use a lower value if regular pulses aren't coming through.

In looking at the SCR itself, \$D_2\$ can be thought of as a diode-connected PNP BJT (ignoring \$R_7\$.) If looking at it that way, then \$Q_3\$ and \$D_2\$ form a current mirror. But an imbalanced one where \$D_2\$'s current will be much larger than \$Q_3\$'s collector current (even without the added \$R_7\$ to further imbalance it.) \$Q_3\$'s collector is needed to turn \$Q_2\$ on, but it only needs to be a small percentage of the SCR current to do that. So this is a mirror with a current gain that is a lot less than 1, as desired.


The above circuit will provide low-going pulses to the microcontroller pin. These pulses will probably be tens of microseconds wide. The number of pulses per second (or the time between each pulse) relates to the voltage. The relationship will need to be calibrated for any given circuit, because part variations will of course have a modest impact on the timing. But this is an easy step. A one-point calibration at the desired "threshold" may be sufficient, using a known voltage source, or else use different calibration points and use a developed formula. I believe that \$V_{BAT} \propto \Delta t\$, except that as the time period between pulses gets smaller the voltage must have been larger and therefore the proportional constant must be negative. But this should be pretty easy to work out, regardless.

\$\endgroup\$
0
\$\begingroup\$

If microcontroller does nt use much power then we can use the same concept as resister (not capacitive) transformerless power supply uses. The wattage of resistor and losses will b the main issue to deal with.

\$\endgroup\$
1
  • 6
    \$\begingroup\$ nice answer, could you please make it a little better to read ("b" should be "be", "does nt" should be "doesn't" or "does not", "resistor" is right, "resister" is wrong, and maybe you'd want to expand on what the loss would be given a randomly chosen resistive divider! \$\endgroup\$ Jul 22 '17 at 14:37
-2
\$\begingroup\$

Instead of directly use a voltage divider to cut down a voltage of 110 V to 5 V, you can use voltage regulator such as 7805. Since, p = (V*V)/ R,we can say that resistance is inversely proportional to the power. So that , increasing resistance to drop a voltage to the required level, will drastically reduces the power dissipation. Using an IC 7805, is the most effective way instead of relying on resistors.Resistors may not be consistent in voltage divider. So, very easy and effective idea is using a voltage regulator.

By this concept, you need not to drop down a voltage to required level precisely say 5V. Instead make a voltage divider to drop around 20V which may reduce the burden on resistors and will be within the operating voltage range of 7805. According to data sheet 7805 can handle upto 25V as input for minimal current consumption of 550mA which would be enough for micro controller. Additionally there will be no fluctuations in input voltage to the microcontroller.

Let's enter into the calculation. Say, we are going to use 500k ohm resistors in voltage divider circuit. In order to drop a voltage of 110 to 20V, we need to use resistors of R1 and R2 respectively, 409 K and 91 K. Using 400K and 100K is also allowed.

Since we use 500K, power consumption will be 24mV which is very low. So, using quarter watt resistor is enough.

This dropped 20V can be given as input to the 7805 which ultimately gives 5 V as output with out any fluctuations.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ The OP wants to sample voltage, not make a power supply. \$\endgroup\$
    – user133493
    Jul 23 '17 at 4:27
  • \$\begingroup\$ So what? Can't that sample voltage be constant ? \$\endgroup\$
    – CNA
    Jul 23 '17 at 5:28
  • 1
    \$\begingroup\$ If the sampled voltage can change, and is fed into a regulator, the change will be lost. Using a voltage regulator is useless for level detection. \$\endgroup\$
    – user133493
    Jul 23 '17 at 5:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.