Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
ohaldi
Normal user
Posts: 61
Joined: 31 Jan 2020, 09:10
Location: Switzerland

Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#1 Post by ohaldi » 04 Dec 2023, 14:15

Hello
I'm using the following board : Two Canal ESP32-WROOM-32E. See Picture.
ESP32-WROOM-2Relais.jpg
ESP32-WROOM-2Relais.jpg (72.79 KiB) Viewed 2882 times
I use it to close my garage door if it's left open.
I use a relay that sends pulses to open or close the door.
The problem is when the boot card the two relays make a small pulse. In my case, this activates a door movement.
How can I configure ESPEasy so that when it starts up, nothing happens to the relays?


For information here my Rules:
// Info : See Rules 2 / Stand vom : 04.12.2023 /Ho
on System#Boot do
notify 1 //Send Email System Boot
TimerSet,1,0 // Stop Loops
TimerSet,2,0 // Stop Repeat
AsyncEvent,PIR#State=[PIR#State] // Let the PIR eventhandler take care of the logic
LCD,4,1,%ip% // Show IP
endon

on Door#State=0 do // Door is open
TimerSet,1,0 // Stop Loops
event,Progress
LCD,1,1,""
LCD,2,1,"Das Tor ist offen "
endon

on DelayButton#State=1 do // Set Delay ON
TaskValueSet 5,1,40 // Slow Prog.Bar 40s
event,Progress
LCD,4,1,"Pause ist EIN V[Delay#Value]"
endon

on Progress do
let 1,%eventvalue1|20% // Display with 20 characters
LoopTimerSet,1,[Delay#Value],%v1% // Repeat timer 1 every x sec. for n times
endon

on Rules#Timer=1 do
LCD,1,1,{substring:0:%eventvalue2%:********************} // Timer Line 1
if %eventvalue2%>15 // Reached 70%?
Pulse,17,1,1400 // Pulse Alarm
end
if %eventvalue2%=%v1% // Have we reached 100%?
lcdcmd,clear
LCD,1,1,"Die Tor geht zu!"
Pulse,16,1,400 // Pulse on GIPO 16 to close the Door
TimerSet,2,20 // Timer to check it door closed after 20s else repeat
endif
endon

On Rules#Timer=2 do // Door timer
if [Door#State]=0 // Door still open?
LCD,1,1,"Tor schliessung !.."
Pulse,16,1,400 // Pulse on GIPO 16 to close the Door
TimerSet,2,20 // Repeat wait timer 2 until door closed
else
TimerSet,2,0 // Stop timer 2
endif
endon

on PIR#state do // Will be triggered when PIR state changes
if [Door#State]=0 // Door open?
if %eventvalue1%=1
TimerSet,1,0 // Stop countdown
LCD,1,1,"ACHTUNG PIR Meldung!"
notify 1 //Send Email
AsyncEvent,Progress // Using default
endif
endif
endon

On DOOR#State=1 do // Door closed
lcdcmd,clear
LCD,2,1,"Das Tor ist zu"
LCD,4,1,"ATEHO 03.12.23 V[Delay#Value]"
TimerSet,1,0 // Stop Loops
TimerSet,2,0 // Stop Repeat
TaskValueSet 5,1,10 // Set to fast Prog.Bar 10s
Endon

I'm still improving my Rules. I'm a beginner. But so far it's working pretty well.

My devices:
ESP32-Devices.jpg
ESP32-Devices.jpg (88.77 KiB) Viewed 2882 times
Regards
Otto

TD-er
Core team member
Posts: 8757
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#2 Post by TD-er » 04 Dec 2023, 15:28

Some pins always do send out some undefined pulses when the ESP boots.
See: https://espeasy.readthedocs.io/en/lates ... e-on-esp32
Not sure if this also applies to your setup.

It is best to pick the state which is the default state at boot for the most harmless situation.
I assume the most harmless situation is to not have a motor running.
Or do you need to trigger a short connection to simulate a button press of an existing garage door opener?

You can have a look at the boot states on the Hardware tab, to see if you can select a state which will not trigger a pulse during boot.
But keep in mind this selected state will only be set after loading the settings, which takes roughly 300 - 400 msec after boot.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#3 Post by chromo23 » 04 Dec 2023, 16:17

I have the same issue with GPIO 17. It´s pulled low for a split second.
The relays on your board seems to be attached to GPIO 16 & 17. Do both relays turn on at boot. (my relay on GPIO 16 is fine)
Setting the boot state didn´t help me. but using another GPIO :) (which is a bit more complicated with a ready made board but not impossible ;) )
But the strange thing is, that your relays seem to be active on high. Mine are acting on low. Your relay on GPIO 17 shouldn´t theoretically turn on at boot...

TD-er
Core team member
Posts: 8757
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#4 Post by TD-er » 04 Dec 2023, 16:24

GPIO 16 and 17 on a classic ESP32 (not the -S2/S3/C2/C3/C6) are sending out some 80 MHz signal during boot as those would be used for PSRAM if it was present.
So the ESP tries to find the PSRAM and thus sends out some quite high frequency pulses to these 2 pins at boot.

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#5 Post by chromo23 » 04 Dec 2023, 16:37

TD-er wrote: 04 Dec 2023, 16:24 GPIO 16 and 17 on a classic ESP32 (not the -S2/S3/C2/C3/C6) are sending out some 80 MHz signal during boot as those would be used for PSRAM if it was present.
So the ESP tries to find the PSRAM and thus sends out some quite high frequency pulses to these 2 pins at boot.
I couldn´t find any issues related to that. I would be strange to sell boards that trigger the relay every time at boot. Could this be an ESPEasy-only problem?

Edit: no, it isn´t :)

User avatar
chromo23
Normal user
Posts: 827
Joined: 10 Sep 2020, 16:02
Location: germany

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#6 Post by chromo23 » 04 Dec 2023, 16:57

Ok, i was testing...GPIO 16 is HIGH and GPIO 17 is LOW for fraction of time at boot.

User avatar
ohaldi
Normal user
Posts: 61
Joined: 31 Jan 2020, 09:10
Location: Switzerland

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#7 Post by ohaldi » 05 Dec 2023, 11:51

Thank you very much for your help.
I also tried setting the GPIO boot states to Output Low, but that didn't solve my problem.
I will try to put a small capacitor between pins 16 and 17 to ground.

User avatar
ohaldi
Normal user
Posts: 61
Joined: 31 Jan 2020, 09:10
Location: Switzerland

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#8 Post by ohaldi » 22 Dec 2023, 17:40

Just for information. I just received the same card and took the opportunity to do some additional tests.
If I erase all the ESP32 software and power up the board. Then the relays have absolutely no reaction. As soon as I download ESPEasy, without any configuration, then again I have this problem where the relays switch on for a few milliseconds on power-up.

bidrohini
Normal user
Posts: 106
Joined: 03 Nov 2022, 16:24

Re: Two Canal ESP32-WROOM-32E. Relais send pulses when booting!

#9 Post by bidrohini » 25 Dec 2023, 23:15

Try adding a delay at the beginning of your on System#Boot rule.

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests