Important news about HackSpace

We have some important news to share about HackSpace: Issue 81 was the last issue of HackSpace as a standalone magazine, and HackSpace has become part of The MagPi, the official Raspberry Pi magazine. Starting with issue 145, We’ll be adding pages to The MagPi to make room for the stories and tutorials you’ve come to expect from HackSpace.

How to see your name up in (cheap) lights

By Ben Everard. Posted

RGB LEDs are a wonderful invention that allow us vast amounts of visual creativity in our builds. You can light things up as subtly or as garishly as you like. In reality, these lights aren’t a single thing, but three tiny LEDs mashed together in one package. This means that to control them you need three pins – one for each colour. This quickly adds up and, even with multiplexing, it’s hard to control much more than a grid of ten by ten RGB LEDs. Fortunately, help is at hand in the form of the WS2812B, which is an RGB LED with embedded microcontroller.

These have a really simple networking protocol, so that each has an input pin and an output pin. Attach a microcontroller to the input pin of one WS2812B, then attach its output pin to the input pin of the next, and you can daisy-chain a string of these LEDs almost as long as you like, (the only limits being power and microcontroller memory).

These little LEDs are best known as Adafruit’s NeoPixels, but the same part is available in a lot of forms from a lot of sellers – and crucially, they all use the same protocol, so you can use the Arduino NeoPixel library to drive them.

We ordered an 8 × 32 pixel flexible display for £25.61 from AliExpress store Ledworld. That’s 256 LEDs. The first thing you need to realise when using this number of LEDs is that you’re not going to be able to use a simple power supply. At full brightness, Each LED uses up to 20 mA of current, and each pixel has three LEDs (a red, green, and blue), so that’s potentially over 15 amps! Of course, this is the maximum current if you’ve got all your LEDs on white, at maximum brightness. If you know that you’re not going to hit this, you may be able to get away with a lot less. Even with them all on full brightness of a single colour (red, green, or blue), this comes down to five amps.

Danger!

Our screen came with three points to supply power, which should reduce the amount of current through each point. All three are connected on the PCB though, so you shouldn’t connect them to different power supplies, just three times from the same one. This will reduce the resistance between the power supply and the LEDs. We do have some concerns about the quality of the joints joining the leads onto the PCB. The wire around the soldered blobs seemed prone to fraying.

LEDscreen2

We wouldn’t be comfortable using this display at a high current because of this fraying, and the potential fire risk this entails. That’s not to say that there isn’t a safe way of using these displays (after all, anything sets on fire if you put enough current through it). There are plenty of applications where you can use this sort of display without using the high current levels that could cause risks – if you don’t need to illuminate all the LEDs, or don’t need them all bright, you can run this safely. Make sure you’re familiar with the issues before going down this route.
If this screen isn’t big enough for you, it does come with a connector to daisy-chain multiple ones together (in this case they can be powered by separate power supplies, as long as you tie the grounds together).

As well as power, it takes memory to run these as the microcontroller has to be able to manipulate the graphics data and send it out. You need three bytes of RAM per pixel, so our screen will use 768 bytes of RAM. An Arduino Uno has 2kB of RAM, so there’s enough to fit our screen in, provided we don’t need too much additional memory.

Our screen came on a flexible PCB, but had no specifications attached, so we don’t know how tight it’s supposed to bend before breaking, or how many times it’s supposed to withstand bending. It creaks a little while bending, so we suspect the best answer to the above questions is not very tight, and not very often, however ours didn’t actually break during our testing.

Addressable RGB LEDs are a great way of making your builds stand out. Generic WS2812B LEDs can be cheap, but come with no support or documentation, and are of variable quality – for experienced makers, this may not be a problem but it might lead to confusion for beginners. It’s best to start small to make sure you know what’s going on before diving into a display this big. While it’s great to get cheap bits, the extra money on a reputable manufacturer may be worthwhile if you need support or parts to handle high currents.


https://hsmag.cc

From HackSpace magazine store

Subscribe to our newsletter