gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Detecting an appliance is in use

Mon Nov 25, 2019 5:06 pm

ok. I want to either buy ( < $50US ) a sensor that can tell if my sump pump has turned on. Or make one if it's not too difficult. I don't want to modify the sump pump.

I was looking at this: https://www.crmagnetics.com/remote/cr25 ... qMQAvD_BwE

But this doesn't look like something I could use without cutting the ac cord of the sump pump.....

trejan
Posts: 2492
Joined: Tue Jul 02, 2019 2:28 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 5:11 pm

If you can't use a current clamp due to no easy access to the live wire then maybe a vibration or hall effect sensor on the pump itself?

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 5:29 pm

it's not that I don't have access to the pump - a current clamp would work, if it was like the pincer type, or the ring type in the link, as long as I can fit the ac power cord through the opening.

Do they make a current clamp that is just a sensor?

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 5:33 pm

ooh...just found this one - which look promising.

https://www.sparkfun.com/products/11005

Anyone used this with a pi?

trejan
Posts: 2492
Joined: Tue Jul 02, 2019 2:28 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 5:52 pm

gginnj wrote:
Mon Nov 25, 2019 5:29 pm
it's not that I don't have access to the pump - a current clamp would work, if it was like the pincer type, or the ring type in the link, as long as I can fit the ac power cord through the opening.
It is slightly more complicated than that. You need to clamp around just the live wire inside the cable. You can't clamp around the whole cable as the live + neutral would cancel out and you wouldn't get a reading.

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 6:17 pm

