Showing posts with label RGB. Show all posts
Showing posts with label RGB. Show all posts

2025-10-10

LED Strips

There a lot of options for colour LED strips.

I am talking pretty much entirely about 5x5mm individually addressable full colour LED modules on a 10mm wide flexible PCB with leads at each end. But even being that specific there are a lot of choices!

These things basically...

Covering/backing

Start with something simple - these strips often have options.

  • Black or white strip supporting the LEDs.
  • A domed flexible clear covering that is generally pretty waterproof.
  • A rectangular sleeve enclosing the string, which is more waterproof.

This is really a simple choice. I have some on a door frame which are the domed covering, because the strip or chips would snag otherwise. I have some on a shelf (image above) with no covering, as out off reach. You need to consider this if putting in some sort of diffuser, e.g. an aluminium strip with plastic cover - where no covering in the strip itself helps much under the diffuser. A diffuser is usually a good idea.

Now, some do come in a diffuse housing, which can be a good compromise. Bear in mind that any covering or enclosure makes cutting to length and joining harder. The simplest is the bare strip with LEDs on it (and the pads between them) allowing easily soldered joints to another strip. There are clips you can get but I do not recommend them - soldier it.

Note - the adhesive backing is pretty universally crap, not bad on aluminium, but on wood, etc, not good. I'd think about some nice 3M tape.

Density

Again a pretty simple one - how close the LEDs are - and that varies.

  1. Close together is great for sheer amount of light, and using inside any sort of diffuser strip as you can hide that there are individual LEDs.
  2. Close together means more LEDs and so more power needed.
  3. Close together adds to the cost.

Voltage

This is a bit more complex. The main choices are 5V, 12V or 24V. I am generally working towards 12V these days (with per pixel control on a WS2815).

  1. 5V can mean notable voltage drop on long runs, meaning power feed in at extra points. 12V can run longer and typically the modules can work on much less than the full 12V if they are per pixel 12V.
  2. 12V and 24V can be multiple pixels on one controller, e.g. 3 RGB pixels on one controller in a row are controlled together as the 12V is split over them. This is pretty shit, to be honest. It is not always the case, and WS2815 seem to be ideal with single 12V working pixels separately addressable.
  3. Higher voltage is lower current and can be a smaller power supply and less heavy duty power leads.

Current

This is one of the big issues, and not as simple as it looks - the LEDs do not use a lot of power, but there are a lot of them. Higher voltage means you can work with lower current. But you have to be careful, even with 5V DC levels, if you have hundreds of amps available - that can be nasty stuff (not that is unlikely to electrocute you, but can burn and melt stuff - a short at that power can melt copper wires).

The other issue, apart from not wanting to handle large currents (for which higher voltages help) is the power supply itself. A high current power supply is bulky and expensive.

A big challenge is working it out - and this can easily go wrong. There are guides and tools and data sheets. But you can easily find you are massively over specifying your requirements. As with any modern electronics, LEDs are getting more efficient and so lower power - the guides for 10 years ago do not apply now.

You also have the option of not lighting all LEDs full white all the time. So depends what you want. In practice you probably do want almost any system to work at all LEDs on full - but not always!

In short, my recommendation is to test the strips you are using, get a current meter, a strip and set to full power all on. Measure it. Note if can change on temperature, so leave a little overhead. But that tells you what you need.

Bear in mind voltage drop is also a thing - all white on a long strip could have more than enough current from the supply but still fade and lose colours at the end due to voltage drop - sometimes you need extra power feed in along the strip(s) to fix that. This is were 12V can help if the pixels can work down to half that (as seems the case) you can tolerate a lot of voltage drop.

I have a fence where along side the chain of strips I have a thick copper power pair, which taps in at each strip join. That works a treat as the thick copper power cable is low resistance and allows the current to get to the whole strip. The same power supply, which clearly has enough power, could not work the whole chain from just one end as the voltage drop would kill it after about the second strip. Bear in mind, whilst the data has to connect at one end, the power could always connect in the middle of your set up.

