Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe

Power Failure Indicator in NRF24LE1 (Part 4/14)

By Amanpreet Singh May 7, 2023

Power Failure Indicator in NRF24LE1

Nowadays most of our devices are portable and run on batteries. We often do not know when the battery is about to get discharged. Many systems have the battery voltage display to indicate the battery voltage but what if we don’t have the display in our system. In such a case, using a small LED to indicate low battery is very helpful for users to know about the battery status.

In this article, we are going to discuss a very important feature of NR24LE1 which enables power failure indicator.

Prototype of NRF24LE1 and EEPROM Interfacing

Fig. 1: Prototype of NRF24LE1 based Power Failure Indicator

The NRF module comes with an inbuilt comparator known as Power-Failure (POF) Comparator. This comparator gives the MCU (Microcontroller Unit) an early warning of power failure. The comparator compares VDD (Supply voltage) and threshold voltage. It gives a warning when the VDD voltage falls below a threshold level.  We know that the threshold level is a voltage level that can be set by user as per requirement. There are four threshold levels offered by NRF module: 2.1, 2.3, 2.4 and 2.5V.

The register through which we can access the functionality is POFCON (Power Failure Control) register. It’s an 8-bit register. Functions of various bits of the register are given below :

• Bit 7 – enable/disable POF comparator. 0:disable, 1:enable

• Bit 6:5 – set threshold level. 00 : 2.1V, 01 : 2.3V, 10 : 2.5V, 11 : 2.7V

• Bit 4 – warning. 0 : VDD above threshold, 1: VDD below threshold

• Bit 3:0 – not used
Power-Failure (POF) Comparator.
For using POF comparator we have to enable it by writing 1 at 7th bit of POFCON register.  After enabling the comparator, we have to choose our desired threshold level from different threshold level and write bit6:5 accordingly. When we have enabled the POF and set our desired threshold level, we can check the warning of power failure indicated by bit4 of the POFCON.
FUNCTION INPUT PARAMETER OUTPUT DESCRIPTION
hal_pof_enable() 0/1 – To enable the POF

0:Disable

1:Enable

hal_pof_set_threshold() HAL_POF_THRESHOLD_2_1V

HAL_POF_THRESHOLD_2_3V

HAL_POF_THRESHOLD_2_5V

HAL_POF_THRESHOLD_2_7V

– To set threshold level:

2.1V, 2.3V, 2.5V, or 2.7V

hal_pof_warning() – 0/1 To check POF warning

0 – No warning

1 – Warning

Check out the code to understand how to do the programming for this feature. The code has been commented for a clearer understanding.
Power Failure Indicator in NRF24LE1
Another great feature that comes with NRF is Brown Out Reset. This feature puts the microcontroller in reset state whenever VDD falls below BOR threshold level. The BOR threshold level is 1.7V. The MCU again becomes operational whenever the VDD gets above 1.77V.
The module seems to be an amazing module with so many features. We are really enjoying our work on the module. Do let us know what you make using the module and share your project with us in the comments below.

Project Source Code

###

#include"reg24le1.h" // I/O header file for NRF24LE1

// main function

void main()

{

POFCON |= 0xe0; // POF enable with threshold at 2.7V

P0DIR = 0; // set PORT0 as output

P0 = 1; // Port 0 high



// infinite loop

while(1)

{

if(POFCON & 0x10) // check for warning

P00 = 0; // make Pin 0 of Port 0 low

}


}

###

Circuit Diagrams

Circuit-Diagram-NRF24LE1-Based-Power-Failure-Indicator

Project Video


Filed Under: Power, Tutorials

 

Next Article

← Previous Article
Next Article →

Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.



Tell Us What You Think!! Cancel reply

You must be logged in to post a comment.

EE TECH TOOLBOX

“ee
Tech Toolbox: Internet of Things
Explore practical strategies for minimizing attack surfaces, managing memory efficiently, and securing firmware. Download now to ensure your IoT implementations remain secure, efficient, and future-ready.

