Serial Monitor goes havoc when spinning up D1 mini with a load on 5V

Hi! Forgive me if this is not the most appropriate board but maybe you can at least direct me further.

When I plug in a “naked” D1 mini via USB then I can connect, flash, and run the program (which is GitHub - afoeder/Somfy_Remote: Somfy remote control emulator connected to MQTT BTW); I can also monitor what happens on the Serial Monitor.

However when I plug in an FS1000 transmitter and restart the device by pressing reset, I get an infinite scrolling of weird characters that seem to repeat:

Eventually (after 20, 30 seconds) my Visual Studio Code crashes, I guess the buffer just went full.

An upload in this case also doesn’t work:

loading .pio/build/d1_mini_pro/firmware.bin
esptool.py v3.0
Serial port /dev/cu.usbserial-1410
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header

it just eventually time-outs.

However if I unplug the 5V of my transmitter, (re)start the D1 mini again (by pressing reset for example), everything works; and I even can re-connect the 5V!

So TL;DR: booting with a load on +5V somehow makes the (serial) interface unavailable?

Thanks for any help or insights!

Hm. Just for fun, can you change this line to

to

Serial.begin(74880);

then this

also to

monitor_speed = 74880

and repeat the same experiment? You should get your normal output at first, and after plugging in your transmitter and restarting the device, maybe now the output won’t be garbled, but the output from the ESP8266’s bootloader code telling something has happened, like an error reading out flash, and it will try to reboot, over and over again, but the transmitter is still affecting the circuit so nothing changes…

1 Like

Hey that’s a good one! so 7488 is the default baud rate I guess. Now I get:

(Copypasta:

Fatal exception (0): 
epc1=0x40100003, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, 
depc=0x00000000

I’ll try to help myself with Google now but will still be grateful if you had another hint :slight_smile:

Thanks already!

//edit: nevermind: Fatal exception (0): - Resolved - Everything ESP8266… wow!

At least make sure all of GPIO0, GPIO2 and GPIO15 are never directly wired to either Vcc or ground

Is there some official source of this?

These are the bootloader pins: Home · espressif/esptool Wiki · GitHub

They are read on bootup to determine certain settings (which mode to boot into, bootloader or normal application or SD card, which flash voltage to use that was on the ESP32). If these are wrong the ESP will indeed not boot…

Is your transmitter module placed on one of these critical GPIO pins?

absolutely… apparently I misunderstood/confused the many forks of this kind of project and eventually used the wrong pin, i.e. GPIO2!
I now tried D1 (i.e. GPIO 5) which works fine.

Now when I’m looking for it the Internet is full of notices saying some Pins must not be HIGH or LOW on boot etcpp…

Thanks again a lot for your help! I’ve learned a lot already. And I can throw the PCB I’ve ordered in the bin :cry: :sweat_smile:

Cheers!

Hmm in that case, have you tried a resistor hack? A strong pullup or pulldown resistor on the pins to nodge the voltage in the right direction again?

But glad the source of the problem is understood now at least :smiley:

1 Like

I’ve read a bit into it and it seems these GPIOs just shouldn’t be used, and I second that. I’ll wait until my (first ever) PCBs arrive, examine them and will take the opportunity to improve them anyways.
Thanks a lot again!