Battery powered designs & sleep  mode - Page 1
Forum section: electronics / projects

author: leonhart88
author_rank: Regular Contributor
timestamp: February 10, 2016, 03:59:56 pm
content: Hey Guys,I had a quick question about battery powered designs coupled with sleep modes. I've designed a battery powered infrared transmitter for a project and it's working great. The design consists of a PIC18F25K80 mcu, and a TPS73201DBVR regulator. Everything is running at 2.2V regulated from 2 x 3.6V AA batteries (these are special kinds of AA batteries @ 3.6V). The TPS7320 was chosen for its current output as well as the low dropout to maximize battery life. The design has a power button that, when held for 1.5 seconds, will put the mcu to sleep. If this button is held down for another 1.5s, the mcu will wake up from sleep.I'm now characterizing the current consumption. Although I was careful in selecting components and designing my circuit for minimal power consumption, I seem to have totally missed the fact the TPS7320 has a ground current of 400uA. So now when I put the device into sleep, I'm measuring around 380uA with a uCurrent. Obviously the limiting factor here is the ground current of the regulator.All in all, it seems OK with my current design, and the device will still last almost a year without needing to change the batteries. However, it would be nice to know of a solution for future projects.If I could use the enable pin on the TPS7320 I could minimize current during sleep. However, because all my circuitry (including the mcu) is tied to the output of this regulator, if I do this, the mcu will stop functioning. So my question is, what solutions do I have for minimizing current other than replacing the regulator with one that has lower ground current (I seem to recall it was difficult to find regulators with the specs I needed in terms of dropout voltage, current output, and regulated voltage output)?My quick thinking was that I could have another smaller regulator dedicated for powering the mcu, and then the mcu could control the enable pin on the TPS7320, but I'd be curious to look at other solutions too.Thanks!

author: Ian.M
author_rank: Super Contributor
timestamp: February 10, 2016, 04:27:57 pm
content: If there is enough bulk capacitance on the Vdd rail, it may be possible to use the HLVD module to monitor the Vdd voltage, and shut off the regulator when it enters SLEEP mode. Vdd will drop slowly due to the sleep current consumption then, at a voltage a little above the minimum operating voltage, the HLVD module will wake up the PIC, which will reenable the regulator, wait till Vdd is stable, then shut it off again and reenter SLEEP. You will have to arrange for the regulator enable pin to be pulled high if Vdd<1.8V (possibly using a micropower supply supervisor) otherwise it will never power on in the first place.However a separate regulator for the PIC is probably a better idea as not only do you save the current the main regulator uses during periodic wakeup events, you also save the shutdown current of all the other devices on the 2.2V rail. You may even want to consider replacing the main regulator with a switching one for more efficient battery use in run mode.

author: Kalvin
author_rank: Super Contributor
timestamp: February 10, 2016, 05:09:59 pm
content: You could run the PIC from the first 3.6V battery (the lower half) as the operating voltage 1.8V – 5.5V. Then you could use the enable pin to turn on/off the regulator, which is driven by the two 3.6V batteries connected in series.Ps. I do not quite understand why everything is running at 2.2V as your power supply is 7.2V so you are wasting energy very heavily into the linear regulator.Edit: Apparently you are running them in parallel

author: Fungus
author_rank: Super Contributor
timestamp: February 10, 2016, 05:38:50 pm
content: Quote from: leonhart88 on February 10, 2016, 03:59:56 pmIsn't that a complete waste of a battery? One of those batteries will donothingexcept heat up the voltage regulator...You could run the PIC directly off a single battery.Put in a suitable constant-current circuit for the IR transmitter (I assume that's what runs at 2.2V) and you don't need a regulator at all.Edit: Assuming you're running the batteries in series at 7.2V...

author: Brutte
author_rank: Frequent Contributor
timestamp: February 10, 2016, 06:00:40 pm
content: QuoteThe LDO is supposed to deliver a fixed 2,2V during full battery discharge cycle? I hope the batteries are in parallel, not in series..I think your LDO is not needed there. As mentioned that PIC can operate directly from the battery. If some other circuitry requires precise regulation then you can use that LDO for that and power it off during idling periods. But for powering a PIC this LDO is pointless.

author: leonhart88
author_rank: Regular Contributor
timestamp: February 10, 2016, 06:59:52 pm
content: Thanks for everyone's inputs. Yes, the batteries are in parallel, I should have stated this in my first post.There is other circuitry on the board that would need the 2.2V. However, powering the PIC directly from battery is a possibility. The only issue is that I'm using an analog input on the chip, which uses the voltage rail as the reference, to measure the battery voltage. Obviously if I power the PIC from the battery, this reference will vary. I know the PIC has an internal reference, but it seemed to be much noisier than using the output from my LDO at the time. I'll think about it and see if I can figure something out.So sounds like two good options are to either run the PIC directly off battery, or have a 2nd regulator for the PIC. Are there any issues with running microcontrollers off unregulated supplies (ie. straight from batteries)?

