Skip to the content
PCBKitNew board
2 layers32 × 55.8 mmEsphome powermon, the printed circuit board in 3D

Esphome powermon

michd/esphome-powermon1

Multi-paradigm power usage monitoring board for ESP32 devkit

Size
32 × 55.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
61
Nets
44
Pads
158
Tracks, vias
225, 15
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
5 Oct 2023
Updated
8 Oct 2023

Overview

Esphome powermon is an open-source printed circuit board by michd, from the michd/esphome-powermon repository on GitHub, published under the CERN-OHL-P-2.0 licence. It is a 2-layer board of 32 × 55.8 mm with 61 parts on 44 nets, routed with 225 tracks and 15 vias.

It is built around the ADS1115IDGS. Its parts include 10 connectors, 3 resistors, 2 capacitors and 1 IC. It belongs with the home automation and IoT boards of this library.

Main components

1

README

README.md

ESPHome Power Monitor

Device meant to monitor power usage of a house or circuit. Supports both blinking LED (e.g. 800 blinks per kWh consumed) with a detector, or interfacing with a Current Transformer (CT) clamp.

Fits an ESP32Devkit1 board. Please carefully compare the markings on the board with the ESP32 board.

See [Releases] for fabrication files. I generally order from jlcpcb.com, so that's what the files are tailored for.

Hardware to bring yourself

  • 2x Single row, 15 pin 2.54mm / 0.1" pitch PCB header sockets
  • JST PH angled connectors, 2mm pitch:
    • 2 pin: For CT Clamp
    • 3 or 4 pin: For pulse detector
    • Cable assemblies to connect to these JST PH connectors
  • Any other 2.54mm / 0.1" pitch connector up to 7 pins for other side of the board, if required
  • Through-hole Burden resistor (see further down) Pitch: 7.62mm / 0.3", diameter: 2.5mm / ~0.1"
  • For pulse meters: a pulse detector providing 3.3V logic level pulses

Solderable jumpers

Some soldering is required to start using the board.

PWR IN

The PWR IN jumper connectos the "Vin" connector pin either to the "Vin" pin of the ESP32 board, or to the 3.3V pin of same.

If you are supplying power via the connector (Vin and GND), select 3.3V or 5V depending on your power source.

If you are powering the ESP32 board directly via a USB cable, then you might use Vin the other way around. In that case the jumper selection can be used to decide whether to supply 3.3V or 5V to that pin. In my case, I'm using this connector to feed a pulse detector 3.3V.

A0 SRC

The board features a 4-channel analog to digital converter, the ADS1115IDGS. Its first input A0 can be wired to the CT Clamp circuit, or to a connector on the other end of the board, AI0.

A1-A3

The remaining ADC channels are also made available. 3 Jumpers are provided to make the connections to the ADC chip by the bottom of the board. If they are left unconnected, these pads can be used for other purposes. Note that all of these inputs should be kept within a 0-3.3V range.

Pulsing meters

For using with a meter that blinks and LED or otherwise provides a pulse with every x amount of energy consumption, wire the pulse to "Blink" on the connector. It expects a 3.3V logic pulse, going directly to pin D27 on the ESP32.

CT Clamps

Current Transformer clamps clip around a conductor carrying an alternating current and induce a smaller current themselves as a result.

See this introduction to using CT Sensors

The important part is that you need to provide your own resistor to connect across the CT Clamp. Through ohm's law, the current through that resistor, multiplied by the resistance value results in a measurable voltage. This resistor is called the burden resistor and I'll talk more about it shortly.

ADC bias calibration

Trimming potentiometer is used to set 50% midpoint at 1.65 V, to centre the CT Clamp signal around. Without a CT-Clamp connected, but with the board powered up, use a multimeter to measure the DC voltage from GND to the CT clamp pin furthest from the board edge. Tweak RV1 until this voltage is 1.65 V.

Preselected burden resistor values

Use this table to select a resistor to use as burden resistor for your CT Clamp.

Info you'll need:

  • $I_{live_{RMS}}$

    The maximum current you expect to go through the conductor you put the clamp around

  • $n$

    Number of windings of the current transformer in the CT Clamp. For example: 100 A : 50mA -> 2000

