Send alarms from basement pump to mobile device

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Send alarms from basement pump to mobile device

#1 Post by -manuel- » 29 May 2021, 12:54

Hello
I have a pump with a controller in the basement. The controller of the pump has a bunch of potential-free error outlets. Outlet 03, 04,05 are described in the manual as following.

Outlet 03 / 04 / 05 General error potential-free
04 / 05 closed --> operrational
03 / 04 closed --> general error

I would like to use a ESP8266 controller to to grip on outlet 03 and 04 if the relay is closed or open. If relay 03/04 is open everything is ok and if it's closed I would like to send a message through openHAB to my mobile phone.

I installed the newest ESPeasy on a ESP8266 and had a look at the supported devices. Would it be possible somehow to use a Switch input - Switch on ESPeasy to check if relay 03/04 is open or closed?

Thank you very much for your help.

Greetings Manuel
Attachments
AnschlüssePumpe.png
AnschlüssePumpe.png (88.79 KiB) Viewed 12693 times
Dorfstrasse 11 Pumpe Keller.png
Dorfstrasse 11 Pumpe Keller.png (415.22 KiB) Viewed 12693 times

User avatar
Ath
Normal user
Posts: 3415
Joined: 10 Jun 2018, 12:06
Location: NL

Re: Send alarms from basement pump to mobile device

#2 Post by Ath » 29 May 2021, 13:22

-manuel- wrote: 29 May 2021, 12:54 Would it be possible somehow to use a Switch input - Switch on ESPeasy to check if relay 03/04 is open or closed?
Yes, you can have the relay connect a GPIO pin to ground on the ESP (so the switch state becomes 0) to detect that. You'd better not use GPIO's 0, 2 15 or 16.
If you set up a Home Assistant (openHAB) MQTT controller, and enable that in the Switch device/task setup, so that state is sent to openHAB. In openHAB you can configure that alarm trigger when the state goes to 0 (wouldn't know how though as I don't use openHAB)
/Ton (PayPal.me)

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

Re: Send alarms from basement pump to mobile device

#3 Post by TD-er » 29 May 2021, 20:06

Make sure you also use a pull-up resistor (or enable the internal pull-up) or else you won't see any signal.
The internal pull-up resistors are quite weak, so you might pick up noise.
Better use something like 4k7 - 10k as pull-up.
And as Ath mentioned, not using GPIO-0, -2 or -15 as those require a specific state during boot.
GPIO-16 is needed for deep sleep. If you don't need deep sleep, you can use it as an input, but that pin doesn't have a pull-up resistor.
GPIO-16 also can't be used on an interrupt, but it can be used with the monitor command in the rules.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#4 Post by -manuel- » 31 May 2021, 10:43

Hello Ath, hello TD-er
Many thank for your answer. I tried to chart the wiring from ESP8266 to pump controller outlets. I think it won't work because according my model pattern from Elektronik-Kompendium - Paragraph 3 (German) GPIO-Pin is connected with +VCC.

Could you please give me some advise?

Many thank. I really appreciate your work and help.

Greetings Manuel
Attachments
ESP8266 Wiring.png
ESP8266 Wiring.png (90.28 KiB) Viewed 12627 times
Pullup.png
Pullup.png (6.63 KiB) Viewed 12627 times

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

Re: Send alarms from basement pump to mobile device

#5 Post by TD-er » 31 May 2021, 11:01

You're using a single pull-up resistor for all inputs. You need a resistor for each signal you like to measure.
Also in your picture, you attach the GPIO pins line to the GND.
So that's not going to work.

You did post a correct schematic below, where there is a resistor between Vcc and the GPIO.
The switch will then "pull" the level down to GND.
There you also see why you need to have a resistor per GPIO, otherwise all connected GPIO pins will be pulled down if one of the switches is closed.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#6 Post by -manuel- » 31 May 2021, 13:50

Hello TD-er
Thank you for your patience. Unfortunately I know very little about electronics :oops: but I try my best.

I made a new picture but if I use a separate +VCC (3V3) per outlet I only can connect three outlets of the pump controller. Or I could use only one resistor and V3V for pump1 and pump2 (Outlet 06/07 and 09/10) so I just would know if pump1 or pump2 has a failure. That would be ok. I then could use the third 3V3 for Outlet 12/13 to find out if there is a flooding error.

I hope this is a step further into the right direction :)

Thank you for your help.

Greetings Manuel
Attachments
Wiring ESP8266 to Pump Controller v1.1.png
Wiring ESP8266 to Pump Controller v1.1.png (129.45 KiB) Viewed 12614 times

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

Re: Send alarms from basement pump to mobile device

#7 Post by TD-er » 31 May 2021, 14:19

Nope.

What you need is this:
3V3 ---Resistor----GPIO----switch----GND

So all resistors have 1 pin connected to 3V3 and their other pin to the respective GPIO pins.
From the GPIO pins you connect a wire to their switches
The other end of the switches you connect to GND.


Only a big warning!
Make sure the switches are (before you start) not connected in any way to each other or to some voltage. (so called "potential free")
The best way would be to have the switching pins of some relays.
If the outputs are not a relay, but something else, you need to know if those outputs have some kind of polarity (a + and - symbol)
However, the schematic does not suggest it, so you're probably fine.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#8 Post by -manuel- » 31 May 2021, 16:37

