How to Program Power Duty Cycle Controller to Prolong Battery Life
by GreenPAK™ in Circuits > Electronics
3 Views, 0 Favorites, 0 Comments
How to Program Power Duty Cycle Controller to Prolong Battery Life
Some battery powered products, particularly Internet of Things (IoT) sensor transceivers, are best powered intermittently, to prolong battery life. For example, say a transceiver only needs to check for a signal once per second. Based on this period, a duty cycle controller turns on power to the transceiver and controlling MCU. Once the MCU has determined that the transceiver has completed its work, it triggers the duty cycle controller to restart by turning off the power to the downstream circuit.
Below we described steps needed to understand how to program the power duty cycle controller. However, if you just want to get the result of programming, download GreenPAK Designer software to view the already completed GreenPAK design file. Plug the GreenPAK Development Kit to your computer and hit the program to create the system.
Existing Technology
This duty cycle configuration is currently achieved by using multiple connected devices, such as TI’s TPS61291, TPL5111, or CD4541, as well as associated passive components.
GreenPAK™ Technology
The ability to modify the delay period between each cycle is advantageous, as it allows the application to modify the duty cycle for the best battery life by taking into account external factors (e.g. time of day, season, temperature, traffic volumes, etc.).
Implementation
The circuit is implemented using a SPI interface to set and change the time interval. When the external circuit is not powered, it is expected that the input pins would have high impedance or be held at logic LOW.
It is left to the user to implement a hardwired version if the time interval is constant or a parallel interface version if preferred.
Counter blocks CNT0-CNT3 are configured as rising edge delays with various delay times. When the DLY_IN signal to each of the blocks goes HIGH for 100ms, 500ms, 1s, and 5s respectively, the blocks will output HIGH. The select pins of each of the 3 muxes are connected to DFF0 and DFF1, whose operation is described below. The selected MUX output will go HIGH at the end of the delay period and will drive the P-FET Power Switch on, connecting Power in to Power out. Once the MCU or other external hardware has determined that the required operations have been completed, the Sleep pin is driven HIGH, and after inversion through 2-L3, this signal resets DFF2 and the CNT/DLYs, resulting in DFF 2's output going LOW. This turns off the P-FET switch. At this time, the Sleep input should return to LOW or voltage free (the pin is internally pulled down) as the external circuit loses power.
To program the selection of the time period, with SPIEN driven HIGH, the logic level at pin D is clocked into DFF0 on the rising edge of CLK. Data already in DFF0 is clocked into DFF1. This sets up SEL0 and SEL1. As most MCUs have a minimum SPI data frame size larger than two bits, it should be noted that only the last two clocked bits are retained (so you should only set up the last two bits transmitted when implementing the SPI interface on the MCU). SPIEN should remain LOW or at high impedance (it is internally pulled LOW) when the SPI interface is not in use.
At first power up, DFF0 and DFF1 have default values of 0, which results in the shortest delay. Additionally, DFF2 has an initial polarity of HIGH, turning on the P-FET switch. At this time, the desired delay should be programmed. Afterwards, the programmed delay interval will be retained until a power loss to the GreenPAK chip, or until the delay is reprogrammed.
The shown delay times can be modified to any allowable delay period by reconfiguring the Counter data (and/or Clock) for each CNT/DLY module and/or the OSC module.
If the SPIEN function is not required, the 2-L2 gate can be removed, and the CLK can drive DFF0 and DFF1 directly. In this case, CLK should be held LOW or be at high impedance when not clocking data.
The SPI input has been tested at a clock speed of 8MHz, and works in SPI mode 0, 1, and 3.
Waveforms
Arduino Code
These tests and demonstrations were completed using the Arduino test code in the image above.
Conclusion
In this Instructable, we created a variable-length power duty cycle controller to help prolong the battery life of a system. It allows a microcontroller to decide how long to power down and when to wake back up. Since GreenPAK IC’s quiescent current is less than a typical microcontroller’s quiescent current, using the GreenPAK as a dedicated wake/sleep device will help the system operate for a longer period of time before the battery runs out.