Pages: [1]   Go Down
Author Topic: need help completing this circuit  (Read 676 times)
0 Members and 1 Guest are viewing this topic.
USA
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

OK, so in order to detect power loss, I'm going to try hooking this:
http://www.isocom.com/datasheets/db92449.pdf
ISP814 to my 120VAC, 60Hz line (with roughly 150k of resistors) to limit current.

On the other side, the idea is to connect to one of the Arduino's digital I/O ports, using the pull-up.  But I have at least one (possible) issue on that side: the ISP814 is using two inverse, parallel diodes to keep it lit as the AC cycles, but as it crosses zero, I assume neither will be lit.  Thus, I think I need a cap and possibly a resistor on the side connected to the Arduino (across the ISP814's pins 3 & 4) to "smooth" the output, right?

Any ideas/help would be much appreciated!
-AJ
Logged

South Texas
Offline Offline
Edison Member
*
Karma: 8
Posts: 1023
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any reason why you are trying to do this at line voltage? You could use the output from a wall wart power supply and work with much safer voltages.

Voltage dividers from the AC line still have the potential to feed you 120VAC if the voltage divider fails. For a safer setup always step it down with a transformer. 
Logged

Germany
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2756
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
For a safer setup always step it down with a transformer.
That's true, of course, and other hints like
-" use resistors on both power wires " or
-" don't setup those resistors on a breadboard, but aways keep the power line and resistors isolated  "
-" two 47k resistors in series is safer than a single 100k "
are very bad, because either you don't need them or you should not be encouraged playing with mains smiley-wink

That said, you can either smooth the signal on pin 4 electrically or have a "software solution" :
 Power is OFF when digitalRead gives HIGH for more than ~10 millis
You could even use the pulse frequency to compare the accuracy of Aduino's clock with the 60 Hz supply ...
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23861
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Or use an optoisolator. Have your voltage divided down/rectified AC driving an optoisolator, monitor the other side with the input.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well, if you consider durability and costs, two (roughly) 75k resistors connected on either side of the 120VAC should far outlast a transformer, which also costs additional money and requires resistors anyway to reduce whatever the output is to < 5VDC.  Also, this project won't have an AC receptacle to plug-into, so "wall-wart" is out, though if you exclude the durability and cost previously mentioned, some generic transformer could be included.

Or use an optoisolator. Have your voltage divided down/rectified AC driving an optoisolator, monitor the other side with the input.

Forgive me, obviously a novice, but isn't this an optoisolator I'm trying to use?
Logged

Germany
Offline Offline
Faraday Member
**
Karma: 49
Posts: 2756
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

isn't this an optoisolator I'm trying to use?
Sure. If you've got it already, you can use it. Alternatively, you may look for a cheap single diode optocoupler and add a separate diode or led outside. Especially if you will use the unsmoothened pulses. Half the pulses should still be enough to detect power off.
« Last Edit: April 25, 2012, 02:44:47 pm by michael_x » Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23861
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Sorry, I missed the link in the initial post.

By the way, what will you do when power goes away? Is the arduino seperately powered, battery backed, super-cap, etc?
Or you are looking for loss of power to something else?
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Offline Offline
Edison Member
*
Karma: 35
Posts: 1429
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
to detect power loss
What's the Arduino going to do for you if it detects a power loss?

Quote
this project won't have an AC receptacle to plug-into, so "wall-wart" is out
Why?? If you can connect this circuit of yours anyway, what's so difficult about putting a standard jack on the 120Vac side and plug in the wallwart?

Pete
Logged

Where are the Nick Gammons of yesteryear?

USA
Offline Offline
Newbie
*
Karma: 0
Posts: 16
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The "project" is being powered by an external, 12v battery that is already present.

If the AC power is lost, I'm going to send a notification (going to experiment with one of the available GPRS Shields).

I understand the idea of stepping-down the voltage from 120VAC.  I have an old wall wart here that is currently outputting 5.6VDC.  Is there a simple way to connect that to one of my digital I/O ports (via a resistor, I'm sure) and just wait for the pin to go LOW?  (Is the 5.6v outside the Arduino's tolerances?  Should I use resistors to reduce that voltage further to be safer - in the sense of protecting the board?)

Thanks again for all the ideas/help!
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 444
Posts: 23861
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

5.6 is a little high, reduce it a little, like to 4.5V, and read it as high/low.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 45
Krazatchu Design Systems
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Use a resistive divider to reduce it. http://en.wikipedia.org/wiki/Voltage_divider#Resistive_divider

Connect your gnds so that you have a common reference and use large value resistors so that you don't dissipate a lot of power and burn up the resistors.
10k and 47k would be a good choice but you should make sure the input is really 5.6 volts as it could be higher when it's unloaded ...

Logged

Michael
----------------------
http://www.krazatchu.ca

Pages: [1]   Go Up
Jump to: