Finding a suitable sensor

I am looking for a a sensor that can help me monitor my sewage plant. The sewage plant consists of an electric motor powering a large drum which then does the job that you might expect. It is a fairly simple installation in the ground.

Twice in the last year it has stopped and this can cause a bit of a problem. Once it failed because the circuit breaker tripped and the other because the drive belt snapped.

I would like to get a notification that movement has stopped. I thought of attaching some type of sensor to the main drive pulley which turns continuously unless the drive belt or power has failed. The pulley is not immersed in any liquid and remains dry though it isn't a pleasant environment.

Is there a type of sensor that could detect movement and signal a proposed new setup if movement stops? It doesn't need to send out a message continuously. Once per hour or less would work. If the system fails I need 24 hours to get it running again or we may be staying in a hotel.

I have a feeling something may be possible but I suspect one problem may be how long the battery will last.

The manufacturer of the system can provide a solution, it flashes a large external red light on failure, but it costs £2k.

What kind of motor is it? AC or DC? If AC, I think a current clamp with a current sensor (e.g. a Shelly EM) would be the simplest. If the motor has its own circuit in your DB (it's own breaker), then even better, because you can then install it safely (and even install a DB-mounted sensor), far away from all the (non-electrical) hazards.

1 Like

Some ideas.
An independant little motor and wheel, riding on the outside surface of the rotating drum, acting as a voltage generator. Constant output for constant speed.
Rectify and measure the voltage. Alert if above or below certain thresholds.

Alternate. Drive a toothed wheel from the drum and measure the output frequency of the pulses generated on a magnet or interrupted light sensor. Use a LED/LDR or LED/ phototransistor pair, or reed switch or hall effect transistor as sensors. Alert if above or below certain frequencies.

Alternate: Place regularly spaced magnets on the surface of the drum and monitor when they pulse a reed switch or hall effect transistor. Not sure of rotation speed - maybe one magnet will be enough.

Alternate: Monitor a belt of regularly spaced stripes or reflective strips painted on your drum for light/color variation. Sensor is LED/LDR combination. Alert if missing at expected interval.

This way you are measuring the drum is actually rotating, not the driving motor is working, and the risk of missing something like a broken belt or pulley is eliminated.

An ESP32 should be able to handle the monitoring, alerting, and notification aspects. Draw power from the same circuits driving your motor. A relay can handle a siren or flashing light alert. Normally open contacts will allow for power failure, and a small rechargeable battery or 12v alarm battery can power the flashing light/siren when the relay changes state.

A regular call in to say all is well to HomeAssistant can be flagged as an alert if missed, irrespective if drum has stopped, power has gone, or something else is wrong. A countdown timer that gets reset when the remote end calls in is the automation required.

Network connection can be determined by volume of data being transferred, distance, and battery life if battery powered.

Alternate to ESP32. Try a nRF52840 as they are far less power hungry.

Reporting frequency doesn't have to be every second.

Lots of options and choices.

Independence from HomeAssistant for functionality may be desirable, so siren/flashing light happens regardless of what the state of HomeAssistant ecosystem is. Try to do the go/nogo sensing on the board rather than automation on the HomeAssistant server.

Keep us posted on progress.

Thanks for the reply. I don't know what type of motor but the cable runs straight from the main consumer unit and a circuit breaker so I would imagine AC. Sounds like a simple idea but the motor could be running and the drum not, which is the more likely scenario.

1 Like

I see! Perhaps a vibration sensor then? I've seen people use those on their washing machines (I have a power meter on mine, so haven't done this myself, but a friend of mine also did this).

My other suggestion was what IOT already gave: a light or magnetic sensor.

Thanks for your reply. Options 1 and 2 will be beating my capabilities. Option 3 sounds the most feasible. The only challenge there is that "the drum", both inside and out, is immersed in sewage at every rotation. It takes about 5 seconds to do a full rotation. I willbtey to determine if it is possible to mount a magnet and if that works where to position a switch.

I was hoping to attach something onto the end of the drums driveshaft, which is not immersed in fluids. I thought that if the sensor is rotating (moving) it wouldn't create an alarm condition.

The system is in total darkness. Thanks for the ideas.

Put the magnet/doorsensor onto the driveshaft?

Your pulley attached to the drum usually consists of a central hub fastened to the mounting shaft via bearings, the external surface having grooves for the driving belt. These are usually joined by ribs or spokes, and are rarely solid.

A waterproof hall effect switch mounted adjacent to the pulley should be able to sense these passing ribs. If the pulley is solid, epoxy two small magnets on opposite sides of the shaft [for balance to prevent vibration], and sense those by reed switch or hall effect transistor as your pulse input sensor.

If your rotation speed is once every five seconds, you will get a pulse every 2.5 seconds with two magnets, easy enough to detect with timing routines as falling within an 2 to 3 second window, and a timer reset routine that falls through if a pulse doesn't arrive within, say 10 seconds, and triggers the alarm routine (a watchdog timer condition). Within your main loop, keep track of a status flag that is examined on a regular basis for sending home 'all is well' data reports. Increment the counter each loop, and when it exceeds a fixed number of loops, send the 'all is well' alert and reset it. If your pulley has three spokes and you are detecting the spokes passing a hall effect transistor or reed switch, you will get three pulses every rotation. Adjust your timing loops appropriately.

MQTT may be an option for alerts. This will work over WiFi, ZigBee, LoRa, RS485, or whatever other networking option you choose to get your data back to your HomeAssistant server.

ESPHome, Tasmota, Arduino, or straight C or Micropython can all probably do the job on a firmware level. Lots of sample code related to water/gas meter pulse sampling will offer ideas you can get clues from. Beware that asking AI bots (ChatGPT, Claude, Copilot etc) for help with coding can often give you a confusing mishmash of hallucinations, obsolete or non-functional code.

Waterproof and climate tolerant case obligatory. Be aware if fully enclosed, there may be temperature rises for working electronics, and if externally mounted, subject to issues such as burning sun, rain, snow, corrosive sewage and other conditions.

12v7ah alarm batteries are cheap and readily available, and can be float charged for long life standby purposes for the sensor and alarm/alert circuits. Use a 2amp car adapter as your 12v to 5v stepdown power supply should be fine. Combine that with a cheap relay board, external flashing light and siren and you have most of your hardware taken care of.

Mounting inside a metal pit, or metallic case can mask your wireless signals. Read up about "Faraday Cage". You may need to run to an external antenna.

No smell detector necessary!!!

1 Like

Aqara vibration sensor? Seems much easier and cheaper than most of the rather complicated solutions mentioned above. Or put the motor on a smart switch and monitor the power?

You mean a slosh sensor? We are monitoring sewage here. It may be finely balanced and not detectable changes between working vibrations and not.

I would think it’s worth a try given how easy and cheap it would appear to be compared with all the other solutions I’m reading above :blush: