DIY low powered esp8266 door/window/mailbox sensor

Hello john

Which resistor did you forget on board ?

Do you think possible to code it with esphome and mqtt messages ?

Hello Neo,

It was a pullup restor for the esp8266 chip, but as I wrote, that is implemented in the schematic.

Yeas it is possible to use mqtt, but not Esphome. There are too many things going on in the backgroud that would cause problems with update and communication.

Mqtt could be implemented using a library in arduino and remove the webhooks.

1 Like

I realize this is a year old thread. I tried to implement the same circuit, but I’m seeing some weirdness. Have you had any issues?

I have tried to implement the circuit as you have it, and I have also tried to implement it with just the SN74AHC1G86 trigger waking an ATTINY to control an LDO. Sometimes it works beautifully. Sometimes the output of the SN74 just oscillates wildly creating a lot of instability. I’m watching the circuit on an oscilloscope to understand what’s happening, but I don’t know enough about circuits like this to correct the issue.

I haven’t had any issues with it.
But I’m not quite sure what you mean when you say you have tried to implement it. If you only have taken parts of the circuit you will get issues, all the parts are there for a reason, and some are there to counter instability issues.
If you can share your complete circuit I can maybe help you a bit more.

I’ve since learned a little more about what some of my issues were. My first attempt was to use your circuit as designed, just with a slightly different layout to get the board size smaller. However, I am using an ESP32, not an ESP8266. Mostly because I’m trying to use ESPNow, and i’ve seen weird issues with the 8266 and that protocol. What I learned is that the ESP32 takes longer to boot than the 8266 and the pulse generated by your circuit doesn’t keep the power supply on long enough for the ESP32 to take over and hold the power supply on. I’m sure that can be tuned, or I could just switch back to ESP8266 devices and further troubleshoot their espnow issues.

I then tried to just take the first part of your circuit, the XOR and related inputs, and use that to generate a pulse to wake an ATTINY85 from sleep, and use that to control an LDO. But I was seeing crazy oscillations on the XOR output. When I lift the pad so it’s not connected to anything, the output is clean and as expected. When I connect it back to the ATTINY input pin to goes back to crazy oscillations. It appears that either A) that device can’t drive enough to set the Pin high on the ATTINY, or B) I had something very messed up. I’m betting it’s option B.

Basically I was seeing self created problems trying to minorly adapt your design to my own needs. I’ve given up and just moved to using the ATTINY by itself since it can just do pin change interrupts to come out of sleep, so it can just watch the reed switch directly.

Just to circle back one last time. It looks like all my problems are in fact self created. I gave the 8266 version of my implementation another try and it works fine. So thank you for sharing your work on this, looks like it will indeed work great for me.

1 Like