How to read from Automation Hat buffered input


I would like to configure mr Raspberry in order to receive an email when the main gate opens.

I have signal coming from the gate, when the gate is open the signal is 12VCD, when the gate is closed there is no signal.

My doubt is simple, my signal is made of a DC voltage, plus and ground. Each input channel just has one pin.

I can not just connect the plus of the signal coming to the gate two one input channel because there should be the same voltage reference. The reading would not be accurate.

What could I do?

Please help,


Connect the ground from the gate to ground on the automation Hat and the input to one of the buffered inputs. The buffered inputs are referenced to ground so it should work.


Thanks for replying.

But if I connect the ground from the gate to the ground of the Automation HAT, all noise coming from the gate will enter the Raspberry.

Or am I wrong?



If there is noise yes? Tying your Ground bus to earth ground should keep it nice and clean. If there is noise its also going to also be on the 12V signal wire. You can’t do what you want to do with 1 wire? Not that I know of anyway? If your that worried about it put an opt isolator or even a relay between the Automation Hat and fence. Use the 12V to latch the relay and have the relay ground the automation hat impute. Use the common and normally open contacts on the relay. Ground gate closed, open circuit gate open.