digital watt-hour meter

hi, i'm an electrical engineering student, and i'd like to help my friends out in building their project which is a digital watt-hour meter using arduino.
i have a few questions regarding this project

  • current sensing is no problem with acs712 current sensors, but how do i measure instantaneous mains ac voltage? first thought is using step down transformer then voltage divider to an analog pin. the mains ac voltage here is 240Vac line to line (neutral is inaccessible), 60Hz. i am having a hard time looking for 240-12 or 240-8 small scale transformers. what devices do i usually find them in? do they have a model number or something? i tried searching the net for local availability, but i found none.

  • i've destroyed an unused cellphone charger and found a transformer, but further research says it is a flyback transformer. can i use this or can i modify this for my needs?

  • for the program flow, i'm thinking about recording the millis() or micros(), then getting instantaneous voltage * instantaneous current polling for a straight 16.6667 ms (1/60), then summming them up (with their corresponding sign, positive or negative), and divide by the 16.6667 ms period to get the average power, then multiplying this power by the time it takes for the sketch to complete a full loop, therefore having the energy consumption for the said time, then adding this to the total energy consumption recorded by far, then repeating the process. is this program flow feasible? (i'm not very picky with accuracy atm)

thanks in advance

Search eBay for "wattmeter s0".

You will find lots of wattmeters for DIN rail mount that give 1000 pulses per kWh using the S0 standard interface. It's easy to use Arduino counting S0 pulses.

i must admit this is very tempting, but there're some complications.
our academic instructors strongly discourage these "ready-made" models, so i guess this option would be out of the running. and the cost is also not very encouraging.

thanks though.

are there any ac wattmeter ICs that maybe easy to program? i've tried searching, but i'm afraid i don't understand them very well.

oh, i think i've found a suitable transformer, it's called pcb transformer.
next question is, what devices do i usually find these so i could just destroy and obtain?

looks like you are re-inventing the kill-a-watt meter. Perhaps you can get one and see how it works.

With suitable safety precautions wouldn't a couple of resistors making a voltage divider be simpler than a transformer.

...R

visit openenergymonitor.

they answer all your questions.

I would highly doubt that your cell phone charger has a flyback transformer.

I would look for a doorbell transformer to get started. a little larger than you need, but simple to test.

I am going to both agree and disagree with Robin2. he is exactly right that you can just use a simple voltage divider, but I would not want to recommend that to someone who is not familiar with the mains voltages and precautions and such.
this is a catch-22, if you know your way around mains voltages, then you do not need to ask the question. since you asked the question, it would not be safe for you to experiment with potentially life threatening voltages.

as for your quest, any lamp dimmer, any electronic wall wart, and batter charger, any fax machine, any printer, any DVD player, any clock radio, and the list goes on and on.

take an old cell phone charger, crack open the case, find the transformer and remove the caps and such.
use the old caps holes for your voltage divider and presto !

dave-in-nj:
but I would not want to recommend that to someone who is not familiar with the mains voltages and precautions and such.
this is a catch-22, if you know your way around mains voltages, then you do not need to ask the question. since you asked the question, it would not be safe for you to experiment with potentially life threatening voltages.

I was inclined to say something like this but I did not because of the first line of the Original Post "i'm an electrical engineering student".

Of course I may have been reading far too much into that statement.

...R