Page 1 of 1

switch gpio 0 always high after boot

Posted: 18 Jan 2018, 13:26
by riker1
Hi

I tried to have default low for gpio 0.

so in hardware I said boot default low.
in device switch is defined normally, not pulled high.

but after reboot or new repowering, gpio is 1 high?

how can I avoid this?

thanks
T

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 14:02
by grovkillen
You can't.

https://www.letscontrolit.com/wiki/inde ... figuration

But you can use rules to set it to low after boot is completed. But it will always be high at first.

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 15:19
by riker1
Hi

thanks for the link.

but do not understand the default setting options so.

No funktion for GPIO 2 and 0 for example?

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 15:39
by grovkillen
Not really no. The default setting is not that accurate (at the moment). I tend to use rules just to be sure. But we might need to take a look at the default settings and fix it.

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 16:37
by riker1
ok thanks for the info.

maybe you know this:

I have an ESP-01S relais .

but ESP is not booting when inserted, especially when GPIO0 is inserted.

Do not know how to solve this. Rules is too late, as they are handled after powering up, right?

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 18:01
by Shardan
Try a 10K Resistor from 3.3V to GPIO0 to keep it high if it isn't on the board.
A "Low" at boot time will not work as it puts the ESP8266 into flash mode.

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 18:43
by riker1
Shardan wrote: 18 Jan 2018, 18:01 Try a 10K Resistor from 3.3V to GPIO0 to keep it high if it isn't on the board.
A "Low" at boot time will not work as it puts the ESP8266 into flash mode.
Hi
do not understand this.
https://www.letscontrolit.com/wiki/inde ... figuration
is saying it is always high at boot , so how can it come into flash mode?

Re: switch gpio 0 alsway high after boot

Posted: 18 Jan 2018, 19:08
by grovkillen
The MCU (ESP8266) will only boot if it defects a high signal on GPIO 0. Thus the GPIO 0 will always be high during boot but once the firmware is booted the GPIO 0 can be set to low or used as what ever.

But please understand that the high signal on GPIO 0 is not set by the ESP but by external source. The pre-build boards take care of this but raw ESP chips do not.

Re: switch gpio 0 alsway high after boot

Posted: 19 Jan 2018, 09:32
by riker1
ok thanks for clarification
will try a resistor between GPIO 0 and VCC

Re: switch gpio 0 alsway high after boot

Posted: 19 Jan 2018, 18:16
by riker1
it is working with the resistor
perfect

i am wondering why they sell esp-01s with relais, how can this work?

Re: switch gpio 0 alsway high after boot

Posted: 19 Jan 2018, 18:27
by grovkillen
riker1 wrote: 19 Jan 2018, 18:16 it is working with the resistor
perfect

i am wondering why they sell esp-01s with relais, how can this work?
Don't know really. 8-)

Re: switch gpio 0 alsway high after boot

Posted: 19 Jan 2018, 22:06
by Shardan
Simple reason: Cost.
It is the cheapest ESP.

Re: switch gpio 0 alsway high after boot

Posted: 21 Jan 2018, 04:34
by psy0rz
Which version of ESPEasy are you using? I've tested this with the latest mega and v2.0, and i was able to set the bootstate of GPIO 0 to both low and high. (and it would give the correct signal)

Edwin

Re: switch gpio 0 alsway high after boot

Posted: 21 Jan 2018, 09:16
by riker1
Hi
I am using r147 on ESP01 1M
I was not able to flash and boot a V2xx on an ESP-01
it was never starting up right with V2 for me

Re: switch gpio 0 always high after boot

Posted: 19 Mar 2018, 16:58
by riker1
Hi
is it possible to create a rule for reboot to
set gpio 0 low after startup?

how would a rule loook like?

Thanks

Re: switch gpio 0 always high after boot

Posted: 19 Mar 2018, 17:27
by Micha_he
It's simple...

Code: Select all

on System#Boot do
	gpio,0,0
endon

