Glorified Cup Illuminator
Hey everyone welcome back,
The "Glorified Cup Illuminator" is an interesting device that resembles an overengineered saucer that holds a cup or glass.
The goal of this project was to flex my maker muscles by creating an RGB version of a commonly used saucer using a custom matrix with an ESP8266 board that shuffles a simple color changing animation and runs on an inbuilt lithium ion cell setup.
This article will explain how this saucer was made and how you can make it in a few simple steps.
Supplies
These were the materials used in this built-
- RGB Matrix (from a previous project)
- 3D printed parts
- ESP8266 board
- IP53906 Boost board
- Lithium cell
- Acrylic sheet
RGB Matrix
The main component in this project is a 16x16 RGB matrix that was created entirely from scratch.
In this matrix, 256 RGB LEDs are arranged in a 16x16 grid.
Because WS2812 addressable LEDs were used, no LED driver or complicated multiplexing circuitry was added to this board.
Both the Adafruit Neopixel Library and the FastLED Library, or a similar matrix library, can control this matrix.
Here's the built guide for this matrix-
https://www.instructables.com/Custom-16x16-WS2812-Mini-Matrix-Project/
The WS2812B 3535 that is being used in this project works the same as the 5050 Version, the only difference is the size and flux of light.
The data transfer protocol uses a single NZR communication mode. After the pixel power-on reset, the DIN port receives data from the controller, the first pixel collects initial 24-bit data and then sends it to the internal data latch, and the other data, which is reshaped by the internal signal reshaping amplification circuit, is sent to the next cascade pixel through the DO port.
Its operating voltage is between +3.5~+5.3V DC.
Datasheet- https://www.elecrow.com/download/product/1RGWS2812B0MINI0/WS2812B-3535_RGB_LED_Chips_datesheet.pdf'
Elecrow PCB Service
For the Matrix PCBs, Elecrow PCB Service was used.
For this order, White Solder mask with black silkscreen was chosen, 1.5mm Board thickness with 1 oz copper.
Also, because this matrix has 256 LEDs, it was super hard if we manually added solder paste to each component pad, which in this case would be 1024 as each led has four pads.
We ordered a stencil for applying solder paste and making the soldering process easy.
PCB Service from Elecrow was Super Awesome
ELecrow provides various professional services, including PCB manufacturing,PCB assembly, and 3D printing service. The PCB manufacturing price is as low as $1. Besides, the packaging was pretty decent, and it took a week for delivery, which was super fast.
Check out Elecrow for great PCB services at a low cost.
Basic Setup
The electronics of this overengineered saucer or glorified cup illuminator are extremely simple; an ESP8266 board is used to drive a 16x16 matrix, and a 5V source is used to power the entire setup, which is the IP5306 setup, which is a power management ic setup that steps up the 3.7V from a lithium cell and outputs a clean 5V with a peak current of 2A.
I've used this IP5306 in a number of projects, and it's a fantastic option for adding battery capability to any project; it has low and high cut features that are extremely useful for protecting the cell during the charging and discharging processes.
Like the matrix, the ESP8266 board I'm using in this project is a DIY project; it's an ESP07S-based board with an AMS1117 3.3V voltage regulator setup because the ESP8266 is a 3.3V tolerant device.
You can read more about this project from here-
3D Parts
By measuring the matrix, a simple design in Fusion360 was created that houses the matrix on a midbody along with a switch and other electronics.
There is a top body that will hold a rectangular part cut from a 5mm thick acrylic sheet.
All three parts were exported as mesh files and 3D printed separately using brown PLA at 0.6mm nozzle and 0.2mm layer height.
Acrylic Glass
Using the Cad design as a guide, I cut a rectangular piece from a spare acrylic sheet I had lying around.
For this task, an electric jigsaw was used.
I also used a 4mm drill bit to make four mounting holes near the edge.
There was still a transparency issue with this sheet, so I used butter paper sheet and cut it down to the size of the acrylic sheet.
Assembly
- We begin the assembly process by first attaching the acrylic sheet to the top part with four M3 nuts and bolts. We attach the acrylic sheet first, followed by the diffusion layer on the inside, so that the glass touches the acrylic sheet from the outside.
- Next, we insert the matrix into the midsection and secure it with four M3 screws.
- We then install a switch in its place and connect the ESP8266 setup to the LED matrix board. Matrix VCC connects to the 5V port of the Custom board, GND to GND, and GPIO14 to Matrix Din.
- Next, we install a lithium cell with an IP5306 Boost module board inside the midbody and connect its positive terminal to the 5V of the custom board and its negative terminal to GND.
- The ESP8266 board, the lithium cell, and the IP5306 board are then secured in place with hot glue.
- After all of the electronics have been installed, we will attach the lid with four M2 screws and close the box from the bottom.
- Finally, we insert the top part into the middle part, which is tightly fitted without the use of any adhesive or screws.
- Assembly is now complete.
CODE
Here's the code which was used in this built-
#include <Adafruit_NeoPixel.h>
#define PIXEL_PIN 14
#define PIXEL_COUNT 200
Adafruit_NeoPixel strip = Adafruit_NeoPixel(PIXEL_COUNT, PIXEL_PIN, NEO_GRB + NEO_KHZ800);
void setup() {
strip.begin();
strip.show(); // Initialize all pixels to 'off'
}
void loop() {
rainbow(20);
}
void rainbow(uint8_t wait) {
uint16_t i, j;
for(j=0; j<256; j++) {
for(i=0; i<strip.numPixels(); i++) {
strip.setPixelColor(i, Wheel((i+j) & 255));
}
strip.show();
delay(wait);
}
}
uint32_t Wheel(byte WheelPos) {
WheelPos = 255 - WheelPos;
if(WheelPos < 85) {
return strip.Color(255 - WheelPos * 3, 0, WheelPos * 3);
}
if(WheelPos < 170) {
WheelPos -= 85;
return strip.Color(0, WheelPos * 3, 255 - WheelPos * 3);
}
WheelPos -= 170;
return strip.Color(WheelPos * 3, 255 - WheelPos * 3, 0);
}
This code is made using the Adafruit_NeoPixel library to control a strip of NeoPixels (RGB LEDs) connected to pin 14 of the microcontroller. The program uses the rainbow() function to generate a rainbow color pattern on the strip.
The rainbow() function accepts a single argument, wait, which is the delay (in milliseconds) between each frame of the animation. The function uses a nested loop to iterate over each pixel in the strip and set its color based on the current value of the j variable (which is incremented from 0 to 255 on each iteration of the outer loop). The Wheel() function is used to generate the actual color values based on the WheelPos parameter, which is a value between 0 and 255 representing the position of the color on the color wheel.
The Wheel() function uses conditional statements to generate different color values based on the current value of WheelPos. The function returns a 32-bit value representing the RGB color value to be set for the current pixel.
The setup() function initializes the NeoPixel strip and turns all the pixels off, while the loop() function simply calls the rainbow() function with a wait time of 20 milliseconds. The program will continue to run indefinitely, generating the rainbow animation on the NeoPixel strip.
Result
The end result of this simple build is an RGB Saucer or Glorified Cup Illuminator that RGBfies any glass cup we place on it. Glass reflects color perfectly, creating a mesmerizing effect that is almost satisfying to look at.
Now i can pour myself a cup of chai and enjoy it with a slight touch of RGB.
If this project was fun or you need any details regarding it, DM me or leave a comment.
Special thanks to ELECROW for supporting this project, do check them out
Peace.