You need to take several thousand instantaneous readings of both current and voltage per second and average their product over the time period to calculate true power (Kill-a-Watt does it this way). You can measure the current using hall-effect sensors and the voltage using an unregulated DC wall transformer (you'll need a calibration procedure). Apparent power is just Vrms * Iavg. TP / VA gives you PF.
Doing it this way will also handle loads like switching power supplies, CFLs, etc.
There used to be a PIC based example on Dr. Ed Cheung's website. He's a NASA engineer who built a device to measure the power used in his house. I'm not sure it's still there but he will probably respond to email, if not.
Of course, the easy way is to spend $25 for a Kill-a-Watt meter. I think I was the first person to buy one and review it (on comp.home.automation). Now you can buy them at every corner store.
Bookmarks