Close
0%
0%

Single-phase energy meter

Electricity meter with touchscreen and remote access

Similar projects worth following
This single-phase energy meter features a 3.0" TFT touchscreen that displays all essential parameters for AC power monitoring, including voltage, current (up to 16A), active, reactive, and apparent power, power factor, and accumulated import/export energy, as well as energy direction. It is based on the MCP39F511 metering chip and the PIC32MM0256GPM028 microcontroller.

Measured values are presented in both numerical and graphical formats. The user can switch between screens by tapping on the left or right side of the touchscreen. Additionally, the display shows the current time, power-up timestamp, and the last blackout timestamp. I chose the RV-3028C as the real-time clock (RTC), and it functions exceptionally well.

All measurements are recorded in the SPI FLASH memory SST26WF080B, which can store up to 16384 logs. The default logging interval is 5 minutes, but it can be adjusted within a range of 10 seconds to 20 minutes. Users can access measurement data and adjust the energy meter's settings in two ways: either via USB or remotely through the RFM75 RF transceiver, which requires a USB dongle on the PC side. Both the energy meter and the USB dongle enumerate as virtual COM ports, allowing the use of any serial terminal software.

I have created a simple Command Line Interface (CLI) that supports the following commands:

--DT<hhmmddmmyy> - set time and date

--READ<> - Read current measurement

--ENER<> - Read all energy accumulators (temporary and total)

--LOGS<> - Read all logs from external flash memory

--LPER<ssss> - Set the logging interval (in seconds)

--?LPER<> - Read the logging interval

--DISP <n>- change screen (n: 0-primary display, 1-apparent power plot, 2-active power plot, 3-reactive power plot, 4-current plot, 5-voltage plot, 6-info screen)

--RFCH<ccc> - set RF channel (000-127)

--AD<aaaaaaaaaa> - set 5-byte address for the RF communication (HEX)

--ID<max. 20chars> - set custom identifier (name)

--RAMLOG<> - read last 256 samples (V,I,P,Q,PF...)

--RESET<> - reset the energy meter

All commands are terminated with a carriage return and line feed (CR LF).

The energy meter is powered by a simple isolated flyback AC/DC converter based on Power Integrations' TNY276. The flyback transformer features two isolated windings: the first powers the measuring circuits, while the second powers the microcontroller (MCU), display, and communication interfaces.

An isolation barrier between the microcontroller and the measurement circuit is provided by the optocouplers FOD8012 and HCPL-181.

USB dongle for remote reading and control 

  • 1 × OPEN-SMART 3.0 " inch TFT LCD Shield module Touch Screen Breakout Board with Touch Pen for Arduino
  • 1 × PIC32MM0256GPM028
  • 1 × MCP39F511
  • 1 × SST26WF080B

  • Testing

    Miroslav Hancar09/15/2021 at 19:18 0 comments

    I did some testing to verify that samples are correctly logged into the FLASH memory. I've been able to read them back through USB and plot some of them in excel. Plots show power consumption of my Ender 3 Pro 3D printer as well as voltage variation during the print (logging period is 2s).

  • RF communication and 3D printed enclosure

    Miroslav Hancar08/29/2021 at 16:43 0 comments

    RF communication is finally working. It wasn't easy to get those cheap chinese RF modules working but this library helped me a lot.

    Two new commands have been added:
    --RFCH<xxx> - set RF channel (0-127)
    --AD<aaaaaaaaaa> - set 5-byte address for RF communication (HEX)
    These two commands are also used for setting the USB dongle on PC side, which must have the same channel and address as energy meter you want communicate with.

View all 2 project logs

Enjoy this project?

Share

Discussions

Robert Gawron wrote 09/29/2024 at 19:53 point

Did you use some library to create the graph visible on the LCD in the video? In general, the GUI on the LCD is pretty impressive.


I think the main cables are way too close to the LCD (it looks like LCD is touchable, based on the video). I’d be worried that if the connector's screw gets loose, the cable fall off and touch && shock me. Could maybe change printed enclosure a bit to avoid that.

  Are you sure? yes | no

Miroslav Hancar wrote 09/30/2024 at 08:17 point

Thanks! I wrote my own library for rendering graphs. The terminal blocks with 230V are covered with transparent plastic caps, as you can see in the first video.

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates