Embedded Computing
  • About
  • Blog
  • Hardware
    • Which Platform?
    • Controller Platforms >
      • Adafruit Platform
      • Arduino Plaform
      • BBC micro:bit
      • Espressif Platform
      • iLabs Platform
      • Raspberry Pi Platform (MCU)
      • Seeed Platform
      • Silicon Labs Platform
      • Teensy Plaform
    • Computer Platforms >
      • BeagleBone Platform
      • Raspberry Pi Platform (SBC)
      • UDOO Platform
    • Peripherals >
      • Shields
      • Grove System
      • Sensors
      • Actuators
    • Displays >
      • E-Paper Displays
      • Reflective Displays
      • TFT Displays
      • LCD Displays
    • Legacy Platforms >
      • chipKIT Plaform
      • 4D Systems Platform
      • Intel Platform
      • LaunchPad Plaform
      • BoosterPacks for LaunchPads
      • LightBlue Bean
      • Maple Plaform
      • Mediatek Platform
      • Microsoft Azure IoT DevKit
      • Particle Platform
  • Software
    • Exploring RTOS with Galaxia >
      • Event Library
      • Semaphore Library
      • Mailbox Library
      • Timer Library
      • Clock Library
      • SWI Library
      • Task Library
    • Ultra-Low Power with EnergyTrace >
      • Ultra-Low Power with MSP430
      • Ultra-Low Power with Energia MT and Galaxia
    • Using Integers Instead of Reals
    • Going Python?
  • IoT
    • IoT Platforms: Which Hardware? >
      • Matter with Silicon Labs MG24
    • IoT Services: Which Solution? >
      • Recommended IoT Solutions
      • Platform-Specific IoT Solutions
      • Other IoT Solutions
      • Not tested IoT Solutions
      • Notification Solutions
    • Get Date and Time from Internet with NTP
    • Fast and Easy WiFi Connection with QR-Code
  • Tools
    • How to Start?
    • Reference >
      • Asking for Help
      • Boards Pins Maps
      • Ruler
      • Boards and Plugs
      • I²C Logic Level Converter
      • Standards for Connectors
    • Training >
      • Texas Instruments Workshops
      • Embedded Systems: Shape The World — MOOC edX UTAustinX UT.6.02x
      • Embedded Systems - Shape The World: Microcontroller Input/Output — MOOC edX UTAustinX UT.6.10x
      • Embedded Systems - Shape The World: Multi-Threaded Interfacing — MOOC edX UTAustinX UT.6.20x
      • Real-Time Bluetooth Networks: Shape the World — MOOC edX UTAustinX UT.RTBN.12.01x
      • Systems Thinking with Texas Instruments Robotics System Learning Kit
    • Books >
      • Getting Started with the MSP430 LaunchPad
      • Getting Started with Arduino
      • Arduino Cookbook
    • IDE >
      • The Battle of IDEs
      • More Options
      • Assessing the Next Generation of IDEs
      • Tools for Documentation
    • Equipment >
      • Saleae Logic Analyser
      • Rigol DS1102E Oscilloscope
      • XDS110 Debug Probe with EnergyTrace​
      • Segger J-Link Programmer-Debugger
      • Nordic Power Profiler Kit II
  • Projects
    • Libraries >
      • Master I²C Software Library
      • Date and Time Library
      • highView Library Suite
      • Others Libraries
    • smartDevices >
      • I²C smartColours Smart Sensor
      • I²C smartRFID Smart Sensor
      • I²C smartLED Display
      • I²C smartControls Smart Device
      • I²C smartWiFi Smart Device
      • I²C smartBLE Smart Device
      • I²C smartNode Smart Device
    • IoT Projects >
      • Remote E-Paper Weather and Message Board
      • Typie-Walkie with LoRa and E-Paper Screen
      • Typie-Walkie with E-Paper Screen
      • Remote e-Paper Pictures Panel
      • Remote e-Paper Messages Panel
      • Industrial IoT Project
      • Remote Contactless Temperature Monitor
      • Using Node-RED for IIoT
      • Low Power Home Network Weather Monitoring
      • Updated Low Power Home Network Weather Monitoring
      • Weather and Security Station with Blynk
      • SensorTag to Blynk Using Node-RED
      • Pervasive Reporting
    • AI Projects >
      • Colour Recognition with Neural Network
    • Other Projects >
      • Air Quality Monitoring
      • Driving a Large E-Paper Display with a Compact Xiao RP2040
      • Low-Power E-Paper Weather Station
      • Portable Particulate​ Matter Monitor
      • FRAM-based E-Paper Screen Controller
      • General Purpose 3.5" Screen
      • Colour Recognition with Neural Network
      • A Low Power Weather Station
      • Digital Volt-Amp-Watt Meter
      • Mobile Measurement with LCD Display
      • Screen with SRAM for GUI
      • Volt-Amp-Watt-Meter for Grove
      • Multi-Touch Project with CapTIvate

Ultra-Low Power with MSP430

If the LaunchPad programmer doesn't feature EnergyTrace, the programmer of another LaunchPad can be used. 

In this example, the MSP430G2 LaunchPad doesn't not feature EnergyTrace, so we are going to use the EnergyTrace-compatible programmer from the LaunchPad MSP430FR5969.
​
Picture
Here's the schematic of the EnergyTrace implementation.

The EnergyTrace-compatible programmer from the LaunchPad MSP430FR5969 is connected to the LaunchPad MSP430G2553. Remove all the jumpers and connect the +3.3V and Ground lines.
Picture

delay() vs. sleep()

The loop() blinks the LED twice, enters delay() state for 10 seconds, then blinks once, and goes to sleep() for 10 seconds.

With sleep() and sleepSeconds(), the MCU enters LPM3. 
  • CPU is disabled.
  • MCLK and SMCLK are disabled.
  • DCO's dc generator is disabled.
  • ACLK remains active.
As a consequence of SMCLK being disabled, background processes such as Serial transmit and receive will halt or get scrambled.

sleep() applies for milliseconds and sleepSeconds() for seconds. 
​
Picture
Notice the difference of power consumption between delay() and sleep().
  • delay() requires 3 mW or 1 mA
  • sleep() requires less than 0.1 mW.

The peaks correspond to the LED blinking twice before delay(), and once before sleep().
Picture
EnergyTrace also estimates the battery life, here close to half a year with 2 AA batteries.
Picture

suspend() and wakeup()

With suspend(), the MCU enters LPM4.
  • CPU is disabled.
  • ACLK is disabled.
  • MCLK and SMCLK are disabled.
  • DCO's dc generator is disabled.
  • Crystal oscillator is stopped.

​The MCU can only react to a hardware interrupt, triggered here by PUSH2. The interrupt calls the buttonISR() routine and launches wakeup() to return to active mode.

This example is based on Frank Milburn's code (June 2015), which is derived from @spirilis at 43oh.com

Picture
The peak corresponds to the LED turned on and happens just after PUSH2 is pressed.
Picture

Conclusion

Using sleep() instead of delay() and implementing a hardware interrupt save energy and increase battery life.

EnergyTrace provides a convenient way for measuring and comparing power consumptions.
Picture

Links

  • MSP430G2553 page
  • Low Power Measurements Handbook by Keithley / Tektronix
  • ​Add Documentation and Examples for Low Power Mode
  • How to measure Energy profile in Energia with TI Energy Trace
  • Example fmilburn3/Energia_LPM

Posted: Dec 29, 2015
Edited: July 26, 2018
Powered by Create your own unique website with customizable templates.