Hello TD-er
Ok, I don't give up. Next try :oops: :oops: :oops: sorry to bother you again.

The manual states that the outlets are potential free (potentialfrei in German). Should I measure voltage from outlet 03/04, 06/07.... before connecting some cables? Just to be sure that there is no voltage and the relay is potential-free? I already checked the continuity (Durchgangsprüfung) with a multimeter and there is no connection between 03/04 but between 04/05 because there was no error when I was measuring. That's how it should be.

I took the outlet for pump1 and pump2 on the same GPIO (D2, GPIO 4) because there is no 3V3 left on the ESP8266.

Thank you for your help. It's really nice.

Regards Manuel
Attachments
Wiring ESP8266 to Pump Controller v1.1.png
Wiring ESP8266 to Pump Controller v1.1.png (137.65 KiB) Viewed 12606 times
Störungsmeldungausgänge.png
Störungsmeldungausgänge.png (71.62 KiB) Viewed 12606 times

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

Re: Send alarms from basement pump to mobile device

#9 Post by TD-er » 31 May 2021, 17:17

Still not a good drawing ...

With respect to the potential free, that sounds good.

Just puck 1 pin on the NodeMCU with 3V3 and one with GND and use those.

So with my best ASCII-art skills:

Code: Select all

3V3 ---Resistor----GPIO A ----switch A----GND
    |                                    |
    |--Resistor----GPIO B ----switch B---|
    |                                    |
    |--Resistor----GPIO C ----switch C---|
    |                                    |
    \--Resistor----GPIO D ----switch D---/
As you can see, Each GPIO you plan to use should be connected to:
- A resistor
- the center point of the switch

Each resistor is on one end connected to 3V3
The pin on the switch that is normally closed is connected to GND

So what you get then is that the signal is "0" on the normal situation and "1" on the alert situation.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#10 Post by -manuel- » 02 Jun 2021, 14:28

Hello TD-er
I hardly dare to show you my next drawing..... :roll: :oops: I hope it's ok now.

Thank you for your patient and feedback.

Greetings Manuel
Attachments
Wiring ESP8266 to Pump Controller.png
Wiring ESP8266 to Pump Controller.png (135.33 KiB) Viewed 12544 times

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

Re: Send alarms from basement pump to mobile device

#11 Post by TD-er » 02 Jun 2021, 16:31

Looks much better :)
But just to make it more clear, you better draw the resistors from a single 3v3 pin to the switches.
Electrically it does not matter, just more clear in the drawing, when you have a single line from the GPIO pins as it is a rather small picture.
The switches are larger, so easier to draw a line from the resistor to it and from the GPIO pin.

But I'm almost sure it is conceptually correct :)


Edit:
Only one issue.... seems like on the switch side you have GND and the GPIO lines connected to the same pin
That's not correct.
It should be to GND on the middle pin and GPIO line to one of the side pins (depending on whether the signal should be "1" or "0" in error state)

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#12 Post by -manuel- » 03 Jun 2021, 13:48

Hello TD-er
Cool! Thank you for your help and patience. I really appreciate that. I made a new drawing with fritzing. Makes me always a little bit nervous to show it to you ;)

I changed the wiring on the switch side.GND is now in the middle an GPIO line to one of the side pins.

I sponsored you some coffees. ESPEasy is really really cool and I already have some sensors installed in my apartment.

Thank you all for your great work.

Greetings Manuel
Attachments
ESP8266 Wiring Pump Controller_Steckplatine.png
ESP8266 Wiring Pump Controller_Steckplatine.png (386.72 KiB) Viewed 12485 times
Last edited by -manuel- on 03 Jun 2021, 14:20, edited 1 time in total.

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

Re: Send alarms from basement pump to mobile device

#13 Post by TD-er » 03 Jun 2021, 14:02

Looks OK.
Just a few remarks:
- The Fritzing image mentions "4.7 Ohm" that should be 4k7 Ohm, or 4700 Ohm. (10k is also fine, 4.7 Ohm is almost a short circuit)
- The lines from the switch to the pull-up resistors is now drawn in red, it is more clear when drawn in the same colors as the GPIO line. After all it is the GPIO state.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#14 Post by -manuel- » 03 Jun 2021, 15:18

Thank you TD-er
I already changed the colors of the red lines to the one of the GPIO state colors in the last post. Resistor is now 10k.

I guess this is it :D. I'm very happy now.

Thank you very much.

Manuel
Attachments
ESP8266 Wiring Pump Controller_Steckplatine.png
ESP8266 Wiring Pump Controller_Steckplatine.png (386.72 KiB) Viewed 12483 times

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

Re: Send alarms from basement pump to mobile device

#15 Post by TD-er » 03 Jun 2021, 16:23

Great :)
Hope you also learned why it should be connected like this.

-manuel-
Normal user
Posts: 14
Joined: 26 Oct 2020, 15:37

Re: Send alarms from basement pump to mobile device

#16 Post by -manuel- » 03 Jun 2021, 20:24

Hello TD-er
Yes, with your explenations I think I understand it. There is also a really good Site in German which explains very well pullup and pulldown relay. This also helped me a lot.

Many thanks for your help. You deserved your coffees.

Greetings Manuel

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests