Low Power

ATMEGA328p

Atmega32P barebone, 16MHz alkimenté par une pile Lion de 4.2V avec une diode 1N4007 en série pour réduire la tension.

Library Low power

#include <Arduino.h>
#include <LowPower.h>

#define LED_STA 5

void setup() {
  pinMode(LED_STA, OUTPUT);
  digitalWrite(LED_STA, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);                       // wait for a second
  digitalWrite(LED_STA, LOW);    // turn the LED off by making the voltage LOW
  delay(100);                       // wait for a second
}
void loop() {
  LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF);
  digitalWrite(LED_STA, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(100);                       // wait for a second
  digitalWrite(LED_STA, LOW);    // turn the LED off by making the voltage LOW
  delay(100);
}

Résultats :

  • Sans sleep : 7mA
  • LowPower.powerDown(SLEEP_8S, ADC_ON, BOD_ON) => 120uA
  • LowPower.powerDown(SLEEP_8S, ADC_OFF, BOD_OFF) => 4.7uA