6
\$\begingroup\$

I have a device that is powered by 4 AA (4x1.5V=6V) batteries, but I want to power it with a 12V battery. The device measures its input voltage to determine the battery level. I only need to know if the battery is low.

The question is: what is the best way halve the battery voltage so I can use it to power the device, without losing the possibility for the device to measure the battery level (e.g., when using an LDO, the output voltage must follow the input voltage)? In my case, "best" means:

  1. Using THT & easy to source components (I am just a hobbyist and would like to avoid soldering SMD parts).
  2. Minimal impact on battery life (low Iq).

The maximum input voltage is 9V (a higher voltage will damage the device). The device uses 50mA when active and 10uA when in sleep mode (99.9% of the time). I am able to reprogram the device (i.e., change the input voltage level software setpoint at which the device thinks the battery is low). I am only able to modify the software, not the hardware (the device is sealed in epoxy, but luckily still has its programming pins exposed).

Options I considered:

  1. Use a voltage divider. However, this will waste a lot power.
  2. Use an LDO with an adjustable output voltage. However, usually, the LDO Vadj pin is connected to the LDO output and a resistor to set the voltage (forming a feedback loop), not to an external reference voltage. But maybe there is a way to fool the LDO so it takes the input voltage into consideration?
  3. Use a voltage tracking LDO, like TPS7B4256. But I haven't found a similar device in a THT package.

This question seems not very exotic; I can imagine that many people have solved this already but I haven't found any answers on the forum, Google/, etc. I hope some of you can point me in the right direction!

\$\endgroup\$
15
  • \$\begingroup\$ Most people solve this with a switch mode power supply (SMPS). But with such low current most of the time, you can probably get away with a modern LDO. Just make sure it can support spikes on the battery rail, especially when the car is running and alternator is active. Maybe get one that can support at least 16V or 20V on its input? Have you ever measured your car battery? Mine is frequently above 14V. I don’t understand your point #2. Don’t you want the output fixed at 6V? You shouldn’t need anything special in your LDO besides it being able to support the input voltages I mentioned. \$\endgroup\$
    – Ste Kulov
    Commented Jun 9 at 7:42
  • \$\begingroup\$ It would be much simpler to use a fixed voltage output LDO to power the device, but I assume you want the variable output voltage feature so it can display the battery voltage while being powered by the LDO, right? \$\endgroup\$
    – bobflux
    Commented Jun 9 at 8:27
  • \$\begingroup\$ @bobflux you are correct, the LDO must track the input voltage \$\endgroup\$
    – Juicer
    Commented Jun 9 at 8:31
  • \$\begingroup\$ @SteKulov using a fixed value LDO does not solve the question: the output of the LDO must change with the input, so I can measure the battery voltage. \$\endgroup\$
    – Juicer
    Commented Jun 9 at 8:32
  • \$\begingroup\$ @Juicer It sounds like you want to have your cake and eat it, too. You may use a car battery. But you may use something else. And regardless of its chemistry or topped off voltage (for example, \$12.6+ \:\text{V}\$ for lead-acid car battery or other voltages for other chemistries) you want it to magically provide the (6) AA battery curve used by the device to "determine the battery level." I will enjoy seeing what someone comes up with, if that's the goal. Kind of a swiss-army knife to accept input sources. Cool. \$\endgroup\$ Commented Jun 9 at 8:43

5 Answers 5

8
\$\begingroup\$

Sorry, mobile so no schematic. I’ll draw one later.

Edit: still mobile but stole a schematic from All about circuits (link)

enter image description here

Feel free to adjust up the 10 kΩ to one or two orders of magnitude to save on battery drain.

How about an ST TSX631 opamp in buffer configuration with a 1:2 voltage divider on the input? Supply Iq is low enough for most battery applications and can supply 50 mA on the output. There are others too. Search on Digikey for something which can take your entire input voltage range, can supply the current, low Iq and in a capsule you like.

It would track your input voltage with division ratio.

https://www.st.com/content/ccc/resource/technical/document/datasheet/b5/7c/ad/c8/37/4f/4b/78/DM00078052.pdf/files/DM00078052.pdf/jcr:content/translations/en.DM00078052.pdf

\$\endgroup\$
10
  • \$\begingroup\$ hmm... ok this (using opamps, buffer configuration etc) is new territory for me so allow me some time for a proper response. Thanks! \$\endgroup\$
    – Juicer
    Commented Jun 9 at 9:12
  • \$\begingroup\$ The TSX631 works like a charm (tested it with LTspice); next step for me is to look for a similar THT component, but the alternatives I've found (rail-to-rail opamps like LM6142, OPA251 and LT1490) all fall short in the simulation. Makes me think I'm missing some important properties I should filter my search with (other than input voltage range & output current). Do you have a suggestion for a THT op-amp? \$\endgroup\$
    – Juicer
    Commented Jun 9 at 17:29
  • \$\begingroup\$ @Juicer : no necessity to limit yourself to rail to rail op-amps : you are working right in the middle of the range, so from this point of view, most op-amps will do. Just avoid the few (often old or high voltage) that are limited to very far from the rails (like >3V from the rails). For your application, I would add an extra filter for the supply current (ie the current consumed by the op-amp without output current) : best avoid anything >2µA if you want your op-amp to have minimal impact on your o-load consumption \$\endgroup\$
    – Sandro
    Commented Jun 9 at 18:04
  • 1
    \$\begingroup\$ Solder an SMD part to a DIL adapter PCB? \$\endgroup\$
    – winny
    Commented Jun 9 at 18:54
  • 2
    \$\begingroup\$ @MicrocontrollerEnjoyer ADCs don't have that high of an input impedance, at least not at high frequency. They have significant input capacitance, and depending on how the S/H is configured, that can throw measurements off. \$\endgroup\$
    – Hearth
    Commented Jun 10 at 4:04
4
\$\begingroup\$

enter image description here

Using only easy to find parts could mean discretes. Thus here is a simple discrete voltage regulator.

R5 R6 form a 1:2 voltage divider ; D1 should be a 8.2V Zener diode to limit output voltage. The rest is a discrete opamp with a differential stage and MOSFET as an output. Any N-MOSFET from the junk parts bin should work provided it operates within its safe operating area.

Idle current use is 1mA. It can be reduced to 200µA by setting R1 to 56k instead, this will make it a bit slower which is not a problem as the output cap is quite large.

R4 is not a component you should add, it simply models the equivalent serial resistance of the capacitor which is required for stability. Thus C1 should be a general purpose cap which should give the correct amount of ESR. 100µF should work fine.

It is definitely not a low dropout regulator due to the NMOS, but you've got at least 6V to waste so it's not a problem.

There is no short circuit protection on the output.

Here's the 100µA version (90µA for the regulator and 10µA for the load):

enter image description here

...and the 20µA version (10µA for the regulator) which is a bit pushing it, as there is no point going below the battery's self discharge. It requires large values for R5 R6 so I switched to MOSFETs for the differential pair to avoid base current.

enter image description here

Transistors are BC547/557C to keep good hFe at low Ic, and MOSFETs are jellybean like 2N7000.

As expected, at lower idle currents, the error amp loses transconductance and gets slower, so performance is worse.

\$\endgroup\$
2
\$\begingroup\$

Emitter follower using NPN transistors

schematic

simulate this circuit – Schematic created using CircuitLab

The output voltage will be:

$$ \mathrm{ V_{out} = V_{in} \times \frac{R_2}{R_1 + R_2} - 2 \times V_{be} - \frac{I_{out}}{\beta^2} \times \frac{R_1 \times R_2}{R_1 + R_2}} $$

$$ \mathrm{ \approx V_{in} \times \frac{R_2}{R_1 + R_2} - 1.2\,V} $$

Main advantage is the simplicity and low quiescent current, which is 4µA with the values shown. Downside is that the output voltage will vary by about 0.5 V depending on output load and transistor temperature.

\$\endgroup\$
3
  • \$\begingroup\$ Interesting idea and indeed very simple/clean! But when the device is in sleep mode (Iq 10uA, load simulated by 720k resistor), the output voltage goes up to 8.4V... \$\endgroup\$
    – Juicer
    Commented Jun 10 at 11:13
  • \$\begingroup\$ @Juicer Interesting - is that on a breadboard? Because the CircuitLab simulator estimates just 7.1 V. But I agree that the stability at low loads is not going to be great. \$\endgroup\$
    – jpa
    Commented Jun 10 at 11:17
  • \$\begingroup\$ Ah my bad, it is indeed 7.1V but I also changed Vin to 14V (higher battery voltage). But indeed the low load stability won't be good enough for this application. \$\endgroup\$
    – Juicer
    Commented Jun 10 at 11:21
1
\$\begingroup\$

Oh no, this ain't easy.

The best way would be an SMPS that has an algorithm for controlling voltage output that's based on input voltage. Proportional output (let's say halve output always) won't work, it has to be a more complex linear formula.

The reason being is that 1.5 volt batteries are actually 1.6 volts full, 1.0 volts empty (well some devices may draw them down to 0.9 volts but at 1.0 volts you get a very large share of the capacity). So what you want:

  • Lead-acid battery that's 13.5-14.7 volts when charged, 13 volts when full, 11.5 volts when empty.
  • Output range from 6.4 volts when full to 4.0 volts when empty

