Help in upgrading a current set up of a mail notifier using an ESP8266 board

Hi all,

About my project
I am currently making a mailbox notifier based on a project guide I found. I have all current parts and I am ready to solder parts but I have recently come up with with other Ideas for it and I would like some help on how I can make this work. Can anyone please help me out?

My current set up...

  • A board similar to a WEMOS LOLIN D1 mini.
  • A mercury switch, with no diode or resister, connected to the ESP's RST and GND Pins
  • For power I have a solar panel that is connected to the 3V3 and GND Pins, in between is a Zener diode and a 39ohm wire wound resister. Please don't ask about the details of the Solar Panel as I don't know (I am re-using it and my dad did all the calculations for the resister and diode.)

My current connections (not soldered yet)...

My current plan is to program it to...

  1. Wake up once activated by the mercury switch
  2. Connect to my home internet
  3. Send Email (I wish it was an SMS but I don't want to pay for it to do it. Whether a new plan or an existing.)
  4. Once sent, turn off (possibly the deep sleep mode) till the mercury sets it off again.

My problem/query...
I would like to add a reed switch variable and have 2 options based on the mercury rather than 1.
In other words I want it to do as follows...

1) When the mercury switch

a. Acts like a push button

  1. Turn on the ESP
  2. Connect to the internet
  3. Send email saying that there is mail
  4. Turn ESP back off/ go back to sleep

b. Acts like a switch it changed the state of the pin yet it didn't change

  1. Turn on the ESP
  2. Connect to the internet
  3. Send email refer to point 3 for what I want it to send
  4. Turn ESP back off/ go back to sleep

2) When the reed switch returns to its normal state After the switch acts like a push button (i.e. door closes)

  1. Turn on the ESP
  2. Connect to the internet
  3. Send email saying that the mail has been collected
  4. Turn ESP back off/ go back to sleep

3) Added programming problems that I'd like help with...

  1. I want it to send out a message based on the status on the mercury switch to basically either say...
    a. There is mail, please check blah blah blah
    b. There is mail that has been delivered via the parcel shoot, please check blah blah blah.
    c. (finally) there is mail but stuck in the slot, please check blah blah blah

  2. How do I connect the mercury and the reed switches to the ESP? do I need anything like resisters or something?

  3. Based on the following scenario...
    Mail has been delivered but stuck in the slot. The ESP sends the message saying that there is mail but it is stuck in the mail slot. Someone opens the door(the reed switch), checks it, removes the mail then closes the door(the reed switch). Before turning off/sleeping, the ESP sends a message saying that the mail has been collected.
    Problem 1: Once the mail is removed from the slot, how do I make sure that it doesn't then send a message saying that there mail and that it needs to check.
    Idea: Could it stop it based on the status of the reed switch (I.e. the door is open but not closed).
    Issue with Idea: What if someone removes the mail from the slot without opening the door?
    Problem 2: What if someone "checks" the mail without the notification/ no mail
    Idea: Maybe an LED or 2 on the outside of the mail box that indicates if there is mail or not.
    Issue: How would that go with saving power (Hence the sleep mode)?

Additional help
I was wondering if there is a possibility for the ESP to actually be powered by a battery (I still want it to be able to do the sleep and interrupt features of above) and have it so that the solar panel actually charges/tops up the battery.
is there anyone willing to help me with how I can make this happen as I am not good at all the math side behind this. I like the making, learning how to program and the feeling of the accomplished (being able to use it successfuly).

In Conclusion
If anyone can help me with these thoughts whether it is...

  • To do with additional parts (I want it to run solely on the ESP board),
  • How to do with how to connect everything (please try to make it easy for me to understand like clearly written, in a table or having an image of how to do it),
    or
  • To do with programming it, either sharing similar examples or some handy tips,

it that would also be greatly appreciated.

Thanks in advanced,
Cassie
(Cassowary)

…Continued... The ESP8266 board I am using

The ESP board I am using is this...

And here is info about the WEMOS board that Jaycar is basing it off
from: LOLIN D1 mini — WEMOS documentation website

That doesn't look right at all!

I will firstly say that the solar panel connections look strange. The obvious explanation is that the "diode" must actually be a 3.3 V Zener. Even then, the use of a series resistor is inappropriate as the solar panel will itself limit the current. And you need a capacitor across the input to the ESP if you are going to use the shunt regulator.

The LoLin/ WeMOS D1 Mini is the wrong board for battery power; An ESP-xx module itself and in particular, the ESP-01 would be more appropriate as you do not need the on-board regulator - or USB interface in the deployed version.

And as best I understand it, pulling Reset to ground fails to minimise the current consumption - and also means it cannot operate at any time while Reset is actually pulled to ground.

On the ESP-01, the "CH_PD" pin can be used to completely switch the ESP off, but since you are not switching the whole current draw of the chip, a logic output can be used to control it.

To program the ESP-01, you use this which while it does include the reset button, initiates the programming directly from the Arduino IDE:
Aliexpress item

