Quote of the Day

by Arnov Sharma in Circuits > LEDs

210 Views, 4 Favorites, 0 Comments

Quote of the Day

14.gif
15.gif
IMG_5202.JPG

Greetings everyone and welcome back. here's something cool.

The Quote of the Day is a compact, Wi-Fi-enabled inspirational display device built using a Raspberry Pi Pico W and a custom WS2812B RGB LED matrix.

The device connects to the internet, retrieves the current day using NTP (Network Time Protocol), and scrolls a quote corresponding to the day of the week across the colorful LED matrix.

Whether it's a Monday incentive or a Friday reflection, this device ensures that each day starts with a positive spark, making it an ideal addition to your workplace, workspace, or bedside table.

This post is about the build procedure for this quote display, so let's get started.

Supplies

These are the materials used in this build:

  1. Custom Matrix PCB (Provided by NextPCB)
  2. Custom Power Module Board (also provided by NextPCB)
  3. Raspberry Pi PICO W
  4. WS2812B LEDs
  5. 100uF Capacitors
  6. Battery 3.7V Li-Po cell 2000mAh
  7. 3D Printed Enclosure and parts
  8. IP5306 IC
  9. 1uH Inductor SMD
  10. 1206 Capacitor 10uF
  11. Vertical Push Switch
  12. Type C port
  13. Indicator LED 0805
  14. 10K Resistor
  15. 3 Ohms 1206 Resistor
  16. M2.5 Screws
  17. Solder Paste
  18. Reflow Hotplate

RGB Matrix

01.gif
Image12.jpg
IMG_5178.JPG

In this project we are utilizing one of our previously built custom RGB matrix boards, which consists of 100 WS2812B LEDs arranged in a 10x10 Matrix, a PICO is also added to the board for controlling the Matrix.

You can check out more about the Matrix Project from the below link to get more detail about its build process and code.

https://www.instructables.com/Raspberry-Pi-Pico-Matrix-Project/

Here, we are using the Matrix coupled with the Raspberry Pi PICO W, which will allow us to connect with the internet in order to get daytime readings.

POWER CIRCUIT

01.PNG
POWERBOARD_page-0001.jpg
02.PNG
power.PNG

For the Power source of this project, we are using a Custom Power Circuit that revolves around the IP5306 Power Management IC, that delivers a consistent 5V/2A of power from a 3.7V LiPo Cell we are using in this project.

After building the basic layout according to the datasheet, we exported the netlist from our PCB CAD software and created a board layout file in which we placed all of the SMD and through-hole components in the correct sequence, connected all of the traces according to the schematic, and finished the board.

After finalizing the Board Layout, we exported the gerber data and shared it with HQ NextPCB for samples.

HQ NEXT PCB

aaS.jpg

After completing the PCB design, we export the Gerber data and send it to HQ NextPCB for samples.

Gerber Data was sent to HQ NextPCB, and a Green Solder Mask PCB with White Screen was ordered.

After placing the order, the PCBs were received within a week, and the PCB quality was pretty great.

In addition, I have to bring in HQDFM to you, which helped me a lot through many projects. Huaqiu’s in-house engineers developed the free Design for Manufacturing software, HQDFM, revolutionizing how PCB designers visualize and verify their designs.

HQDFM: Free Online Gerber Viewer and DFM Analysis Tool

06.PNG
Capture.PNG

Also, NextPCB has its own Gerber Viewer and DFM analysis software.

Your designs are improved by their HQDFM software (DFM) services. Since I find it annoying to have to wait around for DFM reports from manufacturers, HQDFM Is the most efficient method for performing a pre-event self-check.

Here is what the online Gerber Viewer shows me could not be clearer.

However, for full function, like DFM analysis for PCBA, you need to download the software. The online version only provides a simple PCB DFM report.

With comprehensive Design for Manufacture (DFM) analysis features, HQDFM Is a free, sophisticated online PCB Gerber file viewer.

It provides insights into advanced manufacturing by utilizing over 15 years of industry expertise. You guys can check out HQ NextPCB if you want great PCB service at an affordable rate.

PCB ASSEMBLY

07.gif
08.gif
09.gif
10.gif
  1. Using a solder paste dispensing needle, we apply solder paste to each component pad after assembling the power board to begin the PCB assembly process. In this case, we are using 63/37 SnPb solder paste.
  2. The pick-and-place process comes next, in which each component is placed in its allotted location.
  3. The circuit is then placed on our MHP50 Reflow hotplate, which melts solder paste by heating the surface from below. This causes the components to be soldered to their pads.
  4. After adding each THT component to the PCB, we use a soldering iron to solder the pads from the bottom of the board.

WIRING

