Skip to content
View in the app

A better way to browse. Learn more.

BuildHub.org.uk

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Raspberry Pi: Sensing Mains Voltage

Featured Replies

Does anyone know of a cheap way to do this with a Raspberry Pi.

All I want to know is when a pump is on or off, I don't need to know the current or the voltage.

I am thinking that I could use a contactor, wired in parallel with the pump, and just sense when it is closed with a GPIO ports/pin.

It would be nicer to use a non-invasive method such as a CT clamp, but not too sure how to set that up as a simple detector.

 

Thoughts anyone?

Edited by SteamyTea

How about a neon or LED across the switched supply and a light sensor ?

  • Author

I had thought of that, but I can get a relay for a tenner, and it should be pretty easy to wire in (not actually seen the pump yet).

 

An alternative is a small PSU that can drop down to 3VDC and sense that voltage.  Not sure how to wire it into the Raspberry Pi as it will not be the same as the unit powering the Raspberry Pi.

Maybe connect all the neutrals together.

You could alternatively for a flow sensor on the pipework ,    ?

Why not just an accelerometer to detect the vibration / hum whilst running.  Then you don't need to touch the mains voltage.

Thought about this,

The easiest way would simply be a relay wired I'm parallel to the pump, with the outputs going to the RPi GPIO

That's the simpilest method, and no complicates code or anything else for the Pi

Exactly as you said in the OP @SteamyTea

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.