So if you multiply the voltage by 0.49, then you get 6.37 volts when full (close enough), but 5.6 volts when empty (which falsely shows too much capacity). Ain't gonna work.

So the formula you want is \$V_{out} = V_{in} \cdot 1.6 - 14.4\ \mathrm{V}\$

This formula gives 6.4 volts from 13 volts and 4 volts from 11.5 volts.

However, if you must support operation when the lead-acid battery is being charged, then you must cap the output to 6.4 volts, because from 14.7 volts you would get 9.12 volts which is way too much and would probably destroy your battery-operated device.

I guess the easiest way would be to create a buck DC-DC converter with an AVR microcontroller that you can test on an Arduino and create the algorithm there. Then you can implement the formula and maybe capping the output voltage to 6.4 volts. You need some experience in creating buck converters and control algorithms for them.

I guess given the very low power draw (50 mA), you might also consider a transistor in emitter follower configuration for dropping the voltage, with the linear equation being implemented using an operational amplifier analog math circuit. However, this wouldn't cap the output voltage to 6.4 volts, you need some way to figure out how to implement the capping. Maybe some simple circuit could do that as well.

\$\endgroup\$
7
  • \$\begingroup\$ Thanks for taking the time to dive into this! Something I haven't mentioned in the original question is that 1) I only need to measure if the battery is running empty, and 2) I am able to reprogram the device. Therefore the difference betweens types of battery (characteristics) can be circumvented by changing a setpoint in the software. \$\endgroup\$
    – Juicer
    Commented Jun 9 at 9:05
  • \$\begingroup\$ Ok, then you can multiply the voltage by 0.49 which means a voltage divider for providing the target voltage, and a transistor in emitter follower configuration with its base voltage being controlled by an op-amp that compares the target voltage to the output voltage, with negative feedback. Then you just have to set the low battery alert to a suitable level, much higher than the usual 1.0 volt per AA cell (4.0 volts for 4 cells). \$\endgroup\$
    – juhist
    Commented Jun 9 at 9:07
  • \$\begingroup\$ OF course, the emitter follower configuration wastes half of the energy, but given the lower power draw (50 mA) maybe you can tolerate it. Besides, SMPSes have idle energy waste as well... \$\endgroup\$
    – juhist
    Commented Jun 9 at 9:08
  • 3
    \$\begingroup\$ @Juicer I'd recommend that you do the opposite of what you have been doing. Stop "try[ing] to limit the specs to what I assume is needed". Instead, write more than you think is needed. Things coming out in drips and drabs isn't a good thing. And you know the situation. We should not have to pull every single tooth, one at a time. Now you've added that you only need to know about "running on empty". Which is a specification you missed adding. Dredge that swamp, and drain it, and let us see what's down there! \$\endgroup\$ Commented Jun 9 at 9:08
  • 2
    \$\begingroup\$ @Juicer Okay, that's your circuit then. See "A High-Current Voltage Follower" here: allaboutcircuits.com/video-tutorials/… and the R_load is your device, and the V_in is made by a simple resistor voltage divider. Be sure to use at least 100KOhm resistors so that the resistor voltage divider wastes as little current as possible. \$\endgroup\$
    – juhist
    Commented Jun 9 at 9:41
0
\$\begingroup\$

A trick that can be used is to use a bipolar PNP transistor as a switch in the positive side of a potential divider from the source .

With careful choice of resistor values - transistor off, leakage current only. Transistor on, drain base current + divider chain current. Voltage drop is saturation voltage of transistor..

Turn on the switch a short while before measurement, time to settle, sample, turn off switch. If I were using an STM32Fxxx MCU, this could all be programmed in hardware on a counter timer,even including the ADC trigger delay.

Then the supply voltage regulator output does not have to be exactly half the input source voltage , just sufficiently high to allow the output of the measurement potential divider to be within the ADC input range . So then a fixed 5V or 6V switchmode would do.

\$\endgroup\$
1
  • \$\begingroup\$ Mike - Hi, Thanks for trying to help. However your proposal does not meet a restriction stated (albeit not prominently) by the OP, so it isn't a valid answer in this case. || I was going to propose the same type of solution, until the OP stated in a comment that they are: "only able to modify the software, not the hardware (the device is sealed in epoxy, but luckily still has its programming pins exposed)". So they cannot add the required new control signal to switch the bipolar PNP transistor that you propose (nor presumably the new connection to an ADC input that this proposal requires). \$\endgroup\$
    – SamGibson
    Commented Jun 10 at 11:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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