Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Detecting AC voltage and taking the input to the atmega32

Status
Not open for further replies.

prathyks

Newbie level 5
Joined
Mar 22, 2011
Messages
8
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,348
I am trying to detect AC voltage (ie 220v, 50hz) and take the input to the atmega32.

Like, to detect whether an AC appliance is ON or not.. ?

So what would be the ideal circuit to do this.

Am a computer science guy and havent got expertise in electronics.. so please do suggest an idea.

Thanks in advance.
 

I suggest an opto-isolated zero-cross detector.

A cheaper more DIY solution is to use a series of 3 100k resistors (to protect from arcing) a 3.3v zener diode, and a regular diode that can block 300V+. The result will be a 50hz square wave 0-3.3v.
 

I suggest an opto-isolated zero-cross detector.

A cheaper more DIY solution is to use a series of 3 100k resistors (to protect from arcing) a 3.3v zener diode, and a regular diode that can block 300V+. The result will be a 50hz square wave 0-3.3v.

But what we need is a DC input to the microcontroller (atmega32 in our case). So what we were thinking is about step down tranformer, a rectifier, and a regulator.

I dont know much about the "opto-isolated zero-cross detector".

So which would be the better solution.?
 

You should just get an opto-isolator zero-cross chip they are much cheaper than a transformer. They usually output a pulse at zero-cross meant to drive a triac. This way you can keep a triac on without using firmware resources to maintain the triac on.
 

I am unsure what you are trying to achieve here.. are you looking for a constant DC input to the ucontroller? or are you looking to detect it is connected to the mains or not?

If you want a constant DC, I think a step-down transformer, a rectifier and a regulator (which essentially is a linear DC power supply) is a good idea, although it does use a lot of componenets.. As far as detecting if it is connected to the mains or not, you can just step it down and connect it to the ADC of the controller and write code to detect if AC is present (ofcourse you would need to use appropriate protection with resistors - check the max currect input to the pins)...
 

hey thanks sagar_satish.

I would like to give more details. What i am trying to do here is to detect whether an AC appliance is ON or not. ? like a light bulb or something.
So i would want to detect the presence of AC current in the wire from switch to the bulb.? which is the ideal solution to my problem.. ? so i think i would be needing constant DC voltage as an input to the micrcontroller (atmega32).

As u said the circuit with transformer, rectifier and a regulator with some other stuff similar to a mobile phone charger circuit is what came to my mind first.

But along side, was wondering whether there is an better alternate solution.

Any more suggestions.. ?

Thanks
 

I think the best way for your application is to use an opto-coupler.. there are many cheap ones and they would provide isolation so you wouldnt damage your ucontroller.. you can connect the optocoupler to your ucontroller and can detect if it is on or not..

you can read about them here:
**broken link removed**
 
@sagar_satish : thanks a lot. I didn't know about these optocouplers and i think this is what i precisely wanted. :)
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top