Detecting 110v

I am working on a digital hour meter project and am kinda new to all of this. What would be the best way to detect if a 110v device is running? The machine in question uses a magnetic starter to supply power while its running.

Thanks,

Mike

A relay is a wee bit of overkill for driving a TTL input.

Google "AC optoisolator". I've posted about one I used, but since then someone came up with another that looks better than mine (fewer external components.

While you're googling, look for posts that says things like "playing with mains voltage can kill you" or "messing with house wiring can burn down your house".

-j

Could you use a clamp-on current sensor transformer like is sold by Seeedstudios?:

http://www.seeedstudio.com/depot/noninvasive-ac-current-sensor-100a-max-p-547.html?cPath=6

Not exactly what I think the original poster wanted, but if he wanted to know if it was on (as well as how much current it was using, meaning how much money it was costing to run), one of these (outside of the whole certification, etc thing) would be kinda ideal, I would think...?

:)

Great suggestion. It completely bypasses any requirement to attach wires to the measured circuit. Might require some minor additional components to interface to Arduino, but avoiding all electrical connections to the measured is a significant advantage, IMHO.

I'm not sure whether it requires extra components or not; according to the spec (if I am reading it right), it outputs 0-1V for the current - unless that is peak-to-peak voltage, in which case you would need to rectify and filter it to measure it (then there would be extra components).

I found those on the site yesterday (not a new product, I'm sure); I thought "That would make for a good project to monitor household electricity usage per circuit in a house" - it would be kinda expensive for most houses, though (at least $100.00 US just in the sensors!).

Hmm - might be interesting to stick on the line running to my servers in my shop; that would be a good testbed project before migrating to the distribution box (DANGER! DANGER!)...

;)

Quick, dirty, cheap and reasonably safe method : Use a mains neon with associated resistor hooked up to the 110v device. Use an LDR or phototransistor to detect its light output hooked up to a pin on the arduino. A home brew opto-isolator if you like. Shouldn't run to more than a couple of dollars US :)

Well, a really really cheap and dirty way to do it is to connect a 5V output wall-wart to the line being tested, and drive an arduino input with the 5V output.

-j

(Sorry for the mistake on Richard's suggestion - those optoisolators are in a relay form factor, and the "AC output" silkscreen on the PCB threw me off.)

I'm thinking 50 turns of magnet wire around the supply lead, a diode (or 4), an RC and an analog pin. It's a do it yourself "clamp on" ammeter.

No electrician required.

Another idea which might work is a reed switch placed close to the starter.

If the device has an "ON" light, then this would be the area I'd look into monitoring. Something like a photo transistor, or possibly a small 120v relay in parallel with the light for detection. Generally speaking any direct connection with the 120vac power increases potential risks.

The little yellow Grayhill device is NOT a relay. It produces +5 when it detects AC past a threshold.

http://parts.digikey.com/1/parts/747536-modl-mini-ac-input-5v-output-70m-iac5.html

The data sheet has an error and claims DC input rather than AC in on one picture.

http://lgrws01.grayhill.com/web/images/ProductImages/AC%20Input%20Modules.pdf

These devices are nifty. They will put out a dc voltage when AC is above a set voltage is applied. The device DOES require a logic voltage and that is specified per model in the data sheet. Industry standard modules would use +24V supply and put out a +24 volt on signal. You would want the +5 version.

The absolute simplest device I've seen used is a relay/contactor whose coil runs off the voltage to be monitored. The coil would be driven by 120VAC and you can then treat it as a button on the contact side.

There is no problem with using a relay but simple usually means expensive. The following is around 35 dollars. Ouch.

http://relays.tycoelectronics.com/datasheets/KHA_DS.pdf

Below is a Radio Shack 120vac relay that might be of interest.

http://www.radioshack.com/product/index.jsp?productId=2049721