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]
Rating:
Author: dany
Last Updated: 2016-02-18
Package Version: 1.0.0.0
Category: Measurement
Downloaded: 3366 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.
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)".
DOWNLOAD LINK | RELATED COMPILER | CONTAINS |
---|---|---|
1410258774_wattmeter__power_mikropascal_pic.zip [1.14MB] | mikroPascal PRO for PIC |
|
1410258796_wattmeter__power_mikrobasic_pic.zip [1.14MB] | mikroBasic PRO for PIC |
|
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.