hmm. I can get a 2 foot extension cord - splice off the covering, and just isolate the hot - that could then become an in line sensor - once I clamped over the correct wore (I'm assuming white) I could put the wire through a small project box to hold the tap with the sensor wire comeing out.

It's cheap enough to toy around with.

Then comes part two of the project - put a sensor in the ouput tubing to detect when water is being pumped out....

So I can check, that when the pump is activated, water is being pumped out - with two alerts - one for working ok, and one for something is wrong, it's going off, but no water is coming out.

PhatFil
Posts: 1703
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Detecting an appliance is in use

Mon Nov 25, 2019 6:40 pm

If supplied by mains electricity may i suggest a more out of the box solution, a £10-20 smart socket that monitors power usage can be reprogrammed with your own or a public project like Tasmota https://github.com/arendst/Tasmota/wiki.. Many smart devices use the same core h/w :) Any Adds that mention Tuya or a "smartlife" phone app are prime candidates for OTA reprogramming too.. (see DrZzs iirc on utube) And reprogramming throws away all that remote server.data mining phone app reliance nonsense too ;)

Then you can monitor the power usage and deduce when the pump is on how long it is on and how much juice it uses by (if you use tasmota f/w) just subscribing to the relevant mqtt telemetry topic.

Just host a mqtt broker (nominal overhead) on your pi to facilitate the coms.

This will also allow you to overide the pump too should it start running when not wanted.

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 7:13 pm

interesting. I didn't see any smart sockets that monitored power usage as well - will have to look into those. I have a few on/off sockets now - which I'm looking to setup a mqtt server in the future so that could also be part. Thanks for the info

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 7:41 pm

if you go the route of smart plug with montioring, make sure the plug can handle the amperage of the device. most are only 10A loads. and of the 15A - I'm not so happy about the reviews - seems quite a few like to catch fire! - so now I need a smart fire detector also? will have to keep an eye on this device - one reason I'm liking the external monitoring method - but for $25US I'll try it and see how it goes, as well as try the external also as it looks to be about $30US once I have the sensor and extension cord setup.

emma1997
Posts: 985
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Detecting an appliance is in use

Mon Nov 25, 2019 10:55 pm

trejan wrote:
Mon Nov 25, 2019 5:52 pm
You need to clamp around just the live wire inside the cable.
Actually either wire, not just live, will give the same result.

One trick I've used is to wrap 10 turns instead of just one to get 10x the sensitivity (1a reads as 10a). In fact with enough turns it will detect power when connected to Pi directly w/o an ADC or comparitor.

I've purchased quite a few of these for similar project: https://www.ebay.com/itm/Durable-AC50-5 ... 1vXDERz9tg . Not only 1/5th the cost of one linked above but after disconnecting you get a free lines voltmeter.

trejan
Posts: 2492
Joined: Tue Jul 02, 2019 2:28 pm

Re: Detecting an appliance is in use

Mon Nov 25, 2019 11:14 pm

emma1997 wrote:
Mon Nov 25, 2019 10:55 pm
trejan wrote:
Mon Nov 25, 2019 5:52 pm
You need to clamp around just the live wire inside the cable.
Actually either wire, not just live, will give the same result.
Sure but was easier to just say live side. I prefer high side monitoring anyway for various reasons but it shouldn't matter for a pump.

hippy
Posts: 8231
Joined: Fri Sep 09, 2011 10:34 pm
Location: UK

Re: Detecting an appliance is in use

Tue Nov 26, 2019 1:42 pm

trejan wrote:
Mon Nov 25, 2019 5:52 pm
You need to clamp around just the live wire inside the cable. You can't clamp around the whole cable as the live + neutral would cancel out and you wouldn't get a reading.
It might be worth experimenting. When I tried whole cable clamping I could see an indication when current was flowing even though it was far from suitable for determining how much which is the usual goal. YMMV.

gginnj
Posts: 57
Joined: Tue Aug 06, 2013 3:30 pm

Re: Detecting an appliance is in use

Tue Nov 26, 2019 4:50 pm

Well - after refining my searches with more appropriate keywords I found this little gem...

https://www.youtube.com/watch?v=uZyJWVA_gyE

and

https://www.youtube.com/watch?v=Z3YSHhS39Bc&t=778s

The most important lesson learned from the above is to properly calculate that resistor and put it in place
BEFORE clamping the sensor over any wire - for safety reasons.

emma1997
Posts: 985
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Detecting an appliance is in use

Tue Nov 26, 2019 5:00 pm

hippy wrote:
Tue Nov 26, 2019 1:42 pm
It might be worth experimenting. When I tried whole cable clamping I could see an indication when current was flowing even though it was far from suitable for determining how much which is the usual goal. YMMV.
In my 'experiments' what trejan said and in gginnj youtube proves more correct. Using the item I linked above, with both wires the readings often increased as current went down (occasionally versa vice). Readings very low and somewhat random.

Note it's quite easy to split a typical 2 wire lamp cord to clamp one of the wires. Even with 3 wire cables it's not hard to separate out the individuals. In that case you do have to make sure to use the live wire as trejan mentions or make sure to pair the other two (neutral & gnd) and treat as one.

Not sure about 'high side' though which IME refers more to things like H bridge and BLDC controller shunts. Technical terminology, can't live with it and can't shoot it. lol

trejan
Posts: 2492
Joined: Tue Jul 02, 2019 2:28 pm

Re: Detecting an appliance is in use

Tue Nov 26, 2019 5:28 pm

emma1997 wrote:
Tue Nov 26, 2019 5:00 pm
Not sure about 'high side' though which IME refers more to things like H bridge and BLDC controller shunts. Technical terminology, can't live with it and can't shoot it. lol
*shrug* That is how I've always referred to measurements between power and the load. If you prefer then I'll call it live. In either case, if you monitor the live wire then you'd see everything including any unintended paths. It isn't particularly important for OP's situation anyway as I mentioned before.

emma1997
Posts: 985
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Detecting an appliance is in use

Tue Nov 26, 2019 5:51 pm

I suspect OP does have an understanding of basics by now. Maybe it is a country/language issue. IMO always a good idea to let others know in the avatar approximately where you are from. Anyway no big deal.

I'm not sure what resistor is referred to but will add that, when increasing sensitivity as mentioned in my other post, an inline trim pot allows for exceptional accuracy. Far better than spec. Calibration against DMM always works out better for me than calculations.

User avatar
DougieLawson
Posts: 39792
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Detecting an appliance is in use

Tue Nov 26, 2019 6:33 pm

It's fairly obvious from the OP posts that he/she is based in the US.

They're referring to dollar amounts for prices.
They're referring to "hot" rather than "live".
They're referring to white cables (typically a 110V cable uses white for live).
They're using the term "cord" rather than "cable".
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

emma1997
Posts: 985
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Detecting an appliance is in use

Tue Nov 26, 2019 6:46 pm

Lol. All true. Except it wasn't with OP that language and terminology issues arose.

I will say that it's very common for furriners to use USD. Apparently a world standard. Now if only we could get them to abandon that ridiculous metric stuff and adopt the obviously far better inches/ounces. And what's with all that 'wrong side of the road' BS? :)

User avatar
Burngate
Posts: 6347
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: Detecting an appliance is in use

Tue Nov 26, 2019 7:03 pm

DougieLawson wrote:
Tue Nov 26, 2019 6:33 pm
...
They're referring to white cables (typically a 110V cable uses white for live).
...
https://www.leadsdirect.co.uk/knowledge ... ains-lead/ says black is live!

User avatar
DougieLawson
Posts: 39792
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Detecting an appliance is in use

Tue Nov 26, 2019 8:22 pm

