Maker Pro
Maker Pro

Detect AC Power supply

steve_venkat

May 22, 2017
30
Joined
May 22, 2017
Messages
30
This is the circuit I' using to detect the AC voltage.I can't get any output from this circuit..
Is simply in Idle.Their is no negative voltage is detected.
 

Attachments

  • Image_1.png
    Image_1.png
    9.1 KB · Views: 14

Alec_t

Jul 7, 2015
3,587
Joined
Jul 7, 2015
Messages
3,587
You can't get a negative voltage out, since the '814 output transistor is only connected to a +5V supply.
What AC voltage are you trying to detect? 110V mains?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
With 100k resistors I'm surprised you're getting anything at all. This means only 0.5mA through the opto's LEDs. Without referring to the data sheet (coz I can't be bothered to download one) is <1mA sufficient to activate the LEDs?
 

steve_venkat

May 22, 2017
30
Joined
May 22, 2017
Messages
30
You can't get a negative voltage out, since the '814 output transistor is only connected to a +5V supply.
What AC voltage are you trying to detect? 110V mains?
Its connected to MCU input,The resistor is connected as pull-up resistor...
Have to detect 230VAC,But the voltage will vary from 160VAC to 280VAC...
 
Last edited:

steve_venkat

May 22, 2017
30
Joined
May 22, 2017
Messages
30
With 100k resistors I'm surprised you're getting anything at all. This means only 0.5mA through the opto's LEDs. Without referring to the data sheet (coz I can't be bothered to download one) is <1mA sufficient to activate the LEDs?
Its 5mA current required.?If the voltage is constant(230VAC) means 4.k OHM is enough for it..?
But the voltage will vary from 160VAC to 280VAC...
At this point how to choose the resistor value..?
 

kellys_eye

Jun 25, 2010
6,514
Joined
Jun 25, 2010
Messages
6,514
The current range for LED operation can vary considerably yet still allow it to work. Take the average AC voltage (220V) and use that to calculate the required resistor for 5mA current flow. Any changes either side of that will be acceptable.

Alternatively take the 230V as the 'working value' and choose a resistor for that.
 

steve_venkat

May 22, 2017
30
Joined
May 22, 2017
Messages
30
The
Its 5mA current required.?If the voltage is constant(230VAC) means 4.k OHM is enough for it..?
But the voltage will vary from 160VAC to 280VAC...
At this point how to choose the resistor value..?

The LED in optocoupler is 20mA current and 70mW power dissipate.So I calculate resistor value for 5 different range of input supply and took average value from that.Its 11.1K,2W...Is this Correct method or have to change something..?
 

steve_venkat

May 22, 2017
30
Joined
May 22, 2017
Messages
30
The optocoupler working fine with ground supply...I tried with positive voltage instead of ground supply and connected the output from the optocoupler to controller.Their is no response in the controller.Is this circuit is correct..?
 

Attachments

  • Positive_voltage.png
    Positive_voltage.png
    7 KB · Views: 5

(*steve*)

¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥd
Moderator
Jan 21, 2010
25,510
Joined
Jan 21, 2010
Messages
25,510
On the optocoupler side, I would make the 1k resistor 10k, and connect it from the emitter to ground. The emitter should be connected to the microcontroller input pin.

upload_2018-11-25_17-56-50.png
 
Top