Proprietary 7-segment colour display based on WS2812B
Hello my dears
I would like to present here my attempts to make a self-contained 7-segment display based on WS2812B colour LEDs, my own PCB and a case printed on a 3D printer.
The display shown here I will test with an Arduino and give full operating codes for download.
Heart of the display - WS2812B LEDs
The display is based on WS2812B 'smart' coloured LEDs, a large number of which can be controlled by a single pin. These diodes only require a power supply (5V and ground) and one signal, they are connected like this:
(in the case of long wires, it is still worth giving a resistor on the data line before connecting to the microcontroller)
Of course, controlling them requires a suitable protocol.
I wrote more about them in the topic PIC18F45K50 as WS2812 LED strip driver , here:
https://www.elektroda.pl/rtvforum/topic3590731.html
Board design
I started the design of my own display by planning the board. For this I used the free version of Eagle software.
The tile represents a single digit. The digits can be connected together and have more digits (controlled by a single pin anyway) by using the WS2812B.
I have tried to make the whole thing no larger than 5cm by 5cm, as most PCB shops will accept panels up to 10cm by 10cm at a cheaper price, which will allow me to order more of my tiles (4 tiles per panel) more cheaply in the future.
There is a small error on the board - the distance from the goldpin connectors on the right and left side to the edge of the board is a bit too large, making it impossible to connect the two boards together with jumpers alone. This is necessarily to be corrected in the future.
I exported the boards to Gerbers and had the board shop make them (as a start without a panel - this is the first version).
Soldering the board
Even before soldering the board itself, it is worth stressing one very important thing. The WS2812B diodes should, of course, be soldered in the correct orientation - you can't flip the diode and confuse the pins. You need to pay attention to the markings. On my board (made in Eagle), the first pin is marked with a dot:
The WS2812B itself, on the other hand, has a truncated corner in place.... third pin:
That is, the dot is supposed to be on the opposite side (diagonally) to the truncated pin on the WS2812B.
Armed with this knowledge we can start soldering:
Appropriately positioned element:
Soldered:
First test with Arduino UNO and "Adafruit Neopixel Library":
In the process of soldering (I soldered the whole thing with the cheapest soldering iron from china):
Finished module:
First digit test:
The 3D design of the display
I then started Blender and took to designing a 3D overlay for the diode board to shape the digit parts. I started by transferring the holes from the PCB (I will use these for assembly):
I then decided on the size of the segments and applied their initial shape:
Then I refined their shape and prepared the final element (in Blender I used the Boolean operation to cut the segments out of the cube):
This is how I gave the whole thing a third dimension (the central two cylinders are the holes; the four on the corners are the tabs):
Display 3D printing and fitting
The component came out right the first time. On the board it looked like this:
But that's not the end of the story, because you still need to make some sort of overlay that diffuses the light at least a little and gives the effect of whole segments (rather than individual LEDs) shining through.
I wasn't sure what was best to use for this, so I used one of the layers from the inside of an old LCD matrix (whose teardown I described recently in the 'device interiors' section). I chose the layer that gives the best effect, white/milky:
I applied it to the printed part using droplet/superglue, as I was no longer planning to change it.
I attached the printed component to the PCB using laptop screws:
Final result:
Combining subsequent panels
I designed the panels so that they could be joined together. Unfortunately, however, they turned out to have slightly too thick edges and I couldn't use the typical 2.54mm jumpers to join them, but I managed in another way. This will be corrected in the next version.
Ultimately I wanted to use the prototypes I made as a temperature display, so I connected the three modules together:
(in the meantime I also switched from Arduino UNO to Nano)
The module in action (highest possible brightness):
Colour test (50% brightness):
Example operating code for Arduino (countdown)
Ultimately, I intend to use my display with the PIC, but nevertheless I thought I'd write some short test code for it on the Arduino and share it with you.
The code supports digit division and you can easily add support for more digits to it.
The code is based on the Adafruit_NeoPixel library.h, from here:
https://github.com/adafruit/Adafruit_NeoPixel
Copy of the repo above to download in .zip:
Code:
Code: C / C++
The 'displayDigit' function sets the display of a given digit to a specific position, and 'displaySimple' displays a three-digit number (more digits can be handled, but the code must be modified). The 'masks' array specifies which parts should be lit for which digit (further elements can be added to this array to display, for example, the letter 'A').
It's worth remembering that just setting the WS2812B colour through the library here doesn't display it on the strip, to display the changes you need to call 'strip.show()'.
The result of the code:
Based on this, you can easily realise a simple thermometer or clock (in the case of the clock, the fourth digit will be useful, you will need to modify the code).
Mistakes made, what could be improved, etc
This was my first attempt at making my own displays based on 3D printing, so a few things could be improved here:
- first of all, you need to improve the edges of the boards so that the goldpins would reach each other (there would be a gap of 2.54mm between them) in order to be able to connect them with ordinary two-pin jumpers
- the number of WS2812B could be doubled to increase the brightness of the segments (although they are now clearly visible)
- you could think about using the other side of the PCB, e.g. give space for the microcontroller there (but of course only use it for the first module, and not solder in the others)
- this 3D printed element could be printed with more infill or thicker, because a little bit of its side walls let the light through and they should not
- a better light diffusing coating could be used, maybe someone has an idea what kind?
- the board from the photos in the topic was obviously missing the description layer, it simply got lost during the export to Gerbers, in the next version you should remember to add it
Summary
The first attempt was essentially successful - I am happy with my display. It is comfortable to use and looks good in a dark room. I will definitely make a second, improved version of it. From the version shown here, I think I will in turn make a thermometer and use the RGB possibilities to somehow also reflect the displayed temperature through the colour of the digits.
Attachments:
Blender file with display model (and some additions):
Eagle file with the display PCB (needs tweaking!):
Comments
Well, maybe not just the brightness, but the evenness of the backlighting. [Read more]
It's good that people are trying to create such constructions themselves. It stimulates the brain to think. [Read more]
A PCB with white soldermask would probably be more expensive, but the lighting effect would be more visible. This printed piece with the shapes of the digits could have the recesses for the LEDs not perpendicular,... [Read more]
And what I miss about this is the implementation of a microcontroller, so that this can be controlled via the normal seven segments, or in a better case via i2C. See how you can make a module like Sparkfun... [Read more]
In my opinion, what is missing here is simply good 'optics', but making them at home is not easy. [Read more]
Regarding the improvement of the uniformity of the segment surface illumination (uniformity), there are several possibilities: - these diodes are generally not suitable for this purpose (small beam angle),... [Read more]
This is probably the main design obstacle and a well-made matt optic on the final surface takes care of the issue. [Read more]
Believe me - it doesn't take care of :( In the case of a small LED-surface distance even if "bare" LED structures (bare die) are used only the appropriate resin (dissipative resin) will do. But this applies... [Read more]
That is why I wrote that this is difficult to achieve in an amateur setting. [Read more]
I have used glugan in similar situations. Simple and (stubbornly) reversible (can be hollowed out in case of "W"). [Read more]
Yes, it does have some effect, but it's not the same. [Read more]
You can also buy ready-made ones, I use them and I think they are quite good. https://www.rgbdigit.com/shop/index.php?id_category=12&controller=category&id_lang=1 Mariusz [Read more]
Except that this topic is not about bought-in displays. [Read more]
This price in particular is not bad :D ;) https://obrazki.elektroda.pl/9618258100_1599889989_thumb.jpg This is the DIY section mate, not where to buy. [Read more]
Or perhaps a Fresnel lens would help? [Read more]
Interesting idea. What struck me immediately was the lack of possibility to assemble the modules without gaps. A smaller pcb and connectors on the other side of the PCB - male=>female would have... [Read more]
When making some luminous lettering I solved this in a different way. I omit the shaping of the lettering itself because here the Author printed and I milled in hard PU foam. In order to get sharp and... [Read more]
With these glass balls in my opinion a very cool idea. If anything, you can get them in specialty shops (larger than the "road" ones) as steriliser fillers. You can try them out. [Read more]
I used to paint roads and that's why this idea occurred to me :D First there were experiments with other materials and, for example, coarse crystal sugar also gives decent results. Such a bag would last... [Read more]