ESP8266EX pin advice

I have migrated one of my previously ATmega128 /AT328P (5V) based devices to ESP8266EX (Wemos D1 MiniPro). My first steps had still been successful (WiFi, I2C stuff, etc) but at some point, when connecting more peripheral stuff I had first experienced strange malfunctions (e.g. the 8-relais module that I am controlling via a SIPO shift-register (with additional 3v3 to 5V level shifter) had turned on/off erratically and at some point something on the Wemos D1 board seems to have burned out (the ESP8266 chip now seems to get hot very quickly and it no longer responds to reprogramming).

I have various suspicions of what may have been the problem - but before using the replacement D1 I want to double check on all of them, e.g.:

  1. I am using the A0 pin as a fuse-sensor, e.g. to check if the 12V current that I am switching via the relais actually gets to the destination: It might be that the voltage divider is still wrong (from my original 5V design) and that I just fried the analog input with more than 1V (I'll double check that before my next attempt).

  2. As far as I know the D1's 3v3 regulator (RT9013 ?) should be good for 500mA. It might be that all my stuff together with the ESP8266 just exceeds that. I am using: one I2C based 2x16 LCD display, one I2C based RTC, two I2C 32kb EEPROMs. There is then a simple ASK receiver (RX470-4 Superheterodyne 433 mhz Receiver) which supposedly only needs a working current of 2.1mA. The 5V 8-Relais is powered separately via a 1A buck-converter (the same that also provides the RAW/5V input to the D1) and the SIPO+level-shifter should not put much strain on the 3v3. Unless the ESP8266 already needs most of the available 500mA for itself I would think that this should not be the problem.

  3. In normal operation the device is powered by a 2A 12V power supply: which is used via a 1A 5V buck-converter to power the D1 but also used directly in some sub-circuit that provides either 12v or 9V to whatever is connected to the 8-relais assembly. While testing I sometimes power the D1 directly via the USB connector (with/without the regular/separate 12V supply). The respective USB connection is obviously only capable to deliver several hundred mA at most.. maybe the unpowered parts just created some excess load (when 12V was not connected) or the parallel use of the USB 5V with the buck-converter's 5V (while 12V was also connected) created some problems (the two 5V voltages are here are not identical and I don't know what side effects that might cause). Maybe I should better disconnect certain parts of the circuit while using USB power.

But now to the main question:

  1. I found that many of the ESP8266's pins have some attached limitations. see PIN limitations (see A Beginner's Guide to the ESP8266):
my use		PIN  = GPIO		special 
		D0   = 16		wake up from sleep (no pull-up but pull-down instead)
I2C		D1   = 5
I2C		D2   = 4
ASK RX		D3   = 0		boot mode selection!	(No Hi-Z)
		D4   = 2		boot mode selection!	(the internal pullup resistor is enabled during boot)
SIPO data	D5   = 14
SIPO CLK	D6   = 12
SIPO latch	D7   = 13
powerSel	D8   = 15		boot mode selection! (this pin is always pulled low; pull-up NOT useable)
		RX   = 3
		TX   = 1
fuseSens	A0				1V MAX!
		
			"boot mode selection" pins cannot be used as INPUTs (without additional circuitry)

I already tried to avoid the special purpose pins as far as possible but due to the pin shortage I have not completely succeeded and I'd like to know if my use of pins D3 and D8 is OK or if any changes might be in order:

  • D3: I am currently using this for the 'data' line of my 3v3 ASK receiver (not successfully tested yet - and I might still add a Schmitt-trigger to maybe get better reception results). I guess received data might be considered INPUT - so do I need to move this to D0 instead?
  • D8: I am using this pin to control a MOSFET/relais/buck-converter based sub-circuit that produces 12V or 9V output depending on whether the output of this pin is high or low.

Any suggestions?

wothke:
I just fried the analog input with more than 1V (I’ll double check that before my next attempt).

As far I remember, A0 can handle up to 3.3v as other GPIO but it can measure only b/w 0 and 1v. If >1v, the result is 1023.
In any case it is clearly not 12v compliant :slight_smile:

wothke:
2) As far as I know the D1’s 3v3 regulator (RT9013 ?) should be good for 500mA. It might be that all my stuff together with the ESP8266 just exceeds that. I am using: one I2C based 2x16 LCD display, one I2C based RTC, two I2C 32kb EEPROMs. There is then a simple ASK receiver (RX470-4 Superheterodyne 433 mhz Receiver) which supposedly only needs a working current of 2.1mA. The 5V 8-Relais is powered separately via a 1A buck-converter (the same that also provides the RAW/5V input to the D1) and the SIPO+level-shifter should not put much strain on the 3v3. Unless the ESP8266 already needs most of the available 500mA for itself I would think that this should not be the problem.

If it’s the 8266 that become hot, it’s not an RT9013 issue but something wrong in what you’re connected to GPIO (like back currents, or short circuit).
Anyway, take also in account that the ESP is power hungry when doing WiFi.

wothke:
4) I found that many of the ESP8266’s pins have some attached limitations. see PIN limitations (see A Beginner's Guide to the ESP8266):

GPIO 0, 2 and 15 are only checked at startup. After bootup, you can do what you want with them, including Input if you’re sure of their level at bootup. For safety, I prefer use them as output :slight_smile: GPIO 2 is also used as debug TX during bootup : your electronic has to take it in account.
GPIO 16 may be used for deepsleep. If you’re not doing deepsleep, it’s free of other usage.

RX/TX ping can be used as normal GPIO if your not using the console. Take in account that on some model, the internal LED is connected to TX.

So all in all, only Flash related GPIO are not usable.

This is true for raw ESP module (like the ESP-201 I’m widely using) : Wemos D1 MiniPro may have some other limitations.

wemos has a cirquit on A0 to read 0 to 3.3 V. A0 is not gpio