# Unicorn HAT

**URL:** <https://forums.pimoroni.com/t/unicorn-hat/28>\
**Category:** New Products\
**Created:** [September 11, 2014, 8:43am UTC](https://forums.pimoroni.com/t/unicorn-hat/28 "2014-09-11T08:43:33Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![jon](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jon](https://forums.pimoroni.com/u/jon)\
**Post date:** [September 11, 2014, 8:43am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/1 "2014-09-11T08:43:33Z")

</div>

![](https://sea2.discourse-cdn.com/flex016/uploads/pimoroni/18/b91b145cc64fd566.jpg)

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.

> **[Unicorn HAT for Raspberry Pi – Pimoroni Store](https://shop.pimoroni.com/products/unicorn-hat)**
>
> What's going to protect your beloved Raspberry Pi from an onslaught of rainbow-coloured fusion? That's right, it's Unicorn HAT.

---

<div class="post-metadata">

**Author:** ![biglesp](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@biglesp](https://forums.pimoroni.com/u/biglesp)\
**Post date:** [September 11, 2014, 10:31am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/2 "2014-09-11T10:31:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jon](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jon](https://forums.pimoroni.com/u/jon)\
**Post date:** [September 11, 2014, 10:50am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/3 "2014-09-11T10:50:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![biglesp](https://avatars.discourse-cdn.com/v4/letter/b/258eb7/32.png) [@biglesp](https://forums.pimoroni.com/u/biglesp)\
**Post date:** [September 11, 2014, 11:42am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/4 "2014-09-11T11:42:46Z")

</div>

mmm I smell a project with Blackpool Illuminations team :)

---

<div class="post-metadata">

**Author:** ![Boeeerb](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@Boeeerb](https://forums.pimoroni.com/u/Boeeerb)\
**Post date:** [September 11, 2014, 2:27pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/5 "2014-09-11T14:27:17Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![monkeymademe](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/monkeymademe/32/20_2.png) [@monkeymademe](https://forums.pimoroni.com/u/monkeymademe)\
**Post date:** [September 11, 2014, 3:08pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/6 "2014-09-11T15:08:22Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jon](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jon](https://forums.pimoroni.com/u/jon)\
**Post date:** [September 11, 2014, 3:36pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/7 "2014-09-11T15:36:17Z")

</div>

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…

---

<div class="post-metadata">

**Author:** ![ben](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/ben/32/21_2.png) [@ben](https://forums.pimoroni.com/u/ben)\
**Post date:** [September 11, 2014, 4:10pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/8 "2014-09-11T16:10:47Z")

</div>

I love the unicorn

Also I love _markdown_

---

<div class="post-metadata">

**Author:** ![antario](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@antario](https://forums.pimoroni.com/u/antario)\
**Post date:** [October 30, 2014, 1:44pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/10 "2014-10-30T13:44:15Z")

</div>

**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?

Thanks,  
_Antario_

---

<div class="post-metadata">

**Author:** ![jon](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jon](https://forums.pimoroni.com/u/jon)\
**Post date:** [October 30, 2014, 3:22pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/11 "2014-10-30T15:22:03Z")

</div>

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](https://learn.adafruit.com/adafruit-neopixel-uberguide/overview)

---

<div class="post-metadata">

**Author:** ![antario](https://avatars.discourse-cdn.com/v4/letter/a/5e9695/32.png) [@antario](https://forums.pimoroni.com/u/antario)\
**Post date:** [October 31, 2014, 10:07am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/12 "2014-10-31T10:07:52Z")

</div>

Wonderful, thank you Jon!

---

<div class="post-metadata">

**Author:** ![Aust](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/aust/32/66_2.png) [@Aust](https://forums.pimoroni.com/u/Aust)\
**Post date:** [November 18, 2014, 7:52pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/13 "2014-11-18T19:52:01Z")

</div>

This is going on my Christmas list!

---

<div class="post-metadata">

**Author:** ![Lisa](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/lisa/32/34_2.png) [@Lisa](https://forums.pimoroni.com/u/Lisa)\
**Post date:** [December 15, 2014, 6:48pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/14 "2014-12-15T18:48:12Z")

</div>

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+.

Cheers  
Amy’s mum :)

---

<div class="post-metadata">

**Author:** ![jon](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@jon](https://forums.pimoroni.com/u/jon)\
**Post date:** [December 16, 2014, 7:58am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/15 "2014-12-16T07:58:00Z")

</div>

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](mailto:support@pimoroni.com) we’ll sort you out Amy’s mum! :-)

---

<div class="post-metadata">

**Author:** ![Lisa](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/lisa/32/34_2.png) [@Lisa](https://forums.pimoroni.com/u/Lisa)\
**Post date:** [December 18, 2014, 11:55am UTC](https://forums.pimoroni.com/t/unicorn-hat/28/16 "2014-12-18T11:55:15Z")

</div>

Brilliant - thanks Jon :)

---

<div class="post-metadata">

**Author:** ![Alistair12](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/alistair12/32/121_2.png) [@Alistair12](https://forums.pimoroni.com/u/Alistair12)\
**Post date:** [February 9, 2015, 7:30pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/17 "2015-02-09T19:30:44Z")

</div>

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).

Alistair

---

<div class="post-metadata">

**Author:** ![Mati](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@Mati](https://forums.pimoroni.com/u/Mati)\
**Post date:** [February 9, 2015, 8:25pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/18 "2015-02-09T20:25:33Z")

</div>

Hi!!

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

Thanks for your time and contributions :)

---

<div class="post-metadata">

**Author:** ![sandyjmacdonald](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.pimoroni.com/sandyjmacdonald/32/393_2.png) [@sandyjmacdonald](https://forums.pimoroni.com/u/sandyjmacdonald)\
**Post date:** [February 9, 2015, 9:27pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/19 "2015-02-09T21:27:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![c64emu](https://avatars.discourse-cdn.com/v4/letter/c/b5e925/32.png) [@c64emu](https://forums.pimoroni.com/u/c64emu)\
**Post date:** [June 30, 2016, 10:04pm UTC](https://forums.pimoroni.com/t/unicorn-hat/28/20 "2016-06-30T22:04:17Z")

</div>

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!  
Greetinx  
/H.
