WS2812b Ambilight Clone For The Raspi

Raspi

For how often the Raspberry Pi is used as a media server, and how easy it is to connect a bunch of LEDs to the GPIO pins on the Pi, we’re surprised we haven’t seen something like Hyperion before. It uses the extremely common WS2812b individually controllable RGB LEDs to surround the wall behind your TV with the colors on the edges of the screen.

One of the big features of Hyperion is the huge number of LEDs it’s able to control; a 50 LED strip only eats up about 1.5% of the Pi’s CPU. It does this with a “Mini UART” implemented on the Pi running at 2MHz.

There’s only one additional component needed to run a gigantic strip of RGB LEDs with a Pi – an inverter of some sort made with an HCT-series logic chip. After that, you’ll only need to connect the power and enjoy a blinding display behind your TV or monitor.

Thanks [emuboy] for sending this one in.

 

Comments

  1. Stefan_Z says:

    It’s not new (search for BOBLIGHT for example), BUT it seems, that this time they use the Rasp to analyze the image – making it a true Ambilight-clone. Or it’s just better code… :-)

    I for one suspect that the recent revealing of the DSP’s source is the base for this.
    Good thing that I still have a roll of LPD8806 LEDs here :-)

  2. Greenaum says:

    Pretty sure we have seen stuff quite a lot like this before, even using the Raspi to analyse the image. I recall stuff featured here that was at least very similar. Still, a new way of doing it’s always welcome.

    Not sure where you get the 2MHz rate from, is that just the CPU’s clock frequency multiplied by the 1.5% usage? Or does it mean something else?

  3. Gavin says:

    Yeah they’ve it’s been around nearly as long as when xmbc was ported, had some sitting around for a while might be time to finish it

  4. CNK says:

    “an inverter of some sort made with an HCT-series logic chip”

    Unless I missed something, a signal transistor and a couple of resistors should do the trick.

    • rj says:

      Once I was going for “a single transistor” I think I’d just use a 74’1g04.

      • CNK says:

        Why? Harder to get and more expensive than a cheap transistor (eg. BC549) and a couple of resistors.

        Plus if you’re buying a stock of them, a transistor is definately useful in a wider number of applications than a single inverter IC.

        • rj says:

          More compact, either sharper transitions or less dependent on exact hFE of the BJT, lower power consumption, same cost when the resistors are factored in (at least, whenever I look for quotes of equal quantity)

          • CNK says:

            For a small DIY job I’d call the compactness a disadvantage – harder to work with.

            “either sharper transitions or less dependent on exact hFE of the BJT”

            True to an extent, but I don’t think it’s a major concern in this design (not that I’ve used addressable LEDs)

            “lower power consumption”

            When you’re powering tens of LEDs, I don’t think a milliamp or two here or there in the inverter circuit really counts as significant.

            “same cost when the resistors are factored in (at least, whenever I look for quotes of equal quantity)”

            None of the electronics stores Iuse stock these Inverter ICs, so I’m just going by Element 14’s price which is $0.10 cheaper in single quantities than a single transistor and two resistors from my usual electronics store. I’m sure you could find both options cheaper, but I don’t get the point when a transistor and two resistors is so much more versatile (so you can buy in bulk more hapilly anyway).

            Plus a BC549 can give you 100mA output current compared to 32mA, and a far wider operating voltage range.

          • CNK says:

            Umm, make that $0.10 more expensive for the IC. $0.44 compared to $0.34

    • Erik Johnson says:

      I’v never had a problem running WS2811 direct from ~2.0V mCU GPIO. Their internal buffers appear to be pretty sensitive so no external logic level conversion needed – at all.

    • Bogdan says:
  5. Haasebert says:

    Is there any reason you couldn’t just tap off the 5V pin on the RasPi to power the LEDs? Too much current draw?

  6. friedcpu says:

    It isn’t just the ws2812b, it can use a number of LED Strips, also it uses the dispmanx in the Raspberry Pi firmware (thought you might want to mention this) with XBMC. Also has a JSON interface, can use V4L Devices, Compatible with boblight, has android app and a web interface to change static colours and load effects. With a little research you could of made a good article about it.

  7. Michael Stone says:

    yes we have seen similar as recent as August 2013. There was an ARM based unit too a little earlier. Just use the site search for Ambilight.

    http://hackaday.com/2013/08/05/no-computer-ambilight-clone-uses-a-computer/

  8. chirishman says:

    I can’t see much difference between this and a bunch of other projects that I’ve seen, although they may not have been covered on this site yet. The only distinguishing factor that I see is that it uses WS2812b instead of the WS2801 LEDs that most people choose. PiBob springs to mind: http://pibob.nadnerb.co.uk/parts.html

    • Torque says:

      Ih you have a device with processing power to spare, then the WS2812b is vastly superior since the only extra component needed is a decoupling capacitor across VCC and ground.
      And even then it isn’t always needed..
      And the WS2801 isn’t available embedded inside a 5050 packaged RGB IC, it’ll need a separate RGB LED since the WS2801 is a controller for RGB LED’s and not a all-in-one package.

  9. tz2026 says:

    It will work until/unless some other interrrupt comes in and blocks the next UART character from going out. It might be fixed with the next burst, but it won’t be 100%.

  10. alan says:

    it is very great ,i will build my own project ,but use apa102 apa104 led strip to replace ws2812b

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 96,695 other followers