EE Learning Center

EE Learning Center
“engineers
EXPAND YOUR KNOWLEDGE AND STAY CONNECTED
Get the latest info on technologies, tools and strategies for EE professionals.

HAVE A QUESTION?

Have a technical question about an article or other engineering questions? Check out our engineering forums EDABoard.com and Electro-Tech-Online.com where you can get those questions asked and answered by your peers!


RSS EDABOARD.com Discussions

  • Input impedance matching network
  • High Side current sensing
  • The comparison of different Tcl script checkers
  • Voltage mode pushpull is a nonsense SMPS?
  • Reducing "shoot-through" in offline Full Bridge SMPS?

RSS Electro-Tech-Online.com Discussions

  • Back to the old BASIC days
  • Parts required for a personal project
  • PIC KIT 3 not able to program dsPIC
  • Failure of polypropylene motor-run capacitors
  • Siemens large industrial PLC parts

Featured – RPi Python Programming (27 Part)

  • RPi Python Programming 21: The SIM900A AT commands
  • RPi Python Programming 22: Calls & SMS using a SIM900A GSM-GPRS modem
  • RPi Python Programming 23: Interfacing a NEO-6MV2 GPS module with Raspberry Pi
  • RPi Python Programming 24: I2C explained
  • RPi Python Programming 25 – Synchronous serial communication in Raspberry Pi using I2C protocol
  • RPi Python Programming 26 – Interfacing ADXL345 accelerometer sensor with Raspberry Pi

Recent Articles

  • What is AWS IoT Core and when should you use it?
  • AC-DC power supply extends voltage range to 800 V DC
  • Infineon’s inductive sensor integrates coil system driver, signal conditioning circuits and DSP
  • Arm Cortex-M23 MCU delivers 87.5 µA/MHz active mode
  • STMicroelectronics releases automotive amplifiers with in-play open-load detection

EE ENGINEERING TRAINING DAYS

engineering

Submit a Guest Post

submit a guest post
Engineers Garage
  • Analog IC TIps
  • Connector Tips
  • Battery Power Tips
  • DesignFast
  • EDABoard Forums
  • EE World Online
  • Electro-Tech-Online Forums
  • EV Engineering
  • Microcontroller Tips
  • Power Electronic Tips
  • Sensor Tips
  • Test and Measurement Tips
  • 5G Technology World
  • Subscribe to our newsletter
  • About Us
  • Contact Us
  • Advertise

Copyright © 2025 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy

Search Engineers Garage

  • Electronic Projects & Tutorials
    • Electronic Projects
      • Arduino Projects
      • AVR
      • Raspberry pi
      • ESP8266
      • BeagleBone
      • 8051 Microcontroller
      • ARM
      • PIC Microcontroller
      • STM32
    • Tutorials
      • Audio Electronics
      • Battery Management
      • Brainwave
      • Electric Vehicles
      • EMI/EMC/RFI
      • Hardware Filters
      • IoT tutorials
      • Power Tutorials
      • Python
      • Sensors
      • USB
      • VHDL
    • Circuit Design
    • Project Videos
    • Components
  • Articles
    • Tech Articles
    • Insight
    • Invention Stories
    • How to
    • What Is
  • News
    • Electronic Product News
    • Business News
    • Company/Start-up News
    • DIY Reviews
    • Guest Post
  • Forums
    • EDABoard.com
    • Electro-Tech-Online
    • EG Forum Archive
  • DigiKey Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Learn
    • eBooks/Tech Tips
    • Design Guides
    • Learning Center
    • Tech Toolboxes
    • Webinars & Digital Events
  • Resources
    • Digital Issues
    • EE Training Days
    • LEAP Awards
    • Podcasts
    • Webinars / Digital Events
    • White Papers
    • Engineering Diversity & Inclusion
    • DesignFast
  • Guest Post Guidelines
  • Advertise
  • Subscribe