dwyl/smart-home-security-system

Controlling an electric strike from RPi w/ PoE

Closed this issue ยท 9 comments

Currently, I have been able to connect up a RPi and the NFC development board using PoE and a USB-C splitter. I've found no issues with this.

PoE is 48V which is far too high to power our 12v door strikes. We need to work out a way to step down the power to 12v, and, if possible, work out a way of getting power from the same cable as the Raspberry Pi.

12v splitters for PoE do exist:
image

So it would be possible with two ethernet cables, but that defeats the point.

It also seems possible to power two low-power devices by splitting a PoE cable: https://networkengineering.stackexchange.com/questions/32560/multiple-poe-over-a-single-cable
image

Which could be our best option as long as both of our PoE splitters support "Mode A" operation

Apparently, PoE switches require some negotiation before they supply power. This means we can't just plug the power rails into a transformer and expect power. This means just buying the transformer as you suggested in #15 won't work.

We can either buy a microcontroller and start building our own PCBs, or we can buy a splitter made by someone that knows what they're doing: https://www.amazon.co.uk/DSLRKIT-Active-Splitter-Ethernet-IEEE802-3at/dp/B01H37XNHE

image

We can easily cut the plug off this and split the wire directly into our relay.

@th0mas yeah, I was thinking the same thing. (Good detective work BTW!) ๐Ÿ’ญ
Sadly it's not as simple as grabbing the power from the POE. ๐Ÿ™„ ๐Ÿคฆ
Thankfully all the external doors have a 240v AC socket next to the Ethernet socket. ๐Ÿ’ก
ethernet-power-socket
(we added this "just in case" powering the doors via POE wasn't an option ...)
So if we have to, we can always place a 12V DC power supply for each Door controlled by a relay from the RPi0.
I think it might actually be the best course of action for now as the hardware side isn't the most important part.
(provided we can get a relay working to activate a 12V "thing" we can work out the rest later!)

@th0mas definitely continue with your current line of development
as we will deploy it @home as soon as it's working end-to-end. :shipit:

What I'm proposing below is related to the hardware side of things, the software will not need to change.

This is probably a crazy idea, but it might work so please bare with me ... ๐Ÿ’ก
As you have noted above, converting POE 48V to 12V for each of the 20 doors might be a bit tedious. ๐Ÿ’ญ
(we will do it where there is no other option, but maybe we need to think laterally on this ...)

What if we could sidestep the POE 48V 600mA -> 12V 3A (power stepdown) thing entirely (for the doors) and just use a single 12V 3A power supply to power all the Doors directly using a central relay board in the server rack?
We would still use 2 pairs of wires in the the CAT6 cable for the 12v 3A to the Electric Strike
and use the other 2 pairs for the UART connecting the RPI0 to the NFC/RFID reader.

TBC. (requires more research)

Note: Edit this comment to reveal more notes. I need to finish drawing the diagram/schematic for clarity before sharing.

The relay we have bought and are currently using is a 5v relay, but the Raspberry Pi's GPIO pins can only push out 3.3v

To get around this we probably need to use a Logic Converter:

image

to make sure we properly step up and step down our voltages

This is currently how I've got the relay wired up:
image

@th0mas which wire is going to the PI?
This is what I was going on: https://www.instructables.com/id/5V-Relay-Raspberry-Pi

None currently, I presumed we'd need to step up voltages but that guide suggests different.

I'll wire it up as suggested and let you know

Cool. Yeah, I was honestly under the impression that RPI Zero/3/4 have 5v power at pins 2 & 4 (top left): https://www.raspberrypi.org/documentation/usage/gpio
GPIO-Pinout-Diagram-2 (1)

Look forward to seeing how you get on. ๐Ÿ‘

Strike lock being controlled successfully and documented