switch gpio 0 always high after boot

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

switch gpio 0 always high after boot

#1 Post by riker1 » 18 Jan 2018, 13:26

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
Last edited by riker1 on 21 Jan 2018, 09:17, edited 1 time in total.

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

Re: switch gpio 0 alsway high after boot

#2 Post by grovkillen » 18 Jan 2018, 14:02

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.
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:

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#3 Post by riker1 » 18 Jan 2018, 15:19

Hi

thanks for the link.

but do not understand the default setting options so.

No funktion for GPIO 2 and 0 for example?

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

Re: switch gpio 0 alsway high after boot

#4 Post by grovkillen » 18 Jan 2018, 15:39

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.
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:

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#5 Post by riker1 » 18 Jan 2018, 16:37

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?

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

Re: switch gpio 0 alsway high after boot

#6 Post by Shardan » 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.
Regards
Shardan

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#7 Post by riker1 » 18 Jan 2018, 18:43

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?

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

Re: switch gpio 0 alsway high after boot

#8 Post by grovkillen » 18 Jan 2018, 19:08

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.
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:

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#9 Post by riker1 » 19 Jan 2018, 09:32

ok thanks for clarification
will try a resistor between GPIO 0 and VCC

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#10 Post by riker1 » 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?

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

Re: switch gpio 0 alsway high after boot

#11 Post by grovkillen » 19 Jan 2018, 18:27

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-)
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: switch gpio 0 alsway high after boot

#12 Post by Shardan » 19 Jan 2018, 22:06

Simple reason: Cost.
It is the cheapest ESP.
Regards
Shardan

psy0rz
Normal user
Posts: 232
Joined: 02 Feb 2017, 12:12

Re: switch gpio 0 alsway high after boot

#13 Post by psy0rz » 21 Jan 2018, 04:34

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
Please support ESPEasy development via Patreon or buy us a coffee.

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 alsway high after boot

#14 Post by riker1 » 21 Jan 2018, 09:16

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

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#15 Post by riker1 » 19 Mar 2018, 16:58

Hi
is it possible to create a rule for reboot to
set gpio 0 low after startup?

how would a rule loook like?

Thanks

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: switch gpio 0 always high after boot

#16 Post by Micha_he » 19 Mar 2018, 17:27

It's simple...

Code: Select all

on System#Boot do
	gpio,0,0
endon

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#17 Post by riker1 » 19 Mar 2018, 17:40

ok, perfect, thanks, will check

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#18 Post by riker1 » 20 Mar 2018, 08:08

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

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

Re: switch gpio 0 always high after boot

#19 Post by grovkillen » 20 Mar 2018, 08:58

Then you need a physical pull down...?
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:

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#20 Post by riker1 » 20 Mar 2018, 11:04

ok, you mean a resistor between GPIO 0 and GND?

Would 10 kOhm be sufficient?

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

Re: switch gpio 0 always high after boot

#21 Post by grovkillen » 20 Mar 2018, 11:54

That's what I use... :roll:
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:

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: switch gpio 0 always high after boot

#22 Post by Micha_he » 20 Mar 2018, 12:52

@riker: Are you specifically talking about this relay-modul?
relay_modul.jpg
relay_modul.jpg (77.29 KiB) Viewed 21150 times

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#23 Post by riker1 » 20 Mar 2018, 14:25

yes I am
even need a pulldown to boot up the esp-01

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#24 Post by riker1 » 20 Mar 2018, 14:27

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

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

Re: switch gpio 0 always high after boot

#25 Post by grovkillen » 20 Mar 2018, 15:35

It might flicker, if I remember correctly (only got one ESP-01 running).
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:

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: switch gpio 0 always high after boot

#26 Post by Micha_he » 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
esp01s.jpg (8.58 KiB) Viewed 21124 times
hardware.jpg
hardware.jpg (30.09 KiB) Viewed 21124 times
devices.jpg
devices.jpg (17.71 KiB) Viewed 21124 times
rules.jpg
rules.jpg (11.59 KiB) Viewed 21124 times

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#27 Post by riker1 » 22 Mar 2018, 11:05

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.

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#28 Post by riker1 » 22 Mar 2018, 11:08

Hi
where did you get the R148 from?
Only find 147

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: switch gpio 0 always high after boot

#29 Post by Micha_he » 22 Mar 2018, 11:37

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 .

riker1
Normal user
Posts: 344
Joined: 26 Dec 2017, 18:02

Re: switch gpio 0 always high after boot

#30 Post by riker1 » 22 Mar 2018, 12:10

Micha_he wrote: 22 Mar 2018, 11:37

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

nisho
New user
Posts: 1
Joined: 12 Apr 2019, 00:43

Re: switch gpio 0 always high after boot

#31 Post by nisho » 12 Apr 2019, 00:48

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,

Micha_he
Normal user
Posts: 369
Joined: 07 Feb 2018, 19:14
Location: Helmstedt, Germany

Re: switch gpio 0 always high after boot

#32 Post by Micha_he » 12 Apr 2019, 07:39

Yes maybe. I have tried several values...

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

Post Reply

Who is online

Users browsing this forum: No registered users and 32 guests