BASIC on Raspberry Pi Pico
  • BASIC Interpreter
  • BASIC with VGA Display
  • BASIC with WiFi & Internet

  • Maximite Family
  • Colour Maximite 2
  • Original Colour Maximite
  • Monochrome Maximite
  • The Maximite Story

  • Micromite Family
  • Micromite Summary
  • Standard Micromite
  • Micromite Plus
  • The Microbridge

  • Micromite LCD Backpack
  • Micromite LCD Backpack
  • Air Quality Monitor
  • DDS Signal Generator
  • Super Clock
  • Boat Computer MkII
  • Parking Assistant

  • Other Projects
  • Pico Gamer Console
  • Precision Analog Clock
  • Watering Controller
  • Windows/DOS MMBasic
  • ASCII Video Terminal
  • Utility Power Supply
  • Precise Voltage Reference
  • ISM Band Scanner
  • Game of Pong
  • Simple GPS Based Clock

  • Useful Techniques
  • 3D Printed Cases
  • Measuring Capacitor ESR
  • Surface Mount is Easy
  • Programming PIC Micros
  • Custom PC Boards
  • The Gerber Format

  • General Articles
  • Problems in Open Source
  • Hantek DSO-2250 Scope
  • Rigol DS1000 Scope
  • Brickbats

  • WEB Site
  • Home
  • Old or Obsolete Projects
  • About



  •  

     

     

    This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Australia (CC BY-NC-SA 3.0)

    SC Energy Meter Firmware

     

    The Silicon Chip Energy Meter described in the July 2004 and August 2004 issues was designed to measure the energy consumed by an appliance (TV, heater, etc). 

    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.

    Replacement Chip

    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.

    New Functions

    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.

    Setup

    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!

    Usage

    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.

    Downloads

    Enhanced Energy Meter Firmware V2.3 - HEX file for the PIC16F88 DOWNLOAD
    Enhanced Energy Meter Firmware V2.3 - Source Code DOWNLOAD