Perte d'alimentation ESP8266

@AGB44 It’s very difficult to help you if you don’t provide more information, in a structured way.

Which relay contacts are you using, and what is the status of these contacts when no power is applied to the system?
Does writing a HIGH signal to GPIO0 make these contacts open or close?
Does writing a HIGH signal to GPIO0 energise the coil of the relay?

Pete.

As far as I know it’s an active high relay

In which case, energising it in void setup makes no sense.

Pete.

It should be

digitalWrite(0,LOW);

In the void setup

J’avais au début mis dans la configuration

digitalWrite(0,LOW);

Mais cela dès la mise sous tension actionne mon relais pendant 6 secondes avant de retomber.
Le fait de mettre

digitalWrite(0,HIGH);

Permet au relais de ne plus avoir une impulsion au bout de 6 secondes.
Mon problème restant est cette impulsion instantanée des la remise sous tension.
Désolé de ne pas être structuré comme il le faudrait.
Concernant ceci :
“J’ai pris un ESP-01s neuf dont je n’ai rien téléversé dedans, et lors de sa mise sous tension, le même phénomène se passe (1 battement du relai qui se ferme et s’ouvre)”
Mon problème est-t-il vraiment lié au programme ?

The best thing to do now is buy a new board.

@AGB44 you seem reluctant to provide straight answers to my questions about your relay board.

Normally, it’s recommended to avoid using GPIO0 for this type of application, but I’ve seen this pin used very successfully in the past, and I’m fairly confident that you could get this working correctly. However, as none of has the same hardware as you, we are reliant on you providing us with information about the hardware, but you aren’t doing that.

Pete.

Je fais pourtant pour le mieux, mais ce domaine n’est pas de ma spécialité.
Je te transmets les photos des produits acheté ainsi que le raccordement effectué
Étant limité dans les pièces jointes, je vais essayé de te les transmettre sur plusieurs messages.
ESP-01s

J’ai alimenté via le module adaptateur 230VAC/5VCC le module relai (broches VCC/GND) et me sert des broches NO/COM de mon contact inverseur du relai. Ensuite, j’incère le module ESP-01s sur le connecteur jaune du module relai.
Cela t’aide, ou il te faut d’autres éléments ?

Arrière du module relai.
Module relai-AR

Façade du module relai

Module relai-AV

Raccordement actuel
Module relai ESP-01s (1)

So, you’ve answered this question, in an extremely convoluted way…

How about these questions…

Pete.

Le relais est composé d’une bobine alimentée sous 5 VCC par le module, et de contacts secs inverseurs, qui ne sont reliés à la bobine que mécaniquement. Je peux donc raccorder sur les contacts du relai des récepteurs allant jusqu’à 10 ampères sous 250 volts alternatif.
Donc si la bobine du relai n’est pas alimentée, le contact NO-COM est ouvert, et le contact NC-COM est fermé. Si la bobine du relai est alimentée par du 5 VCC, le contact NO-COM est fermé, et le contact NC-COM est ouvert. Donc l’écriture alimente la bobine du relai, mais en aucun cas les contacts.

Once again, a very long response, which explains how a relay works (something I’m already aware of) but which doesn’t answer either of the two questions I asked.

I’ll take a step back from this discussion, as it’s going nowhere.

Pete.

Moi, j’abandonne :joy:

I was just taking a closer look at the layout of this board.

The Normally Open and Normally Closed load pins on the relay appear to be around 0.5mm away from the 5v groundplane, with no air gaps (yellow arrows in the image below)…

image

I can understand the motivation for not cutting air gaps into the PCB, as this costs money, but I don’t understand why they’d run the groundplane so close to these pins that are going to be at mains potential.

Maybe this was a project they gave to the trainee PCB designer :thinking:

Pete.

1 Like

So it’s time to get a new board, do you agree ?

I wouldn’t use this board as it stands, simply from a mains safety point of view. The GPIO0 issue us potentially solveanle, or a quick hack of the board could change it to use GPIO2, but in the end it’s just not worth the effort.

If I were building a project like this I’ll use a Wemos D1 Mini (or Pro) a Wemos dual base and a Wemos relay, like this…

If it’s going to be a garage door opener then I’d also probably add a reed switch to the upper and lower positions to act as limit switches and position detectors. I’d probably also add a 433Mhz receiver and pair it with a fob to give another way of opening the door.

All do-able with a D1 Mini, but not with an ESP-01 based board.

Pete.

2 Likes

Merci pour votre aide précieuse, et votre disponibilité.
Concernant mon récepteur (lumière) je vais garder mon ESP-01s (piloté avec un switch virtuel) et pour mon récepteur nécessitant un bouton poussoir, je vais suivre vos conseils.
Pour moi le dossier est clôturé, et vous souhaites une bonne journée.

1 Like