Unicorn HAT

You’ve heard of a sunhat right?

Well that may be fine for the tardy photon-stream emanating from our favourite star, Sol, but what’s going to protect your beloved B+ Pi from an onslaught of rainbow-coloured fusion? That’s right, it’s the Unicorn HAT.

Sporting a matrix of 64 (8 x 8) RGB LEDs and powered directly from the Pi this is the most compact pocket aurora available.

Unicorn HAT provides a wash of controllable colour that is ideal for mood-lighting, 8x8 pixel art, persistence of vision effects, status indications, or just blasting colour into your surroundings.

  • 64 RGB LEDs (WS2812B)
  • Python API
  • Compatible with Raspberry Pi B+
  • EEPROM with Raspberry Pi HAT configuration details
  • LED data driven via DMA over PWM
  • You need a good 2A power supply for your Pi for Unicorn HAT to work.

This looks like a great product and has practical applications such as

  • Illumination for the Pi Camera
  • SOS beacon, similar to the children of Mereside Primary, Blackpool. Who use a PiGlow to signal SOS in morse code

It uses the WS2812B, I wonder if something similar would work with WS2811…Parts of Blackpool Illuminations use the 2811 strip LEDs. It would be great to interface a board like this with the lights…event perhaps control part of the Illuminations with a Raspberry Pi.

@biglesp as far as I know that should be possible - they are essentially the same driver chip.

mmm I smell a project with Blackpool Illuminations team :)

I thought the 2811 used a different clock frequency? I may be wrong so don’t quote me.

But as you mentioned Les, it would be a good idea for a DOut and power pins for extending to more Unicorns or strips (if not already done)

Looking forward to seeing this in real world. Photography possibilities with and without the pi cam would be awesome!

Ahh, that’s possible - I have a feeling (though I may be wrong) that the WS2811 supports two different frequencies selected by the “SET” pin one of which I thought was compatible…

I love the unicorn

Also I love markdown

Hey guys,

This is how I found out abot the WS2812 smart LED-s, so thanks for that very much!
It’s also nice that these LED-s can be driven by using the RPi’s built-in PWM.
I’m wondering if the hardware is open-source or not. Can I find the schematics and the layout somewhere?


Hi Antario! We don’t have any schematic available for Unicorn HAT yet but wiring WS2812B LEDs is pretty well covered in other places on the internet :-)

This is a great place to start!: https://learn.adafruit.com/adafruit-neopixel-uberguide/overview

Wonderful, thank you Jon!

This is going on my Christmas list!

Hi. I can’t get the Unicorn to fit into the ninja B+ Pibow - the perspex between the USB connectors and the HAT is too wide on layer 6 - am I doing something wrong? The GPIO pins are all lined up correctly and the mounting holes line up between the HAT and the B+.

Amy’s mum :)

You aren’t doing anything wrong! The HAT spec came out after the B+ so the first few batches of cases didn’t know to avoid the space behind the ethernet/USB. If you drop us an e-mail to support@pimoroni.com we’ll sort you out Amy’s mum! :-)

Brilliant - thanks Jon :)

Hi, been getting the Adafruit OLED 1.27" working! (Which is now responding (in python) and looks great, but, I need to create a better interface!).

I have of course visited the Adafruit website lots, just seen their page on the Dotstar APA102. These LED’s are like the Neopixels according to Ladyada herself, and do not need the strict timings data stream of Neopixels!

This got me thinking, “Unicorn HAT 2” using these babies - no PWM/DMA/GPIO problems!

Also I have 2 Unicorn HATs, and have had both of them running off from one RPi, they of course show exactly the same as they are independently controlled by the chips on each board.

Is there a way to add another 8x8 matrix of LEDs that can be controlled by just one chip? So that each 8x8 matrix can be independently controlled. I am guessing (observed) that the LEDs snake over the board, and that somehow leads could be added to the end and then onto a board with just another snake of LEDs, and then another 8x8? Then dim the WS2812B with 64xN LEDs to control (lots of coding required of course).



Is Unicorn Hat working with the new raspberry pi b 2?

Thanks for your time and contributions :)

Pimoroni have a prototype LED matrix that uses the APA102 LEDs, the Narwhal HAT, but they say that the APA102s are twice the price of the WS2812s so the price would be prohibitively expensive. It did look lovely, mind you.

Hi there,
I want to use the Unicorn HAT (8x8) with a Pi0 (Raspberry Pi Zero).

Therefore I have a little wishlist for a new version of the Unicorn HAT to make it more compatible with the Pi0:

  • Pls provide mounting holes in the middle of the right and left side fitting to the holes on the Pi0 so mounting to the Pi0 would be a piece of cake.
  • Pls provide soldering pads for VCC, GND and DIN in the center of the PCB on the rear side. I’m to lazy to solder a 40pin header when I need only 3 pins. With this pads I could simply solder short leads to contact the Pi0 with the Unicorn HAT

I appreciate your efforts. XMas is coming fast!