Skip to the content
2 layers90.2 × 61 mmElectricity meter, the printed circuit board in 3D

An STM32-based datalogger for electricity meters with pulse LED

Size
90.2 × 61 mm
Copper layers
2
Thickness
1.6 mm
Parts
95
Nets
83
Pads
330
Tracks, vias
516, 20
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
19 Apr 2023
Updated
20 Oct 2024

Overview

Electricity meter is an open-source printed circuit board by ondras12345, from the ondras12345/electricity-meter repository on GitHub, published under the MIT licence. It is a 2-layer board of 90.2 × 61 mm with 95 parts on 83 nets, routed with 516 tracks and 20 vias.

It is built around the MAX3485EESA, DS3231MZ+ and 1N4148W, with the ESD5Z5V0, 0ZCJ0016FF2E and BSS138 among its other parts. Its parts include 28 resistors, 16 diodes, 15 capacitors, 9 connectors and 6 ICs. It belongs with the sensors and measurement boards of this library.

Main components

8

README

README.md

Electricity meter

An STM32-based datalogger for electricity meters with pulse LED.

This repository contains both the PCB design files and firmware source code.

Assembled PCB Bottom side of PCB

Features

  • detecting pulses of LED more than 100 mm away from the sensor,
  • dynamic adjustment of bright / dark threshold,
  • logging over one year of 1 minute resolution data to SPI flash,
  • command line interface for debugging and reading logged data over USB CDC,
  • support for RS485 communication.

Building

Hardware

I milled the single sided PCB on my CNC machine.

Some notes:

  • The DCF-3850N connector is only there for future-proofing. I don't currently use it and never tested it.
  • The onewire bus connector is currently unused, but it should be easy enough to add DS18B20 temperature sensors.
  • DS3231 RTC is necessary because the internal RTC on my STM32F103 was not accurate enough. Cut JP1 (battery power to STM32 VBAT) if you decide to use it too.
  • The micro USB connector was a bad idea. I ended up replacing it with wires soldered directly to the board after accidentally breaking it off several times.

Firmware

sh
make help  # show available commands
make  # build
make check  # run cppcheck

For uploading to the STM32 via STlink, I use tools/mkbin and tools/upload_latest.

Parts

95
QtyValueFootprintReferences
8100nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC2, C4, C5, C8, C10, C12, C14, C15
810kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR10, R12, R15, R16, R17, R20, R26, R27
7NetTie_2Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderNT1, NT2, NT3, NT4, NT5, NT6, NT7
61N4148WDiode_SMD:D_SOD-123D2, D3, D4, D5, D6, D14
5330Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR11, R18, R19, R24, R25
410uCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC6, C7, C11, C13
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
4SolderJumper_2_BridgedJumper:SolderJumper-2_P1.3mm_Bridged_Pad1.0x1.5mmJP1, JP2, JP4, JP5
310Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR21, R22, R28
31N4007Diode_SMD:D_SMA_HandsolderingD8, D9, D10
31kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR1, R3, R4
3ESD5Z5V0Diode_SMD:D_SOD-523D7, D15, D16
2100Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR7, R8
22k2Resistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR13, R14
2330kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR2, R5
2Conn_01x03Connector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ8, J9
2Conn_01x20_PinConnector_PinHeader_2.54mm:PinHeader_1x20_P2.54mm_VerticalJ1, J4
10ZCJ0016FF2EFuse:Fuse_1206_3216Metric_Pad1.42x1.75mm_HandSolderF1
1100kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR6
1100uondra:CP_Radial_D5.0mm_P5.00mmC3
110nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC1
1150 / 0.25WResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR23
1330nCapacitor_SMD:C_1206_3216Metric_Pad1.33x1.80mm_HandSolderC9
133kResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderR9
1AZ1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U3
1BSS138Package_TO_SOT_SMD:SOT-23Q1
1CR2032ondra:BatteryHolder_DS1092-04-B6PBT1
1ChinaBluePillchinabluepill:ChinaBluePillU2
1Conn_01x02_PinConnector_Molex:Molex_KK-254_AE-6410-02A_1x02_P2.54mm_VerticalJ2
1Conn_01x08Connector_PinHeader_2.54mm:PinHeader_1x08_P2.54mm_VerticalJ6
1DCF-3850N-800Connector_Molex:Molex_KK-254_AE-6410-04A_1x04_P2.54mm_VerticalU4
1DS3231MPackage_SO:SOIC-16W_7.5x10.3mm_P1.27mmU1
1ESB228110100Zondra:USB_Micro-B_Amphenol_10104110_Horizontal_power_onlyJ5
1ESD5Z3.3T1GDiode_SMD:D_SOD-523D1
1FTDI breakoutondra:FTDI_breakoutJ3
1GREENLED_THT:LED_D3.0mmD12
1MAX3485EESAPackage_SO:SO-8_3.9x4.9mm_P1.27mmU6
1MX25L3233FM1Package_SO:SOP-8_3.9x4.9mm_P1.27mmU5
1RJ45_ShieldedConnector_RJ:RJ45_HALO_HFJ11-x2450HRL_HorizontalJ7
1SM712_SOT23Package_TO_SOT_SMD:SOT-23D13
1SW_DIP_x06Button_Switch_THT:SW_DIP_SPSTx06_Piano_10.8x16.8mm_W7.62mm_P2.54mmSW1
1SW_PushButton_Switch_THT:SW_PUSH_6mmSW2
1SolderJumper_2_BridgedResistor_SMD:R_1206_3216Metric_Pad1.30x1.75mm_HandSolderJP3
1YELLOWLED_THT:LED_D3.0mmD11

