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.

ac frequency measurement with isolation

Status
Not open for further replies.

zeroskj1988

New Member
i want use measure the frequency of ac(normaly 50hz).since i have problem with common ground,i want to isolate the neural line. so i use a optocoupler to isolate the ac
my circuitis-------half wave rectifier---100k-1k voltage divider---then optocounpler to ccp2 ofpic16f877a. i use timer 1 to find the period. can any body spot, any problem with this logic. thanks in advance actually it is not working
 
If you want to measure the AC mains frequency (you don't mention voltage) then just use a small step down transformer. 220 vac to something like 6.3 vac. You could hack a simple wall wart to get the transformer or just find an ac output wall wart. Can you post a drawing of what you have? Also, what type of timer? What exactly are you using to measure the frequency/period?

Ron
 
Loose the 1k resistor , use only rectifier diode ,100k resistor , optocoupler because the optocoupler is current driven. If still doesn't work ,in the processor side must be a pull-up resistor , check if your Current Transfer Ratio of the optocoupler is sufficient. Some have CTR = 1 or less and for 120v main voltage R pull-up must be higher than 20Kohm. The transformer is to big for such a simple task , post a drawing , the value of the main voltage (I guess 120v if you're from Ohio) and the optocoupler you use to help you make-it work.
 
Assuming the mains voltage is 230V rms the peak current through the opto-coupler diode is only ~3.2mA. Is that enough to give a meaningful output (you don't specify which opto-coupler you're using)? For a 110V mains supply the diode current (~1.5mA) would almost certainly be inadequate for most opto-couplers.

Alec
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top