Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

How to Detect Exceed AC Voltage

Status
Not open for further replies.

Suraj143

Active Member
My mains voltage is 230V AC/50Hz.

I need to turn on a LED when main voltage goes to 240V.

How to do that? What method should I use?
 
My mains voltage is 230V AC/50Hz.

I need to turn on a LED when main voltage goes to 240V.

How to do that? What method should I use?

Look at:

**broken link removed**

You would first have to rectify and filter your incoming AC as the application circuit is designed for monitoring DC voltages.
Lefty
 
Look at:

**broken link removed**

You would first have to rectify and filter your incoming AC as the application circuit is designed for monitoring DC voltages.
Lefty

Hello Lefty thanks for your help.

I want to do this from a PIC with a minimum of hardware.

That Application uses different chip which is unavailable.
 
My mains voltage is 230V AC/50Hz.

I need to turn on a LED (neon?)when main voltage goes to 240V.

How to do that? What method should I use?
If a neon lamp fires at ~62v and wants less than 1mA passing through it, make a voltage divider across the 240v with an ~11k 4w and a ~4.3k 2w resistor and connect one end of the neon to the resistor junction and ground the other end.
220vac gives about 60v across the neon, 240vac gives about 65v @ 1mA.
 
Last edited:
220vac gives about 60v across the neon, 240vac gives about 65v @ 1mA.

You got it.Actually I want to detect 220VAC & 240VAC.

When it 220VAC must turn on GREEN LED.
When it 240VAC must turn on RED LED.

I have done PIC ADC with DC voltages (0V-5V DC).But when it comes to 230VAC I don't know the theory how to scale the inputs & mehtod to use.
 
Ok this is the method I'm going to use.

I'll use a 230V/6V transformer & give AD input via a resister divider (divide by2).

Code:
230/6V		= 8.484 (smoothed DC)
		= 4.242V---216 (8 bit read val)

240/6.26V	= 8.852 (smoothed DC)
		= 4.42V----225 (8 bit read val)

220/5.7V	= 8.115 (smoothed DC)
		= 4.05V----206 (8 bit read val)
 
You will need a load or else the response for voltage dropping from 240 to 220 will be to slow.
A faster way is to use the two comparators (most pics have two comparators) with two different reference voltages. Both comparators inputs the divided ac voltage. All you need is is to measure the time from first comparator going high and second comparator going high.
AC.JPG
 
Last edited:
You will need a load or else the response for voltage dropping from 240 to 220 will be to slow.

Hi this project is to verify the mains voltage has gone up or low.

Not going to connect any load.The voltage drop happening from the surrounding area or from the road transformers.Not from this project load.
 
Yes , but if you use a rectifier and a capacitor or something like that, when ac voltage drops from 240 to 220 the capacitor Will remain charged if you don't have a load for it .
 
Last edited:
Hi mdorian

Now I got what you mean.Your comparator thing is ok but its hard for me bcuz never used comparators before & also this 8 pin PIC have only one comparator I think (PIC12F675).

About my method to make it speed what do I have to do?What load do I have to add?
 
Assume that you want a 10% error , you have 20 v between 220 and 240 so the error is less than 2V , your voltage smoothener must ensure that the voltage between two semi periods doesn't drop more than 2V. So the response time is 10ms*20v/2v = 100ms. I assumed that the ac freq is 50 Hz so a semi period is 10 ms. The things get worst if you don't have a with exactly like that (2v ripple voltage) , if you have a better smoothener (let's say 0,2v ripple voltage) you will have a response time of 10* 100ms = 1 s, if you don't use a good one (let's say 5v ripple voltage) you will have an error of 20v/5v ->25%
 
Hi thanks for the explanation.

So everything based on that smoothing capacitor.I should maintain 2V ripple.I cant use higher value capacitors because its extending the response time.

What is this calculation "10ms*20v/2v = 100ms."

Just now I noticed 6V transformer is not enough because for the 7805 its not enough.IF I use a 9V transformer after smoothed it will become more.So again I have to scale to AD input.

Plenty of problems.
 
Last edited:
hi Suraj,
Can you buy LM393's [dual comparator] at your location.?:)
 
Yes eric gibbs I can buy.Also it must use with PIC12F675.

Understood.

You say that you are short on PIC pins.?

Use an external LM393 as a comparator to compare the mains low voltage against a reference voltage.
The output of the comp would be low for less than 240V [this could drive a Green LED] and high for 240V or greater [drive Red LED].

Or use the PIC to drive the LED's.

Just poll the comp output.

LM393 are not expensive.
 
Last edited:
Understood.

You say that you are short on PIC pins.?

Use an external LM393 as a comparator to compare the mains low voltage against a reference voltage.
The output of the comp would be low for less than 240V [this could drive a Green LED] and high for 240V or greater [drive Red LED].

Or use the PIC to drive the LED's.

Just poll the comp output.

LM393 are not expensive.

Hello eric gibbs that will be fine but I don't know how to calculate the comparator references & AC inputs to the comparator against 230V AC.
 
Hello eric gibbs that will be fine but I don't know how to calculate the comparator references & AC inputs to the comparator against 230V AC.

hi,
If you decide to use that method, we will help with the sums.

You could use the on PIC comparator if required.
 
The adc is fast enough to sample the ac voltage.
you can use something something like that:
variable MAXvoltage = 0
start:
if AdcResult> maxvoltage then maxvoltage = adcresult
if adcresult > 0 then goto start

compare maxvoltage with calculated value for 220v and 240v and set the LEDs accordingly

wait for adcresult > 0
maxvoltage = adcresult
goto start
 
Last edited:
Is not a good idea to use the same transformer to power supply and measurement , it will distort the measurement.
 
Status
Not open for further replies.

Latest threads

Back
Top