From the Loftsmith Workshop
ESPHome electricity meter LED pulse reader case with OLED
Lets you read your electricity meter's blinking LED from a small box stuck right beside it. It has a window on top for the OLED and a side opening for the cable. Change the sensor module and ESP32 board sizes to match the parts you bought.
3 parts · 20 g · 40 × 80 × 20 mm
They show up here as sliders as soon as the model is built.
How to print it
Parts
- base · PETG (black, must be opaque) · Back face down on the bed, open side up; no supports
About 13 g, 22 min at 2 walls/15%. Holds the light-tight sensor bore, whose top meets the module board, plus the module rails, the ESP32 pocket and the USB-C side opening. PETG because the lid's snap hooks flex against it, and black so the only light reaching the photodiode comes through the apertur
- lid · PETG (any opaque colour; shown orange) · Outer face down; the hooks, OLED pegs and fingers point up; no supports
About 7 g, 14 min at 2 walls/15%. Three 1.0 mm snap hooks, two fingers that press the sensor board onto the bore top, a 24 x 14 mm OLED window and a sight dimple directly over the LED.
- seal ring · TPU 95A (black) · Flat on the bed
Under 1 g, about 5 min. Presses into the groove round the aperture on the back. It stands proud by the tape thickness so it seals against the meter face.
Print settings
- Layer height
- 0.2 mm
- Walls
- 2
- Infill
- 15%
- Supports
- None
- Notes
- Engine estimate for the base and lid at the default sliders: about 21 g of PETG and about 42 minutes at 2 walls/15% (about 23 g and 46 minutes at 3 walls). Print the base in black PETG. Print the lid in any opaque PETG colour. Print the seal ring separately in black TPU 95A, slowly.
Hardware
- LM393 photodiode light sensor module (4-pin, about 32 x 14 mm) · Fits 28-40 mm long and 12-17 mm wide (set the sliders). The photodiode must stand straight up from the component side; measure its height below the board for the Photodiode height slider (7.5-12 mm).
- ESP32-C3 board with USB-C at one end (for example a SuperMini, about 22.5 x 18 mm) · Boards from 18 to 30 mm long and 15 to 22 mm wide fit the floor pocket; the USB-C end goes against the side wall.
- 0.96 in SSD1306 I2C OLED module, 128 x 64, 4-pin (about 27.3 x 27.8 mm) · Held on four 1.7 mm pegs through its corner holes. The hole positions are estimated at 1.9 mm in from each edge, so check yours.
- Double-sided foam mounting tape · Set the Mounting tape thickness slider (0.5-1.6 mm) to match it so the seal ring meets the meter face.
- Black paint marker or black electrical tape · To cover the module's power and D0 LEDs.
- 7 × Hookup wire · Solder it straight to the module and OLED pins; Dupont plugs on the module's end pins may not fit.
- USB-C cable and 5 V USB power supply
- Small square of foam tape · Under the ESP32 so it stays down in its pocket.
Assembly
- Measure your module, ESP32 board, photodiode height and tape, then set the sliders. Set LED to screen centre so the case body clears the meter's display. The case can point in any direction from the LED; set the display rotation in ESPHome to match.
- Press the TPU seal ring into the groove round the aperture on the back of the base.
- Solder short wires to the sensor module, OLED and ESP32 (module VCC, GND and D0 to 3V3, GND and a GPIO; OLED VCC, GND, SDA and SCL to 3V3, GND and two I2C pins).
- Set the module's trimpot before fitting it. With ESPHome running, hold the bare photodiode on the meter LED and turn the trimpot until the module's D0 light blinks only with the meter's LED. Once mounted the trimpot faces the meter and can't be reached. Then cover both of the module's small LEDs (po
- Put a square of foam tape under the ESP32 and drop it into the floor pocket with its USB-C port at the side opening.
- Press the OLED glass-first onto the four pegs inside the lid, then melt the peg tips over with a soldering iron to hold it.
- Snap the lid on until all three hooks click. Its two fingers press the sensor board down onto the bore top. To open it, lift at the fingernail scoop on the tip.
- Use the ESPHome pulse_meter multiplier and the internal_filter limit shown on the Check tab for your impulse rate and load.
- Put foam tape on the back round the seal ring, line the sight dimple on the lid's tip up with the meter LED, and press the case onto the meter face. Plug in the USB-C cable.
Good to know
- It sticks to the outside of the meter face only. Never open the meter or touch its wiring. Some energy suppliers don't allow anything attached to their meter, so check yours first.
- Fits, the bore seal and snap strength were checked in the Loftsmith engine only. Nothing has been printed or tested on a real meter.
- The bore seals where the module board sits flat on it. Solder blobs or parts on the underside next to the photodiode can hold the board off the bore top, so check the board seats flat.
- Cover both of the module's small LEDs (power and D0) with black paint or tape before fitting it; the D0 LED blinks with each pulse and can trigger the photodiode from inside the case.
- Module and OLED sizes vary by seller. The OLED peg positions and the photodiode height are estimates, so measure your parts and set the sliders before printing.
- The module sits face-down so its photodiode points straight at the LED without bending its legs. That puts the trimpot against the meter: set it before you close the case.
- The snap hooks bend across the print layers. The engine estimate gives a 1.5x margin on layer strength in PETG. Use PETG, not PLA, for the lid and base.
- The ESPHome check uses the two ESPHome sliders together. A 10,000 imp/kWh meter at 25 kW pulses every 14 ms, which leaves only 7 ms for the debounce filter, and the check flags it.
- Indoor meter cupboard only. PETG softens at about 70 °C.
Comments