In the table, $R$ is the approximate ideal resistance value to get maximum range out of it, and E12/E24/E48 give a resistor value available in the E-series of preferred numbers - that is, a resistor you can actually buy.

$I_{live_{RMS}}$$n$$R$E12E24E48
200 A200011.67 Ω10 Ω11 Ω11.5 Ω
100 A200023.33 Ω22 Ω22 Ω22.6 Ω
60 A200038.89 Ω33 Ω36 Ω38.3 Ω
50 A200046.67 Ω39 Ω43 Ω46.4 Ω
32 A200072.92 Ω68 Ω68 Ω71.5 Ω
16 A2000145.84 Ω120 Ω130 Ω140 Ω
10 A2000233.35 Ω220 Ω220 Ω226 Ω
5 A2000466.69 Ω390 Ω430 Ω464 Ω
2 A20001,166.73 Ω1 kΩ1.1 kΩ1.15 kΩ
1 A20002,333.45 Ω2.2 kΩ2.2 kΩ2.26 kΩ
200 A10005.83 Ω5.6 Ω5.6 Ω5.62 Ω
100 A100011.67 Ω10 Ω11 Ω11.5 Ω
60 A100019.45 Ω18 Ω18 Ω18.7 Ω
50 A100023.33 Ω22 Ω22 Ω22.6 Ω
32 A100036.46 Ω33 Ω36 Ω34.8 Ω
16 A100072.92 Ω68 Ω68 Ω71.5 Ω
10 A1000116.67 Ω100 Ω110 Ω115 Ω
5 A1000233.35 Ω220 Ω220 Ω226 Ω
2 A1000583.36 Ω560 Ω560 Ω562 Ω
1 A10001,166.73 Ω1 kΩ1.1 kΩ1.15 kΩ

Selecting a burden resistor

These are more details about how this burden resistance is selected.

There are three factors at play to select the burden resistor.

  • Desired output voltage range
  • Maximum expected current through the live conductor the CT clamp clips around
  • Number of windings of the current transformer (or, its ratio).

The last two combine into the maximum expected current through the current transformer winding and thus through the burden resistor.

Desired output voltage range: fixed

The desired output voltage range happens to be fixed. Based on the operating voltage of the ESP32 and the analog to digital converter (ADC) used in this design, the DC output voltage should never be higher than 3.3 V.

The voltage across the burden resistor will be in the form of a sine wave, so to remain between 0V and 3.3V, it is superimposed on a 1.65 V offset. From that, the peak voltage across the burden resistor ($V_{pk}$) should be 1.65 V.

Maximum expected current through live conductor

To play it safe, this should probably match or exceed the current rating of the breaker on this circuit, or any lower-rated fuse that's in line with it.

For example, this could be 32 A.

Ratio of the current transformer

A CT Clamp will typically have a marking like 100 A : 50 mA or something similar. Divide those by one another to get the ratio or number of windings. In this example that's

math
n = \frac{100 A}{0.05 A} = 2000
Max expected current through burden resistor

Our max expected current through the burden resistor becomes the maximum expected current through the live conductor, divided by the number of windings. Taking our example:

math
I_{burden_{rms}} = 32 A \div 2000 = 16 mA

This 32 A rating is typically an RMS value, that is, not the actual peak value. To get the peak value, multiply by $\sqrt2$:

math
I_{burden_{pk}} = 16 mA \times \sqrt{2} \approx 22.63 mA
Putting it all together

Now we can pick a burden resistance value:

math
R_{burden} = V_{burden_{pk}} \div I_{burden_{pk}}

Example:

math
R_{burden} = 1.65 V \div 22.63 mA \approx 72.91 \ohm

For convenience, here's the equation from base values:

math
R_{burden} = V_{burden_{pk}} \div \frac{I_{live_{RMS}} \times \sqrt{2}}{n}

Where $V_{burden_{pk}} = 1.65V$.

You'll then want to pick a resistor that actually exists. Round the value down, since rounding up will result in higher voltages than those calculated.

Playground and connections

All pins of the ESP32 have an additional open pad next to them to directly wire things to them as desired. All ADC inputs have a directly connected pad, near the center of the board (A0-A3). Each connector on the board has duplicate pads to wire directly to them.

