PixelPi AC – LED Controller Raspberry Pi HAT

PixelPi AC – LED Controller Raspberry Pi HAT

PixelPi AC is an add-on HAT for Raspberry Pi. Based on a previous project, PixelPi AC is an interface board for use with addressable APA102 / WS2801 LEDs. With a built-in opto-isolated relay, PixelPi AC can be hard-wired to actively switch on / off a mains voltage LED driver, with a current rating up to 6A. While not so revolutionary by itself, coupled with the included AC detection circuit the PixelPi AC can be integrated with existing 2-way lighting circuits with ease. The stackable design allows for up-to four PixelPi AC boards to be used simultaneously.

Features / improvements from old design:

  • Simple wiring. No loop-back cables needed for AC detect
  • Built-in surge protection circuit
  • Opto-isolated relay
  • 6A current rating
  • Improved overall electrical safety
  • Independent GPIO channel selection, with WiringPi numbering
  • LED indicators for relay & AC detect
  • Truly stackable design, with solder-less pass-through header
  • Micro USB power port, with option to back-power the Raspberry Pi
  • Power safety diode circuit to protect Raspberry Pi when back-powered
  • Built-in user programmable ID EEPROM
  • Support for multiple connector types
  • Less than 15mm in height
  • Conforms to Raspberry Pi HAT Specifications

The board manufacturer I use is PCBWay.com. Great customer service & quality boards as usual.

This version does not offer any blind motor control, since the solid-state relay was an expensive part in-terms of both cost & physical size. There is also only one relay on the PixelPi AC to be used to switch a single LED driver (or contactor for loads >6A).

During this project I took the opportunity the play around with SketchUp to produce a 3D model of the PixelPi AC. Much of the model was created dynamically from the PCB layout editor using a heavily modified version of a SketchUp extension called eagleUp. This tool generates the layout of the PCB with the solder-mask, silkscreen, holes, milling, and the position / orientation of the individual parts.  These parts had to be modelled individually to complete the model. Once complete we’re left with a very accurate representation of the final product:

All exposed AC parts are on the underside of the board, where they would normally be out of reach if attached to a Raspberry Pi. I have also added an exposed earth around the underside of the board so that in the unlikely event that someone with small enough fingers were to ever touch a live exposed part they would also most-likely be in-contact with the safety electrical earth, preventing the user from experiencing the full blow from the potentially lethal electric shock.

It would still need to be mounted in an enclosure for permanent installation, especially if used to switch a mains voltage LED driver. Although any enclosed Raspberry Pi case should be fine. There are plenty of tall / modular Raspberry Pi cases on the market that should work already, a good example is this one from ModMyPi. It’s just a matter of drilling a few holes for cables.

With the use of modular cases, and using the built-in channel selection, multiple HATs can be stacked using a combination of PCB stand-offs & extra-long pinned headers. Although one caveat is that while you can switch multiple LED drivers (or anything else) this way, there is only one digital output for the LEDs, this is a limitation of the Raspberry Pi’s SPI interface. I have an idea for a board which would allow for multiple dedicated strips simultaneously, but it would require a code library to be developed for it to work (it would also be much more difficult to set-up & use, and be incompatible with any other HAT), so that’s an idea for a future version.

Share this post

Leave a Reply

Be the First to Comment!

Notify of