How to wire sinking output with Automation HAT Mini

The example in the tutorial shows using the Pi’s 5V supply going to the load then the sinking output. I am a novice and not super familiar with sinking output but my understanding is that it is like a “gate” before the ground as opposed to the Pi’s normal outputs which are like a “gate” with the 5V/3.3V behind them. (This isn’t even necesscarily relevant but maybe if I’m understanding wrong that’s why I’m having trouble.)

What I am trying to do it open/close a solenoid valve. I can do this with the relay just fine. I’m having trouble doing it with the sinking output. I have a 12V supply to use for the valve. If I wire my positive side 12V to my valve then from my valve to the sinking output… That’s not a complete circuit. How do I wire the negative side 12V back into this?

I’m assuming these wouldn’t be labeled as 24V tolerant outputs if there was no way to actually wire more than the Pi’s 5V supply to them.

Do I just wire the negative 12V wire to the HAT Mini’s ground? (As a follow up if that’s true, would wiring it to the Pi’s ground fry the Pi?)

Making the ground connections a common ground is the answer. And no this won’t hurt the Pi, as long as the 12V is going through the Hats sinking output. The 12V is isolated from the Pi’s GPIO pins. Connecting the two grounds together establishes a common reference, that’s all.

That makes sense. I just need to verify that I’m not putting more than 500 mA through and then I will give it a shot and let you know if it worked. Thanks!

Yeah, the Pi’s 3.3V and 5V share that common ground. As long as you don’t exceed 3.3V into a GPIO input all is good. The other side of the coin is they are only good for 15ma out, which is why Hats like the Explorer exist. ;)

That worked! Thanks for the help.

Good stuff, have fun.