DE EN FR NL ES IT
© 2026 S. Sternitzke · CC BY-NC-SA 4.0 ↑ Contents Feeder-Relais · Manual Edition 1
ESP32-C3 · Wi-Fi
230 V timer
Shelly 1PM Mini Gen4
DIY · Version 3

Feeder-Relais

The manual — from the bare board to the finished device in its enclosure
The Feeder-Relais board v3 from above
Edition 1 · August 2026 · English Hardware v3 · ESPHome firmware · CC BY-NC-SA 4.0

About This Manual

This manual is written for beginners. You don't need any formal electronics training — just a soldering iron, some patience, and a willingness to type a few commands into a terminal. Every step is described in full: what you do, why you do it, and how you can tell it worked. By the end, you'll be holding a device that switches on a 230 V load (for example, an automatic feeder) at the press of a button for an adjustable time — operable via three buttons, a small display, and a web page on your home network.

✋ This Device Carries 230 Volts 230 volts of mains voltage is life-threatening. Building, testing, and commissioning the power supply must be done by a qualified electrician or a person trained and instructed in electrical safety. In this manual, all tests that are possible without a qualified electrician are carried out exclusively via USB and without any mains voltage. Please read Chapter 2 first.

How to Read This Manual

ℹ Note Blue boxes provide background knowledge. You can skip them — but they make a lot of things easier to understand.
✓ Tip Green boxes save you time or nerves.
⚠ Caution Yellow boxes mark spots where things commonly go wrong.
✋ Stop Red boxes mark actions that can destroy hardware or injure you. Please always read them.

Terminal commands look like this — they are entered line by line and submitted with Enter. Lines starting with # are comments and are not typed in:

# This is a comment — for explanation only
esphome run firmware/timer-relais-c3.yaml

References such as "Chapter 7" are clickable in the PDF. The "↑ Contents" link at the bottom of every page always takes you back to the overview.

Contents

  1. 1 What the Feeder-Relais Is
  2. 2 Safety — Please Read First
  3. 3 How the System Works
  4. 4 Shopping List: Materials and Tools
  5. 5 The Enclosure
  6. 6 Understanding the Board
  7. 7 Getting the Board Manufactured
  8. 8 KiCad Step by Step (Only for Your Own Changes)
  9. 9 Assembling the Board
  10. 10 Flashing the Firmware
  11. 11 Setting Up Wi-Fi and Operating via the Browser
  12. 12 Network, Language, and Display
  13. 13 Connecting the External Shelly
  14. 14 Assembly and Commissioning
  15. 15 Firmware Updates and Maintenance
  16. 16 Troubleshooting
  17. 17 Appendix: Pinouts, Files, Glossary

1What the Feeder-Relais Is

The Feeder-Relais is a DIY control board that switches on a 230 V load at the press of a button for an adjustable time and then switches itself off again automatically. The name comes from its original use case: it replaces the broken timer board of an automatic feeder. Because at its core it just "presses a switch for a certain time," it is suitable for any load you want to switch on a timer.

1.1 What the Device Does

On the front there are three buttons. A short press switches the load on for a stored time:

ButtonLabelDefault timeAdjustable
S1Down / Manual (T1)5 seconds1–600 s via Wi-Fi
S2SET (T2)10 seconds1–600 s via Wi-Fi
S3UP (T3)15 seconds1–600 s via Wi-Fi

A small OLED display behind the viewing window shows the Wi-Fi signal at the top, the large clock (set via an internet time server), and the Idle status; at the bottom, the date and free memory. While a timer is running, the seconds countdown is shown in the middle and Feed on the right.