Re: switch gpio 0 always high after boot

Posted: 19 Mar 2018, 17:40
by riker1
ok, perfect, thanks, will check

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 08:08
by riker1
hi this is working , but will take a will .
so how can I avoid gpio beeing switched after powerup?

rule skips in after reboot, so too late.

setting hardware gpio to input low does not solve it

maybe a resistor?

Thanks T

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 08:58
by grovkillen
Then you need a physical pull down...?

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 11:04
by riker1
ok, you mean a resistor between GPIO 0 and GND?

Would 10 kOhm be sufficient?

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 11:54
by grovkillen
That's what I use... :roll:

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 12:52
by Micha_he
@riker: Are you specifically talking about this relay-modul?
relay_modul.jpg
relay_modul.jpg (77.29 KiB) Viewed 21492 times

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 14:25
by riker1
yes I am
even need a pulldown to boot up the esp-01

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 14:27
by riker1
grovkillen wrote: 20 Mar 2018, 11:54 That's what I use... :roll:
and with this setup after powering up, GPIO 0 stays low?

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 15:35
by grovkillen
It might flicker, if I remember correctly (only got one ESP-01 running).

Re: switch gpio 0 always high after boot

Posted: 20 Mar 2018, 19:09
by Micha_he
It works like follow at me:

ESP-01 on ESP-01S relay modul v1.0 with ESPEasy R148.
One resistor 10k between Vcc and CH_PD and one resistor 15k between Vcc and GPIO0 was soldered on the relay-modul.
No flicker, no "1" while or after boot !
esp01s.jpg
esp01s.jpg (8.58 KiB) Viewed 21466 times
hardware.jpg
hardware.jpg (30.09 KiB) Viewed 21466 times
devices.jpg
devices.jpg (17.71 KiB) Viewed 21466 times
rules.jpg
rules.jpg (11.59 KiB) Viewed 21466 times

Re: switch gpio 0 always high after boot

Posted: 22 Mar 2018, 11:05
by riker1
Micha_he wrote: 20 Mar 2018, 19:09 It works like follow at me:

ESP-01 on ESP-01S relay modul v1.0 with ESPEasy R148.
One resistor 10k between Vcc and CH_PD and one resistor 15k between Vcc and GPIO0 was soldered on the relay-modul.
No flicker, no "1" while or after boot !
ok, thanks, will try this.

Re: switch gpio 0 always high after boot

Posted: 22 Mar 2018, 11:08
by riker1
Hi
where did you get the R148 from?
Only find 147

Re: switch gpio 0 always high after boot

Posted: 22 Mar 2018, 11:37
by Micha_he
I don't know anymore :cry:
Do you think, the R148 make any difference? If you wish, I would attach the R148 here today evening or send it as PM.

E.g. you can download it from here .

Re: switch gpio 0 always high after boot

Posted: 22 Mar 2018, 12:10
by riker1
Micha_he wrote: 22 Mar 2018, 11:37

E.g. you can download it from here .
thanks.

Re: switch gpio 0 always high after boot

Posted: 12 Apr 2019, 00:48
by nisho
Micha_he wrote: 20 Mar 2018, 19:09 It works like follow at me:

ESP-01 on ESP-01S relay modul v1.0 with ESPEasy R148.
One resistor 10k between Vcc and CH_PD and one resistor 15k between Vcc and GPIO0 was soldered on the relay-modul.
No flicker, no "1" while or after boot !
esp01s.jpg
hardware.jpg
devices.jpg
rules.jpg
Hey there Micha_he,

Because i didn't have a 15K with me, I tried and put a 10K resistor VCC<>CH_PD & 10K resistor VCC<>GPIO0, but it did not work.
Do you think it is because of the 10K i used and it's necessary to be 15K?

Thanks in advance,

Re: switch gpio 0 always high after boot

Posted: 12 Apr 2019, 07:39
by Micha_he
Yes maybe. I have tried several values...

Test it, with 4.7k and 10k in series !