Inrush current at wifi start for RX only ? Disable RF calibration ?

glitch911
Posts: 7
Joined: Thu Dec 20, 2018 9:41 am

Inrush current at wifi start for RX only ? Disable RF calibration ?

Postby glitch911 » Tue Apr 02, 2019 10:09 am

Hello all,

I'm using esp32 only for wifi scan (no connection) and I'd like to minimise the inrush current at start-up.

I've used 1ohm shunt to measure current at first start-up and found that depending on the antenna situation the RF calibration takes different time : about 15ms when touched with finger and about 5ms when free space (see attached, zoom on 400mA pulse).
After first scan I can go deep sleep and subsequent wake-up don't trig RF cal so this 400mA pulse is not there.

Is RF calibration required for RX only usage ? What does it do ?

How can I disable it (found some info in your documentation but not really up to date) ?

Any help will be highly appreciated :)

Have a good day,
Attachments
first_scan_full.png
first_scan_full.png (8.64 KiB) Viewed 5906 times
free_space.png
free_space.png (10.46 KiB) Viewed 5906 times
finger_touch.png
finger_touch.png (12.86 KiB) Viewed 5906 times

glitch911
Posts: 7
Joined: Thu Dec 20, 2018 9:41 am

Re: Inrush current at wifi start for RX only ? Disable RF calibration ?

Postby glitch911 » Wed Apr 10, 2019 9:02 am

Any support ?

glitch911
Posts: 7
Joined: Thu Dec 20, 2018 9:41 am

Re: Inrush current at wifi start for RX only ? Disable RF calibration ?

Postby glitch911 » Thu May 23, 2019 1:04 pm

Nobody ?

6l3nhx
Posts: 1
Joined: Mon Aug 23, 2021 3:19 pm

Re: Inrush current at wifi start for RX only ? Disable RF calibration ?

Postby 6l3nhx » Mon Aug 23, 2021 3:38 pm

So, this is a long time since the original post, but having solved this issue myself, I thought to share it.

As no RF calibration is performed when waking from deep sleep, we use this to prevent the RF calibration.

On boot set up a wake method and initialise a boot counter in RTC memory.

Increment boot counter and if this is first boot, go to sleep.

According to the wake method, system will immediately wake, increment boot count, and therefore not sleep this time, so can initialise RF system without calibration.

Code: Select all


RTC_DATA_ATTR int bootCount = 0;

void setup() {

  pinMode(GPIO_NUM_33,INPUT_PULLUP); // use this to wake - pull low on startup to keep it asleep if required.
  esp_sleep_enable_ext0_wakeup(GPIO_NUM_33,1); // set this pin to wake if high

  ++bootCount;
  if(bootCount==1) { // if first boot...
  esp_deep_sleep_start(); // go to sleep
  }

// continue with setup.

}

glitch911
Posts: 7
Joined: Thu Dec 20, 2018 9:41 am

Re: Inrush current at wifi start for RX only ? Disable RF calibration ?

Postby glitch911 » Thu Sep 23, 2021 9:01 am

Hello,

Thank you 6l3nhx.
Nice workaround !

Works perfectly.

I made it with timer and disabling the image validation this ack takes 10µWh instead of 20µWh for RF calibration but max current is 50mA instead of 350mA ^^ Battery powered device under -20°C thank you :)

Code: Select all

void app_main(void)
{
	++bootCount;
	if(bootCount==1) { // if first boot...
	esp_sleep_enable_timer_wakeup(1000);
	esp_deep_sleep_start();  
  	}

Who is online

Users browsing this forum: Majestic-12 [Bot] and 78 guests