0
\$\begingroup\$

enter image description here

The image above is my schematic for ESP12E. I soldered the circuit as shown. When ESP is in WiFi mode (like an AP), and I try to connect to that from any device (laptop, mobile) there is a very high occurrence of ESP reset. As long as no device is connected to this WiFi, it keeps broadcasting SSID fine. But as soon as I try to connect, problem of reset happens (over75% times I'd reckon)

Has any one experienced similar behavior? I'm using good power sources (1 Amp). In fact I've tried with multiple power sources, all giving same problem. Any help would be greatly appreciated.

1: https://i.stack.imgur.com/nlYb8.jpgenter image description hereenter image description hereenter image description here

\$\endgroup\$
12
  • 2
    \$\begingroup\$ (a) Have you got an oscilloscope and viewed the voltage directly at the ESP12E module power supply pins, when you try to connect via WiFi and the MCU resets? (b) Can you add a large (>100uF) tantalum or electrolytic capacitor (observe correct polarity) as close as possible to the module's power pins and repeat your test? Is there any reduction in the percentage of resets, even if some resets still happen? (c) Can you add some clear, in-focus photos of your hardware setup, especially including the wiring from power supply to your board? (d) Did you load-test your power supplies? If so, how? \$\endgroup\$
    – SamGibson
    Jul 30 '18 at 18:13
  • \$\begingroup\$ I have470 uF across power supply. I have not tested power source stability. \$\endgroup\$
    – Ouroboros
    Jul 31 '18 at 2:30
  • \$\begingroup\$ I've added images \$\endgroup\$
    – Ouroboros
    Jul 31 '18 at 2:42
  • \$\begingroup\$ I'm using 12A Ac DC power adapter, along with you robot module that steps it down to 5&3.3v. \$\endgroup\$
    – Ouroboros
    Jul 31 '18 at 2:43
  • \$\begingroup\$ Without something else to compare to, it's hard to say if this is a brownout due to a weak power solution, or a crash and restart due to software error. \$\endgroup\$ Jul 31 '18 at 3:21
1
\$\begingroup\$

My guess is a power supply problem. An active ESP8266 uses much more current (~ 300mA) than other components you might have worked with.

That 'you robot' power supply uses SMD linear regulators to reduce your 12V to 5V and 3.3V. When you draw 300mA from the 5V with an input of 12V (is it really 12V or somehwat more??) the 5V regulator dissipates 2.1W, which is way too much.

For a test, my can try a beefy USB power supply (at least 1A).

If this solves the poblem, I suggest you use a switching mode PSU to reduce the 12V to 5V and 3.3V.

\$\endgroup\$
2
  • \$\begingroup\$ Thanks @Wouter. The problem did not go away due to code change (sleep) as I mentioned in my answer, so what you are saying may indeed be correcty \$\endgroup\$
    – Ouroboros
    Jul 31 '18 at 16:47
  • \$\begingroup\$ Putting a 470 cap across 3.3V stabilizes things. I'd put it across 12V, which is incorrect and defeats the whole point of using bypass cap in the first place using esp. Thanks to @Sam for pointing it out \$\endgroup\$
    – Ouroboros
    Jul 31 '18 at 19:38
0
\$\begingroup\$

Very weird these ESP issues, and I've faced similar of them in past, each having its own even weirder workarounds. Hope this helps someone:

This time, I put a sleep in my code as so (I'm using micropython):

macaddress = ubinascii.hexlify(ap_if.config('mac'),':').decode()
macaddress = macaddress.replace(':','')
ap_if.config(essid="ABC1_"+macaddress, password="ZYXDFWER")
# Fix added recently : Added 3 sleeps of 0.5 sec each
utime.sleep_ms(500)  
utime.sleep_ms(500)
utime.sleep_ms(500)
ap_if.ifconfig(('192.168.0.1', '255.255.255.0', '192.168.0.1', '192.168.0.1'))

And now, every thing (at least so far) seems to work.

I've no explanation for why that would happen, but it may be possible that DHCP settings in last line do not take effect until the ssid configuration is complete, and that may require some things which happen after that line executes. So may be sufficient sleep ensured those things finished, and then DHCP settings work.

I'm just guessing. Anyone who has more idea, I request to share their pearls of wisdom. This unfortunately is beyond my domain of expertise, seeking someone who has had similar issues.

EDIT 1:

The issue was not fixed, and still happens :( Apparently power supply issue? I'm going to use USB on the 'yu robot' and try again, and let you guys know the result.

EDIT 2:

The issue seems to be that I've not put 470uF cap where I need it, that is, its needed across 3.3V power, whereas I'd put it at the 12V power. I put the cap across yu robot's 3.3V output (lower right part has a +/- where I put the cap) and things have been stable so far. No reboots, but i've done that just 8-10 times. I'll keep doing and let you know after some 100 attempts over next week or so.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.