1

For a DIY project, I would like to know the on/off state of a load (on being over around 200 mA, otherwise off). For example, a smart home app tells a smart switch to turn on a fan that's connected to it by a standard, isolated, power cord. The state of the fan is deduced by the smart switch's MCU that drives a relay.

This deduction is not an indication of the fan actually working, just the relay being closed. What if the fan's speed selector is pointing at 0? What if it's connected to a timer/temperature sensor the turns it on or off?

I would like to make an MCU + sensor combination to place over or near the fan's power cord that will tell me if AC current (not voltage) is present.

  • I want something that is completely independent, external and fully decoupled from both the smart switch and the load.
  • I don't want to use other means to deduce if the load is on (e.g., pointing a camera to see if it's working or placing a vibration sensor on it, etc.) I want to somehow sense the power cord itself.
  • I don't want to cut, strip or otherwise hack into the power cord. I have full access to the power cord, but only to place something over it, or close to it.
  • I don't care about measuring an exact amount of AC current, just to know for sure whether the load is pulling current or not.
  • Fast response isn't mandatory. It can lag a second or two behind the real state.
  • If you come up with a way that's only good for, say, over 1 A or even 5 A, I would still very much like to know about it.
  • No AC/DC voltage detection or DC current detection is desired.

The fan is just an example. Consider any AC load.

JRE
  • 67,678
  • 8
  • 104
  • 179
yaronalk
  • 13
  • 3
  • A very warm welcome to the site. You've said in two places that you want to detect if AC current is being drawn or not. However, you've not specified (a) the minimum current for detection as 'on' or (b) the maximum current for detection as 'off'. Please can you edit your question to add these values in amps or milliamps. For example, an unloaded mobile charger or something else may draw 20 mA. Should that be detected 'on'? Or is a typical load 2 A etc? That may alter what types of circuit can be proposed in any answers. The value can't just be 'any load', must be a specified threshold. Thanks. – TonyM Sep 14 '22 at 14:56
  • Thank you! I tried to be specific (see the "Tolerance" bullet point) but I agree I should be more specific. I need some help, though. Idle currents (e.g., unloaded mobile charger, a fan that's not working but is running an internal MCU to provide some logic) should be identified as OFF. But what would be a reasonable threshold for this? – yaronalk Sep 14 '22 at 15:14

2 Answers2

1

A current transformer and some circuit to interface it to your MCU should do it. A Hall effect sensor is another option.

If you're trying to detect current in a typical AC power cord you're going to have to split it somehow, otherwise the currents in the hot and neutral will cancel and you'll get no reading.

If you don't have access to the individual wires you might be able to use an AC line splitter that goes between the outlet and power cord. They're a bit bulky, expensive and not generally meant to be left in place though. You could also have short extension cords made with the wires separated.

Another option is to use something that takes into account that the magnetic fields in the cable will not exactly cancel, by getting a sensor in just the right place it can detect current flow. See this question.

Disclaimer: You are responsible for safety and code compliance in whatever you do concerning electrical wiring. Knowing if a fan is on or off isn't worth getting electrocuted or burning your home down.

GodJihyo
  • 17,628
  • 1
  • 16
  • 45
  • 1
    but isn't the current transformer supposed to interact with a the Live wire? In my case I only have access to the cord with all wires (Live, Neutral and possibly Ground) inside. – yaronalk Sep 14 '22 at 15:00
  • 2
    AC Line Splitter: https://www.grainger.com/product/3ZH94 It's _intended_ to be used with a [clamp meter](https://www.amazon.com/dp/B07Z3988K3/), but we can't always do what we're _supposed_ to do. – Solomon Slow Sep 14 '22 at 17:31
  • 1
    As well as the linked question in this answer see also my other answer to a similar topic in [can-i-build-or-is-there-such-a-thing-as-an-ac-clamp-multimeter-which-does-not-r ...](https://electronics.stackexchange.com/questions/581648/can-i-build-or-is-there-such-a-thing-as-an-ac-clamp-multimeter-which-does-not-r/581650#581650). – Transistor Sep 14 '22 at 17:42
  • @yaronalk if it's just plugged into the wall, you could make your own device, with a plug and a socket, and a current transformer around the live wire on the inside. – user253751 Sep 14 '22 at 19:42
  • @user253751 I don't have access to the outlet. All I have is the power cord. – yaronalk Sep 15 '22 at 13:16
1

I'd try putting a coil or a Hall effect sensor near the cable (ideally right on the cable).

Emphatically not a toroidal current transformer. You don't want to measure both the live and neutral wires because the current would cancel out. You want one wire to be sensed more strongly than the other, so that you get a detectable signal. Since you aren't "focusing" all of the magnetic field onto the sensor, you don't get an accurate current reading, but you can still know whether there is current.

You might need to try a few different placements for the sensor, since some positions will be close to one wire inside the cable, and other positions will be equally close to both and won't work.

user253751
  • 11,998
  • 2
  • 21
  • 37
  • although I haven't tried it myself yet, I accepted this answer because it seems to be the only way to sense current under the desired limitations as described above – yaronalk Sep 15 '22 at 13:17