Never forget - power ends up as heat and has to go somewhere.

Colour options

There are two main colour options.

  • RGB - the simplest type - full colour using Red, Green, and Blue
  • RGBW - an extra 4th White LED.

There are some RGBWW with two different shades of white as well, but rare.

the main advantage of RGBW is that the extra white LED is usually very bright (and often available in a specific shades of white), but is also one LED, using less power than combining RGB to make white. Yes you can go overkill and try RGB and W for even more bright and even more power usage.

The general idea is if the strip it to be functional lighting as well as pretty effects, RGBW helps allowing the white to be lighting. You also often want to consider higher density of LEDs in such cases.

Chip type

There are a few chip types, and many odd chips that are compatible. There seem to be some subtle differences in the data sheets but in practice they all work the same way.

  • WS2812 is the main one, simple RGB 5V
  • SK6812 is another one, typically the order of colours is different in the data sent
  • WS2815 is the one that does RGB but using 12V
  • There are new WS2815 that are 12V and RGBW

Timing

Rarely an issue, but worth considering - each pixel on a strip takes time. So the maximum update rate of a whole strip depends how many pixels. Each bit is approx 1us long, so each colour is 8, and each RGB is 24us. That means 100 RGB takes 2400us or 2.4ms. RGBW is 4 colours, so takes longer. As you can see, once you have hundreds of pixels the refresh rate can come down and start to be more noticeable. The answer is more separate strips working in parallel if your controller can do that. I'm practice, it is rare for many hundreds of pixels and rare that the refresh rate matters that much. But bear in mind on large installations. 

Duff pixels

One of the reasons to look at the chip type is the WS2815 has a backup data line. The way this works is the data daisy chains from one module to another - any break, or any failed module means the whole of the rest of the strip dies. The WS2815 has a cunning plan - a backup data that goes directly on to the next pixel. The idea is that if a module fails, the next LED picks up the backup line, and delays one pixel, meaning it works and so does the rest of the strip. Only if two adjacent modules fail does the rest of the strip die. This is an excellent innovation, and I definitely recommend it.

Recommendation

The recommendation is simple...

  • For density - decide what you need.
  • For covering and strip PCB colour - decide what you need.
  • Recommend WS2815 RGBW 12V strips - only now available in 2025.

The reasons are simple.

  • 12V working is less current, so smaller power supply.
  • 12V allows more voltage drop, so longer strips just work.
  • WS2815 backup data allows a duff pixel.
  • RGBW allows more powerful white at lower power.

(I have some of these latest strips on order).

Update:

I have the new WS2815 12V strips. 96 LED/m. They state 23W/m (so around 2A/m), but tests are fun.

I usually expect each LED (R/G/B/W) to use power, so red is half yellow and a third of RGB White, but same as W White. But now.

Measuring a 100 LED test gave me roughly 1A for red or green or blue, but also 1A for yellow, or cyan, or magenta, and even 1A for RGB white, and 1A for W white. I only got more (1.75A) for RGB+W double white.

This is interesting. I assume they balance the currency for multiple LEDs somehow, which sort of makes sense - you do not want yellow twice as bright as red or green really. It makes things simple as well.

2023-09-27

Dialling the gate

People will know I am a slight Stargate fan (!), and I like making PCBs. So, well... Latest is...

LEDs

First off, the LEDs. There is a very popular LED format, a WS2812B chip and RGB LEDs in a package. These use a serial daisy chained control channel allowing 256 colours of each of Red, Green, and Blue, to be loaded individually to a whole chain of LEDs. This design has 372 LEDs.

There are standard libraries to drive these, but I have discovered the ESP32 S3 is better as it uses DMA for the "remote control" hardware that is used to drive the data for these LEDs.

You can get these on tapes, and rings, and so on, usually 5mm x 5mm, or 4mm by 4mm, and I had even seen some 2mm x 2mm, but was surprised to find they are now available in these tiny 1mm x 1mm format. This ring design has a 100mm diameter centre hole.

