Explorer pHat and brightness

Hi, i recently got an explorer phat with electronic kit.
I played with tutos but now i have to try some stuffs that seems not to be documented.

I’d like to control an external light and i’m searching for information on how to wire the Outputs in order to control its brightness.

Could you please give me some hints ?

Regards,
Joël.

if you mean controlling brightness using a PWM signal, the Explorer outputs are not suitable. Your best bet is actually to tap straight onto the GPIO header, on bcm18.

… if I misunderstood the question, please post additional context as it is not really clear what your bill of material is and what you are trying to achieve.

Hi. Thanks for your answer.

In a first step, i’m simply trying to make any kind of test on the outputs 1 to 4 using the explorer pHat (https://shop.pimoroni.com/products/explorer-phat).

If I understand well, those can be controlled as described in the explorer API : https://github.com/pimoroni/explorer-hat/blob/master/library/explorerhat/init.py#L316

But i have no idea on any wiring. Could you provide some information on a simple wiring that could make use of this API ?

hey, you are right, the API does support PWM through the Explorer outputs, I forgot about that.

The key thing to remember/understand is that the Explorer uses a Darlington array to drive its outputs, and as such can only sink to ground, not supply power. That means that your logic needs inverting.

See the following topic for a simple LED wiring that achieves this logic reversal:
http://forums.pimoroni.com/t/explorerhat-pro-output-issue/4105/2

The following tutorial could also help:

https://learn.pimoroni.com/tutorial/sandyj/explorer-hat-pro-pin-entry-system

Thanks ! This helps so much.

If i understand well, if use brightness function (https://github.com/pimoroni/explorer-hat/blob/master/library/explorerhat/init.py#L483) then i should measure :

  • 0V between 5V and output 1 pin when calling output.one.brightness(0),
  • 5V between 5V and output 1 pin when calling output.one.brightness(100)

Is that true ?

Auto-replying for those who’d be interested in more details :

  • explorerhat.output.one.brightness(100) : stable 4.44V between 5V pin and Output 1 pin,
  • explorerhat.output.one.brightness(1) : floating approx 2.68V to 2.74V between 5V pin and Output 1 pin