Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By MarkoM
#60320 Hello to all!
I'm Marko, electronic engineering hobbyist, who discovered esp8266 recently.
While finding my way around, I've noticed some strange behavior on a ESP-12F, that I'm not sure what causes it.
I've made a simple sketch that has wifi, simple web server, some I2C communication, real time clock with ntp update and Arduino OTA. It's kinda learning project where the code itself does nothing special, it shows a simple web page with some controls, turning a few leds through IO expander, based on user input and current time.
While doing the tests, I noticed that supply current is fluctuating from 10-20mA to 80-90mA, a few times a second. The module has an on board led, connected to GPIO2, which is turned on in the sketch. Previously mentioned oscillations are somewhat visible on this led, because it changes it's brightness in the same rhythm as the current changes noticeable on the power supply.
The first thing I've done when troubleshooting the issue was multi stage bypassing of power supply, as it seemed obvious, since the test circuit is on the breadboard. This had no effect on the fluctuations.
The next thing I did was to remove parts of the code and libraries from the sketch, one by one, suspecting that this comes from software. I ended up with nothing but the bare minimum for turning GPIO2 low. This, also, had no effect.
The next thing was to remove all components from the circuit, but a few jumpers for basic configuring of esp module. No effect, as you may already predict. :)
The last thing I did is uploading MicroPython on the module. I've made it connect to wifi and put GPIO2 to low, which is kind of similar state as in my previous tests. The module consumes constant 75mA with MicroPython and no fluctuations are noticeable, not in current measurement, nor in led brightness change.
I didn't test with another module, since all I have come from the same source (ultra cheap ones from Aliexpress - could this be the cause?).
It came to my mind that some settings in IDE could be the problem, but I've tried altering the ones I understand, with no success. IDE is 1.6.13.
Do you have any idea what could be the cause?
Thank you!
User avatar
By RichardS
#60333 Current spikes can be seen every 100mS, these are the WIFI beacon pulses.... broadcasting the SSID etc...

Upwards of 100-200mA has been report, these last around 2mS (one TU is 1024 uS and I think it lasts 2 TU)

http://www.mathworks.com/help/comm/exam ... hworks.com

RichardS
User avatar
By rudy
#60337 What did you think you should see?

I used different energy when I climb the stairs compared to walking. I use more when walking that sitting at this computer typing this. It all can produce an average power consumption but that is of limited use unless I am also counting calories.

There are different things going on in the WiFi module and some things take more power than others.
User avatar
By MarkoM
#60339 Guys, thanks for the responses!

The thing that is bothering me is why I don't see those fluctuations with MicroPython firmware and why it causes led at gpio2 to slightly change brightness? Bad board design? But again, why not with MicroPython. Besides the things mentioned in my previous post, I can exclude psu, since I've tried with a few of them, both linear and smps, up to 5A.