Operation is app-free and cloud-free, via a small, mobile-optimized web page that the ESP32 hosts itself (in the browser at http://feeder-relais.local): trigger timers, adjust times, view network and status values. For connecting to a home automation system (for example ioBroker or Home Assistant), there is also a lightweight JSON interface (Chapter 11).

1.2 The Signal Chain

From the button press to the switched load, the signal passes through five stages. Each has exactly one job:

Button ─►  ESP32-C3  ─►  330 Ω  ─►  PhotoMOS  ─►  Shelly 1PM  ─►  Load
S1–S3      counts the    limits      switches       switches and     (pump,
           time, draws   the LED     galvanically   measures the      feed
           the OLED      current     isolated       230 V load        motor …)
ℹ Why So Many Stages? The ESP32 operates at a harmless 3,3 volts. It must never "touch" 230 volts directly. The PhotoMOS is the bridge: it completely separates low voltage and mains voltage using light (details in Chapter 3). The Shelly handles the actual switching of the load and even measures the power while doing so.

1.3 What Version 3 Does Differently

This manual describes version 3 of the board. Compared to the first version, the design has become considerably simpler:

2Safety — Please Read First

✋ Danger to Life from 230 Volts Mains voltage can be fatal. Anyone who builds, tests, and commissions the 230 V side must know the hazards and master the rules of electrical engineering. When in doubt: bring in a qualified electrician. There is no exception and no hurry that justifies skipping this.

2.1 The Basic Rules

2.2 Why 6 Millimeters of Clearance

Between two copper areas on a board, current can not only jump through the air but also creep along the surface — aided by dust, moisture, and dirt. At 230 volts, this "creepage distance" must be large enough. We fix it at 6 mm, which is generous and leaves margin. The only permitted exception is the inside of the PhotoMOS relay itself — this component is the certified isolation barrier and is allowed to carry mains and low voltage within a few millimeters of each other (Chapter 6).

⚠ The 6 mm Rule Is Not a Recommendation It is encoded in the board design as a fixed design rule (Chapters 6 and 8). Anyone modifying the board must not weaken this rule — it is the reason the device stays safe in everyday use.

2.3 The Safe Path to First Commissioning

The order in this manual is deliberately chosen so that you do anything dangerous last and can practice safely until then:

  1. Assemble the board and flash the ESP without a power supply via USB (Chapters 9 and 10).
  2. USB-only test: the buttons, OLED, and the PhotoMOS output are tested completely without mains voltage (Chapter 14).
  3. Only once everything works do the power supply and Shelly get added — and the first mains test runs behind an RCD with the enclosure closed (Chapter 14).

3How the System Works

3.1 The Components and Their Jobs

ComponentJob
ESP32-C3 Super MiniThe "brain." A small microcontroller with Wi-Fi. It reads the buttons, counts the time, draws the OLED, hosts the web page, and drives the PhotoMOS. Supplied with 5 V, operates internally at 3,3 V.
PhotoMOS relayThe galvanic isolation barrier between 3,3 V and 230 V. Details in Section 3.3.
Series resistor 330 ΩLimits the current through the PhotoMOS's internal LED so it isn't overloaded.
Power supply (AC/DC module)Turns 230 V~ into the 5 V that runs the ESP. A ready-made, encapsulated module.
Shelly 1PM Mini Gen4Switches the actual load, measures the power, and is additionally reachable over Wi-Fi. Sits outside the board.
OLED display 0,91"Shows the clock, countdown, and status. Only plugged on, not soldered.
Fuse + varistorProtect against overcurrent and overvoltage on the mains side.

3.2 Why a Shelly — and Why Outside the Board

The Shelly 1PM Mini Gen4 is a ready-made, tested switching relay with power measurement. Using it has three advantages: the risky task of switching the load is handled by a certified, off-the-shelf product; the power is measured (so you can see whether the load is actually running); and the Shelly is itself reachable over Wi-Fi, in case you want to integrate it separately as well.

Our board only "presses the switch" for the Shelly — as a genuine hardware signal, with no Wi-Fi dependency for the core function. In version 3, the Shelly sits outside the board and is connected via a terminal block (Chapter 13). This keeps the board small, the 230 V paths short, and the layout easy to follow.

ℹ "Switch / Follow" The Shelly is configured so that its relay is on for exactly as long as our signal is present (operating mode Switch or Follow). This keeps all the timing with the ESP — the Shelly only follows.

3.3 What a PhotoMOS Is, and Why This One Specifically

A PhotoMOS is a tiny semiconductor relay. On one side sits an LED, which the ESP drives with 3,3 V. On the other side is a light-controlled switch that is allowed to switch mains voltage. Between them lies only light — that is, a complete galvanic isolation between low voltage and 230 V.

The Shelly's switch input is referenced to mains voltage (it expects a switched L). That's why the PhotoMOS must withstand ≥ 400 V blocking voltage — for example an Omron G3VM-601BY or a Panasonic AQY216.

✋ No PC817 & Co. An ordinary optocoupler (such as a PC817) is not permitted for the mains side — it does not hold the voltage safely and is not built to isolate mains voltage. Only use a PhotoMOS rated for mains voltage with ≥ 400 V.

3.4 Every Component in Detail

Here is the exact function of each component — with the values actually fitted on the v3 board. The reference designators appear this way on the board's silkscreen.

ReferenceValueExact function
U1ESP32-C3 Super MiniThe microcontroller with Wi-Fi. Runs on 5 V, generates 3,3 V internally via a regulator (also for the OLED). Carries an onboard RGB LED (WS2812) on GPIO8. Drives the buttons, OLED, PhotoMOS, and the web interface.
K1G3VM-601AY2The PhotoMOS — the galvanic isolation between 3,3 V and 230 V. Pins 1/2 = internal LED (pin 1 via R1 from GPIO6, pin 2 to GND), pins 3/4 = light-controlled switch (pin 3 = L_F, pin 4 = SW_SHELLY). Blocking voltage ≥ 400 V.
R1330 ΩSeries resistor for the K1 LED. From ~3,3 V minus ~1,2 V LED forward voltage, about 6 mA flows — enough for reliable switching, well below the LED's limit.
PS1TSP-05 (5 V / 3 W)The power supply: turns 230 V~ (L_F + N) into 5 V/GND for the ESP. 3 W = 600 mA — enough for the Wi-Fi transmit peaks (~350 mA) plus the OLED.
C1220 µF / 10 VBulk capacitor on +5 V: buffers short current spikes during Wi-Fi transmission and prevents the voltage dip that would otherwise restart the ESP.
C2100 nFDecoupling capacitor directly on +5 V/GND: absorbs high-frequency noise close to the chip.
F11 A slow-blowFine fuse (5×20 mm) in series: X1 (L_IN) → F1 → L_F. Protects against short circuit/overcurrent. "Slow-blow" so the power supply's inrush current doesn't trip it falsely.
RV1S14K275 (varistor)Overvoltage protection in parallel between L_F and N: limits voltage spikes (switching transients, mains disturbances) and protects the power supply and electronics.
J2OLED SSD1306 128×32The display. I²C address 0x3C, 400 kHz. Only plugged on (pinout GND/VCC/SCL/SDA).
SW1–3Push button 6×6 mmThe three tactile switches T1/T2/T3. One terminal to GND, the other to GPIO3/4/5 — the ESP uses internal pull-ups, and a press pulls the pin to GND.

And the terminal blocks at the edge of the board:

ReferenceConnectionPinout
X1Mains input1 = N, 2 = L_IN (230 V in)
X2Load output1 = O (switched), 2 = N
X3Snubber1 = O, 2 = N — for an optional RC network with inductive loads
J1Shelly1 = SW, 2 = O, 3 = L, 4 = N (to the external Shelly, Chapter 13)

4Shopping List: Materials and Tools

Everything you need for one Feeder-Relais. You have the board itself manufactured (Chapter 7); the components are ordered and soldered on (Chapter 9).

4.1 Components on the Board

ReferenceComponentValue / TypeNote
U1ESP32-C3 Super Mini18 × 24 mm, USB-CController with Wi-Fi
K1PhotoMOS relayOmron G3VM-601AY2 (or -601BY / Panasonic AQY216)≥ 400 V!
PS1AC/DC power supply module5 V / 3 W (HLK-PM05 class)Measure pin spacing first
OLED display0,91" SSD1306, 128 × 32, I²CPins: GND VCC SCL SDA, address 0x3C
SW1–3Tactile switch6 × 6 mm, travel 1,5 mmPosition is fixed (front panel)
R1Resistor330 ΩPhotoMOS LED series resistor
F1Fine fuse + holder1 A slow-blow, 5 × 20 mmprimary side, mandatory
RV1VaristorS14K275primary side, mandatory
C1 / C2Capacitors220 µF/10 V & 100 nF5 V buffer and decoupling
X1Mains input2-pin (L, N)Screw terminal, 230 V in
X2Load output2-pin (O, N)to the switched load
X3Snubber2-pin (O, N)optional RC network for inductive loads
J1Shelly connector4-pin (SW, O, L, N)short wires to the external Shelly, Chapter 13
J2OLED header socket1 × 4, 2,54 mm pitchGND/VCC/SCL/SDA, display is plugged on

4.2 Assemblies Outside the Board

4.3 Tools

5The Enclosure

The enclosure consists of two parts: the front piece (the original front panel with the viewing window and the three button plungers) and the back piece, which you 3D print yourself. The board is screwed to six bosses from behind, and the display sits behind the viewing window.

The printed enclosure back piece from an angled top view
The 3D-printed back piece with the six screw bosses and the mounting tab (top).

5.1 Structure: Front and Back Piece

The front piece is the original enclosure's top part. It carries the viewing window (behind which sits the OLED) and the plungers that, when pressed, actuate the three buttons on the board. This is why the position of the buttons is non-negotiable — they must sit exactly under the plungers (Chapter 9).

Front piece of the enclosure
The front piece (original) with the viewing window and the three button plungers.

In version 3, the back piece is deliberately deeper than the original (35 mm instead of the original 5,7 mm), so that the board and the external Shelly fit comfortably inside. A mounting tab with a keyhole slot sits at the top edge for wall mounting.

5.2 Printing the Back Piece Yourself

The template is available as an OpenSCAD file in the project under box/feeder_back.scad. OpenSCAD is a free program that generates a 3D model from a text file — the advantage: all dimensions appear as variables at the very top of the file and can be adjusted.

  1. Open OpenSCAD and load box/feeder_back.scad.
  2. Press F6 to render the model and save it as a printable file via File → Export → STL. A ready-made STL is already included: box/feeder_back_35mm.stl.
  3. Load the STL into your printer's slicer. Recommendation: print with the open side facing up, 3–4 wall lines, 20–30 % infill, no supports needed.
✓ Print the Board Mock-Up First The project also includes box/Timer-Ersatzplatine-v3-BOARD.stl — a 1:1 replica of the board (outline, screw holes, slots). Print it flat and place it into the back piece before you order the real board. This lets you check the fit safely (Chapter 7).

5.3 Height Budget and Mounting

The board is screwed from behind onto the back piece's bosses with six screws (boss grid 45 mm × 70 mm, screw hole 3,2 mm, countersunk for the screw head on the back). Four additional points on the front panel further center the board.

DimensionValue
Back piece outer size109,8 × 90,8 mm
Back piece depth (v3)35 mm
Wall and floor thickness1,3 mm
Board size101,6 × 77,5 mm
Boss grid45 mm (X) × 70 mm (Y)
⚠ Nothing May Protrude Downward (Toward the Front) Space between the board and the front panel is tight. That's why all tall components sit on the back of the board (Chapter 6). Only the flat buttons and the display connector remain on the front.

6Understanding the Board

You don't have to design the board yourself — it is finished and ready in the project under kicad-v3/. This chapter explains how it is laid out, so that during assembly and testing you know what belongs where. Anyone who wants to change something themselves will find the KiCad guide in Chapter 8.

6.1 Front and Back

In version 3, all the electronics sit on the back of the board. Only the three buttons and the OLED socket remain on the front (toward the front panel) — everything that is operated or seen.

Assembly side (back) of the board
The back carries the ESP, power supply, PhotoMOS, and the 230 V terminal blocks. Mains voltage (bottom) and low voltage (top) are clearly separated spatially.

6.2 Four Layers and the Ground Planes

The board has four copper layers: the two outer layers (front and back) carry the traces, and the two inner layers are continuous ground planes in the low-voltage area. Such ground planes act as a calm reference plane: they keep the design low-noise and the Wi-Fi function stable.

ℹ Important for Safety In the mains-voltage area there is no inner copper. The 230 V lines run exclusively on the two outer layers, and the ground planes maintain at least 6 mm of clearance from mains voltage everywhere. This ensures that no dangerous proximity can occur anywhere inside the board.

6.3 Mains Voltage Only on the Outside: the 6-Millimeter Rule

The five nets L_IN, L_F, N, SW_SHELLY, and O_LAST carry 230 volts. They are grouped into their own net class "230V" (wider traces, larger clearances) and all sit in the bottom left, well away from the electronics. A design rule encoded in the design requires 6 mm of clearance between every 230 V net and every low-voltage net.

The only exception is the PhotoMOS relay K1: its package is the certified isolation barrier (pins 1/2 = low voltage, pins 3/4 = mains voltage). Only there are the two worlds allowed to meet within a few millimeters — that is exactly what the component is built for.

6.4 The Nets and the Pinout

The following overview shows what each line carries:

Net nameCarriesConnects
L_IN230 V (unfused)Mains input X1 → fuse F1
L_F230 V (fused)F1 → varistor RV1, power supply PS1, PhotoMOS K1.3, Shelly J1.L
N230 V neutralX1 → RV1, PS1, Shelly J1.N, load X2, snubber X3
SW_SHELLY230 V switchedPhotoMOS K1.4 → Shelly J1.SW
O_LAST230 V switchedShelly J1.O → load output X2 + snubber X3
+5VLow voltagePower supply → ESP 5V, C1, C2
GNDLow voltageGround: ESP, buttons, PhotoMOS, OLED
+3V3Low voltageESP 3V3 output → OLED

The ESP32-C3 uses these pins:

GPIO assignment of the ESP32-C3 Super Mini
The pins used on the ESP32-C3 Super Mini.
PinFunction
5V / GSupply from the power supply
3V3Supplies the OLED
GPIO3 / 4 / 5Buttons T1 / T2 / T3
GPIO6PhotoMOS driver (via 330 Ω)
GPIO7I²C SDA (OLED)
GPIO8Onboard RGB LED (status)
GPIO9I²C SCL (OLED)
ℹ Why SDA on GPIO7 Instead of GPIO8? The ESP module's small RGB status LED sits on GPIO8. If I²C were there instead, the data traffic would drive the LED in an uncontrolled way. That's why SDA is on GPIO7. The same RGB LED later shows the device's status traffic light (Chapter 11).

6.5 Every ESP Connection in Exact Detail

This table is the binding alignment between board and firmware. On the left is what the firmware (timer-relais-c3.yaml) does with the pin — with its exact configuration; on the right, where the board routes it. Both sides must match exactly, or the device will not work.

ESP pinFirmware (ID & configuration)BoardFunction in detail
GPIO3btn_s1 · input, internal pull-up, inverted, 30 ms debouncePad 3 → /BTN1 → button S1 to GNDButton S1 (Down/Manual). Idle level HIGH; a press pulls it to GND (LOW) → counts as "pressed." Short press = trigger timer 1.
GPIO4btn_s2 · input, pull-up, inverted, 30 msPad 4 → /BTN2 → button S2 to GNDButton S2 (SET). Short = timer 2; long ≥ 3 s = info menu.
GPIO5btn_s3 · input, pull-up, inverted, 30 msPad 5 → /BTN3 → button S3 to GNDButton S3 (UP). Short = timer 3; long ≥ 1,2 s = stop everything.
GPIO6shelly_trigger · GPIO outputPad 6 → /PMOS_DRV → R1 330 Ω → K1 LED anodeDrives the PhotoMOS. HIGH = LED on = PhotoMOS conducts = Shelly SW gets L → load on. LOW = off.
GPIO7i2c: sda · 400 kHzPad 7 → /SDA → OLED J2.4I²C data line to the OLED. Deliberately on GPIO7 (not GPIO8).
GPIO8status_led · WS2812 (GRB), dimmedon-module — no net on the board (Pad 8 unused)Onboard RGB status LED (traffic light green/yellow/red). It sits fixed on GPIO8 of the module; that's why no second signal may be placed here — the reason SDA moved to GPIO7.
GPIO9i2c: scl · 400 kHzPad 9 → /SCL → OLED J2.3I²C clock line to the OLED (address 0x3C).
5V / GNDModule supply/+5V / GND from the power supply5 V from the AC/DC module; GND is the common ground (also the inner layers).
3V3Output of the onboard regulator/+3V3 → OLED-VCCThe ESP generates 3,3 V internally and uses it to power the OLED.
⚠ This Exact Alignment Is Critical If SDA is accidentally routed to GPIO8 on the board (where the WS2812 sits), the OLED stays black and the LED signal interferes with the data line. When building your own, therefore check: OLED SDA must be connected to ESP pad 7 (GPIO7), SCL to pad 9 (GPIO9) — GPIO8 stays unused.

7Getting the Board Manufactured

You don't build a four-layer board at home — you have it manufactured by a PCB fabricator. Today that's cheap and easy: you upload a handful of files and receive the finished boards by mail.

7.1 First, a Test in Plastic

✓ The Fit-Check Trick Saves Money Before ordering boards, print the included box/Timer-Ersatzplatine-v3-BOARD.stl 1:1 on your 3D printer (flat, no supports) and place it into the printed back piece. Does the outline fit? Do the six slots line up with the bosses? Do the screw holes sit right? These five minutes save you an expensive misorder.

Alternatively (or in addition), print the board outline on paper at 1:1 scale and cut it out.

7.2 Generating Gerber Data

"Gerber" is the standard file format that manufacturers expect boards in — one file per layer, plus the drill data. The finished Gerber files are already included in the project; you can generate them from KiCad like this:

  1. Open the project kicad-v3/Timer-Ersatzplatine-v3.kicad_pcb in KiCad.
  2. File → Fabrication Outputs → Gerbers — select all standard layers, export.
  3. In the same dialog, generate the drill files (Excellon).
  4. Pack all generated files into a ZIP archive.

7.3 Ordering from a Manufacturer

Upload the ZIP to a provider such as JLCPCB, PCBWay, or Aisler. Important settings:

SettingValue
Layers4
Board thickness1,6 mm (standard)
Surface finishLead-free HASL or ENIG
Copper1 oz (35 µm)
Colordoesn't matter
⚠ Set It to Four Layers Really choose 4 layers. A two-layer build would have no inner ground planes — Wi-Fi performance and noise immunity would be worse, and the design's rule checks would no longer fit.

8KiCad Step by Step (Only for Your Own Changes)

You only need this chapter if you want to modify the board yourself. If you're just building the existing design, you can skip it — the finished manufacturing data is included. KiCad is a free program for board design (tested with KiCad 8/9/10; menu names may vary slightly).

8.1 Opening the Project and Checking the Schematic

  1. Start KiCad and open kicad-v3/Timer-Ersatzplatine-v3.kicad_pro.
  2. Start the schematic editor. It shows how all the components are connected.
  3. Run Inspect → Electrical Rules Checker (ERC). Warnings about "unconnected power pins" are known and non-critical.

8.2 Footprints and Net Classes

Each component symbol is linked to a footprint — the solder pattern on the board. Under Tools → Assign Footprints, check that, for example, PS1 matches the power supply you actually bought (measure the pin spacing!) and that the PhotoMOS matches the SMD or DIP package.

The net classes are defined in the project file and must not be changed: Default (0,2 mm clearance and trace width) and 230V (1,0 mm clearance and trace width) with the five nets L_IN, L_F, N, SW_SHELLY, O_LAST.

8.3 The 6-Millimeter Rule and the DRC

The creepage-distance rule exists as its own file Timer-Ersatzplatine-v3.kicad_dru in the project. It requires 6 mm between 230 V and low voltage — with the deliberate exception of the PhotoMOS K1:

(version 1)
(rule "230V->SELV 6mm (K1-Barriere ausgenommen)"
   (condition "... 230-V-Netz gegen Nicht-230-V-Netz,
               K1 ausgenommen ...")
   (constraint creepage (min 6mm))
   (constraint clearance (min 6mm)))

After every change, run the DRC (Design Rules Check, Inspect → Design Rules Checker) until it comes back clean.

⚠ Pull Ground Planes Back 6 mm The automatic ground-plane fill only honors the net-class clearance, not the 6 mm rule. That's why the ground planes are geometrically shaped to stay 6 mm away from mains voltage everywhere. Anyone who redraws the planes must maintain this distance by hand.

8.4 Manufacturing Data

Once the DRC and visual inspection (3D view with Alt+3) are clean, export the Gerber and drill data as described in Chapter 7.

9Assembling the Board

"Assembling" means soldering the components onto the board. We go from the flat parts to the tall ones — this way the board always lies stably while you solder.

9.1 Order and Tools

Recommended order: R1 → C2 → PhotoMOS → buttons → OLED socket J4 → C1 → fuse holder F1 → varistor RV1 → terminal blocks. The ESP goes on only once it has been flashed and tested (Chapters 10 and 14).

9.2 The SMD Components

Depending on the type, the PhotoMOS is a small SMD component. Here's how to solder it cleanly:

  1. Tin one pad thinly.
  2. Place the component with tweezers and solder it to the tinned pad — check its orientation.
  3. Solder the remaining pins. Flux helps; use a small amount of solder to avoid bridges.
ℹ PhotoMOS Orientation Pin 1 is marked (dot or chamfered corner). The low-voltage side (pins 1/2) faces the electronics, the mains-voltage side (pins 3/4) faces the 230 V corner. The solder pattern dictates the direction — don't guess, go by the silkscreen marking.

9.3 The Through-Hole Components and Connectors

ℹ The OLED Is Plugged, Not Soldered You solder a pin header (facing backward) onto the OLED that fits into socket J4. The display then sits right against the viewing window with a thin foam pad. This keeps it replaceable and the build height low.

10Flashing the Firmware

The "firmware" is the program that runs on the ESP. The very first time, it goes onto the chip via a USB cable. All later updates then happen wirelessly (Chapter 15).

10.1 What You Need

USB connection from the PC to the ESP32-C3
Connecting the ESP32-C3 to the PC via USB-C.
ℹ You Don't Have to Compile Anything Ready-made images are included in the project under firmware/build/: feeder-relais.factory.bin for the initial flash and feeder-relais.ota.bin for later web updates. They contain no Wi-Fi credentials — you set those up after flashing (Chapter 11).

10.2 Path A — Using ESPHome

ESPHome is the tool used to build and flash the firmware. A secrets.yaml is not needed — no Wi-Fi data is compiled in.

  1. Plug in the ESP via USB-C.
  2. Run in the project folder:
    esphome run firmware/timer-relais-c3.yaml
  3. ESPHome compiles, asks for the serial port (on Linux, e.g. /dev/ttyACM0; on Windows, a COMx), and flashes.
  4. After the restart, the ESP opens its setup hotspot → continue with Chapter 11.
✓ Linux: "Permission Denied"? If access to /dev/ttyACM0 is denied, add your user to the dialout group and log in again:
sudo usermod -aG dialout $USER

10.3 Path B — In the Browser

For the ready-made feeder-relais.factory.bin, with no installation at all:

Flow: flashing via the browser
The flashing flow in the browser via the web flasher.
  1. Open https://espressif.github.io/esptool-js/ in Chrome/Edge.
  2. Plug in the ESP via a USB-C data cable.
  3. Leave the baud rate at 115200, click Connect, and select the ESP's serial port.
  4. Under Flash Address, enter 0, use Choose File to select feeder-relais.factory.bin, then Program. Wait until "Hard resetting…" appears.
  5. Continue with Chapter 11.

10.4 If Flashing Gets Stuck

SymptomCause / Fix
ESP isn't recognized at allCharge-only cable instead of a data cable → try another USB-C cable, another port
No port in the browserUse Chrome/Edge; on Windows, install drivers if needed (CH340/CP210x)
"Connect" failsBoot mode: hold BOOT + tap RESET + release BOOT, then connect again
No …​.local afterwardset up Wi-Fi first (Chapter 11); mDNS needs a moment

11Setting Up Wi-Fi and Operating via the Browser

11.1 The Setup Hotspot

The firmware deliberately ships with no Wi-Fi credentials. After flashing, the ESP opens its own hotspot:

  1. On your phone/PC, connect to the Wi-Fi network "Feeder-Relais Setup" (password feeder1234).
  2. A login window opens (otherwise go to http://192.168.4.1).
  3. Select your home Wi-Fi, enter the password, save — the ESP restarts and connects.
  4. From now on it's reachable at http://feeder-relais.local.
ℹ Set It Up Once, Never Again The Wi-Fi credentials are stored under a fixed storage key and survive firmware updates. For a factory reset, flash the factory image with "Erase all flash."

11.2 The Web Interface

http://feeder-relais.local opens a mobile web app with five tabs:

11.3 The Status Traffic Light and the JSON Interface

The header shows a status dot: green = everything OK, yellow = a timer is running, red = a fault while idle (e.g. OLED unreachable or no Wi-Fi). The same traffic light is shown on the device by the dimmed onboard RGB LED.

For home automation, the ESP offers a JSON interface. The most important endpoints:

CallEffect
GET /api/statusall values as JSON (active, time remaining, relay, times, Wi-Fi …)
POST /api/trigger?button=Ntrigger button N (1–3) with its time
POST /api/trigger?seconds=Nswitch on ad hoc for N seconds
POST /api/trigger?seconds=N&src=adapteras above, tags the source — appears as trg (button/api/adapter) in the status and log
POST /api/stopswitch off immediately
POST /api/config?time1=A&time2=B&time3=Cset the times (each 1–600 s)
ℹ ioBroker Example Set button 1's time to 8 seconds: POST http://feeder-relais.local/api/config?time1=8.

12Network, Language, and Display

12.1 Network Settings

In the Network tab you can set:

12.2 Wi-Fi Roaming

The Wi-Fi roaming (802.11k/v) switch only makes sense if you have multiple access points with the same SSID (mesh/UniFi) that support the technology. In that case, the device can actively switch to the stronger access point. Default: off. After toggling it, the "Reconnect now" button helps it take effect immediately.

12.3 Operating the Buttons and OLED

On the device, the buttons are labeled: S1 = Down/Manual, S2 = SET, S3 = UP.

The OLED (128 × 32) shows the Wi-Fi bar at the top, the large clock or countdown, and the status (Idle/Feed); at the bottom, the date and free memory. Weekday, status, and menu titles follow the configured language. Until the first time synchronization, it shows "--:--".

13Connecting the External Shelly

✋ Wire It Up Only With the Power Off The Shelly carries 230 volts. All wiring work is done de-energized, with the mains plug pulled or the circuit breaker switched off — and, when in doubt, by a qualified electrician.

13.1 Wiring

The Shelly has four terminals: L, N, SW (switch input), and O (load output). Four short wires connect it to the board's terminal block J1:

Board (J1)→ ShellyMeaning
J1.3 (L_F)LPhase (fused)
J1.4 (N)NNeutral
J1.1 (SW_SHELLY)SWour switched signal (from the PhotoMOS)
J1.2 (O_LAST)Oswitched load to the output

The Shelly is secured lying flat inside the enclosure (VHB tape or a clip). Keep the wires short and the screw terminals tight — no exposed copper may be visible.

13.2 Setting Up the Shelly (Input Mode)

After the first power-on, you set up the Shelly once (via its own app or web interface):

  1. Connect the Shelly to Wi-Fi (per the Shelly's instructions).
  2. Set Input Mode = Switch (Follow) — this makes the relay follow the SW signal exactly.
  3. Done: from now on, the ESP determines how long the load runs, via the PhotoMOS.

14Assembly and Commissioning

14.1 Assembling and Preparing the ESP

The small parts are soldered (Chapter 9). Now the ESP:

  1. Flash the ESP via USB and test the Wi-Fi connection (Chapters 10 and 11) — this is easiest before it is soldered in.
  2. Solder the ESP onto the board (pin headers or directly).

14.2 The USB-Only Test

✓ Everything Important Works Without Mains Power Power the ESP via USB (no mains!). Check: Only once all of this checks out does mains voltage come into play.

14.3 The First Mains Test

  1. Visual inspection: no solder bridges, no short circuit between L/N, ≥ 6 mm clearance everywhere between 230 V and low voltage.
  2. Solder in the power supply, connect the Shelly (Chapter 13), wire up the load.
  3. Close the enclosure.
  4. Switch on via an RCD/PRCD. The OLED shows the clock/status.
  5. Set up the Shelly (Input Mode "Switch"), then run a button test with the load.
  6. Set the times as desired via http://feeder-relais.local.
✋ Never Open While Powered The mains test only runs with the enclosure closed. Always de-energize before making changes.

15Firmware Updates and Maintenance

15.1 Wireless Updates (OTA)

After the initial USB flash, two wireless update paths are set up — the USB port is welcome to be hard to reach once the device is installed:

ℹ Wi-Fi Data Is Preserved An update only overwrites the program, not the stored settings. Wi-Fi, timer settings, and network configuration survive the update.

15.2 The Service Log

With live view enabled, the Service tab shows the most recent log lines, filtered by level (ERROR/WARN/INFO/DEBUG). This helps with troubleshooting without having to hook the ESP up to a cable. Full logs are also available via esphome logs firmware/timer-relais-c3.yaml.

16Troubleshooting

16.1 While Flashing and Connecting

ProblemRemedy
ESP isn't recognizedData cable instead of charge-only cable; try a different USB port
"Connect" failsForce boot mode (hold BOOT, tap RESET, release BOOT)
feeder-relais.local unreachableWas Wi-Fi set up in the setup hotspot? mDNS takes a moment; try the IP address directly (in the OLED menu)
Setup hotspot missingThe device is already connected to a Wi-Fi network; otherwise do a factory reset (factory image with flash erase)

16.2 During Operation

ProblemRemedy
OLED stays darkIs the display seated correctly on J4? Check the GND/VCC/SCL/SDA pinout
Clock shows "--:--"no time from the NTP server yet; check Wi-Fi and the NTP server
Status dot redOLED unreachable or no Wi-Fi — the Status tab shows details
Load doesn't switchIs the Shelly set to "Switch/Follow"? Check the SW/O wiring; measure the PhotoMOS output in the USB-only test
Button doesn't triggerIs the button seated exactly under the plunger? Check the solder joints

17Appendix: Pinouts, Files, Glossary

17.1 Pinout and Net List

ESP pinFunctionNet
5V / GSupply+5V / GND
3V3OLED supply+3V3
GPIO3 / 4 / 5Buttons T1 / T2 / T3BTN1/2/3
GPIO6PhotoMOS driver (via 330 Ω)PMOS_DRV
GPIO7I²C SDA (OLED)SDA
GPIO8Onboard RGB status LED
GPIO9I²C SCL (OLED)SCL

The five 230 V nets (net class "230V"): L_IN, L_F, N, SW_SHELLY, O_LAST.

17.2 Project Files

PathContent
kicad-v3/the v3 board (KiCad: schematic, layout, rules) + manufacturing data
box/feeder_back.scadenclosure back piece (OpenSCAD source) + ready-made STL
box/Timer-Ersatzplatine-v3-BOARD.stlboard mock-up for the fit check
firmware/timer-relais-c3.yamlESPHome firmware
firmware/timer_web.hweb app + JSON interface
firmware/net_config.hnetwork configuration (IP, NTP, hostname, roaming, language)
firmware/build/*.binready-made flash images (factory + ota)
README.mdproject overview (German; translations under docs/<language>/)
docs/handbuch/…-Handbuch.pdfthis manual as a PDF (translations under docs/<language>/)

17.3 Glossary

TermMeaning
ESP32-C3small microcontroller with Wi-Fi — the device's "brain"
PhotoMOSsemiconductor relay that isolates low voltage and 230 V using light
Shellyready-made Wi-Fi switching relay with power measurement (external)
OLEDsmall, high-contrast display
Gerberstandard file format for PCB manufacturing
Footprintthe solder pattern of a component on the board
DRCDesign Rules Check — the automatic rule check in KiCad
Creepage distancethe path along the surface that current can "creep" along
OTA"Over the Air" — wireless firmware update
NTPinternet time service that sets the clock

17.4 License and Thanks

This manual is licensed under CC BY-NC-SA 4.0. Its structure follows the documentation rulebook of the sister project AskSin-Analyzer: a table of contents with jump targets, fixed page-break rules, and the footer with the way back to the contents on every page.

Building this project is at your own risk. 230 volts can be fatal — when in doubt, consult a qualified electrician.