Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’ve got a question that I’ve tried to answer by googling but I’ve never been able to find anything that helps.

I have a septic tank alarm system that turns on an audible and visual alarm when the float switch detects that the tank is 3/4 full. There is a pair of NO dry contacts that close when the alarm goes off.

How do I monitor whether the contacts are closed or open? I assume with a GPIO pin, but I’ve never been able to google this question and find anything of use.

I’m ready to give up and use a RIB01BDC [0] packaged relay to turn on a raspberry pi and email me when the septic tank contacts close.

[0] https://www.functionaldevices.com/product/rib01bdc/



> How do I monitor whether the contacts are closed or open? I assume with a GPIO pin, but I’ve never been able to google this question and find anything of use.

Without making assumptions about the microcontroller used, attach ground to one of the contacts, then attach a GPIO pin, the other contact, a 10k resistor (or 100k), and VCC together in series. The microcontroller should periodically read the GPIO pin. If it reads high, the contact is open and the alarm is not sounding; if it reads low then the contact is closed and the alarm is sounding.

The GPIO / contact / resistor / VCC arrangement acts to pull up that side of the circuit to the high logic level, and the resistor will limit the current that flows whenever the contacts close. If your microcontroller has an internal pull-up configuration for GPIO pins, you may be able to attach the pin directly to the contact without the extra hardware. (Conversely, if it has a pull-down configuration you can reverse things, attach VCC to the contact and the GPIO directly to the other. Read your microcontroller's documentation for available features and any current limitations.)


You're assuming the tank switch is low voltage.

The very first thing to do is read the manual for the installation and/or parts used. Second, approach the tank setup with a high voltage multimeter and carefully and safely take measurements of what you might be dealing with.


> The very first thing to do is read the manual for the installation and/or parts used. Second, approach the tank setup with a high voltage multimeter and carefully and safely take measurements of what you might be dealing with.

Good call, I’ll make sure it’s not 120v or 24v with a multimeter before attaching anything that expects dry contacts.


Thank you for the detailed instructions, this is extremely helpful! I’ll throw a multimeter across the contacts on the septic tank alarm to make sure they aren’t putting out 24v.


I use an ultrasonic sensor and ESPHome to monitor the water level in my sump pit. Depending on what you want out of your septic tank monitoring, this may be a useful option.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: