RGB HexMatrix | IOT Clock

10K115122

Intro: RGB HexMatrix | IOT Clock

HexMatrix is the LED matrix having many triangular pixels. Six pixels combining makes a hexagon. There are many different animations that can be shown on the matrix form FastLED library, Also I have designed digits from 0 to 9 using 10 segments for each digit in the matrix and made a IOT clock.

STEP 1: 3D Printing:

STEP 2: Circuit Connections:

  • Make all the connections as shown in circuit diagram.
  • GND~-Ve
  • Vin~5V~+Ve
  • DataIn ~ Pin 2
  • Also extend the power supply wires to last LED and connect, to prevent the voltage drop across the LEDs.

STEP 3: Note:

  • If you use Arduino board then you can only display animations,you cannot display time.
  • If you use ESP8266 board then we can display time and other animations on the matrix.

STEP 4: Assembly:

  • Put all the LEDs in snake wise order.
  • Assemble everything together.
  • Solder the connector to Microcontroller board , the connector is taken from the other end of the LEDs line.

STEP 5: Coding:

  • Click here for codes
  • For this matrix I have made three codes HexMatrix.ino ,clock1.ino and clock2.ino.
  • HexMatrix code is the code for displaying animations on the matrix,it can run on any Microcontroller board.
  • Clock and clock2 code only runs on ESP8266 boards.

HexMatrix.ino:

  • Open the code given in Arduino IDE.
  • Install the FastLED Library in Arduino IDE.
  • Select the board type,port and upload the code.

Clock1 and Clock2 Codes:

  • Open the code in Arduino IDE.
  • In this code we can change this values as per our color requirement

//Digit color values in RGB
int r=255;

int g=255;

int b=255;

//Background color values in RGB

int br=0;

int bg=20;

int bb=10;

  • Enter the Wifi name and password

const char* ssid = "Wifi_Name";

const char* password = "Password";

  • Enter the time zone of your country(India 5:30=5.5 similarly enter your time zone)

//Your time zone
int timezone = -5.5 * 3600;

  • Select the board type as ESP8266,select the port and upload the code.
  • Apart from this we also have many other animations in the FastLED Examples.

104 Comments

great project. collected for the child, everything works. then I redid the project a little, added an OTA firmware update and added a light sensor. everything works fine. but after I tried to update on OTA, the LEDs started flickering on their own. there was also a problem downloading the sketch via USB. I filled in a new sketch that shows the monotony of all the LEDs, everything is fine. but as soon as I upload a sketch with a clock, the problem with flickering remains, as well as loading into wemos does not happen the first time. disabling the light sensor does not help. tell me what is the reason?
The clock works fine. but it is flickering. i am using a ESP 82665v 2a power supply. what could be the issue?
Does anyone who've already made it is experiencing some random flickering?
I've powered it with a 3A supply in LED #1, #50 and #96 to prevent some brightness loss.
Parallel with the supply of the LEDs there is a 1000uF capacitor.
FastLed library installed is 3.5

Thanks for any input!
Mee too experiencing this. what is the solution
hello i always get this message when uploading the code.
exit status 1
Compilation error: conflicting declaration 'CRGB leds [96]'

In Step 4, the orientation of the leds is with the panel facing you (like seeing the clock when finished) or is seeing the panel from the back side?
Thanks!
Hello,
I modified the original code to add a zero for minutes 0 through 9 and I added a night mode where the LEDs will turn off and turn back on at hours you define. I have posted my version of the code at:
https://github.com/shatter71/HexClock
I also fixed the non-manifold errors with the original piece that holds the LEDs and then designed a new housing where you print the face and sides as one piece and then the back is printed separately. The back piece will accommodate a female barrel power socket. These files are posted on thingiverse at the link below. I also provided the Fusion360 files and set them up to utilize parametric design so you can easily define the opening for the LEDs and all of the openings will be resized. In my case, I made the opening 8.1mm.
https://www.thingiverse.com/thing:4590275
Thanks again for this great project!

I am running your code, but no matter what I set dst to, my time is always an hour behind. Where do I start?
//Your time zone
int timezone = -5 * 3600; //UTC offset * 3600
int dst = 1; //Default to DST is in effect
Hello,
I went back and modified the daylight savings time auto adjustment code and pushed the update to my github repo. From my testing, it looks to now be working properly.
Thanks!
bonjours ca fonctionne Mais j'ai un problème
d'inversion d'affichage de l'heure en mirroir
In step 4, is the pic showing how to shtuff the leds into the grid the back view or the front view? Thanks.
I will probably use a ESP01 board for this, which does not have D2 (GPIO4) pin. Only GPIO0 and GPIO2.
Do you think that it's enough to change the line
#define LED_PIN 2
to
#define LED_PIN 3 or 4 (which corresponds to GPIO0 and GPIO2)?

Thanks!
Eduardo

hi,
I wonder if the 5V/2A power supply is enough as I found the highest power of each LED is 0.3W?
Yes I have used the 5V/2A power supply for the safer side you can use 5V/3A or so
Hello. I have made this project, and have modified the code because I used strips of 2812B LEDs, so my matrix/array is completely different. I have everything working, except one thing. When I unplug the USB from the ESP board, the code stops running, the clock freezes on whatever time and colors were being displayed when I removed the connection. I tried resetting the ESP, removing power, even left it off overnight, the code will not run unless it is connected to my PC. Without the USB connection, it comes up as 7:00, with no movement of the numbers or colors. Has anyone else seen this kind of thing, or have any suggestions?
It's a great project!
But I had some problems
LED time display reversal, LED lights I've seen the order is correct, I use the lights are WS2812, there are ways to solve it?
More Comments