Introduction: Moodiest Display

About: Hey there. This is Amit. I love making electronics on the concept of LEDs, PCBs, Batteries, and IoT.

This is a WS2812B based Seven Segment Display aka Moodiest Seven Segment Display is designed to be the moodiest of all.

You heard it right because it not only serves you a particular colour of light but the whole rainbow (VIBGYOR) effect and tons of animations.

This Instructable is in "Rainbow Contest" because in this project you see all the rainbow colours i.e. Violet, Indigo, Blue, Green, Yellow, Orange, and Red.

From this Instructable you will be Learning-

1. How to design this Moodiest Seven Segment Display.

2. How to integrate animations and effects

3. How to get the IPC class 2 graded PCBs

4. How to Build the very same display with customizations

5. Get this Project from here.

Supplies

To build this project, we will need-

1. 14 WS2812B Addressable LEDs here

2. PCB here

3. Microcontroller- Nodemcu, but you can opt for any such board wherein you have the VCC, GND, and Data pin available. BANGGOOD / AMAZON

4. I am using the popular Arduino IDE for uploading the code.

When we deal with electronics, we require soldering tools like the soldering iron (Pointed tip), paste, sponge, some wires, and a pair of tweezers.

For your reference, I have uploaded the images of the tools I used in making this project.

Step 1: How These Displays Work?

Each WS2812B LED has a data input and output pin. So, these LEDs take a formation of a Train where you connect the first LED to the data pin of the microcontroller and the output of the first LED is connected to the data input pin of the second LED. The chain formation goes on... ๐Ÿ˜„

Now the reason to choose WS2812B is that it has a built-in WS2811 integrated chip. We need a 100nF capacitor for each LED, but in this project, we can ignore it as we have a 3V option in the popular Nodemcu.

In future, we can opt for a WS2813 LED as we get a built-in capacitor with the WS2811 integrated chip.

Calculation

No. of Segments in one display unit - 7

No. of LEDs in one segment - 2

Total no. of LEDs required to build one Moodiest Segment - 7 x 2 = 14 LEDs

Now to make one RGB Clock we need 3 display units

So, we will need 14 x 3 = 42 LEDs in total.

Unfortunately, my stock is not sufficient but once the international curbs open, I will get it refilled.

I will update you all when I am back with the RGB Clock.

Until you can try it out and share.

So, let's begin the project.

Step 2: Getting Your PCBs (Lion Circuits)

For making this project you will need a PCB board and I highly recommend getting it from Lion Circuits.

They provide IPC Class 2 PCBs for only $15 for 10pcs and on-time globe shipments. You get a free goodie with your PCB order as a gift.

They provide an impressive latest generation Manufacturing from India.

Lion Circuits(Salient Features)

๐Ÿ‘‰ have a Real-Time Pricing Engine.

๐Ÿ‘‰ provide Instant DFM feedback pre manufacturing.

๐Ÿ‘‰ bring you AI based Quality assurance with latest AOI.

๐Ÿ‘‰ secure your design in a robust Design Confidentiality environment.

Your PCB manufacturing time takes only 24 to 48 hours excluding the DFM check and the fastest global shipments.

A cool feature is that we get an assurance report of our PCB manufactured.

Have a look at my PCB fabrication report. The report consists everything that other PCB companies lack and fail to share.

Enjoy your PCBs from Lion circuits and get it blended in India. You have a chance to get discount on your PCB order by completing this form.

Step 3: Designing the PCB.

So, my PCBs weigh less and have precise dimensions. Because the PCB is milled avoiding Board beneath the soldered LED.

I opt for female headers for the output pins and Male headers for the input pins as this will cascade our segments in daisy chain formation easily with no problems. Also, this design is small and precise to fit in your small walls.

But I made a mistake while designing the PCB.

The above (Photo 4) shows the connection of the Schematic and footprint blocks. You will notice that the VSS (with a small right-angled triangle) in the schematic block should be aligned to the 1st pin of the footprint block (the small yellow mark) but I misaligned it.

So, we have to take care of it while soldering ๐Ÿ˜….

The rest file parameters are as follows -

1. Track Width - 0.254mm

2. Track Clearance - 0.152mm

3. Via diameter - 0.61mm

4. Via drill Diameter - 0.305mm

5. PCB layers - 2 layer

6. PCB appearance - Green with White silkscreen + HASL surface finish.

So, I will make sure to correct the error in the Gerber file for future projects.

