Makerverse Nano Power Timer

Updated 18 August 2023

Introduction

The Makerverse Nano Power Timer is an ultra-low current consumption power controller designed to periodically turn on a battery powered microcontroller. It is perfect for maximising the battery life of data-logging sensors. The power switching MOSFET can handle output currents up to 2A and the onboard TPL5110 will operate from 2.3V to 5.5V with a standby current of under 50nA. For low voltage applications the input voltage can be reduced to 1.8V if the onboard Schottky diode is shorted out.

To follow along it's best to have:

Contents

Pinout

The Makerverse Nano Power Timer's pinout and pin description is as follows:

Pin Description
OUT - The negative supply pin for the external microcontroller
OUT + The positive supply pin for the external microcontroller
DNE "Done" input - A high signal on this pin will turn off the external microcontroller until the next timer interval
IN - Negative supply pin from battery pack
DLY "Delay" input - Short to positive supply to force power on and start timer
IN + Positive supply pin from battery pack
PH connector External battery pack input

At a minimum, five connections are required for a typical application:

  • OUT and - to power the external microcontroller
  • A GPIO signal from the microcontroller to the DNE pin
  • IN and - to a battery or other power supply

For the Raspberry Pi Pico example below it is recommended that OUT and - are connected to VSYS and GND, respectively. The VSYS pin connects directly to the Pico's 3.3V switchmode power supply and can vary between 1.8V and 5.5V - the same range as the TPL5110 on the Makerverse Nano Power Timer. The Pico's VBUS pin can also be used however this will incur some loss due to a Schottky diode between VBUS and VSYS.

Note that when the Raspberry Pi Pico is connected to USB for development it will deliver around 5V into the power timer module. The power timer's Schottky diode prevents this from damaging any connected battery pack.

The included RESET button forces the output power terminals to switch on and is useful for quickly debugging projects designed for long delay intervals.

The DLY pin is included on the pin header to implement external "reset" methods - connecting this pin to the battery power supply causes the same behaviour as pressing the reset button.

makerverse-nano-power-timer-pinout

Time Delay Selection

The time delay between external microcontroller power-ups is set by the resistance between a pin on the internal TPL5110 chip and ground. A resistance of 169k is connected via a normally closed solder jumper with a further 5 resistors selectable with a 6-way DIP switch. The 6th switch connects to the "USER" resistor - a through hole footprint included for easy mounting of a custom resistance.

The time delays available on each switch are as follows:

Switch Delay
A 15 Seconds
B 1 Minute
C 5 Minutes
D 20 Minutes
E 1 Hour
F USER resistor
All Off 2 Hours

By enabling multiple switches a total of 32 different time delays between 2.2s and 7200s are possible. These are documented in the Extra Delay Options section, below.

If your application requires a very short delay (100ms to 2s), or a very specific delay up to 2 hours, then you can attach a custom resistor and enable it with switch F.

Note: When the time delay is changed the Nano Power Timer must be "power cycled" (turned off and on again) to program the new delay.

Example Application - Raspberry Pi Pico Data Logger

The simple project demonstrated here periodically logs measurements from the Raspberry Pi Pico's analog to digital converter (ADC). For project simplicity the measurements are recorded to the Pico's internal flash memory. Note that this memory has a write endurance of around 100 000 cycles so this is only recommended for low frequency data logging applications (eg: once an hour). For greater high sample count projects an SD card adapter is recommended.

Note that this example code does not do any time measurement - it only writes samples to a file and assumes you will be able to estimate the sample time from the power timer's delay setting. In applications where accurate timing is important a real time clock module is recommended.

The microcontroller's general algorithm is:

  1. Initialise the ADC and DONE pin - ensure DONE pin is low
  2. Measure an ADC value
  3. Append the value to a log file
  4. Close the log file to ensure data has been written
  5. Send a logic HIGH to the DONE pin - this will cause the power timer to power-down the microcontroller

The Micropython code example below assumes that the Raspberry Pi Pico is disconnected from USB and powered from the Nano Power Timer module. It only records a single data point before requiring a power cycle to take another. To read the log file the Pico can be plugged into a PC and Thonny used to open or copy the file.

from machine import Pin, ADC

DONE = Pin(15, Pin.OUT)
adc = ADC(0) # Pin 26

x = adc.read_u16()

# Opening with "a" for appending
with open("log.txt", "a") as logFile:
    logFile.write(str(x))
    logFile.write('\n') # New line
    logFile.flush() # Ensure data is written
    logFile.close() # Really ensure data is written
    
DONE.on() # Assert DONE signal; powers down Pico

makerverse-nano-power-timer-logger

Schottky Protection Diode and LED Jumpers

The power timer module contains three solder jumpers allowing easy customisation for your application as follows:

  1. The output power LED is illuminated whenever power is present at the OUT and OUT- pins. This is useful as a power indicator but if power consumption must be absolutely minimised the provided solder bridge's trace can be cut to disable the LED. The LED draws about 1mA.

  2. A schottky diode is included to protect the battery when the microcontroller is connected to USB power during development. If absolute maximum efficiency is desired this diode can be bypassed by soldering across the solder bridge next to it.

  3. The jumper in the lower right connects a 169k resistor to the TPL5110 for the 2 hour time delay option. When connecting a custom resistor it may be desirable to cut this trace. Doing so allows for simpler resistor calculations or copying of existing designs without compensating for the 169k resistor in parallel.

makerverse-nano-power-timer-solder-jumpers

Extra Delay Options

The time delays documented above only cover those available by switching on a single switch. Many other time delays can be selected by enabling multiple switches simultaneously, creating a parallel combination of two or more resistors.

