8 Port Passive PoE Injector, Managed and Fused

Aus DL8RDS Wiki
Version vom 11. Oktober 2017, 14:31 Uhr von Dl8rds (Diskussion | Beiträge) (Project Progress and Images)
Wechseln zu: Navigation, Suche

1 Project Scope

My parents' house is widely equipped with Mikrotik routers and other passive PoE powered hardware. So a centralized power distrution seems reasonable. However, passive PoE injectors like the one from Intellinet have one considerable problem:

They use a powerful PSU, capable of delivering a high current to a single port in case of a short circuit on the cable, inevitably causing a fire.

So I wanted to have a PoE injector that has a per-port fuse, however with remote diagnostic capability on broken fuses, as I can always easily ask my parents to exchange a broken fuse. I was not ale to find such a device on the market, so I built it myself.

Additional features:

  • Web Interface
    • Current port switching status
    • Fuse status
  • Syslog interface for event reporting
    • Switching events
    • Fuse failure events
  • External powering (24V) from UPS / Battery

2 Component List

  • SanDisk Micro Secure Digital (Micro SD) Speicherkarte 2 GB: Amazon: 9 €
  • NEUTRIK Cinch Einbaubuchse, sw, NF2D0: Amazon: 12 €
  • Neutrik NE8FDP RJ45 Durchgangs-Einbaubuchse, vernickeltes D-Gehäuse: Amazon: 9 €
  • ah 19" Parts 87407V 19" Leergehäuse 1 HE mit Lüftungsschlitzen: Amazon: 44 €
  • Netzdrossel: 5 €
  • 10x Sicherungshalter: 25 €
  • 8x Feinsicherung 500mA: 5 €
  • Feinsicherung 1A, Feinsicherung 6A, 1 €
  • Schrumpfschlauch-Set: 15 €
  • Lochraster-Platinen: 5 €
  • Stiftleisten, Buchsenleiten: 15 €
  • 8x Injektoren: 30 €
  • Beleuchteter Hauptschalter: 3 €
  • Kabelführungen, klebend: 15 €
  • Kabelbinder: 5 €
  • Netzteil Meanwell 24V 150W (6,5A) MW LRS-150F-24: 25 €
  • 2x DC-DC-Spannungswandler: 10 €
  • 14 Ringkerne: 15 €
  • 8x bistabile Doppelrelais 5V: 80 €
  • BME280 Sensor: 15 €
  • Cinch Stromversorgungskabel: 5 €
  • Kabelschuhe: 5 €
  • 8x ACS712: 70 €
  • 2x Gravitech 8 Channel ADC I2C: 20 €
  • 20x R, 50 kOhm, 8x ZenerDiodes 4,5V: 5 €
  • 1x PCF8575: 3 €
  • 1x PCF8574: 3 €
  • 1x Gravitech I2C-TRN: 10 €
  • NanoPi Neo2

530 €

Datasheets:

3 References

4 Sensor Access

Once again my experience hit me hard that Arduino type controllers are only really good if their usage is exclusively related to reading out values. They don't excel very much as web platforms. Given that they are rather big compared to those recent NanoPi Neo type minicomputers, I have taken the decision to prefer them in any cases in which network programming is part of a project. There is no price advantage in an Arduino, but there is a lot of disadvantage in limited debugging flexibility.

The I2C part was not so bad after getting the cabling right. After some time, all the I2C slaves were visible:

root@poeinjector:~# i2cdetect -y 0 
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- 27 -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- 48 -- -- 4b -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- 77     

The addresses are:

Little explanation about the PCF8575 and the PCF8574: I am using the 8 channel PCF8574 to detect the relay switch state and the 16 channel PCF8575 to swith the bistable latching relays. For this reason I will take the PCF8574 readout to control the success of the PCF8575 switching operations.

So since the relays are bi-stable / latching, I must not set both rows in the PCF7585 to ff, but only one at a time. And I can easily swith off power after the switching is done.

root@poeinjector:~# i2cset -y 0 0x20 0xff 0x00; i2cset -y 0 0x20 0x00 0x00

(everything off) and correspondingly for the most right (number 7 and 8):

root@poeinjector:~# i2cset -y 0 0x20 0x00 0x1c; i2cset -y 0 0x20 0x00 0x00

And reading out the relay state works like this:

root@poeinjector:~# i2cget -y 0 0x27
0x1c
root@poeinjector:~# i2cset -y 0 0x20 0x00 0xff; i2cset -y 0 0x20 0x00 0x00
root@poeinjector:~# i2cget -y 0 0x27
0xff

The relay numbering logic equals this:

Nr 1 - 0x01
Nr 2 - 0x02
Nr 3 - 0x04
Nr 4 - 0x08
Nr 5 - 0x10
Nr 6 - 0x20
Nr 7 - 0x40
Nr 8 - 0x80

Combinations are just additions of the above numbers.

5 Readout Software

6 Calibration

The ACS712 is a little special: Here is roughly the translation scheme between current and output voltage:

2017-10-09-acs712-scheme1.png

The default voltage is roughly at about 2,5V is there is no current at all. So the sensor must take this input voltage as zero reference. Unfortunately the ADS7828 is capped to 2,5V as a voltage reference by default, so it needs to be modified a little. Glad enough, you can use an external voltage reference. The Gravitech manual explains how to change the voltage reference so that the full 5V range can be activated. Unfortunately I am loosing half the dynamic range, which equals 2048 measurement values.

I am expecting 0,2V increase per Ampere, so I have 170 values available per 1 Ampere which gives me a measurement accuracy of about 0,01A, sufficient in my case.

7 Project Progress and Images

Trying to get a rough picture of the layout of the components.

2017-09-14-passivePoEInjector01.jpg

2017-09-14-passivePoEInjector02.jpg 2017-09-14-passivePoEInjector03.jpg 2017-09-14-passivePoEInjector04.jpg

2017-09-14-passivePoEInjector05.jpg 2017-09-14-passivePoEInjector06.jpg

Drilling and cabling starts

2017-09-14-passivePoEInjector07.jpg 2017-09-14-passivePoEInjector08.jpg 2017-09-14-passivePoEInjector09.jpg

2017-09-14-passivePoEInjector10.jpg

2017-09-14-passivePoEInjector11.jpg 2017-09-14-passivePoEInjector12.jpg

2017-09-14-passivePoEInjector13.jpg 2017-09-14-passivePoEInjector14.jpg

2017-09-14-passivePoEInjector15.jpg

Data cables installation...

2017-09-14-passivePoEInjector16.jpg 2017-09-14-passivePoEInjector17.jpg 2017-09-14-passivePoEInjector18.jpg

2017-09-14-passivePoEInjector19.jpg 2017-09-14-passivePoEInjector20.jpg 2017-09-14-passivePoEInjector21.jpg

2017-09-14-passivePoEInjector22.jpg 2017-09-14-passivePoEInjector23.jpg 2017-09-14-passivePoEInjector24.jpg

Now with the NanoPi Neo2:

2017-09-26-passivePoEInjector1.jpg 2017-09-26-passivePoEInjector2.jpg 2017-09-26-passivePoEInjector3.jpg

Project finished!

2017-10-07-passivePoEInjector1.jpg 2017-10-07-passivePoEInjector2.jpg