Step 4: How to Run These Displays?(Coding)

So, to operate these displays there are tons of code available around the world, so to avoid complexity I prepared a code (From Kitesurfer's WS2812FX) for the initial test of this project which will help us know that what we have assembled is correct or wrong.

Now copy-paste the code into your Arduino IDE software and make sure you change your Wi-Fi credentials before compiling.

After uploading the code-

1. Open Serial Monitor in the Arduino IDE.

2. Wait for the message "connected"

3. Copy the IP address shown on the serial monitor and paste it into your browser.

4. Now you can control the segment from the browser over the air.

When we deal with the NeoPixels, there are chances of damaging the data pins while hand soldering.

So before soldering, upload the code to the microcontroller.

Then connect the Microcontroller with the PCB using jumper wires and check the effect after soldering.

This process will be time-consuming. But you will see a good result. The same I followed when I faced these errors.

Once you see the effect on a segment from the test code, you can develop your own code or get it from GitHub and hit upload.

Now there are some precautionsto be followed -

1. Make sure the Data Pin defined in the Code matches your wired connection.

2. Make sure you have all the required libraries and the boards installed.

To add a library or a board in Arduino IDE, check these cool Instructables-

Importing Library to Arduino IDE

Adding boards to Arduino IDE

3. The VCC on the PCB requires 3V, not 5V

Step 5: Customizations

We are after the project now. You are ready with your Segment, Now let's discuss some future improvements.

Customization

So, what can the future versions come with?

1. We could have a version as a shield for the Raspberry Pico or the ESP32 Dev board.

2. We could have Battery management support to make the display portable.

3. We could even have a Touchpad system integrated with the display.

4. We may even switch to WS2813 NeoPixels which can be driven with 5V directly.

5. We will have a sensor integrated system for these segments shortly. Stay Tuned.

Step 6: Displaying Numbers 0-9

Ok, so here comes the first application. A GitHub repository by Electropoint4u allows us to exhibit numbers 0-9 with some animations on our Moodiest Display. I changed the code with my requirements and colour codes for the numbers.

To change the colour effects, I used this RGB Colour Code Software. This helped me to apply different colours to different numbers. But, since the project is under " RAINBOW CONTEST ", I applied the 7 rainbow colours to the first seven numbers and opt three different colours for the 8, 9 and 0 digits.

I have attached the code here and have tried to get it familiar to you at an ease by explaining each section use. still if you scratch your head, then let me know in the comment section. I will help you out.

Step 7: Adding a Wi-Fi Signal Strength Tester Feature.

Since the NeoPixels has been so amazing to work with, I tried to add a feature of the Wi-Fi RSSI function.

While browsing Electropoint4u's Github page, I found his amazing Wifi signal strength tester project. This man rocks here, his contribution made my project thrilled with another feature.

Now, there were some changes to be made in the code because we had 14 LEDs on each display. To solve this conundrum, I had to first test the original code in my Moodiest Display.

(Image 1 above) What I found is that the LEDs lit up till the 6th segment completely but the 7th segment remained off. It was obvious because the guy has designed for his 12 NeoPixel based mood light. So, I changed the signal strength accordingly by decreasing the MIN_VAL (-160dBm) and keeping -20dBm for the MAX_VAL. This will help us assign signal values to the Neopixels. Like here.

LED 1 = -160dBm

LED 2 = -150dBm

LED 3 = -140dBm

LED 4 = -130dBm

LED 5 = -120dBm and so on till LED 14 = -20dBm

Now, another problem comes up that all the NeoPixels on the moodiest display didn't Light-up instead of only 11 Lit up. To solve this dilemma, I had to change the code accordingly ( Image 2 above ).

At first, I changed the

int strength = map(rssi, MIN_VAL, MAX_VAL, 0, 11); to int strength = map(rssi, MIN_VAL, MAX_VAL, 0, 13);

because my Moodiest display operates on 14 LEDs and I want to assign each signal strength to each NeoPixel.

Finally, I assigned the colours to the LEDs depicting a Pattern and the Code is complete here.

Upload the code to your Nodemcu and see the Moodiest indicating the WI-FI signal strength in your area.

I have attached the code here and have tried to get it familiar to you at an ease by explaining each section use. still, if you scratch your head, then let me know in the comment section. I will help you out.

Colors of the Rainbow Contest

Participated in the
Colors of the Rainbow Contest