Automation HAT/pHAT outputs and external power supply wiring issue


I am trying to use the Automation Phat to control a lighting fixture (wiki) with an external 10VDC power supply.

The wiring is as follows:

10V psu positive lead ----> positive dimmer contact
negative dimmer contact ----> Output 1 on the pHAT
10V psu negative lead ----> GND on the pHAT

is this correct? (I am not that good with electronics)

The problem I am having is that when the output pin is ON, I measure 9.5V at the dimmer’s contacts.
But when the output is OFF, I should get 0v, but I measure around 10.5V.
I measure 10v exactly at the psu’s contacts.

Before that I tried to blink a LED using the output and the 5V pin as described here:
…and it worked perfectly fine.

I am a bit at a loss here, any insight would be appreciated.

thank you,


I would use one of the relays instead.
10V psu positive lead ---- positive dimmer contact
negative dimmer contact ---- Relay 1 NO;
10V psu negative lead ---- Relay no 1 COM

I want to use the outputs for PWM (which works well with the internal 5v supply), so the relays are not useful to me at this point.

Ah OK, I missed the PWM part somehow, sorry about that.
Are you putting the output low or just floating?
Maybe post the code your using with the automation hat.

Let’s leave the PWM aspects aside for now. I am just trying the most basic of scripts:

import time
import automationhat

while True:

Try and

I tried and got the same results. Can you confirm that my wiring is ok?

That I’m not sure about? Are you trying to make the automation pHat do what the dimmer does?
If yes then I “think” it should be in parallel.
Output 1 to the dimmer positive contact and ground to the dimmer negative contact.
Is your dimmer current sourcing or current sinking?

The dimmer is expecting a 0-10V external voltage source. The dimmer does not provide it’s own 10V. I think that means the dimmer is ‘current sourcing’, according to the wikipedia page in my first post.

If I connect output 1 to dim+ and the ground to dim-, where do I insert the external power supply?

Ok, I’m really confused now? What exactly are you trying to achieve?
I was assuming the dimmer was already hooked up to some lights, and working as a dimmer.
What is the make and model number of the dimmer?
And what light(s) are you going to hook it up too?

The lighting fixture in question has an integrated dimmer. There are two contacts on the light, let’s call them dim+ and dim-. If you hook up a variable voltage source to those contacts, you can dim the light: 0V dims the light off, 10V turns the light to full power.

But this is kind of besides the point. Let’s forget the dimmer and lights.

Let’s just say I have a device that runs on 10VDC that I want to power on and off using one of the Automation pHAT’s ouput pins, and also using an external power supply. How would I wire this properly?

I would wire it as you did in your first post. Turning the output on should sink it to ground completing the circuit. Keep in mind that with the output off, your still going to measure 10V floating on the input. If you measure from there to ground. There will be no current flow. Also, doing that way with the dimmer in the circuit, turning the dimmer up or down will change the voltage reading. Or at least I “think” it should.

Hi Iwi did you every got it working. Im in the same issue. I believe i got the wiring correct. As if i do output high it turn on and low it two off. However when i start doing pwm. It only act as an on/off it does not dimmer. As in duty cycle at 1 will turn on at full power so duty cycle 1 to 100 is the same brightness.

I have no idea why is happening because if i use the internal power in 5v or 3.3v from rpi to power a small led per say i can dim it perfectly from 1% to 100%. So technically it should work gut is not. Here my current wiring

10v+ -> LED signal wire -> LED signal ground -> output ; 10v gnd -> automation hat gnd

btw i also hook up adc1 to the led signal wire voltage never changed it also 10v no manner what the duty cycle.