8 Port Passive PoE Injector, Managed and Fused: Unterschied zwischen den Versionen

Aus DL8RDS Wiki
Wechseln zu: Navigation, Suche
(Calibration)
Zeile 217: Zeile 217:
 
[[Image:2017-10-07-passivePoEInjector1.jpg|400px]]
 
[[Image:2017-10-07-passivePoEInjector1.jpg|400px]]
 
[[Image:2017-10-07-passivePoEInjector2.jpg|400px]]
 
[[Image:2017-10-07-passivePoEInjector2.jpg|400px]]
 +
[[Image:2017-10-21-passivePoEInjector3a.jpg|400px]]
  
 
Nope, new insights. The blank ACS712 is crap. See above. Now with Sparkfun's ACS712 Low Current Sensor. But beware: I got rid of this solution also. The little Vref Poti's zero state does not correspond with a zero of the measurement, and it is practically impossible to set the Vref to an exact rating of let's say 1,00V. For this reason, I kicked them out again and found Lady Ada's Adafruit INA169 sensor instead. Let's see if it is a good solution.
 
Nope, new insights. The blank ACS712 is crap. See above. Now with Sparkfun's ACS712 Low Current Sensor. But beware: I got rid of this solution also. The little Vref Poti's zero state does not correspond with a zero of the measurement, and it is practically impossible to set the Vref to an exact rating of let's say 1,00V. For this reason, I kicked them out again and found Lady Ada's Adafruit INA169 sensor instead. Let's see if it is a good solution.
Zeile 222: Zeile 223:
 
[[Image:2017-10-21-passivePoEInjector1.jpg|400px]]
 
[[Image:2017-10-21-passivePoEInjector1.jpg|400px]]
 
[[Image:2017-10-21-passivePoEInjector2.jpg|400px]]
 
[[Image:2017-10-21-passivePoEInjector2.jpg|400px]]
 +
 +
After the installation of the INA169, everything works fine.
 +
 +
[[Image:2017-10-26-passivePoEInjector1.jpg|400px]]
 +
[[Image:2017-10-26-passivePoEInjector2.jpg|400px]]
 +
 +
[[Image:2017-10-26-passivePoEInjector3.jpg|400px]]
 +
[[Image:2017-10-26-passivePoEInjector4.jpg|400px]]

Version vom 26. Oktober 2017, 21:25 Uhr

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

I was using the Intellinet 12 port network patchpanel first, but I found that it had no fuses, so I discontinued to use it:

2017-10-11-intellinet-patchpanel.jpg

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:

Websites:

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 calibration thing got me some headache. 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, sounds sufficient in my case.

Unfortunately it turmed out that this is all crap. Since I wanted to have a more fine grained reading, I decided to get myself a bunch of Sparkfun Low Power Current Sensor breakouts:

2017-10-22-sparkfun-LowCurrentSensor.jpg

https://www.sparkfun.com/products/8883

Paid a lot of money for them and understood that the Vref poti is so sensitive that you can hardly adjust it to a reference level of 1,00V or 0,50V. Playing around with the gain poti I understood that for a precise reading this no good either. Hard to adjust and the rise part of the reading is so steep that it is near to a rectangle signal. Maybe I was doing a mistake but lacking success I got impatient.

Result: Kicked it out again andgave a new try for another one: Here comes the Adafruit INA169:

2017-10-22-ladyada-ina169.jpg

https://www.adafruit.com/product/1164

For now I am content, but I understood that I must add a new resistor of let's say 20k so that I can display a rise of 1A into 2V. This will fit perfectly into the input range of 2,5V max of my I2C ADC, with a resolution of 4096 steps.

Outlook: Since I understood that there is a totally new set of current measurement chips, that can be used easily, I will use them in the future. The good side of them is that they can be read out using the I2C protocol, and they don't just give me the current but also the voltage.

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 seems finished!

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

Nope, new insights. The blank ACS712 is crap. See above. Now with Sparkfun's ACS712 Low Current Sensor. But beware: I got rid of this solution also. The little Vref Poti's zero state does not correspond with a zero of the measurement, and it is practically impossible to set the Vref to an exact rating of let's say 1,00V. For this reason, I kicked them out again and found Lady Ada's Adafruit INA169 sensor instead. Let's see if it is a good solution.

2017-10-21-passivePoEInjector1.jpg 2017-10-21-passivePoEInjector2.jpg

After the installation of the INA169, everything works fine.

2017-10-26-passivePoEInjector1.jpg 2017-10-26-passivePoEInjector2.jpg

2017-10-26-passivePoEInjector3.jpg 2017-10-26-passivePoEInjector4.jpg