Skip to the content
2 layers63.5 × 44.5 mmESP32 Wroom energy meter, the printed circuit board in 3D

ESP32 Wroom energy meter

mikey60/ESP32-Energy-Monitor3

ESP32 Hardware and code to use the Aeon labs Home Energy Meter, model DSB09104-zwus, current clamps and housing

Size
63.5 × 44.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
27
Nets
46
Pads
104
Tracks, vias
204, 44
Pours
5
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
20 Nov 2020
Updated
5 Mar 2021

Overview

ESP32 Wroom energy meter is an open-source printed circuit board by mikey60, from the mikey60/ESP32-Energy-Monitor repository on GitHub. It is a 2-layer board of 63.5 × 44.5 mm with 27 parts on 46 nets, routed with 204 tracks and 44 vias.

It is built around the ESP32-WROOM-32D, LMC6484IM and AMS1117-3.3. Its parts include 10 resistors, 5 capacitors, 5 connectors, 3 ICs and 2 switches. It belongs with the ESP32 boards of this library.

Main components

3

README

README.md

ESP32-Energy-Monitor

Hardware and code are designed to use the Aeon labs Home Energy Meter, model DSB09104-zwus, current clamps and housing. I was frustrated with the occasional intermittent connection of the Aeon Labs Home Energy meter because the Z-Wave hub and energy meter were two floors apart. Also the energy meter would occasionally give very high erroneous readings. The unit did not work at all after I upgraded the firmware. That is what led to the ESP32 energy monitor project.

Features:

  • Uses Aeon labs DSB09104-zwus current clamps and housing
  • Wifi has increased signal strength over Z-Wave
  • Uses a minimum amount of components
  • Calculates real power like residential energy meters
  • The capability of calculating power factor could be added
  • Can easily adjust the scale factors to get agreement with energy company's meter
  • Can debug using WiFi and telnet
  • Can download new code Over The Air (OTA)

Disadvantages:

  • The power supply is old school with a 60Hz transformer with a diode bridge and 1000uF capacitor to provide the DC power and the 60 Hz AC signal to the energy meter. I picked up the 6 volt DC, 800mA class 2 power supply at the local surplus store. I opened the power supply to add the two wires for the sine wave input to the energy monitor. I also added two 1 amp rectifier diodes in series with the filtered DC output to the reduce the power of the AMS1117-3.3 LDO regulator on the energy monitor board.
  • There is some distortion of the sine wave voltage due to the load on the power supply.
  • The output of the current clamps is also distorted especially at low currents. The linearity of the output versus power is not too bad even with the distortion.
  • The WiFi activity adds some noise to the A/D coversions.
  • The energy totals get reset if there is a wifi problem or power interruption. Additonal code could be written to keep a running sum in Flash every so often.

PCB

The KiCad PCB files can be found in the PCB folder including a PDF file of the schematic and layout. There are two modifications that I made to the hardware design that are not shown in the documentation of the PCB folder.

Modifications

  • I added a 22uF capacitor directly across the output and ground pins of the AMS1117-3.3 LDO regulator to stop the output oscillation. The other 22uF capacitor on the 3.3 volt output of the LDO regulator is close to the ESP32.
  • I addded a 200pF capacitor and a 100 ohm resistor to the op amp circuit that provides the 3.3/2 volt virtual ground to provide stability when driving a capacitive load. The output would oscillate when a 1x probe (120pF capacitance) was touched to the output. The Micro-Cap 12 stability analysis showed that the circuit should be stable with a 120pF capacitor. See 'Stability Analysis' in the data folder. Maybe there is other capacitances I am not accounting for or maybe the LMC6484 op amp I purchased on ebay is deficient in the stability performance area. The Micro-Cap file is also in the data folder. By the way, the Micro-cap 12 simulator is now free.

Other Information

  • Pictures of the finished device can be found in the images folder.
  • A plot of the current consumption of the device can be found in the data folder.
  • I attached a logic analyzer to pin IO4 and let it run for an hour and did not see any missed 1 KHz samples

Parts

27
QtyValueFootprintReferences
322KResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR1, R2, R10
222uFCapacitor_SMD:C_1206_3216Metric_Pad1.42x1.75mm_HandSolderC1, C2
25.6kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR8, R9
256Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR4, R5
275kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR6, R7
2MountingHoleMountingHole:MountingHole_2mmH1, H2
10.01uFCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC3
10.047uFCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC5
110kResistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolderR3
11uFCapacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolderC4
160 Hz Sine WaveConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ5
1AMS1117-3.3Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1BOOTButton_Switch_SMD:SW_SPST_EVQPE1SW2
1ESP32-WROOM-32DRF_Module:ESP32-WROOM-32U1
1LMC6484Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU3
1Line 1 CurrentConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ4
1Line 2 CurrentConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ3
1Power_ConnectConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ2
1ResetButton_Switch_SMD:SW_SPST_EVQPE1SW1
1UARTConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ1

Similar boards

  • 2 layers62.5 × 83.8 mmYm2151, the printed circuit board in 3D

    Ym2151

    FrankBuss/ym2151

    84 parts5
  • 2 layers100 × 75 mmYM2151, the printed circuit board in 3D

    YM2151

    kuninet/Z80_YM2151

    KZ80-CPUB、SBC8080用 YM2151(FM音源)アダプターボードプロジェクト

    37 parts5MIT
  • 2 layers50.8 × 22.9 mmSSSM4ESP32-S3-TFT, the printed circuit board in 3D

    SSSM4ESP32-S3-TFT

    pyzahl/SSSM4CircuitPython

    Solar Scintillation Seeing Monitor for CircuitPython

    22 parts1GPL-3.0
  • 2 layers200 × 100 mmArduinoNanoDcLoad, the printed circuit board in 3D

    ArduinoNanoDcLoad

    apex-/electronicDcLoad

    A simple DC Electronic Load using an Arduino Nano (0-50V/0-5A)

    49 parts
  • 2 layers167.6 × 71.1 mmAnnoyance2, the printed circuit board in 3D

    Annoyance2

    erikdesjardins/annoyance2

    Digital musical tesla coil interrupter

    67 partsMIT
  • 2 layers86.6 × 65.7 mmYM2151 Shield, the printed circuit board in 3D

    YM2151 Shield

    nanamitm/YM2151-Shield-ver2

    YM2151 Shield hardware project for KiCad 10

    49 partsCERN-OHL-W-2.0
  • 2 layers80 × 53.6 mmYM2413-Shield, the printed circuit board in 3D

    YM2413-Shield

    nanamitm/YM2413-Shield

    This is a KiCad 10 project for an Arduino Uno FM sound shield based on the YM2413.

    42 parts

Questions

How big is the ESP32 Wroom energy meter PCB?

It measures 63.5 × 44.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ESP32 Wroom energy meter use?

27 parts, built around the ESP32-WROOM-32D, LMC6484IM and AMS1117-3.3. 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 ESP32 Wroom energy meter KiCad files?

From the mikey60/ESP32-Energy-Monitor repository on GitHub, at the commit this page was made from: the board is PCB/ESP32 Wroom energy meter.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the ESP32 Wroom energy meter design in my own project?

Its repository states no licence, so its author keeps all rights: ask mikey60 before reusing the design.