logo elektroda
logo elektroda
X
logo elektroda

Proprietary 7-segment colour display based on WS2812B

p.kaczmarek2 5322 27
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • 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:
    Proprietary 7-segment colour display based on WS2812B
    (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.
    Proprietary 7-segment colour display based on WS2812B
    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.
    Proprietary 7-segment colour display based on WS2812B
    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:
    Proprietary 7-segment colour display based on WS2812B
    The WS2812B itself, on the other hand, has a truncated corner in place.... third pin:
    Proprietary 7-segment colour display based on WS2812B
    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:
    Proprietary 7-segment colour display based on WS2812B
    Proprietary 7-segment colour display based on WS2812B
    Appropriately positioned element:
    Proprietary 7-segment colour display based on WS2812B
    Soldered:
    Proprietary 7-segment colour display based on WS2812B
    First test with Arduino UNO and "Adafruit Neopixel Library":
    Proprietary 7-segment colour display based on WS2812B
    In the process of soldering (I soldered the whole thing with the cheapest soldering iron from china):
    Proprietary 7-segment colour display based on WS2812B
    Finished module:
    Proprietary 7-segment colour display based on WS2812B Proprietary 7-segment colour display based on WS2812B
    First digit test:
    Proprietary 7-segment colour display based on WS2812B
    Proprietary 7-segment colour display based on WS2812B

    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):
    Proprietary 7-segment colour display based on WS2812B
    I then decided on the size of the segments and applied their initial shape:
    Proprietary 7-segment colour display based on WS2812B
    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):
    Proprietary 7-segment colour display based on WS2812B
    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):
    Proprietary 7-segment colour display based on WS2812B

    Display 3D printing and fitting
    The component came out right the first time. On the board it looked like this:
    Proprietary 7-segment colour display based on WS2812B Proprietary 7-segment colour display based on WS2812B Proprietary 7-segment colour display based on WS2812B
    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:
    Proprietary 7-segment colour display based on WS2812B
    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:
    Proprietary 7-segment colour display based on WS2812B
    Final result:
    Proprietary 7-segment colour display based on WS2812B

    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:
    Proprietary 7-segment colour display based on WS2812B
    (in the meantime I also switched from Arduino UNO to Nano)
    The module in action (highest possible brightness):
    Proprietary 7-segment colour display based on WS2812B
    Colour test (50% brightness):
    Proprietary 7-segment colour display based on WS2812B

    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:
    Adafruit_N...200911.zip Download(70.48 kB)
    Code:
    Code: C / C++
    Log in, to see the code

    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):
    my7segdisp....blend.zip Download(74.53 kB)Points: 1
    received by the file author

    Eagle file with the display PCB (needs tweaking!):
    ws2812b_7s.._10.zip Download(116.24 kB)Points: 1
    received by the file author

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 13927 posts with rating 11733, helped 630 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 18918495
    Freddy
    Level 43  
    p.kaczmarek2 wrote:
    you could double the amount of WS2812B to increase the brightness of the segments (although they are now clearly visible)
    Well, maybe not just the brightness, but the evenness of the backlighting.
  • ADVERTISEMENT
  • #3 18918540
    yogi009
    Level 43  
    It's good that people are trying to create such constructions themselves. It stimulates the brain to think.
  • ADVERTISEMENT
  • #4 18918672
    androot
    VIP Meritorious for electroda.pl
    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, but slanted to reflect more light from the LEDs.
  • #5 18918710
    Piottr242
    Level 23  
    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 did an encoder with backlighting https://www.sparkfun.com/products/15083
  • #6 18918744
    yogi009
    Level 43  
    In my opinion, what is missing here is simply good 'optics', but making them at home is not easy.
  • #7 18918746
    Loker
    Level 39  
    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), but other types of WS2812 are probably not,
    - two diodes per segment will improve the situation,
    - increasing the distance display surface - diode surface will improve the situation,
    - filling the empty space with a light scattering substance (some milky plastic/resin) will improve the situation, but technically difficult,
    - a more diffuse film (or simply thicker) will improve the situation - but then the risk of cross-talk between segments. Although in this case it is rather irrelevant. And of course it will blur the edges of the segments.
  • #8 18918751
    yogi009
    Level 43  
    Loker wrote:
    increasing the display surface - diode surface distance will improve the situation,


    This is probably the main design obstacle and a well-made matt optic on the final surface takes care of the issue.
  • #9 18918757
    Loker
    Level 39  
    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 to commercial solutions, with uniformity requirements of 1:1.15 ;)
  • #10 18918771
    yogi009
    Level 43  
    That is why I wrote that this is difficult to achieve in an amateur setting.
  • #11 18918977
    398216 Usunięty
    Level 43  
    yogi009 wrote:
    this is difficult to achieve in amateur conditions.
    I have used glugan in similar situations. Simple and (stubbornly) reversible (can be hollowed out in case of "W").
  • #12 18919015
    yogi009
    Level 43  
    398216 Usunięty wrote:
    I have used glugan in similar situations.


    Yes, it does have some effect, but it's not the same.
  • #14 18919099
    yogi009
    Level 43  
    Except that this topic is not about bought-in displays.
  • #15 18919287
    Freddy
    Level 43  
    Maureli73 wrote:
    You can also buy these ready-made, I use them and I think they are pretty good.
    This price in particular is not bad :D ;)
    Proprietary 7-segment colour display based on WS2812B

    This is the DIY section mate, not where to buy.
  • #16 18919310
    Tomek515
    Level 23  
    Or perhaps a Fresnel lens would help?
  • ADVERTISEMENT
  • #17 18919447
    willyvmm
    Level 31  
    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 taken care of it.
  • #18 18923226
    ArturAVS
    Moderator
    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 clear edges, I painted the inner walls of the LED recesses with black spray paint, and after mounting the LEDs, I poured road glass beads into the recesses. Once the LEDs were in place, I sprayed the board lightly with nitro clearcoat (you can put a few drops in the recesses) to stiffen the glass beads. On top of this, frosted (on one side) Plexiglas or glass with the smooth side facing outwards. We have evenly distributed light and sharp edges for the letters/pictures. These glass beads are added at the stage of painting the horizontal markings and it is these that 'glow' at night giving good visibility of the lines.
  • #19 18923236
    398216 Usunięty
    Level 43  
    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.
  • #20 18923261
    ArturAVS
    Moderator
    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 for a long time; https://sklepdrogowy.pl/farby-drogowe-malowarki/mikrokulki-szklane-25-kg unless you have connections in the road company. I recently bought 5kg on Allegro for a dozen or so zlotys and used maybe a soup spoon.
  • #21 18925902
    remiorn
    Level 18  
    Regarding diode soldering, it seems to me that it would be safest to prepare a footprint with a bevel. There would be no doubt about how to turn the diode.
  • #22 18929324
    kaczodp
    Level 14  
    Loker wrote:
    e diodes are generally not suitable for this purpose (small beam angle), but other types of WS2812 are probably not,

    WS2811 solves the problem.
  • #23 18929572
    Freddy
    Level 43  
    @kaczodp Well, tell me what's the difference, apart from the fact that the WS2812 is a WS2811 with embedded diodes?
    Apart from that using a WS2811 will complicate the circuit considerably.
  • #24 18929749
    kaczodp
    Level 14  
    Several leds can be connected to the WS2811. It is then easier to diffuse the light.

    Freddy wrote:
    In addition, using the WS2811 will complicate the circuit considerably.

    To what extent does it complicate things? Diodes and possibly a resistor on the WS2811 supply. Better than fitting several WS2812 per segment.
  • #25 18929880
    Freddy
    Level 43  
    It does, however, get more complicated, because there is an integrated circuit, additional resistors and tracks.
    However, everyone can do what suits them better.

    Proprietary 7-segment colour display based on WS2812B
  • #26 18930333
    kaczodp
    Level 14  
    Freddy wrote:
    Well, it complicates things, though, because there is an IC, additional resistors and paths involved.

    When leds were expensive, fibre optics were used to make them visible from several sides of the device. Now that they are cheap you mount several leds controlled from the same output.

    What will be cheaper, use WS2811 + several leds etc and a piece of plastic to diffuse the light or one WS2812 and develop a suitable diffuser and manufacture it later? At what quantity will the cost of developing the diffuser be recouped?
  • #27 18931004
    Freddy
    Level 43  
    kaczodp wrote:
    What will be cheaper ....
    I assure you that using for example 2x WS2812.
    Don't forget that the PCB designer also has to get paid and will lose much less time for a board with WS2812.
    There is also the cost of the laminate.
  • #28 18931199
    kaczodp
    Level 14  
    Freddy wrote:
    Don't forget that the PCB designer also has to get paid and will lose much less time on a board with WS2812.

    This is not a commercial project and the designer is doing it for pleasure so time does not count.

    Freddy wrote:
    There is also the cost of the laminate.

    In a large scale project yes, on the small scale in question here the cost of the laminate is irrelevant.

    For small volumes, developing and making a good diffuser will be expensive and rather more expensive than modifying the electronics.
📢 Listen (AI):
ADVERTISEMENT