03.gif
04.gif
05.gif
06.gif
  1. We began the wiring process by connecting the battery's positive and negative terminals to the power circuit's battery connector.
  2. We then connected wires to the power circuit's 5V and GND.
  3. The connecting wires are then attached to the Matrix's 5V and GND terminals.
  4. Pressing the push switch turns our setup on, and double-pressing turns it off.

FRAME DESIGN

02.gif
Screenshot 2025-05-12 163540.png
Screenshot 2025-05-12 163629.png
Screenshot 2025-05-12 163640.png
Screenshot 2025-05-12 163711.png
Screenshot 2025-05-12 163721.png

We are creating a quote display that will be placed on our desk; thus, we need to create a stand or frame-like part that will maintain the display slightly tilted and house both the lithium cell and the power circuit on the other side of the matrix.

We imported the 3D model of the display into Fusion360, along with the 3D models of the lithium cell and power module. We arrange all components according to our design, with the matrix on the front side and the power module and battery on the rear side. We then designed a frame based on the arrangement of our components. This frame requires four bushing- or washer-like pieces to mount the Matrix in place. Both the battery and the power module are mounted to the bottom side. The battery will be fastened to its location with hot glue, and the power module will be secured with two M2 screws.

Using our Ender 3 3D printer, we exported and 3D printed the frame part with a 0.6mm nozzle in transparent PLA.

FRAME ASSEMBLY

07.gif
08.gif
09.gif
10.gif
11.gif
12.gif
  1. We begin the frame assembly procedure by placing the LiPo battery on the back side of the frame.
  2. We next position the power module over two screw bosses and fasten it in place with two M2 screws.
  3. Next, we apply hot glue over the battery to keep it in place.
  4. Finally, we position the matrix on the front side of the frame, then place four 3D-printed washers in each mounting hole, and secure the matrix PCB with four M2.5 nuts and bolts.
  5. Matrix Display is now complete; let's look at the code.

CODE

Let's have a look at the code we prepared for this project, and it's a simple one.

#include <WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <Adafruit_NeoPixel.h>
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>
#define MATRIX_PIN 0
#define MATRIX_WIDTH 10
#define MATRIX_HEIGHT 10
const char* ssid = "UR SSID"; // Your Wi-Fi SSID
const char* password = "UR PASS"; // Your Wi-Fi Password
Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(
MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_PIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS,
NEO_GRB + NEO_KHZ800
);
WiFiUDP udp;
NTPClient timeClient(udp, "pool.ntp.org", 0, 60000); // NTP server, time offset (UTC), update interval (ms)
const char *quotes[] = {
"Monday: Don't wait for opportunity. Create it.",
"Tuesday: The way to get started is to quit talking and begin doing.",
"Wednesday: You are never too old to set another goal or to dream a new dream.",
"Thursday: Believe you can and you're halfway there.",
"Friday: It always seems impossible until it's done.",
"Saturday: The future belongs to those who believe in the beauty of their dreams.",
"Sunday: Act as if what you do makes a difference. It does."
};
int currentQuoteIndex = 0;
int x = 0;
int textWidth = 0;
const int textY = 1;
unsigned long lastScrollTime = 0;
const unsigned long scrollInterval = 100;
void setup() {
Serial.begin(115200);
matrix.begin();
matrix.setRotation(3);
matrix.setTextWrap(false);
matrix.setBrightness(40);
matrix.setTextColor(matrix.Color(0, 0, 255));
matrix.setTextSize(1);
// Connect to Wi-Fi
WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");
// Initialize NTP Client
timeClient.begin();
timeClient.update(); // Sync time on start
// Get the current time in UTC
unsigned long epochTime = timeClient.getEpochTime();
// Adjust to IST (UTC +5:30)
epochTime += 5 * 3600 + 30 * 60; // IST offset (5 hours 30 minutes)
// Get the current day of the week (0=Sunday, 1=Monday, ..., 6=Saturday)
timeClient.setEpochTime(epochTime); // Adjust the epoch time for IST
int dayOfWeek = timeClient.getDay(); // Get day of the week based on IST
// Map 0-6 (Sunday-Saturday) to quotes array (0 = Sunday, 1 = Monday, ...)
currentQuoteIndex = dayOfWeek;
loadQuote(currentQuoteIndex);
}
void loop() {
unsigned long now = millis();
if (now - lastScrollTime > scrollInterval) {
matrix.fillScreen(0);
matrix.setCursor(x, textY);
matrix.print(quotes[currentQuoteIndex]);
matrix.show();
x--;
if (x < -textWidth) {
x = matrix.width(); // Reset scroll to right side
}
lastScrollTime = now;
}
}
void loadQuote(int index) {
int16_t x1, y1;
uint16_t w, h;
matrix.getTextBounds(quotes[index], 0, textY, &x1, &y1, &w, &h);
textWidth = w;
x = matrix.width(); // Start scrolling from the right edge
}