Burngate wrote:
Tue Nov 26, 2019 7:03 pm
DougieLawson wrote:
Tue Nov 26, 2019 6:33 pm
...
They're referring to white cables (typically a 110V cable uses white for live).
...
https://www.leadsdirect.co.uk/knowledge ... ains-lead/ says black is live!
Whatever they use, it's silly.
The European/Australian green/yellow, brown, blue colour scheme makes so much more sense (and works for folks with colour vision impairment).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

LTolledo
Posts: 3905
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: Detecting an appliance is in use

Tue Nov 26, 2019 10:18 pm

Each region/country adopts their "own standard", backed up by a their designated regulatory body, which may or may not be the same (or acceptable) to citizens of other countries.

Unless the UN forces all countries to a single standard that all can agree upon. But I doubt that's happening in the next few generations (or will it?)


In the mean time....
For detecting if a motor load is in use, I (that mean me!) usually (or have the sensors) check these:
1. motor supplied voltage (load side)
2. motor running current (again, load side)
3. confirmation of motor rotation (via encoder, if possible)
4. if pump, output flow (using flow meter)
5. again if pump, output pressure (if important, via pressure sensor)

if the sensor readings are within parameters, the motor is in use and running optimally.
if not, needs troubleshooting.

but for simplicity's sake, just the load running current and output flow sensor will suffice...
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

PhatFil
Posts: 1703
Joined: Thu Apr 13, 2017 3:55 pm
Location: Oxford UK

Re: Detecting an appliance is in use

Wed Nov 27, 2019 11:00 pm

gginnj wrote:
Mon Nov 25, 2019 7:41 pm
if you go the route of smart plug with montioring, make sure the plug can handle the amperage of the device. most are only 10A loads. and of the 15A - I'm not so happy about the reviews - seems quite a few like to catch fire! - so now I need a smart fire detector also? will have to keep an eye on this device - one reason I'm liking the external monitoring method - but for $25US I'll try it and see how it goes, as well as try the external also as it looks to be about $30US once I have the sensor and extension cord setup.
This device is rated for 16a 240v with valid EU Certification not the dodgy China Export scam.. while not qualified myself, a contributor to another list i subscribe to has visited the factory and was quick to correct my assumption the CE marking was suspect.. ..
https://www.itead.cc/wiki/Sonoff_Pow

JohnsUPS
Posts: 185
Joined: Fri Jul 06, 2018 2:13 am
Location: USA

Re: Detecting an appliance is in use

Tue Dec 03, 2019 12:52 am

I made a monitor for my sump pump that simply counts the number of times that the pump has energized. All that was necessary was to connect a small step-down transformer across the motor leads. This pump has two cords coming from it - one for the pump and one for the switch, so the motor connections are accessible away from the wet sump.
Across the secondary of this transformer I connected a pulse counter and bridge rectifier. The pulse counter activation voltage was matched to the secondary voltage of the step-down transformer. Each time the pump switches on, the counter is pulsed (slow pulses, but it has been very reliable). The circuit was tested to be safe if the pump ran for a couple of hours straight (counter energized for a couple of hours), just in case.

In this case, if the OP's pump has separate motor and switch leads, a similar thing could be done - possibly a small step-down transformer to the coil of a relay, then the contacts connected to a GPIO pin and ground (using internal pull-up). An opto could be used here, but more parts (opto, series resistor and reverse biased diode because of the transformer). If there is only one lead from the pump (motor wired to the float switch at the pump), then you would have to sense the current flow as was previously mentioned using a current transformer and resistor.

pfletch101
Posts: 629
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: Detecting an appliance is in use

Tue Dec 03, 2019 4:11 pm

emma1997 wrote:
Tue Nov 26, 2019 5:00 pm
Note it's quite easy to split a typical 2 wire lamp cord to clamp one of the wires. Even with 3 wire cables it's not hard to separate out the individuals. In that case you do have to make sure to use the live wire as trejan mentions or make sure to pair the other two (neutral & gnd) and treat as one.
Current should only flow in the gnd cable under fault conditions (and then usually only very transiently, until the breaker or fuse blows!). There is thus no reason to include the gnd cable in a current sensor if you choose to monitor the return current.

User avatar
bensimmo
Posts: 4823
Joined: Sun Dec 28, 2014 3:02 pm
Location: East Yorkshire

Re: Detecting an appliance is in use

Tue Dec 03, 2019 5:27 pm

I use power monitoring smart plugs for this (tutu based). Not expensive in the uk.

Flashed them with tasmota firmware.
Not only can I see they are using power, I can see how much once loosely calibrated if you also want that too.
You do need a plugged appliance though, or buy sonoff-pow or similar and wire them.uo directly. Again not expensive. I use these for my fish tank.

They have webpages, MQTT for use, etc.

Return to “Automation, sensing and robotics”