A remote Ethernet switch for my relay box

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche

1 Project Scope

The relay box I built recently is great, but without any physical switch a little hard to use. So the requirements profile is this:

  • Must be usable through a web interface.
  • Must be usable haprically through a physical switchboard.
  • Must consume as little power as possible if not used.
  • Must deactivate itself if unused.
  • Must not change relay state if switched of or switched back on again.
  • Must connect to the RaspberryPi that controls the relay box.
  • Must retrieve the switch state when switched on.
  • Must retrieve the switch state every 5 seconds.

2 Solution concept

I am using two Arduinos:

  • Arduino Mega 2560 with Ethernet shield.
The ethernet shield consumes quite much power and the ethernet chip is getting warm. So it must be switched off if not actively used.
The Arduino Mega provides enough GPIO pins to evaluate the switch state all the eight switches and control the red LED switchstate indicators.
  • Arduino Pro Mini
The ProMini is udes to control the entire switch board and consider inactivity times.

Both programs use the same debouncing algorithm, and the code of the Arduino ProMini is enhanced to consider an activity indicator that comes from the Arduino Mega. Whenever a switch is toggled, it sends a 50ms signal over to the ProMini so that the timeout watchdog is reset.

3 Components

  • Arduino ProMini, 5€
  • FTDI Basic USB programmer interface for the ProMini, 5€
  • Arduino Mega, 32€
  • Ethernet shield, 15€
  • Neutrik Ethernet socket, 5€
  • 9x LAS2GQ switches with red LED ring, 55€
  • 8x 10k PullDown Resistors for the switches
  • Aluminium panel, 10€
  • Euro PCB 5€
  • 64 pin backplane header
  • DC-DC converter, 5€
  • 2x ferrite cores, 5€
  • 2x 4mm banana sockets for external power supply
  • Resistors 2k2, 2k2, 4k7, 10k
  • Diode 1N4148
  • Relay FRS1B-S 5V, 5€

The values are rounded. Total costs: 150€