Let's start with the libraries and pin definitions.

#include <WiFi.h>
#include <NTPClient.h>
#include <WiFiUdp.h>
#include <Adafruit_NeoPixel.h>
#include <Adafruit_GFX.h>
#include <Adafruit_NeoMatrix.h>

#define MATRIX_PIN 0
#define MATRIX_WIDTH 10
#define MATRIX_HEIGHT 10

We add libraries for the Wi-Fi, NTP time sync, and Adafruit NeoMatrix control.

We also Defines matrix display properties (size & pin)

Next is the Wi-Fi Configuration, which stores credentials for Wi-Fi connectivity.

const char* ssid = "ADD YOUR SSID"; // Your Wi-Fi SSID
const char* password = "ADD YOUR PASS"; // Your Wi-Fi Password

We then add the Matrix initialization, which Configures NeoMatrix with defined width, height, and pixel format.

Adafruit_NeoMatrix matrix = Adafruit_NeoMatrix(
MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_PIN,
NEO_MATRIX_TOP + NEO_MATRIX_LEFT + NEO_MATRIX_ROWS,
NEO_GRB + NEO_KHZ800
);

NTP Client Setup is then added, which establishes a UDP connection for fetching time from an NTP server.

WiFiUDP udp;
NTPClient timeClient(udp, "pool.ntp.org", 0, 60000); // NTP server, time offset (UTC), update interval (ms)

Then we have the most important element of this project, which were the quotes. We have prepared an array of quotes.

const char *quotes[] = {
"Monday: Don't wait for opportunity. Create it.",
"Tuesday: The way to get started is to quit talking and begin doing.",
"Wednesday: You are never too old to set another goal or to dream a new dream.",
"Thursday: Believe you can and you're halfway there.",
"Friday: It always seems impossible until it's done.",
"Saturday: The future belongs to those who believe in the beauty of their dreams.",
"Sunday: Act as if what you do makes a difference. It does."
};

We have then the scrolling parameters, which initialize scrolling variables.

int currentQuoteIndex = 0;
int x = 0;
int textWidth = 0;
const int textY = 1;
unsigned long lastScrollTime = 0;
const unsigned long scrollInterval = 100;

The Setup Function Initializes serial monitor and NeoMatrix properties (color, brightness, rotation).

void setup() {
Serial.begin(115200);
matrix.begin();
matrix.setRotation(3);
matrix.setTextWrap(false);
matrix.setBrightness(40);
matrix.setTextColor(matrix.Color(0, 0, 255));
matrix.setTextSize(1);

We next have the Wi-Fi Connection Handling section that ensures the ESP32 connects to Wi-Fi before proceeding.

WiFi.begin(ssid, password);
while (WiFi.status() != WL_CONNECTED) {
delay(1000);
Serial.println("Connecting to WiFi...");
}
Serial.println("Connected to WiFi");

NTP Time Sync & IST Adjustment Fetches the current time, adjusts for IST (+5:30 hrs.), and also determines the day of the week to pick the correct quote.

timeClient.begin();
timeClient.update(); // Sync time on start

unsigned long epochTime = timeClient.getEpochTime();
epochTime += 5 * 3600 + 30 * 60; // IST offset (5 hours 30 minutes)

timeClient.setEpochTime(epochTime);
int dayOfWeek = timeClient.getDay();
currentQuoteIndex = dayOfWeek;

"Load Quote for Display Section" calculates quote width for smooth scrolling.

void loadQuote(int index) {
int16_t x1, y1;
uint16_t w, h;
matrix.getTextBounds(quotes[index], 0, textY, &x1, &y1, &w, &h);
textWidth = w;
x = matrix.width(); // Start scrolling from the right edge
}

Then comes the loop function, in which we have added the scrolling logic. This controls the scrolling effect, moving text leftward at intervals (scrollInterval) and resetting the position when the text completely scrolls out.

RESULT

13.gif
14.gif
15.gif

The end result of this simple project is a marvelous display that greets you with a new, inspirational phrase each morning. Here, we've included seven quotes for seven days, which will be exhibited in a daily sequence.

One major improvement I want to make in this project is to increase the size of the matrix so that we can see more text instead of scrolling text, and another is to generate or obtain quotes from the Internet or AI and display them on the display, which means that we will receive new quotes weekly.

For the time being, these are the only two improvements I'd like to make to this project, which is now complete. Please leave a remark if you require any assistance with this project.

If you are into clock-themed projects, check out my weekly clock project.

https://www.instructables.com/Internet-Week-Clock/

Special thanks to HQ NextPCB for providing components that I've used in this project; check them out for getting all sorts of PCB- or PCBA-related services for less cost.

Thanks for reaching this far, and I will be back with a new project soon.