Comments (5)
I have to admit that I haven't looked into power consumption in a while. It's coming up though...
Let me make sure I understand:
- you're using V2
- you have it powered-up for more than 30 seconds before you start to make sure it's in STA-only mode (or you confirm that on the wifi page)
- it's using a baseline of ~70mA as you browse around
- swapping the pins and back puts the functionality into the same state, but lower power consumption
- is it specifically the wifi-link-12 pin config that "fixes" the power consumption, or any pin change?
The thing that is special about the wifi-link-12 pin assignment is the swapping of the UART pins. The code is here https://github.com/jeelabs/esp-link/blob/master/serial/serbridge.c#L342-L352 Overall, it's unlikely that a difference of 50mA can come from current through the pins. I'm pretty sure it can't be the CPU itself. Must be the radio. I have not measured how it looks while in STA+AP mode, so make sure it's not in that mode.
from esp-link.
- Yes. I'm using the precompiled binaries of esp-link v2.0.beta2
- It's powered up for at least a minute. The module is in STA-only mode (see screenshot below)
- Yes.. after booting, baseline is approx 70mA
- It is not the wifi-link-12 pin that 'fixes' the power consumption. The power consumption lowers only when switching away from it. And it rises back to 70mA if switching to it.
- Scenario 1
- Boot with 'jn-esp-v2' and switch from 'jn-esp-v2' to 'wifi-link-12' => 70mA before and after switch
- Switch back to 'jn-esp-v2' => 70mA before and 24mA after the switch
- Scenario 2
- Boot with 'wifi-link-12' and switch to 'jn-esp-v2' => 70mA before and 24mA after the switch
- Switch back to 'wifi-link-12' => 24mA before, back to 70mA after the switch
- Switch back to 'jn-esp-v2' => 70mA before and 24mA after the switch
- Scenario 3
- Switching from any pin with 'swap_uart:no' to any other pin with also 'swap_uart:no' => no change in current. It stays at either 70mA or 24mA.
- Scenario 1
So it would seem the uart swap code does at least something related to power consumption. And maybe the power consumption of 70mA at boot is because initialisation code at boot time does not execute the same code as when switching uart back to normal?
I'll do the same test tomorrow with an ESP-7 module.
from esp-link.
I found the cause.
GPIO15 (together with GPIO0 and GPIO2) is sampled at boottime to determine the bootmode of the device. In order to boot normally, it must be pulled low. Based on comments I found on google, I wired GPIO15 to ground... and everything worked.
However, it appears that after boot, GPIO15 is used as an output and it is set to a logical 1. The excessive current is caused by a short circuit between GPIO15 and GND. I have to admit, I'm really surprised the module survived that for longer periods. When switching from 'wifi-link-12' to any other pin mode, GPIO15 is either set low or set as input and the short circuit/excessive current is gone.
Now I placed a 1K pulldown resistor between GPIO15 and GND and the baseline consumption is now approx 25mA at boot. Also selecting 'wifi-link-12' now does not change the current to 70mA.
Since GPIO15 is set as high output at boot, there is a needless power consumption across the pulldown resistor. If, after booting, I switch from 'jn-esp-v2' to 'wifi-link-12' and back, the baseline current drops approx 3mA.
Would it be possible to set GPIO15 as input, no pullup when booting in a mode where the 2nd uart is not used?
from esp-link.
The UART swap turns gpio15 into UART 0 RX or TX (I forget which), so it definitely changes it (this stuff is in the SDK, so I don't have the details). esp-link doesn't initialize gpio15, maybe the SDK does...
from esp-link.
This is pretty old and I have not seen this again. Please reopen if this is an issue again.
from esp-link.
Related Issues (20)
- esp link not working with Comgrow Z1 laser engraver HOT 1
- Esp-link serial bridge to USB HOT 1
- How long does the reset-Pin triggered? HOT 3
- mdns stop working/resolving hostname.local after ~2.5 minutes after boot HOT 3
- TCP socket not delivery data HOT 13
- how to change soft-ap static IP and PORT? HOT 9
- ESP-link to connect a Smart Meter HOT 3
- No AP HOT 7
- 192.168.4.1 won't respond
- is stub and send flash finish HOT 2
- Issue setting baud rate to 2400 HOT 1
- Connect display
- No AP created - is stub and send flash finish HOT 1
- if your having trouble flashing (not an issue)
- Telnet
- collect2.exe: error: ld returned 1 exit status HOT 2
- RS232 to UDP or TCP HOT 5
- SNTP over serial?
- Build Failure on Ubuntu 20.04.6 LTS (/bin/sh: 1: Syntax error: "(" unexpected) HOT 1
- wlan bridge/repeater HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp-link.