SC Energy Meter Firmware
The original firmware was written in assembler and, as a result, the meter could only display a limited number of measurements (watts, accumulated kWh and cost).
This replacement firmware is written in the C language and uses 32 bit floating point routines to provide a much wider range of information including predictions of the energy cost over time and CO2 emissions.
All you need to do is replace the original microcontroller with a cheap replacement and program it with the firmware available in the download section at the bottom of this page.
To install the new firmware you need to replace the original PIC 16F628 microcontroller with a PIC 16F88 I/P. The 16F88 is pin for pin compatible with the original microcontroller but has double the program memory, and this is used to implement the new functions. The only function of the original design that the new firmware does not cater for is the brownout detection. But, as compensation, you get a much faster update rate (every second) compared to the original design (every 11 seconds).
To install the new firmware, download the HEX file from the bottom of this page, program it into a PIC 16F88 I/P microcontroller and install the chip in your Energy Meter. No other modification is required.
The diagram below shows all the readings that you can call up.
To reset the meter and start accumulating a new set of readings you press the CLEAR button. The FUNCTION button will step you down through the five “layers” of readings as shown in the diagram. The UP and DOWN buttons will step you right or left on a horizontal line. These buttons will also wrap around when the end of the range is reached.
To setup the meter you hold down the CLEAR button for five or more seconds and the display will change to the calibration settings. To adjust a setting use the UP and DOWN buttons as required. To step to the next setting press the FUNCTION button. When you have run through all the calibration settings the display will revert to normal measurement.
In total there are five calibration settings; the cost of electricity, the number of days between electricity bills, the rate of CO2 emissions per kW (your electricity supplier can tell you this – check their web site), zero setting and calibration factor. The last two (zero and calibration factor) are the same as in the original Silicon Chip firmware and you should refer to the original article for details on setting them.
One of the benefits of the new firmware is that you can set the cost of electricity to over $16 per KWh. The original firmware had a limit of 25.5 cents/KWh. At the time this seemed a very high cost but with the march of time many consumers are paying more than this now - hopefully a limit of $16/KWh will not be an issue for some time, at least not in our lifetime!
The firmware predicts energy usage by averaging the readings over time. For something that draws constant power the prediction is accurate after a few seconds, but for an appliance that varies its power (like a fridge) you will need to leave it connected for a few days until the predictions settle to a constant value.
You can use this technique to measure the real cost of running many gadgets including your computer, water pump and even your electric kettle. For example, you can connect this to your “power hungry” plasma TV, and after a while it will have averaged the on/off times dictated by your viewing habits. You can then display how much it will cost you per bill, or per year, and even how much it will contribute to global warming.
|Enhanced Energy Meter Firmware V2.3 - HEX file for the PIC16F88||DOWNLOAD|
|Enhanced Energy Meter Firmware V2.3 - Source Code||DOWNLOAD|