Black Lives Matter - Action and Equality. ... Adafruit is open and shipping.
0

Need elegant 120V- 347V detection for Arduino input
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Need elegant 120V- 347V detection for Arduino input

by Fastereddy on Tue Oct 05, 2010 11:16 pm

I'm an electrician with some basic electronics knowledge. I'd like to be able to connect a 120V to 347V (idealy 5- 347V AC (DC would be nice too!)) and register an input high to an Arduino. I could use a variety of relays - but I'd like to be able to connect a range of voltages (thus circumventing mistakes that could fry components).My goal is to build a troubleshooting tool that could be connected to a mystery wire (unlabled , purpose unknown), register an active input and possibly a time stamp -thus providing helpful information (revealing purpose and possibly location of origin).
Fastereddy
 
Posts: 4
Joined: Sat Sep 25, 2010 12:35 pm

Re: Need elegant 120V- 347V detection for Arduino input

by cstratton on Tue Oct 05, 2010 11:36 pm

In theory it's simple - you just need a probe circuit or voltage divider comprised of a larger resistor to sample a tiny current off the high voltage, and a zener diode to ground to clamp the resulting reduced voltage to 3.something volts, which should read as a nice logic one.

In practice, you want to be sure to get it really, really, really right so you don't fry the board. Or the user.

And you need to make sure it can't fail in some unfortunate way. For example, you probably don't use one resistor but instead several in series. And you find out what the maximum safe current through the human body is (it's pretty small) and make sure that your maximum test voltage across your resistors can't result in more than this, even if the zener diode fails. And then you treat the whole thing as if it's mains powered. Also you might want to avoid connecting a computer to the arduino.


Another interesting circuit that is sometimes used (for example in some telephone ringer projects) involves a small neon lamp - either as a series element, or coupled with a photodetector.

cstratton
 
Posts: 294
Joined: Wed Sep 29, 2010 3:52 pm

Re: Need elegant 120V- 347V detection for Arduino input

by zener on Tue Oct 05, 2010 11:56 pm

Maybe something like this:

http://cgi.ebay.com/Non-Contact-AC-Volt ... 335dbf190b

But you will have to come up with .99 ...

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Need elegant 120V- 347V detection for Arduino input

by chatham on Thu Oct 07, 2010 3:43 am

Have you thought about magnetic sensors? I don't have too much experience with Hall Effect sensors and the like, but a current passing through a wire will generate a magnetic field, and you should be able to measure that with a magnetic sensor. For instance, I'm currently doing something with a digital compass, and even the 3.3v power cord, if it gets near the compassing chip, will throw it off by up to 30 degrees. So I would guess a cheap one-axis magnetometer would be able to pretty easily detect 120+VAC.
OpenChord.org - Open Source kits to let you play Guitar Hero with a real guitar, or build your own Wii/PS3/USB controllers.

chatham
 
Posts: 144
Joined: Thu Feb 04, 2010 2:30 am

Re: Need elegant 120V- 347V detection for Arduino input

by zener on Thu Oct 07, 2010 1:49 pm

Hall effect will only detect current. You can have voltage without current.

zener
 
Posts: 4567
Joined: Sat Feb 21, 2009 2:38 am

Re: Need elegant 120V- 347V detection for Arduino input

by oPossum on Thu Oct 07, 2010 4:38 pm

Image
I am the Possum, and I approve of this message. Sent from MacBook Wheel Sorry for my bad German.
oPossum
 
Posts: 636
Joined: Fri Oct 26, 2007 12:42 am
Location: Michigan, USA

Please be positive and constructive with your questions and comments.