TOP Contributors

  1. MIKROE (2650 codes)
  2. Alcides Ramos (350 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136552 times)
  2. FAT32 Library (69749 times)
  3. Network Ethernet Library (55850 times)
  4. USB Device Library (46189 times)
  5. Network WiFi Library (41812 times)
  6. FT800 Library (41005 times)
  7. GSM click (28930 times)
  8. PID Library (26386 times)
  9. mikroSDK (26292 times)
  10. microSD click (25304 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
Project

WattMeter (Power meter)

Rating:

5

Author: dany

Last Updated: 2016-02-18

Package Version: 1.0.0.0

Category: Measurement

Downloaded: 3329 times

Followed by: 4 users

License: MIT license  

This project is a power meter (Wattmeter).
It is made for 230V~ (nominal, rms), 2.5A~ (max, rms) and 50Hz, but is rather easily adaptable to other voltages, currents and frequencies. It can handle both sinusoidal and non sinusoidal voltages and currents, both with and without DC component.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "WattMeter (Power meter)" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "WattMeter (Power meter)" changes.

Do you want to report abuse regarding "WattMeter (Power meter)".

  • Information
  • Comments (14)

Project Blog

This project is a Wattmeter (Power meter). Documentation.

Important Warnings! Safety issue. (Only for the non mains isolated versions)
All electrical parts of the meter are connected to the live mains supply. Do NOT touch any of those parts when the Watt meter is connected to the mains outlet.

Danger for Electrocution!


The wattmeter itself should be put in a well isolated encasement that will not allow
any touching of any part of it. Mind the LCD metal parts and switches/pushbuttons!


Do NOT connect the circuit to e.g. a PC (via Rs232 or USB or...) because it will lead to a
short circuit.


Do not use an external mains adapter to feed the Wattmeter (e.g. a mains adapter for
a USB device or mobile telephone). There is a danger of touching live mains supply
when touching the adapter or adapter cable.


The only safe choices to feed the wattmeter are
-  batteries inside the (isolated) wattmeter housing (mind the on/off switch!!).
-  a separate power supply (trafo, rectifier, stabilizer) fed from the mains supply,
   also inside the wattmeter housing (mind the on/off switch!!).

[end of Important warnings]

 

The power meter (Wattmeter) is made for 230V~ (nominal, rms), 2.5A~ (max, rms) and 50Hz, but is rather easily adaptable to other voltages, currents and frequencies. It can handle both sinusoidal and non sinusoidal voltages and currents, both with and without DC component.

It measures:
- the Rms voltage (unit: Volt)
- the Rms current (unit: Ampère)
-  the apparent power consumption (unit: VoltAmpère: VA). This value is also called “Complex power”.
- the real power consumption (unit: Watt) (= the one that you are going to pay for)
- the power factor (no unit, ratio of real power to the apparent power). Same as cos phi for sinusoidal V and A.


All values are shown on an LCD, except for the Apparent (Complex) power.


Additionally there is one push button to set the “zero” point for the AD convertors. The values of these zero points are stored in Eeprom and recalled after startup of the PIC.

Have fun!

---------------------------------------------------------------------------------------------------------------------------------------------

2013-07-22:

- Changed the resistors in the 2 level shifters from 10K to 4.7K. This is done to keep the series resistor of the ADC inputs within specifications (<= 2.5K). Also R1 has changed due to the resistor change of the shifters.

- Added in the documentation how to adapt the meter for other voltages, currents, etc...

-------------------------------------------------------------------------------------------------------------------------------------------

2013-07-27: Change in the circuit diagram: added overvoltage protection diodes to the PIC inputs.

---------------------------------------------------------------------------------------------------------------------------------------------

2013-07-29: Added the "Vdd' constant in the code to make PIC voltage changes easier. Updated also the documentation.

--------------------------------------------------------------------------------------------------------------------------------------------

2013-07-30: Added the mB for PIC version.

---------------------------------------------------------------------------------------------------------------------------------------------

2013-08-07: Added documentation about modifications needed for higher currents than 2.5A~rms:

- The method with a dedicated current sensor IC

- The method with a series resistor and an extra amplifier

---------------------------------------------------------------------------------------------------------------------------------------

2013-08-08: added the "Mains Isolation" expansion in the documentation.

---------------------------------------------------------------------------------------------------------------------------------------
2013-08-10: Made some small corrections to the documentation .pdf file.

-------------------------------------------------------------------------------------------------------------------------------------------

2013-08-12: Changed the LCD declarations from "RB2_bit..." to "LatB2_bit...".
 Thanks Helmut! (http:'www.mikroe.com/forum/viewtopic.php?f=97&t=55669&start=13)


2014-09-04: Corrected an error in the eeprom storage of the current offset. Sorry for the inconvenience.     

EeProm_write(3, Hi(VOffset)); // <----- should be "EeProm_write(3, Hi(AOffset));"


2014-09-09: added a version with measurements (ADC readings) under timer interrupt. The accuracy of the measurement timing is no longer influenced by the main loop speed or the ADC conversion time here.  

 

ALSO FROM THIS AUTHOR

TempSensors Ds1820 LM35

16

The basic functions for the DS18(S/B)20 (onewire digital temperature sensor), including string output, ready to display. A routine to convert a more than 9 bits temperature read from a DS18B20 to a string (to e.g. display on an LCD) is also present. Including Parasite Power and Configuration routines. The LM35 basic functions, code efficient.

[Learn More]

FRAM Click used without development board

0

The example shows how to use the FRAM click board without a development board. It is executed with a mini32 board instead.

[Learn More]

AC Dimmer, 230V

0

Simple galvanic isolated dimmer (with triac phase control) for 230V AC.

[Learn More]