Simple way to "monitor" A/C

Hello forum:

I have a project where I’d like to be able to monitor A/C from an Arduino. I don’t need to know current, voltage, or anything fancy, I just want to know if something is “on” or not. In other words, if I have a lamp plugged into a wall outlet, I want to know if it’s on or not.

I’m sure this is dirt simple, but I’m just not coming up with any reasonable ideas. Bonus points if the solution includes little or no modification to the appliance, is low cost, and can feed a digital I/O pin on an Arduino such that the Arduino knows the state of the device.

A Relay hooked through a uln? thats what we use all the time…

If you go to the Seeed Studio site, you will find “current detection sensors” - here’s a link:

http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-30a-max-p-519.html?cPath=61_70

These clamp around an electrical line, and based on current flow, induce a voltage in the sensor (proportional to the amount of current flowing in the line - so you can monitor electricity usage if you wanted to). They are real similar to the “clamp on” style multimeters you see sold here and there for AC current usage (just a smaller diameter). They are meant (I believe) to be used in a system to monitor current flow through the different distribution “legs” of an AC distribution circuit; you could, in theory (something I have thought about) put onel of these on each of the “hot” lines in your circuit breaker box at your house, and run them to an Arduino to monitor individual current consumption of each circuit in the house.

This voltage, however, is an AC voltage - you would need to run that through a rectification circuit to convert it to DC, and then (maybe, it is difficult to tell from the spec on the site - you might contact them about it) if the voltage is above 5V DC, use a voltage divider to keep it in range of the Arduino’s analog inputs.

What you should get, though, is a voltage output that varies between 0V (no power) and some voltage (1V? 5V?), indicating maximum current (?) - once again, some of this is “up in the air” for me because of Seeed Studio’s poor specs.

You could possibly try to homebrew your own current sensor by taking a piece of PVC pipe that is larger than the plug and cord on the appliance/light, and wrapping several turns (experiment - it will depend on the size of your wire and other factors) of wire around it and securing the resulting coil (keep the turns neat and layered neatly for best results); essentially constructing a large diameter open coil.

Run the plug and wire from the appliance/light through it, and plug it in. Hook the two wires from the coil up to a multimeter set to AC voltage (try a high range first, then switch it down gradually); with the appliance/lamp off, it should read zero (or close to it); turning the light on should cause a level of voltage to appear in the coil. Add or subtract windings on the coil until the voltage level you want appears. On your meter set to AC voltage reading, this voltage level shouldn’t be too big, 5-12 volts is sufficient.

All you have to do then is build the same rectification and voltage divider (if needed) to bring it in range for the Arduino’s analog inputs.

Whatever you do DON’T EVEN THINK ABOUT WRAPPING THE WIRE DIRECTLY AROUND THE CORD. This would be inherently unsafe; if you need your coil closer to the cord, then you will have to devise a means of clamping a smaller coil around the cord, or disassembling the cord and running it through the smaller diameter coil.

Hope this helps, and BE CAREFUL.

:slight_smile:

if I have a lamp plugged into a wall outlet, I want to know if it’s on or not.

While the concept of voltage monitoring is pretty simple, say using a relay,optical isolator or other devices, to sense if something has voltage applied or not, there is always the details that get in the way.

Your example of if a lamp is on or not. If the lamp has it’s own on/off switch then a voltage monitor has to wire ‘downstream’ of that on/off switch, not always with easy access. That’s why some have mentioned using a current monitor instead of a voltage monitor, because it can be wired anywhere in the power circuit. However current monitoring has the problem of having to be sized for the load(s) you want to monitor, but does have the advantage of detecting if the monitored load is actually consuming power. How to current monitor a cloths dryer is a little more costly then how to current monitor a 40 watt lamp.

So there is probably not one single device or circuit that would work well for all possible loads. So maybe if you could pick one specific device that you want to monitor we can focus on a simple specific device or circuit for it, and would determine where to wire a voltage or current monitor to it.

Lefty

Hm, this is sounding more complicated than I’d hoped.

The project is for monitoring a fish tank. I basically want to know if any of the major components have failed, or if a GFCI or breaker has tripped and the whole system is down.

So, lots of potential examples: big heaters (~500w, built in thermostats), small and large pumps (say, 100w - 500w draws), high-wattage lighting, etc. Some of this stuff has built-in switches, some of it doesn’t.

Maybe a modification of ladyada’s tweet-a-watt project? But really, I was hoping this would be simple - one or two components, wire it to a GPIO pin, and I “know” when something is consuming power or not.

There is also the option to monitor “secondary” sources. For light, you could use a simple light dependant resistor (LDR). Water temperature can be monitored with low cost analog or digital sensors. For water/circulation pumps you may want to look into flow meters (e.g. inline with piping).

BenF is right on, measurinng the process variables you are controlling might be a lot easier then all the electrical devices being used to control the variables.

Lefty

If that’s the case, I probably won’t bother. The process variables are either too hard to measure, or I’ll already be measuring them. Really what I want here is a way to know if something catastrophic happens, like a GFCI trips and the heaters can’t come on, or something like that.

The system is going to be fed by 2 or 3 dedicated circuits. Perhaps just a Kill-A-Watt type device on each, with a hack so the Arduino can measure it?

Has anyone used an Arduino for power outage detection? I’ll probably put the Arduino and my home network hardware on a UPS so it’ll remain up no matter what. But if I want the Arduino to know when one or more of the tank’s circuits have tripped, how would I do that?

Temperature. All of those things have temperature rise when they come on. Monitor the temperatures, see if they come on and off.

That’s not a half-bad idea. I’m already going to be measuring water temp, so I’ll know if the heater has failed or is stuck on. I’m going to be measuring lighting temp, so I can tell if the cooling system has failed. That really only leaves pumps, and knowing pump temperature would be pretty awesome - in addition to solving this problem. In fact, it would be better than knowing if the pump was pulling juice or not, because it would alert me to things like the sump running dry (pump temps would skyrocket since the pump would be dry) or if something was clogging the pump (smaller temp rise from restriction/vibration) etc.

That’s why I love this forum. You come in with a problem and a certain solution in mind, and half the time you leave with a different solution that solves other problems, too!

Don’t forget that you want change in temp, not absolute, or at least temp rise above ambient.

One more thought

I was running through goldmine the other day, and noticed they have neon bulbs, with the right resistor at 4-5 for a dollar, and a photodiode for about the same. That means a $.50 110V detector (220 with a change in resistor value). That is dirt cheap, and reliable for a while (neon bulbs eventually die).

You wanted to detect actual operation, and the temp works for that, but if for example, you wanted to detect the failure of the GFCI, the neon bulb + photodiode would do that.