author: Fungus
author_rank: Super Contributor
timestamp: February 10, 2016, 07:05:03 pm
content: Quote from: leonhart88 on February 10, 2016, 06:59:52 pmNope. I do it all the time.

author: Kalvin
author_rank: Super Contributor
timestamp: February 10, 2016, 08:04:44 pm
content: Quote from: leonhart88 on February 10, 2016, 06:59:52 pmYou can first measure the internal bandgap voltage 1.024V using the VDD as reference. You should get pretty good accuracy. Optionally, you can take a few measurements and compute an average.

author: ve7xen
author_rank: Super Contributor
timestamp: February 10, 2016, 10:01:00 pm
content: What about just having the power button connect to the regulator EN pin as well as a microcontroller input. When the device is off, the regulator enable is pulled down (or up) to keep the regulator off. When the user presses the button, the regulator starts and the PIC code runs, waits for the hold-down time, and then asserts an output also connected to the regulator EN, which keeps the regulator running. When the user later presses the button again, the dedicated uC input detects this and set the output to EN pin to HiZ, shutting the circuit down.Even if you wanted to use this button for other input during operation I don't think this would cause any issues.

author: KL27x
author_rank: Super Contributor
timestamp: February 10, 2016, 10:08:26 pm
content: To measure battery voltage just reverse it. Use the battery VDD as your ADC reference and measure the regulated 2.2V output. Which obviously wont change, but the reading relative to your adc positive reference will increase as the battery voltage drops. Then u don't need to use the noisy internal reference. You will have to change some code but the accuracy will be the same. And you can reduce your bom by two resistors.If u manage to get suitable result with FVR u can use that instead of the 2.2V rail. FVR can be used as an ADC input, too. So now u save 2 resistors and one trace. Measuring Vdd/Vbat doesn't take any external components or pin connections.

author: leonhart88
author_rank: Regular Contributor
timestamp: February 17, 2016, 09:36:58 pm
content: Thanks again for everyone's input! Really appreciated. I won't be able to power the mcu directly from the battery voltage, as one or two of the ICs the mcu is interfacing with cannot take the 3.6V on their input pins. Since everything is working already I want to make the change that requires the least amount of work. The cost of adding another regulator or IC is not significant so I think I will just add a dedicated regulator for the mcu. This won't require a lot of re-work on the board layout.Quote from: ve7xen on February 10, 2016, 10:01:00 pmI actually really like this idea! However, the issue is that the buttons are actually membrane button assemblies and they are tied to ground internally (I can tie them to the battery voltage as well but then I'll be applying >2.2V to some of the mcu pins, which according to the datasheet is a no-no). I may be able to do this and tie the buttons to the battery voltage if I shuffle some pins around (currently the pins are going to analog/digital combination pins, which have lower max voltage specs), but that's going to require more work for moving traces around.

author: ve7xen
author_rank: Super Contributor
timestamp: February 18, 2016, 02:47:38 am
content: Regulator enables are usually (well, at least often) active-low, so I think that would work fine. You'd need to fiddle with the pull-up and pull-down resistors to get the input detection working without pulling the regulator off too, but this shouldn't be a big challenge as it's all high impedance.

author: KL27x
author_rank: Super Contributor
timestamp: February 18, 2016, 07:53:57 pm
content: ^Apparently, I've been using only the exceptions all my life.Anyhow, reversing the logic could be done with a PFET or a PNP.Considering the code has already been done, I don't blame OP for just adding a low quiescent current regulator dedicated to the MCU.

author: leonhart88
author_rank: Regular Contributor
timestamp: February 18, 2016, 08:08:07 pm
content: Quote from: ve7xen on February 18, 2016, 02:47:38 amUnfortunately this one is active high =PQuote from: KL27x on February 18, 2016, 07:53:57 pmYeah, I weighed all the pros/cons of each suggestion given and I think the easiest is just to slap a low quiescent regulator for the mcu. I already have one of the board anyway for something else, so adding an extra won't be much work at all and requires the least board layout rework too.Thanks again for everyones help!

author: ve7xen
author_rank: Super Contributor
timestamp: February 19, 2016, 03:13:59 am
content: Quote from: leonhart88 on February 18, 2016, 08:08:07 pmSingle-transistor inverter I guess, rather than refiguring you're whole switching setup?