How would you measure Power factor using Arduino 1?

I know I have to measure the time between Voltage's zero-crossing and Current's zero-crossing, using the Timer Register... but I'm having trouble on the Current.
I used an optocoupler (4N35) and I'm getting a square wave that switches from 0 to 5V and 5V to 0, and so on (everytime Voltage = 0), so I don't have a problem with the voltage.
But what to do with the Current? How can I get a clean wave of its zero-crossing to send it to the Microcontroller?

But what to do with the Current? How can I get a clean wave of its zero-crossing to send it to the Microcontroller?

You have to either measure the voltage drop across a small ohm value 'current shunt' resistor or a current transformer or these days there are nice hall effect sensors that will output the AC current wave form suitable of measurement with a analog input pin.

http://www.ebay.com/itm/251169268136?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649

This module will output a steady +2.5 vdc when current is at zero and higher and lower DC voltages as current is either positive or negative half of the AC waveform. There are also modules like this rated for +/- 30 amps full scale if +/- 5 amps is too small for your application.

Lefty

Darksaga28:

could you please share with me the arduino programming for power factor calculation................

You might search the forum for terms like "power factor" and "reactive load" for similar previous questions.