Here is the info on the diode and resister regarding the solar part

  • 3.3V 1N4728 1 Watt Zener Diode
  • 39 Ohm 5 Watt Wire Wound Resistor

Here is the original project.
https://www.jaycar.com.au/mailbox-notifier

Hi again @Paul_B,

So from what you are saying, Is this similar to what you suggested?...
https://www.jaycar.com.au/camping-power-meter
If so, where does the "load" go to

I do prefer to keep this ESP board. is their any other alternatives

FYI
We presume that the Solar panel is a 12V 1W solar panel as it is a panel measuring 150mm x 130mm

Help Please!

That does appear to be the general idea but that Jaycar circuit is just a little crazy! :crazy_face:

If supplied with an actual 12 V, the 5 V resistor will be dissipating 3.4 V and with no other load (such as if the ESP is sleeping) the 1 W Zener will be dissipating 1.3 W.

However a 1 W solar panel would of course, be limited to 83 mA at which point there would be about 1.8 V across the resistor and the Zener would certainly be cool. As mentioned before, the resistor in this case does nothing.

What is really crazy about the Jaycar circuit, is the fantasy that a 3.3 V Zener could in any way imaginable, clamp the voltage across a 10 mΩ resistor!

Thanks for your response @Paul_B,
Your reply on one hand is great but to me you are using "big boy" words that I can't understand. when you say "dissipating" are you saying that that is how much V/W is left or still over by?

can you tell me in layman's terms / for dummies a way around it (pictures / references are preferred)?

3 things...

  1. How many pins can I make it turn into an Interrupt pins and, if possible, how do I make it so that that pin is dedicated to interrupt / wake up the board

  2. Is there still a way for the solar to charge the (unknown) rechargeable battery while the board is active/inactive or both?

  3. Is their still a way to let it save power (and, if possible, have only the LEDs be kept on) while waiting for the interrupts?
    What I am trying to say is that (similar to our devices like computer, laptops phones, etc) instead of shutting down or turning off the board, maybe have it set to a sleep.
    I basically want it to act similar to where you have your screen off on your phone yet you still get notifications.

"dissipating" means that the component in question will necessarily absorb that amount of power and heat up as a result, so it must be capable of getting rid of that heat in some manner or else it will overheat and eventually fail.

So if you cause a 1 W Zener to absorb 1.3 W, the implication is that it will eventually fail.

Don't know offhand. You can either put the MCU to (some grade of) sleep or you can completely shut it down using CH_PD.

The LEDs generally are usually one of the major power draws!

In a phone, that is generally not sleeping, just saving the major use of power, the screen illumination.

:wave: Hi again Paul :wave:,
here are my comments to the parts you have responded to...


So what can I do to make it work?


What do you mean? by grade. all I want is for it to minimise power use age when not sending updates.

I just thought of something - what If I got it to turn "off" (but still wait for an interrupting signal) after the mail is checked (only if there was mail to begin with)?


so if I connect the LED's to another power source (I.e. using both the 5V and the 3V3 Pins). 1 power pin for powering the main bulk of it (the switches and where the power to process the code) and the other for powering just the LED's based on the signals and what has happened from the other "sub-circuit" (if that is what you'd call it)

I was just providing an example of my ideal way around it as in everything is "asleep" accept for the LED's.


Additional things that I'd like to point out/help with...

  • is their a way that I can have the 1 power source (aka. battery/battery pack) that can power both sub-circuits?
  • If not and I have to run 2 separate power sources, can you help me point out a way for them to...
    a. Connect to the ESP
    b. get charged/topped up with the solar panel

Diagrams/images are helpful and always appreciated.

I am currently chatting with someone from Jaycar to see if they can help with the connections of the ESP board. :crossed_fingers:

Point is, it is not a simple substitution of one part. It is a complete design, using the appropriate components.

Of course. So ...

i can't help at this point as I have not manage to figure out from your original description, just what you are trying to do, what precisely the mercury switch in your original post and then the reed switch you are adding actually do, how they will be mounted and interact with the mailbox.

I may not have fully read the OP until now( :confused:) but I think the mercury switch has something to do with the mail slot and the reed switch will be on the back door. This would imply that the reed switch will normally be closed when the door is closed and will open temporarily when you open it to empty the box but you need to confirm this and more clearly explain the operation of the mercury switch.

Just how the system works, including to conserve power, depends on what it needs to do in response to what signals, and exactly what (polarity) these signals are. :face_with_raised_eyebrow:

Sorry, as I understand it the only "power source" here is the solar cell and a rechargeable battery. The problem is that we presently have no specifications for these (such as a Web link), so there is consequently no answer.

I was at a loss as to where these LEDs came from, but on search of your OP (TL;DR) I see "an LED or 2". Why two? Are these supposed to be seen in daylight? From a distance?

LEDs require serious power; I thought the concept was that the notification would be on your PC? Apparently the American mailbox custom is a mechanical flag on the letterbox.

This sounds interesting. Presumably the "someone from Jaycar" is the fellow at the local shop (which?). Have you really found someone who actually uses Arduinos and ESPs?

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.