Wifi LoRa v4 deep sleep current

Hi!

Newbie here! I’m trying to reach μA deep sleep current on my Wifi Lora V4 card since it will be used off-grid and send data occasionally (once an hour approx.). However, despite my efforts the lowest I’ve managed to reach is 1,8mA (which is with a very minimal code which puts the ESP32 in deep sleep basically…).

Could someone help me, where should I begin to be able to lower the deep sleep power consumption?

NB: I power the card through the 2p battery connection with an 18650 battery.

BR
niklas

Hi

Did you put all pins as deactivated ? Did your out Lora module to sleep?

I actually managed, yesterday, to get down to 40microamp in deep sleep mode with a few modifications. Thanks anyway!

Could you please share what exactly you did? I’m in the same situation and can’t get below about 715 uA. I’d LOVE to get to less than 100 :slight_smile:

Sure! I’m not sure how to paste it in an indented, neat way but here’s the code!

#include <Arduino.h>
#include <RadioLib.h>
#include "esp_sleep.h"
#include "driver/gpio.h"

// === Heltec V4 pinout (officiellt) ===
#define RADIO_NSS   8
#define RADIO_RST   12
#define RADIO_BUSY  13
#define RADIO_DIO1  14

#define VEXT_PIN    36
#define LED_PIN     35

SX1262 radio = new Module(RADIO_NSS, RADIO_DIO1, RADIO_RST, RADIO_BUSY);

void VextOFF() {
  pinMode(VEXT_PIN, OUTPUT);
  digitalWrite(VEXT_PIN, HIGH);   // HIGH = OFF on Heltec
}

void ledOFF() {
  pinMode(LED_PIN, OUTPUT);
  digitalWrite(LED_PIN, HIGH);    // HIGH = OFF on Heltec
}

void go_to_sleep() {
  ledOFF();
  VextOFF();

  // Put SX1262 into sleep
  radio.sleep();

  // Keep NSS high and hold it during deep sleep
  pinMode(RADIO_NSS, OUTPUT);
  digitalWrite(RADIO_NSS, HIGH);
  gpio_hold_en((gpio_num_t)RADIO_NSS);
  gpio_deep_sleep_hold_en();

  Serial.println("GOING TO SLEEP NOW");
  Serial.flush();

  esp_deep_sleep_start();
}

void setup() {
  Serial.begin(115200);
  delay(2000);

  Serial.println("Init radio...");

  SPI.begin(9, 11, 10); // SCK, MISO, MOSI Heltec V4
  int state = radio.begin();

  if (state != RADIOLIB_ERR_NONE) {
    Serial.println("Radio init failed!");
  } else {
    Serial.println("Radio OK");
  }

  delay(1000);
  go_to_sleep();
}

void loop() {}
1 Like