Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Watcing Voltage through Analog..


  • Please log in to reply
7 replies to this topic

#1 Coyttl

Coyttl

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationSilver Spring, MD, USA

Posted 09 November 2012 - 01:33 AM

Hey all - This is more of a general question - even though I'm using a N+. I'd like to watch the voltage of a 120VAC feed through an analog pin. What's the best way to go about handling this? (Yeah, I'm aware NOT to hook it straight up to the pin, unless I want to see fireworks!) Unless I'm looking for the wrong terms (possible), Google wasn't much help. SO I thought I'd get ya'll's pointers. Cheers! -Mike.

#2 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 09 November 2012 - 02:23 AM

Hey all -
This is more of a general question - even though I'm using a N+.

I'd like to watch the voltage of a 120VAC feed through an analog pin. What's the best way to go about handling this? (Yeah, I'm aware NOT to hook it straight up to the pin, unless I want to see fireworks!)

Unless I'm looking for the wrong terms (possible), Google wasn't much help. SO I thought I'd get ya'll's pointers.

Cheers!
-Mike.

Mike,

There are several ways to do this, some would use electronics others simple electrical compontnents.

  • If I wanted to keep it simple, use a transformer (something like a door bell transformer) in the range of 120vac to 6vac.
  • Put a full wave bridge rectifier to convert the 6vac to direct current.
  • Build a voltage divider to cut the dc voltage to 3.3vdc or less. For instance wire (3) 1000 ohm resistors in series (current through the network about 2.5 milli amps), and take the voltage between the first resistor and the negative connection (tie negative to Netduino ground) this will give about 2.5vdc when 120vac is applied (the output of the rectifier will be slightly higher than the ac input, RMS values to DC).
  • Scale the reading to the applied AC voltage (120v).

Hope this helps,
Chuck

#3 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 09 November 2012 - 09:01 AM

In case you do not really care about the voltage, but you want the signal for synchronization, have a look at "Zero Crossing Detector" circuit. While it is possible to connect the microcontroller input to the mains (AVR182 application note), I would strongly recommend galvanic isolation (i.e. transformer or an optoisolator). Keep one hand in your pocket when working near the mains.

#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 09 November 2012 - 12:40 PM

Everything the above friends have written is fine, but my advice is:
do not play with voltage above 30 Volts unless you have enough experience in electric sciences.
I am sorry if I hurt you, but instead of giving you some guidance toward a potential danger, I prefer to keep you far from.
Hope you understand what I mean.
Cheers
Biggest fault of Netduino? It runs by electricity.

#5 Coyttl

Coyttl

    Advanced Member

  • Members
  • PipPipPip
  • 61 posts
  • LocationSilver Spring, MD, USA

Posted 09 November 2012 - 03:21 PM

Hey guys -
Thanks for the tips. (And warnings, tho they are unneeded. I work around 120v/220v feeds all the time, I'm safe there! :lol: )

In fact, one of these projects, the client asked if they could be notified when the voltage had a brownout or went out. While there are detectors out there, only the insanely expensive have any external communications abilities. My immediate thought was a simple ND+ (actually, an ND would work fine with an XBee or other communications shield..!) watching the 120v on an analog pin. I know mains electricity better than I know circuits and DC, so was lost on how to convert the two. (read: Get a 120v reading into the ND.)

The doorbell transformer idea makes sense, it lowers the voltage and gives me DC, which the ND can then (safely) read. :)

#6 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 09 November 2012 - 03:35 PM

The doorbell transformer idea makes sense, it lowers the voltage and gives me DC, which the ND can then (safely) read. :)

Mike,

One thing that I thought of after I posted the first reply. Some of the wall warts (power supplies) used for telephones etc have an Low Voltage AC output (in the range of 3 to 12vac). I normally keep old ones around the house from various equipment that I have gotten rid of. Anyway they would would make a convient and safe way to step down the voltage and to protect the Netduino (and curious kids/adults). Also you may be able to use an un-regulated DC power supply with a voltage divider.

Chuck

#7 briankl

briankl

    New Member

  • Members
  • Pip
  • 1 posts

Posted 27 November 2012 - 02:11 PM

Hi, If your looking for a lower DC Voltage, just use a regulator to obtain a lower voltage output example is LM7805 etc. or make a variable power supply to aid your needs.

#8 carb

carb

    Advanced Member

  • Members
  • PipPipPip
  • 352 posts
  • LocationCrystal River, Florida

Posted 28 November 2012 - 12:19 AM

Hi,

If your looking for a lower DC Voltage, just use a regulator to obtain a lower voltage output example is LM7805 etc. or make a variable power supply to aid your needs.

Brian,

We are trying to read a 120vac signal, to use an analog input the reduced voltage must be proportional to the input voltage. A regulator would provide a constant voltage to the analog pin such that a change in the input would read the same on the Netduino board.

But thanks for trying.

Chuck




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.