More from ondras12345/electricity-meter

1
  • 2 layers59.7 × 31.1 mmElectricity meter zigbee, the printed circuit board in 3D

    Electricity meter zigbee

    ondras12345/electricity-meter

    An STM32-based datalogger for electricity meters with pulse LED

    36 partsMIT

Similar boards

  • 2 layers54 × 20.5 mmBBS BUFFER A, the printed circuit board in 3D

    BBS BUFFER A

    mengxyz/BBS_BUFFER_A

    Based on the original BBS Buffer A project: https://github.com/4061N/BBS-Buffer-A

    33 partsMIT
  • 2 layers160 × 110 mmPrepaid meter, the printed circuit board in 3D

    Prepaid meter

    kbssrikar7/esp32-energy-meter-pcb

    KiCad PCB design for an ESP32-based single-phase energy meter (ATM90E26 metering AFE) — DRC/ERC-clean, SPICE-validated, fab-ready

    80 parts
  • 2 layers235 × 235 mmESP Wordclock, the printed circuit board in 3D

    ESP Wordclock

    nikolai2111/Multilayout-ESP-Wordclock_HW

    Hardware (PCB) for an ESP32-C3 based word clock with support of different layouts and languages.

    308 partsCERN-OHL-P-2.0
  • 2 layers160 × 100 mmRDE board, the printed circuit board in 3D

    RDE board

    bartkepl/RDE_board

    Resistance DEcade with SCPI, UART, USB, RS485 and ETHERNET in 3U eurocard format

    388 partsMIT
  • 2 layersSAM21, the printed circuit board in 3D

    SAM21

    jayadevakash/SAM21

    IoTHive

    122 parts
  • 2 layers152.4 × 142.2 mmEsp32 bluetooth, the printed circuit board in 3D

    Esp32 bluetooth

    silelis/MustangRadio_develepementVersion

    127 parts

Questions

How big is the Electricity meter PCB?

It measures 90.2 × 61 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Electricity meter use?

95 parts, built around the MAX3485EESA, DS3231MZ+, 1N4148W and ESD5Z5V0. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Electricity meter KiCad files?

From the ondras12345/electricity-meter repository on GitHub, at the commit this page was made from: the board is hardware/electricity-meter/electricity-meter.kicad_pcb and its schematic hardware/electricity-meter-zigbee/electricity-meter-zigbee.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Electricity meter design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).