The table below documents all 32 possible combinations, sorted in order of time delay:

Switch Combination Delay (Seconds)
A B C D E 2.2
A B C D 2.3
A B C E 2.6
A B C 2.8
A B D E 3.4
A B D 3.7
A B E 4.2
A B 4.5
A C D E 6.8
A C D 7.3
A C E 8.3
A C 8.8
A D E 11
A D 12
A E 14
A 15
B C D E 18
B C D 20
B C E 24
B C 26
B D E 38
B D 42
B E 54
B 61
C D E 136
C D 159
C E 244
C 301
D E 846
D 1196
E 3583
None 7200

Custom Resistor Selection

If a precision time delay is required which is not easily selected with the provided resistors then a custom "USER" value can be soldered to the provided through hole pads.

The Python script below will print the closest 1% (E96) value for time delays between 1s and 7200s (2 hours). For convinience, it can be executed directly on a Raspberry Pi Pico or Python 3.x. Modify line 3 for the time value of your choosing.

For time delays below 1 second use 500 Ohms per 100ms (eg: 700ms = 500*7 = 3500 Ohms). 

Note: Because there is a 169k Ohm resistor connected via a solder jumper the script will output two values. One is correct if the 169k Ohm is kept in circuit and the other correct if it's associated solder jumper trace is cut.

from math import sqrt, floor, log10

t = 1000 # Time in seconds

if t < 1:
    print("Error: This script is only valid for t > 1 second.")
    exit()

if t <= 5:
    a = 0.2253
    b = -20.7654
    c = 570.5679
elif t > 5 and t <= 10:
    a = -0.1284
    b = 46.9861
    c = -2651.8889
elif t > 10 and t <= 100:
    a = 0.1972
    b = -19.3450
    c = 692.1201
elif t > 100 and t <= 1000:
    a = 0.2617
    b = -56.2407
    c = 5957.7934
else:
    a = 0.3177
    b = -136.2571
    c = 34522.4680

# Equation 1 from datasheet, page 12
R = 100*(-b + sqrt(b**2 - 4*a*(c-100*t)))/(2*a);
R2 = 169e3;
R3 = R*R2/(R2-R);

E96 = [1.00, 1.02, 1.05, 1.07, 1.10, 1.13, 1.15, 1.18, 1.21, 1.24, 1.27, 1.30, 1.33, 1.37,
       1.40, 1.43, 1.47, 1.50, 1.54, 1.58, 1.62, 1.65, 1.69, 1.74, 1.78, 1.82, 1.87, 1.91,
       1.96, 2.00, 2.05, 2.10, 2.15, 2.21, 2.26, 2.32, 2.37, 2.43, 2.49, 2.55, 2.61, 2.67,
       2.74, 2.80, 2.87, 2.94, 3.01, 3.09, 3.16, 3.24, 3.32, 3.40, 3.48, 3.57, 3.65, 3.74,
       3.83, 3.92, 4.02, 4.12, 4.22, 4.32, 4.42, 4.53, 4.64, 4.75, 4.87, 4.99, 5.11, 5.23,
       5.36, 5.49, 5.62, 5.76, 5.90, 6.04, 6.19, 6.34, 6.49, 6.65, 6.81, 6.98, 7.15, 7.32,
       7.50, 7.68, 7.87, 8.06, 8.25, 8.45, 8.66, 8.87, 9.09, 9.31, 9.53, 9.76];
mag = floor(log10(R));
Rtmp = R3/10**mag;
err = 2
E96Value = 1.0
for val in E96:
    errTmp = abs(val - Rtmp)
    if errTmp < err:
        E96Value = val
        err = errTmp
R96_1 = E96Value*10**mag

mag = floor(log10(R3));
Rtmp = R/10**mag;
err = 2
E96Value = 1.0
for val in E96:
    errTmp = abs(val - Rtmp)
    if errTmp < err:
        E96Value = val
        err = errTmp
R96_2 = E96Value*10**mag


print("If keeping 169k Ohm resistor in circuit: Resistance for ", t, "seconds: ", R96_1/1000, "k Ohms")
print("If cutting 169k Ohm resistor's jumper trace: Resistance for ", t, "seconds: ", R96_2/1000, "k Ohms")

Power Consumption Measurements

The input current was measured with the Makerverse Nano Power Timer controlling a Raspberry Pi Pico and Makerverse Supercap Real Time Clock. For this experiment the input was 5.0V with the power timer's output connected to the Raspberry Pi Pico's VBUS pin. The Pico's onboard power supply then provided 3.3V to the RTC.

With everything powered on the current consumption was measured at 20mA and after turning the Pico and RTC off with a simulated DONE signal the input current dropped to only 46nA (nano amps! That's 0.000000046 Amps!). At this standby current a typical 1000mAh 3xAAA battery pack would theoretically last for almost 2500 years! ie: the battery lifetime is limited by other factors such as self-discharge, terminal corrosion, etc. If the 20mA load was always on the batteries would be empty in about two days.

Exactly how long a battery will last in a datalogger circuit will depend on sampling frequency and how long the microcontroller needs to be on to perform data sampling, processing, and logging. In total a 1000mAh battery can run the 20mA load for about 170 000 seconds, so if, for example, it takes 5 seconds to sample/process/write data it could take about 34 000 samples. If sampling once per minute that's still over 20 days of data logging, around 10x longer than possible without the power timer module.

nono-power-timer-on-currentnano-power-timer-off-current

Have a question? Ask the Author of this guide today!

Please enter minimum 20 characters

Your comment will be posted (automatically) on our Support Forum which is publicly accessible. Don't enter private information, such as your phone number.

Expect a quick reply during business hours, many of us check-in over the weekend as well.

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.