I'm developing a simple power meter using the ATM90E32 from Microchip. For now, I can read all values: frequency, power factor, voltages, apparent power, etc.

Now the issue is with the energy, I need to read and maybe store the energy.

I can't understand exactly how the energy registers work. Even the datasheet keeps me confused. Has someone already worked with the ATM90E32?


  • Datasheet: Link
  • Aplication Notes: Link

Edit 2: The DataSheet refers to the Energy accumulation in a unit [ CF ] as I understand (and I'm very confused) CF = 1Kwh so in a certain period of time you read the register (clear at reading) and get the Energy represented in this CF unit the chip uses but is this true? Do I need to accumulate this value somewhere?

  • \$\begingroup\$ Welcome to EE.SE! I would suggest adding a link to the datasheet in question so that anyone looking to help you can find it quickly. You can add the datasheet link into your question by pressing the edit button. \$\endgroup\$ – C. Lange Aug 26 '19 at 16:56
  • \$\begingroup\$ Thanks, I just edited the post and added the datasheet and the application notes. \$\endgroup\$ – Juan Quintero Aug 26 '19 at 17:06
  • \$\begingroup\$ Rather than have someone write a full explanation, can you explain what you do understand and where your confusion lies? Put all the information in the question rather than sprinkled through the comments. \$\endgroup\$ – Transistor Aug 26 '19 at 17:44
  • 1
    \$\begingroup\$ Done!, the problem lies in the Energy parameter itself and the representation used to deliver it, even reading the datasheet is confusing..... \$\endgroup\$ – Juan Quintero Aug 26 '19 at 19:10

The datasheet says that energy registers are cleared after reading, so that means each read returns the accumulated energy since the last read. If you want to continuously monitor the amount of energy used over a longer period (eg. to show how much power has been used so far during the day) then you will have to accumulate the individual reads.

The value in the register is a 16 bit integer representing 100ths of a CF, and there are 3200 CFs in a kWh so at most it can store ~0.2kWh without overflowing. Therefore you will need to read the register often if the power consumption is high.

Alternatively you could just count CF pulses via eg. an external interrupt, and divide by 3200 to get kWh.

  • \$\begingroup\$ This answered my question, Thank You so much! \$\endgroup\$ – Juan Quintero Aug 27 '19 at 14:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.