TPL5110 Nano Power Timer Hookup Guide

Pages
Contributors: Elias The Sparkiest
Favorited Favorite 2

Simple Example

Note: If this is your first time using Arduino, please review our tutorial on installing the Arduino IDE. If you've never connected an SAMD21 device to your computer before, you will need to install the board add-on and may need to install drivers. Check out our section on UF2 Bootloader and Drivers and Setting Up Arduino for help with the installation.

With this example we'll be laying out the very basics of how the Nano Power Timer works. Copy the code and paste in the Arduino IDE. Select your board (in this case, the RedBoard Turbo), COM port, and hit the upload button to upload in the Arduino IDE.

The Nano Power Timer is powered by a LiPo Battery and will turn on a RedBoard Turbo every 14 seconds. The RedBoard Turbo will blink it's blue LED, and then send a done signal back to the Nano Power Timer, which will turn off the RedBoard Turbo.

language:c
/*
TPL5110_Blink_Demo_example.ino

  Simple Example Code for the TPL5110 Nano Power Timer Hookup Guide. This code
  simply blinks the pin 13 LED and writes pin 4 (donePin pin) high. This shift from
  LOW to HIGH of the donePin pin, signals to the Nano Power Timer to turn off the
  microcontroller.
  SparkFun Electronics
  Date: May, 2019
  Author: Elias Santistevan
*/

int led = 13; // Pin 13 LED
int donePin = 4; // Done pin - can be any pin.  

void setup(){

  pinMode(led, OUTPUT); 
  pinMode(donePin, OUTPUT); 

}

void loop(){
  // Blink. 
  digitalWrite(led, HIGH); 
  delay(1000); 
  digitalWrite(led, LOW); 
  delay(1000); 

  // We're done!
  // It's important that the donePin is written LOW and THEN HIGH. This shift
  // from low to HIGH is how the Nano Power Timer knows to turn off the
  // microcontroller. 
  digitalWrite(donePin, LOW); 
  digitalWrite(donePin, HIGH); 
  delay(10);
}

After uploading this code, and plugging in the LiPo battery into the Nano Power Timer, the RedBoard Turbo will blink once, be turned off by the Nano Power Timer, and then will turn on again 12 seconds later (14 second timer - 2 second delay in sketch).

TPL5110 Demo Blink

This Nano Power Timer really shines when you're doing remote projects that are running off of battery and you need to maximize the life of the battery! There's only so much deep sleeping that you can do in code, and nothing will compare to 35nA of power consumed in the off state of the Nano Power Timer. You just need one additional GPIO or some method of sending a digital signal that can go from LOW to HIGH to signal OFF to the Nano Power Timer.