NodeMCU V3 and Reed-Sensor

Hello. I bought a NodeMCU v3 12F and a Reed-Sensor. And i thought, that it would be ease to find a video, how to use this, to reead my gas meter. But i´m not a electrican. And i don´t know how to build this together and so on… Are there any tutorials or anythig, how to bild that? I need some help. :frowning:

Quick search = Search results for 'gas meter #esphome ' - Home Assistant Community

Well… That is a tool that i know to use… But thank you…

In the meantime i used google and i think, i have to use on the right side the G (GND) Pin and the D5 (GPIO 14) Pin. But wich cable do i have to use on wich Pin?! I have absolutely no idea!

That reed switch is just a switch which is activated by a magnetic field. It is not polarized and it can connect any way. Remember that the input pin must be declared as an input pin with pullup resistor. The idea is that the pullup keep the pin high unless the switch is on pulling it low to ground

1 Like

Thank you very much! And if I understand correctly, it doesn’t matter whether the sensor is open or closed by default. So ich choose the G (GND) Pin and the D5 (GPIO 14) Pin.

It counts pulses in your case so it does not matter which as far as I can tell. And turning the two wires does not change how the switch works. It is an off/on switch. Difference is that instead of pressing a button it is pressed by magnet

1 Like

Doesn’t matter, as per

Think of it as a jumper wire from GPIO14 to GND which is cut in the middle, when the magnet is aligned with the sensor the wire is joined.

Here is a simple write up (thanks to saruter) of how you may be able to implement.

And another, How to count pulse frequency accurately with ESPHome? - #15 by stevebaxter

More reading, Pulse_counter vs pulse_meter - #2 by der-optimist

image

1 Like

Thank you very much, guys! I´ll give it a try.
Please excuse! I should have informed myself more thoroughly beforehand.