Close
0%
0%

Arduino Ethernet Switch

It's an example of how to build with and arduino nano and a ethernet module, a switch that can be controlled via lan.

Similar projects worth following
This is a project that was in my todo list for a long time, now with more time, i can spend a few hours building it.
The idea is really simple: a device that can allow me turn on/off another 12V device. Don't need the wifi, i want to do it via ethernet.

Configuration

Default IP address of the device is http://192.168.5.2 and will return a JSON string with the uptime and relays' status. There is no configuration process, just change the IP address for the one desired in the code.

Operation

URLAction
http://192.168.5.2/?status1=ONActivate Relay 1
http://192.168.5.2/?status1=OFFDeactivate Relay 1
http://192.168.5.2/?status2=ONActivate Relay 2
http://192.168.5.2/?status2=OFFDeactivate Relay 2

JSON

The JSON return has the following format:

{    
'uptime':'1',   's1':'ON',   's2':'OFF'
}

uptime is in seconds. s1 and s2 can assume ON or OFF values, depend on the status of each relays.

  • 1 × Arduino Nano
  • 1 × Ethernet module enc28j60
  • 1 × DC to DC Step down
  • 1 × Relay Module You can use more than one if you want.
  • 2 × DC Jack barril or other type of connector if you want. I just wanted it to be easy to connect.

View all 6 components

View project log

  • 1
    Step 1
  • 2
    3d printed parts

    There are only two parts of the box, are really easy to print. The box originally designed to host two output jacks.

    You can download from thingiverse: https://www.thingiverse.com/thing:4246250

View all instructions

Enjoy this project?

Share

Discussions

Dan Maloney wrote 03/30/2020 at 16:52 point

Tricked me, too. This is better than a network switch, though - probably more useful.

  Are you sure? yes | no

dsl wrote 03/30/2020 at 06:44 point

[I cannot reply directly to your comment... that's weird]

Guille, of course I do! Personally, I support almost any DIY projects. Yours looks cool!

  Are you sure? yes | no

Tom Nardi wrote 03/28/2020 at 16:14 point

Definitely not the kind of "Ethernet switch" I was expecting, but very cool. Really like the idea of adding an uptime counter.

  Are you sure? yes | no

dsl wrote 03/29/2020 at 20:29 point

Yeah... I expected a 10BASE-T Ethernet L2 switch. Calling it a "latch" might be fair.

  Are you sure? yes | no

Guille wrote 03/29/2020 at 23:00 point

Hello. You are right, I chose the wrong name for the project, I just translated "Interruptor" into English. I hope that beyond that, you liked the project. 

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates