One easy method is to use an oscilloscope with a clamp on current probe and a voltage probe monitoring the line voltage on the secondary of a step down transformer. Examine the zero crossings of both traces to get the phase difference. You can calibrate out any imperfections by first using a resistive load to get the time difference between zero crossings and use this to correct for the zero crossing times of the load you want to measure.
There is a safety hazard involved in doing this and all other mains measurements. There are exposed conductors. You should unplug the cord from the wall socket before attaching the probes and setting the oscilloscope controls. Then stand back and attach the power cord to the wall socket. Stay well away from the circuitry and just look at the oscilloscope output and write down the data. Immediately unplug the power cord after recording the data.
You should also do this type of measurement with another person present and they should have medical training for electrical shock problems. It is also best to have an insulating mat to stand on and keep your left hand in your pocket.
Try to use method described in the following article: **broken link removed**
In this method you will only need "trusty multimeter" (posibly with a serial port to transfer data to your PIC).
Regards,
IanP
use two ZCD, one for voltage, one for current. start the counter by say voltage zcd and stop it by current zcd. the count *clock period will give you time. the divided by the cucle time will give you the lead or lag. cos of it is your power factor.
it is assumed that that waveform is sinusoidal.
hock