I'm somewhere in a process of creating mini automation system for hobby use.
I've already put CAT 5e cables with RJ-45 connectors in walls. They are somewhere between 5 - 30 meters long.
On one side of the cable there is a host device, on the other a few client devices connected in parallel.
I want to use differential communication (probably RS-485 or CAN) over one pair (A, B) and deliver power through the same cable.
I picked 24V DC as optimal voltage (reduced on devices to 5V by step-down converter). To reduce the resistance I want to use two wires for +24V and two wires for GND.
Now I'm facing a problem of choosing which RJ-45 pins should I use for those signals.
In my first prototype I assigned them:
1 - +24V 2 - +24V 3 - GND 4 - A 5 - B 6 - GND 7 - NC 8 - NC
During hot-plugging, there was a possibility that RS-485 / CAN could make contact before GND pins, but after +24V pins, causing the transceiver to blow.
I also want to make it more "not expirienced user" proof and protect both sides when device or host gets connected to Ethernet (possibly with PoE).
My second idea is to do this:
1 - A 2 - B 3 - NC 4 - GND 5 - GND 6 - NC 7 - +24V 8 - +24V
However on many solutions I have seen using 4 and 5 pin for data transmission is recommended. I have also seen numerous documents where 4 and 5 pin was left unused.
Which approach should I choose and why? Maybe ther?