with using GPIO 0, no boot ESP8266-01

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
fo8266
New user
Posts: 2
Joined: 31 Dec 2018, 08:50

with using GPIO 0, no boot ESP8266-01

#1 Post by fo8266 » 31 Dec 2018, 10:29

Hello,

i want to use the GPIO 0 from a ESP8266-01 as an output to switch an optocoupler with ESPEASY.
The GPIO 0 is connected to the optocoupler 4N28 Pin1(Anode) with an resistor 220R. Pin 2(Kathode) is connected to ground.
With this connection the ESP doesen't boot. When i cut the connection the ESP boots and run without any failure.
I can't use the GPIO 2 because it's used as an input for DS18B20, see also attachment

can i use the TX, RX Pins in ESPEASY or is there an option to define any rules at startup to make a correct boot.

Thank you for information

greetings from bavaria

reini
Attachments
GPIO_0_noboot.png
GPIO_0_noboot.png (10.54 KiB) Viewed 9308 times

User avatar
grovkillen
Core team member
Posts: 3621
Joined: 19 Jan 2017, 12:56
Location: Hudiksvall, Sweden
Contact:

Re: with using GPIO 0, no boot ESP8266-01

#2 Post by grovkillen » 31 Dec 2018, 11:31

You can use the RX/TX but they will not be behaving great on boot (switch may flicker etc). You need to try of it's good enough for your project.
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you :idea: :idea: :idea:

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: with using GPIO 0, no boot ESP8266-01

#3 Post by Shardan » 31 Dec 2018, 13:33

GPIO 0 isn't suitable for using the way you did.

The ESP8266 - the chip itself - is able to boot with several states:
- Flash mode
- starting from internal flash
- starting from external flash

These modes are controlled by pulling GPIO0 and GPIO2 high or low.
If GPIO0 is pulled low the ESP8266 will always start into flash mode, that's what your circuit does.

As Grovkillen mentioned you may use GPIO1 / GPIO3, the serial interface GPIOs.
Disable serial in the advanced settings to avoid "flickering" by serial signals.
As this setting is active after booting up there might be some flickering on bootup.
Better way might be using an ESP with more GPIOs broken out (ESP-12E/F for example).
Regards
Shardan

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: with using GPIO 0, no boot ESP8266-01

#4 Post by kimot » 31 Dec 2018, 14:03

RX pin only receives serial, so using it - no flickering, because no sender in your circuit.

Or change your circuit:
3.3v ---- R1 ------ optodiode -----GPIO0

And switch opto with log 0 instead log 1

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: with using GPIO 0, no boot ESP8266-01

#5 Post by Shardan » 31 Dec 2018, 14:39

kimot wrote: 31 Dec 2018, 14:03 RX pin only receives serial, so using it - no flickering, because no sender in your circuit.

Or change your circuit:
3.3v ---- R1 ------ optodiode -----GPIO0

And switch opto with log 0 instead log 1
Rx is always high on boot and would switch on the opto coupler.
Regards
Shardan

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: with using GPIO 0, no boot ESP8266-01

#6 Post by kimot » 31 Dec 2018, 15:34

No, if it will be connected like I wrote.

fo8266
New user
Posts: 2
Joined: 31 Dec 2018, 08:50

Re: with using GPIO 0, no boot ESP8266-01

#7 Post by fo8266 » 01 Jan 2019, 10:56

Hello,

thank you all for information. I've tested to use the RX/TX Pins but there is a problem with a connection to FHEM. It seems that the espbridge in FHEM doesn't control the RX/TX pin correct. Testing with a toggling bit every minute it works fine with GPIO 0 and GPIO2 but if i switch in ESPEASY the Device to GPIO 1 or GPIO 3 there is no change in the status of the device. HTTP commands already works fine to all GPIO's ?
Is that an known issue?

Greetings
Reini

Shardan
Normal user
Posts: 1156
Joined: 03 Sep 2016, 23:27
Location: Bielefeld / Germany

Re: with using GPIO 0, no boot ESP8266-01

#8 Post by Shardan » 01 Jan 2019, 12:59

fo8266 wrote: 01 Jan 2019, 10:56 Hello,

thank you all for information. I've tested to use the RX/TX Pins but there is a problem with a connection to FHEM. It seems that the espbridge in FHEM doesn't control the RX/TX pin correct. Testing with a toggling bit every minute it works fine with GPIO 0 and GPIO2 but if i switch in ESPEASY the Device to GPIO 1 or GPIO 3 there is no change in the status of the device. HTTP commands already works fine to all GPIO's ?
Is that an known issue?

Greetings
Reini
Honestly I never tried to control GPIO1/3 it might be ignored by the FHEM ESP-Bridge.

As a workaround:
It is possible to define a notify in FHEM that sends the http-command.

For example i use this notify to switch a NETIO-Outlet:

Code: Select all

Netio42:on { GetHttpFile("192.168.17.124", "/event?port=1xxx&pass=zzzzzz") }
Regards
Shardan

kimot
Normal user
Posts: 190
Joined: 12 Oct 2017, 20:46

Re: with using GPIO 0, no boot ESP8266-01

#9 Post by kimot » 02 Jan 2019, 09:21

With old Sonoff Basic I use GPIO14 for DS18B20.
New versions of Sonoffs basic has got GPIO14 no more.
So I use RX pin ( GPIO3 ) for DS18B20 connection without any problem.
For safety, I switch off serial port in "Tools" and serial logging too.

Post Reply

Who is online

Users browsing this forum: No registered users and 31 guests