They also usually need 5V power, but amazingly these small 1mm x 1mm modules work on 3.3V (or 5V), which is impressive (Blue is usually the voltage hog).

They are also very cheap. Part XL-1010RGBC-WS2812B, LCSC Part C5349953.

Alignment

My first mistake with the LEDs was making the layout simple, so a grid of these LEDs were one way up on one row, and the other way up on the next row. This allowed GND to be between two rows, then VCC between two rows, and so on. I put caps at the ends of the rows (which works well). This allowed me to pack them at 1.6mm spacing.

This was impressive, but I missed the (apparently well know) issue that the LEDs are placed within the 1mm x 1mm space, so for example Red is one side, and hence an all grid red looks like this, not evenly spaced.

They have to all be the same way around to avoid such issues.

Diamonds

I tried doing the same way and really a pain to track. The trick is to actually place them at 45 degrees, diamond style. This makes tracking really simple.

This allows a track at the top for GND, and at the bottom for VCC, and a link from LED to LED corner to corner for the daisy chained data line. Shown here I have vias for extra power. With thin tracks between the pads of the capacitors (expected to be one per LED) it makes for a really neat layout.

Grids

Grids were easy, and grids of LEDs like this are simple, with 2mm spacing (no caps), which is not bad. Caps added at end of row or column.

Apart from tracks joining VCC and GND top and bottom, or side and side, I actually created zone fills to make for thicker overall power tracks.

The latest design at 2mm spacing is 10mm x 18mm for a 5x7 grid, and allows them to be placed next to each other for a whole row at 2mm spacing, LEDs at the top and bottom of each column.

Rings

The other thing to do was rings of LEDs.

The principle is pretty simple, tracks (this time arcs) for GND, data, and VCC. Some zone fill for VCC and GND, again arcs (well polygons and lots of points).

Adding vias is fun, and I ended up with code that puts them off to one side if diodes and caps too close together (as above image) or in line in the GND/VCC tracks when enough space.

A simple ring with evenly spaces LEDs and caps is easy, but then I decided I needed some grouping of LEDs together with specific tighter spacing (the chevrons in the top image).

I also had to cater for the fact that power vias from one ring could clash with some of the next ring, and so omit some that were too close.

C code

If you have tried doing this in KiCad, it is far from easy - even with the grid locking and simple spacing like 2mm, it is hard, and making a ring with 39 LEDs, i.e. 4.6153846 degrees between LED and cap and LED, is, well, totally impossible. No chance doing it manually at all.

So, obviously, I ended up making C code, parsing in the PCB file, and moving LEDs and caps and making tracks and vias and fill zones. I have code for grid layout and ring layout now.

The gate

Working out the exact animation for the gate will need a bit of trial and error I expect - I cannot actually spin the symbols, so some poetic licence involved, but easy to "spin" the rings of 117 LEDs.

I have actually gone for a number of rings...

  • 117 inner rings, this is 3 per gate symbol, so makes for a nice "1 in 3" spin effect and allows the inner to be lit up and made sparkly for the gate open.
  • 39 gate symbol ring, so I can light individual symbols during dialling (seeing as they don't spin).
  • 18 ring for bottom of engaged chevrons (9 chevrons, so 2 per chevron).
  • 117 outer ring, again for spinning, but also can be two for chevron when engaged, and 3 for chevron end when not.
  • Two 18 rings for chevrons getting wider.
  • A 45 ring, so 5 per chevron, for the lights at the edge of the gate when selected.

I think making it dial will be cool. PCBs ordered, so a week or so (maybe more, some holiday in China), and I can post video of the real thing.

Open source

This is all open source, PCB designs and code, but if you want to buy one of these, and a driver, let me know. I have 5 on order.

Dodecahedron

I was shown a dodecahedron with LEDs inside. Looked great, so decided to have a go. The principle is not that hard - a PCB strip on the insi...