Creating a Custom 7-Segment RGB Display with WS2812B LEDs

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
while browsing displays I came across an Adafruit 7 digigit RGB display it caught my eye so I added it to my shopping cart but upon closer inspection I realized two things its $14 price tack seemed steep for something the size of a quarter and its project description revealed a complexity that made me hesitate each segment contained three LEDs red green and blue totaling 21 with three extra pens for decimal point we will be requiring 24 pins for control a challenge both in connectivity and programming using three shift registers for Control Made matters even more tricky and with 24 pens needed breadboard prototyping becomes impractical designing custom PCB traces also poses difficulties so I have decided to create a module like this myself which would be much easier to control with only one pin of a simpler color control and while I'm at it I'll make it much larger if you want to see whether I succeeded stick [Music] around to start I designed the 3D printed base for such a module at first I wanted to use a classic ws2812 LED strip cut it into pieces containing two l LEDs each for each segment but the amount of work involved in connecting between segments using jumper wires scared me off I also wanted the project to look professional and with such a solution it would be difficult to hide these connections so with that option ruled out I turned to fritzing to create the custom PCB design I utilize a custom shape of the PCB I created and if you do not know how to do this you can refer to one of my tutorials essentially I created LED strip comprising of 14 individually addressable ws2812b LEDs with a unique layout the LEDs would be SMD solded eliminating through holes and instead utilizing metal plates to position and affix them to the PCB with sorder since I have never done this before that would be a challenge now that the design is complet and the Gerber file is ready the next step is obvious I turn to pcba to manufacture and send these bolts to me pcbaa not only provides custom pcbs but also helps to take your projects to the next level with tailor made boards transform your project potential with PCB waste custom boards engineered to maximize efficiency and functionality finally they have arrived hermetically sealed as always let's unpack them and take a closer look I opted for a black PCB which conceals the tracks of the top layer but everything matches what was in the Gerber file all the LEDs will be mounted using SMD soldering initially I assumed soldering 14 LEDs this way wouldn't be too difficult but after reviewing the LED data sheet I realized that this project would be slightly more complicated let's look into how the LEDs connect to one another we are using ws2812b individually addressable LEDs commonly used in LED strips each LED has four connections vsss for ground vdd for 5 volt connection and the data in connection to a designated Arduino digital pin for controlling all 14 LEDs when adding another LED vsss and vdd connections remain the same but this time the data in connection receives data from the data out connection of the first led however after reviewing the data sheet I realize that for this setup to function properly a 100 nanofarad capacitor needs to be added between the vsss and vdd plates of each LED you can carry on adding subsequent LEDs in the same way I have positioned those 14 capacitors on the bottom layer of the PCB they will also be SMD solders again here is the Gerber file to visualize all the tracks the mounting plates for these capacitors are quite tiny adding an additional challenge to the process both LEDs and capacitors were ordered and delivered LEDs arrive packed neatly in real packaging let's extract one now as expected they are incredibly small with a cut Corner indicating the vsss connection this guides Us in positioning them correctly on the PCB now on to the other side this is where the capacitors go they also arrived in real packaging and are even tinier than the LEDs just look at it will I be able to solder them onto the boat we'll see let's affix all components to the PCB using solder I will begin with the header pins for Arduino connectivity and the single resistor between the data in pin and the input of the first led that's done now let's move on to SMD soldering of the LEDs I won't bore you with the whole process I will just show you how I did it for the first segment I am using super glue to position them on the board so I can secure them with the solder surprisingly it went much smoother than I anticipated LEDs are done let's move on to the two capacitors and the first segment is ready you can test your work at any moment by connecting the module to Arduino and running one of the test sketches that came with a fast LED Library Moment of Truth and the both LEDs lit nicely let's disconnect the module and finish the job and there it is with 28 components mounted but will the module work or will I have to make some corrections and troubleshooting wow it worked on the first attempt with this I know this project is going to work as I'm pretty confident about the 3D printing and programming Parts it's time to create the case for this display it will comprise of the base which will have a cavity to which the PCB will fit I have also created additional small indentions for capacitors to fit and double-sided tape patches to fix the PCB to the base then we also have seven segments that I will glue on to the base let's start the prints it takes a combined 5 hours to have them completed printing is finished here is our base and here is one of the segments with all components in place we can now put them all together before I start let's double check if the PCB fits and what do you know it fits perfectly I'm starting with double-sided tape patches to fix the PCB this is now done we can start gluing on the segments the display is complete and I'm truly proud of how it turned out just have a close look at it it looks really professional it's tough and it also has a nice weight to it now for the ultimate test let's connect the jumper wires place the module on a stand that I designed and now we can hook it to the Arduino next we'll write the sketch to display digits 0 to 9 we'll need the fast LED library and set the series of parameters for the LED strip such as Arduino pin the LEDs are connected to number of LEDs brightness LED type and color order additionally we'll create a table of 14 crgb color object corresponding to the 14 LEDs in the display along with a table of 10 predefined crgb colors for use in one of the sketches in the setup we'll initialize the LED strip and set it to the desired brightness to display digits 0 to 9 we will need a mapping that indicates which LEDs should be on or off for each digit this is where the digit States table comes into play in the loop function we have a for Loop that iterates through the rows of the table where each row represents a digit the loop scans 14 led states for the current digit when the state is one a predefined white color is written to the corresponding position in the LED stable when the state is zero a predefined black color is written to that table once all led states are set we run fast LED show command to display the the current digit after waiting for 2 seconds the same procedure is repeated for the next digit let's load the code and see if it works it does the segments are nice and bright now we can change one line of the sketch to unleash the colors upon this display you remember the the colors table with 10 predefined colors we declared at the beginning of the sketch if we change this line of coat to use the predefine values from that table instead of white each digit will be displayed in a different color let's reload the code it looks great we can even use the entire spectrum of colors from the HSV palette let's update the code so each segment will be lit in a randomly generated color out of 255 possible values in the loop function we again have a nested for Loop but this time for each segment we generate an HSV colors stored in a shv SE variable if a segment is to be lit we populate that color for the two LEDs that make up the segment if the segment is to be off we assign a predefined black color to the those two LEDs let's see how this change in the code works it looks fantastic and now this display really resembles the tiny Adafruit RGB one we started this video with so what do you think about my new display did I come close to the original share your comments below we got to the end of this video if you made this far give me a favor and drop a like on this video subscribe to my channel if you want to support me further you can do it through patreon PayPal or becoming my YouTube channel member think of it as buying me a cold one as a token of your appreciation I hope to see you in my next video CIA
Info
Channel: Mario's Ideas
Views: 1,150
Rating: undefined out of 5
Keywords: DIY Electronics, RGB Display, 7-Segment Display, WS2812B LEDs, Custom PCB Design, SMD Soldering, 3D Printing, LED Projects, Arduino Projects, FastLED Library, Maker Projects, DIY LED Display, Electronic Prototyping, PCBWay, Arduino programming, Addressable LEDs, Custom LED Module, DIY, how to, instructable, tutorial, Arduino
Id: lRRdAFY92e0
Channel Id: undefined
Length: 12min 25sec (745 seconds)
Published: Mon May 20 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.