

ESP32 Wroom energy meter
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
3ESP32-WROOM-32D
-- WiFi Modules ROHSEspressif SystemsWiFi ModulesLMC6484IM
SOP-14-40℃~+85℃ 0.01pA 0.02pA 1.3V/us 1.5MHz 2.8mA 20mA 2uV/℃ 37nV/√Hz@1kHz 3V~15.5V 4 74dB 900uV Rail-to-Rail Input, Rail-to-Rail Output SOP-14 Operational Amplifier ROHSTexas InstrumentsOperational AmplifierAMS1117-3.3
SOT-223-40℃~+125℃ 0.003%Vout 1 1.1V@(800mA) 15V 1A 3.3V 5mA 72dB@(120Hz) Fixed Over Current Protection、Short Circuit Protection、Thermal shutdown Positive SOT-223 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSAdvanced Monolithic SystemsVoltage Regulators - Linear, Low Drop Out (LDO) Regulators
README
README.mdESP32-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| Qty | Value | Footprint | References |
|---|---|---|---|
| 3 | 22K | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R1, R2, R10 |
| 2 | 22uF | Capacitor_SMD:C_1206_3216Metric_Pad1.42x1.75mm_HandSolder | C1, C2 |
| 2 | 5.6k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R8, R9 |
| 2 | 56 | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R4, R5 |
| 2 | 75k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R6, R7 |
| 2 | MountingHole | MountingHole:MountingHole_2mm | H1, H2 |
| 1 | 0.01uF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C3 |
| 1 | 0.047uF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C5 |
| 1 | 10k | Resistor_SMD:R_0805_2012Metric_Pad1.15x1.40mm_HandSolder | R3 |
| 1 | 1uF | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C4 |
| 1 | 60 Hz Sine Wave | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J5 |
| 1 | AMS1117-3.3 | Package_TO_SOT_SMD:SOT-223-3_TabPin2 | U2 |
| 1 | BOOT | Button_Switch_SMD:SW_SPST_EVQPE1 | SW2 |
| 1 | ESP32-WROOM-32D | RF_Module:ESP32-WROOM-32 | U1 |
| 1 | LMC6484 | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U3 |
| 1 | Line 1 Current | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J4 |
| 1 | Line 2 Current | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J3 |
| 1 | Power_Connect | Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_Vertical | J2 |
| 1 | Reset | Button_Switch_SMD:SW_SPST_EVQPE1 | SW1 |
| 1 | UART | Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_Vertical | J1 |
Similar boards
- 2 layers62.5 × 83.8 mm

- 2 layers100 × 75 mm

- 2 layers50.8 × 22.9 mm

SSSM4ESP32-S3-TFT
pyzahl/SSSM4CircuitPython
Solar Scintillation Seeing Monitor for CircuitPython
22 parts1GPL-3.0 - 2 layers200 × 100 mm

ArduinoNanoDcLoad
apex-/electronicDcLoad
A simple DC Electronic Load using an Arduino Nano (0-50V/0-5A)
49 parts - 2 layers167.6 × 71.1 mm

- 2 layers68.6 × 81.3 mm

- 2 layers86.6 × 65.7 mm

YM2151 Shield
nanamitm/YM2151-Shield-ver2
YM2151 Shield hardware project for KiCad 10
49 partsCERN-OHL-W-2.0 - 2 layers80 × 53.6 mm

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.