Newbie: I want to create a switchboard with 30 switches and read the status of it

Hi everyone,

I recently aquired an old electric board with 30 (depricated) automatic fuses:

Just for fun: I want to use those fuses as “sensors” by integrating their status (open/closed) in my Home Assistant.
So I fact I just want to read the “state” of a fuse: on/off (open/closed).

Main idea:

  • use an ESP8266 or ESP32
  • Use ESPhome as software
  • I want to have 30 physical attached control leds
  • I want to get the status of each fuse in Home Assistant

Can this be done with an ESP8266/ESP32 and ESPhome?

This is all very new to m, so any kind help in baby steps (electric wiring schema, software config etc…) is appreciated :slight_smile:

kind regards,
Bart Plessers

Biggest problem that you have is, you need 30 input and 30 output ports. An ESP doesn’t have that many pins so you will need additional hardware like multiplexers or shift registers like the 74HC165 or MCP23016.

Just had a look, ESPhome doesn’t seem to have support for either component although the MCP23016 communicates through i2c which ESPhome supports.

Don’t have a ready-to-use solution but hopefully this will help you in finding more information for your project.

1 Like

forgot to mention: I already ordered some MCP23017’s that seems to be compatible with ESPhome as I was told…
But without this complexity: does anybody has an example of config for -let’s say- 2 fuses connected?

Do I need to have

  • 2 pins for the 2 sensor’s (fuse on/off )
  • 2 other pins for the leds

Or can I just

  • 2 pins for the “sensor” and led if I connect my GPIO to (+) in
    VCC → pullup —> LED —(+)—> fuse/switch → ground

Maybe you have a sample config/wiring scheme for this setup?

Sorry for my ignorance…

grtz
B

Do you want to receive the fuse state and also individually control the LEDs from ESPHome? Then you need 2 pins (+ GND) from the board.

If you just want the LED to light up when the fuse is on/off, can use a transistor setup. Then only 1 pin would be needed. Sometime like the following.
Untitled

The pulldown resistor might not be needed, the built-in pulldown from the input pin may already be sufficient. Transistor can be eg BC547.

At rest the base is pulled to LOW so LED won’t light up. When you close the switch, GPIO will sense HIGH + current will flow through LED and lights up.

1 Like