Voltage regulator INHIBIT mode application usage - Page 1
Forum section: electronics / projects

author: MissingLink_NZ
author_rank: Newbie
timestamp: February 27, 2023, 09:46:27 am
content: Hi all,Some time ago I designed a basic PCB to measure the battery voltage of my car. The PCB is plugged into the cigarette power socket permanently while the PCB itself uses an L78L05 fixed voltage regulator (5V output) to power my PIC16F1823 MCU. While my car is a daily driver, there are occasions I might not use it for a few weeks when traveling for work, as a result when I return, my car battery doesn't have enough juice to turn my engine over to start. Now I realize I could simply unplug my PCB to avoid this (which I have since done) for those long trips to avoid another dead battery - however, this results in not improving my electronics design skills. So, now I get more to the point. I have since discovered the L4931 which is also a fixed voltage regulator BUT with the added functionality of INHIBIT mode. My understanding is this function will completely turn off the V(out) using zero to very little current with inhibit enabled - presumably enabled by the MCU. BUT, once Inhibit is enabled, how would the MCU be able to turn V(out) back on, if the MCU has no power to instruct it to. Obviously, I am missing something, an external circuit perhaps?? Is anyone able to point me in the right direction where I can find much more information on working with a voltage regulator inhibit mode? There seems to be very little application assistance, including by the device manufacturer (ST Microelectronics).Many thanks in advance!

author: Jeroen3
author_rank: Super Contributor
timestamp: February 27, 2023, 10:15:42 am
content: Some external trigger, like a button, disables INHIBIT and latches it until the MCU turns it on again. Some simple flip-flop logic or some chip like MAX16054 can do this. You may need a secondary standby 5V LDO for this.However, since your target is a car you could maybe make some automatic-inhibit if the voltage is below a threshold (eg: engine not running) using an TL431? Depends on the type of the car.

author: Siwastaja
author_rank: Super Contributor
timestamp: February 27, 2023, 11:15:41 am
content: The best way, IMHO, would be to not bother with regulators with enable inputs, but just pick a regulator with smaller quiescent current, and then utilize the sleep modes of the microcontroller to get the current consumption low enough so that it does not drain the batteries.Not sure about that particular PIC, but something below 100µA is usually easily achievable and it would then take ages to cause any damage to a lead acid battery - it discharges on its own faster than that, anyway.

author: Ian.M
author_rank: Super Contributor
timestamp: February 27, 2023, 11:46:38 am
content: Exactly!Lead acid batteries have a typical self-discharge of approx. 4% per month. For a 50AH battery, that's equivalent to about 3mA continuous load. Get your standby current down to a small fraction of that by using a lower quiescent current regulator and your battery meter will have negligible effect on the battery discharge rate when the vehicle is unused. No need to power off the PIC as its sleep current or even minimum clock run current is orders of magnitude lower than required. Wake up on ignition switch or any door switch triggering the courtesy light circuit.

author: CountChocula
author_rank: Unknown
timestamp: February 27, 2023, 02:33:40 pm
content: I think we need a bit more information about the use case—the solutions that others have proposed will address some of the power requirements, but not all, because I assume that you want some kind of display active so that you can actually read the voltage while you're in the car, and that is likely to eat up a considerable amount of power unless you can turn it off when you're not in the car. Can you maybe tell us a bit more about how you would want this to work?TBH, I'm surprised that the power adapter in your car is active while the engine is not running… in both my cars, it goes off after a while unless you put the car in the accessory mode (presumably precisely to protect against overdischarging the battery).—CC

author: MissingLink_NZ
author_rank: Newbie
timestamp: February 28, 2023, 09:46:28 am
content: Hi CountChocula,Yes, you are spot on, I am using a small OLED to display the voltage readout. In hindsight, this was a very big detail to leave out of my initial topic question! My car is an older 2005 BMW E90, which does maintain constant power to the cigarette lighter - funny you ask that question as I also have a somewhat 'classic car' (Japanese 1980's car) that does turn off after around 3 minutes.In regards to how I would like this to work: Basically, what I am looking/hoping for is being able to disable all power or at least reduce current consumption via the MCU to self-power off (both the MCU and OLED) after a designated period of time where the car battery is no longer receiving the running voltage of around 13.5+ volts. But when the car is started and the running voltage is increased back to approximately 13.5V+ then the MCU and OLED operate again. This is why I thought of the voltage regulator using the Inhibit feature. While enabling the inhibit function to shut off V(out) is easy enough, using a circuit to detect the voltage increase at start-up to disable the inhibit function and thus repowering the MCU and OLED is something I am struggling to get my head around.Any thoughts would be very much appreciated!

author: MathWizard
author_rank: Super Contributor
timestamp: February 28, 2023, 11:20:49 am
content: How much less current would a 3-4d 7-segment LCD use ? Can they run directly from the MCU also if they are programmed for it ?

author: Siwastaja
author_rank: Super Contributor
timestamp: February 28, 2023, 11:49:23 am
content: Simple LCDs can run with almost nothing, just some microamperes. (This does not apply to those larger character LCDs which are not designed for low power consumption.)OLEDs, LEDs, or any display which produces light, is going to consume too much current in a vehicle which sits unused for a long time. You have to have a way to turn the display off.A good compromise is a simple LCD with backlight, so that it's still readable without the backlight, and have a button which enables the backlight for some time.In a car, you can also just measure the battery voltage (using a resistor divider before the regulator; use large resistor values to prevent this divider from draining the battery) with the microcontroller, and turn the display (or backlight) on when the voltage indicates the alternator is running (say, over 13.5V).With LED display, you can also just quickly blink the voltage value for example every 5 seconds, to get average current consumption down.

author: Ian.M
author_rank: Super Contributor
timestamp: February 28, 2023, 03:09:02 pm
content: Your PIC draws max 60uA running from its nom. 31KHz LFINTOSC, so when the measured battery voltage drops below 13V for over five minutes, turn off the OLED display, switch to that slow clock, and loop repeatedly measuring the battery voltage, waiting until either a button press or a sudden change of measured battery voltage (which would indicate an engine start or some circuit drawing significant current being activated). Then resume normal speed operation, switch the OLED back on, and clear the five minute timer.You can probably get away with very high value resistors in the battery sensing potential divider so it draws under 100uA from the battery, by putting a 0.1uF capacitor to ground at the ADC input to supply the pulse of current needed to charge the internal sampling capacitor, as the input leakage current is (IIRC) max +/-1uA. but worst case you may need a micropower CMOS RRIO OPAMP to buffer the potential divider.

author: CountChocula
author_rank: Unknown
timestamp: February 28, 2023, 03:57:50 pm
content: I think Ian's solution is probably going to result in the least power consumption. If you prefer something more… analogue, you can also use a comparator to check whether the engine is on and activate your circuit accordingly.As an example, I attached a schematic below that should work and draw less than 1mA with the engine off; you just need to tweak RV1 so that the TL431 flips its output low when the car is running, and keep it high when it's not. Do keep in mind that the voltage probably doesn't drop to the “engine off” value right away, so it might take a few seconds for the switch to trigger. I picked the first PMOS that I could think of, but anything that is not logic-level should work fine here.I hope this helps!