Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
Elecrow community is a shared platform and we are not responsible for any design issues.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
Elecrow community is a shared platform and we are not responsible for any design issues.
closed
user-img

Miroslav Hancar

Published: Sep 29,2024

SIngle-phase energy meter

Electricity meter with touchscreen and remote access.

ccc ccc
Copyright Info

Attribution-ShareAlike (CC BY-SA)

Read More⇒
  1045
  4
  2
cover-img
 
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
  • thumbnail-img
 

Story

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 the 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.

The energy meter is placed in a 3D-printed case made of PETG.

Code is written in C using the MPLAB X IDE.

Encolure is designed in Fusion 360.

PCB is designed in Eagle CAD.

Power supply schematic

PCB preview

USB dongle schematic

Code
  • Ugly and uncommented source code (project for MPLAB X)

    elektromer.X_17318116366f96e8809ca9.rar
    Download(9)
Schematic and Layout
user-img

Miroslav Hancar

+ Follow

Topic

View All
Electricity energy meter PIC MCU Microchip Power Measurement Display Touchscreen RF DIY
  • Comments( 2 )
  • Like( 4 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP
  • Thanks for sharing, I learned a lot! it looks so great
    Sep 30,2024 0 comments
    Reply
  • Thanks for sharing, I learned a lot! it looks so great
    Sep 30,2024 0 comments
    Reply

You May Also Like

View All