Lastly, there is a "playground" area with 5 pads for the 5V*, 3.3V, and GND rails. A set of further pads, all spaced 2.54mm (0.1") apart is available as a sort of mini proto-board.These pads are not connected to anything unless marked otherwise on the board.

ESPHome configuration

TODO.

Pertinent info if you already know what you're doing:

Pulse input pin: 27

ADC:

  • domain: ads1115
  • i2c scl pin: 13
  • i2c sda pin: 12
  • i2c address: 0x48
  • Multiplexers available:
    • A0_GND (CT Clamp or AI0)
    • A1_GND
    • A2_GND
    • A3_GND

Helpful esphome stuff:

Parts

61
QtyValueFootprintReferences
39, , , , , , , , , , , , , , , +23
3Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ5, J13, J15
3Jumper_2_BridgedJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP3, JP4, JP5
2100nCapacitor_SMD:C_0603_1608MetricC1, C2
247kResistor_SMD:R_0603_1608MetricR4, R5
2Conn_01x15_FemaleConnector_PinSocket_2.54mm:PinSocket_1x15_P2.54mm_VerticalJ1, J2
2Conn_01x15_MaleConnector_PinHeader_2.54mm:PinHeader_1x15_P2.54mm_VerticalJ11, J12
2Jumper_3_Bridged12Jumper:SolderJumper-3_P2.0mm_Open_TrianglePad1.0x1.5mmJP1, JP2
110kesphome-powermon:Potentiometer_Bourns_3313J_VerticalRV1
1220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR6
1ADS1115IDGSPackage_SO:VSSOP-10_3x3mm_P0.5mmU1
1Conn_01x02_PinConnector_JST:JST_PH_S2B-PH-K_1x02_P2.00mm_HorizontalJ4
1Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ14
1Conn_01x04_PinConnector_JST:JST_PH_S4B-PH-K_1x04_P2.00mm_HorizontalJ3

Questions

How big is the Esphome powermon PCB?

It measures 32 × 55.8 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Esphome powermon use?

61 parts, built around the ADS1115IDGS. 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 Esphome powermon KiCad files?

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

Can I use the Esphome powermon design in my own project?

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

Similar boards

  • 4 layers70 × 43 mmUSMU v10, the printed circuit board in 3D

    USMU v10

    joeltroughton/uSMU

    Credit card-sized, USB-powered 4 quadrant source-measure unit hardware and firmware

    137 parts187
  • 4 layers66.3 × 40.2 mmCm4 drone, the printed circuit board in 3D

    Cm4 drone

    dridri/bcflight

    Raspberry Pi based drone flight controller and remote control

    56 parts175GPL-3.0
  • 4 layers192.1 × 126.9 mmStradex1, the printed circuit board in 3D

    Stradex1

    Bylin-code/Stradex1

    STRADEX1 Documentation and Build Instructions ============== I've always wanted to put my violin skills to use in a MIDI environment, but there really isn't a controller on the market that can emulate the feel of a…

    24 parts101
  • 4 layers100 × 49.8 mmExpansion board, the printed circuit board in 3D

    Expansion board

    reubenstr/zuko

    A quadruped robot dog!

    75 parts51MIT
  • 2 layers96 × 74.4 mmMonolith, the printed circuit board in 3D

    Monolith

    luftaquila/monolith

    DIY wireless real-time datalogging platform for Student Formula and Baja.

    138 parts45
  • 4 layers160 × 73.2 mmMainPCB, the printed circuit board in 3D

    MainPCB

    doppelgrau/esp32-f9p-io-board

    An IO-PCB (two motor-driver/H-bridge, CAN, RS232, ADS1115, relay, ethernet, ardusimple f9p compatible connector) with an ESP32 for 12V power, three 15V tolerant analog inputs, three 5V tolerant inputs.

    162 parts39
  • 2 layers140.7 × 86.5 mmUPD board, the printed circuit board in 3D

    UPD board

    uniclogs/uniclogs-hardware

    University Class Open Ground Station Hardware

    185 parts32GPL-3.0
  • 4 layers20 × 30 mmNanoAmmeter v2, the printed circuit board in 3D

    NanoAmmeter v2

    joeltroughton/nanoAmmeter

    A small ammeter for measuring printed glucose biosensors

    35 parts29