Holiday Notice: Elecrow will be on holiday from May 1-4. You can still place orders during this time. PCB & PCBA orders will be processed from May 4th, and product orders will start shipping from May 5th. Enjoy the holidays!

user-img

Mirko Pavleski

+ Follow

Dynamic LED Hourglass with Sound Effects - ESP32 & 16x16

This is a visually impressive hourglass simulation project, and despite its simplicity, there are many possibilities for modifying most parameters.

Dynamic LED Hourglass with Sound Effects - ESP32 & 16x16
 
  • thumbnail-img
 

Hardware Components

  • Esp32 Board

    Espressif
    X 1 fenxiang
  • 16x16 Led matrix with WS2812B chips

    X 1
  • Tilt Switch

    X 1
  • Speaker

    X 1
  • 470R Resistor

    X 1

Tools, APP Software Used etc.

  • soldering kit

  • Arduino IDE

    Arduino IDE

    Arduino

Story

 

 An hourglass is a device used to measure the passage of time. It consists of two glass bulbs connected by a narrow passage, allowing a substance (typically fine sand) to flow from the upper bulb to the lower one at a consistent rate.

Once all the sand has flowed to the lower bulb, the hourglass is flipped to measure time again. The time it takes for the sand to flow completely from one bulb to the other depends on the size of the hourglass and the amount of sand. Recently, in one of my previous projects I presented you with a way to create a virtual hourglass on a small OLED display. 

Detailed video instructions at:    https://youtu.be/ycQXSKxFcHU  

  In this project, quite the opposite, I will present you with another simple way to make such a device, but now on a huge color "Display" which actually represents a 16x16 LED matrix with LEDs, each of which contains a WS2812b LED chip, so that each LED can be controlled individually.

    The device is really very simple to make and consists of a few components.

 - ESP32 DEV Board

 - 16x16 led matrix with WS2812bLeds

 - Tilt switch

 - and small speaker

     The components are built into a suitable box made of PVC material that I made for a previous project of mine, and on the front of the matrix there is a 3D printed grid for which you can find the .STL file at the end of this text.

 

To achieve a more realistic simulation, I used a tilt switch, so by rotating the clock 180 degrees the countdown starts over. If we look at the code, we will see that it is designed in a way that allows us to easily change almost all parameters, starting from the number of particles, through the flow rate, the brightness of the LEDs, and even defining the colors. 

In particular, we can change the color of the hourglass wall, the sand, the environment around it, the internal empty space, as well as the color of the numbers. The numbers on both sides of the hourglass show the remaining time in seconds. I also added simple sound effects to start and end the countdown, as well as a short sound to indicate each second that passes.

  Let's see from the beginning how this looks in reality. Immediately after switching on, a sound effect is emitted that indicates the start of the countdown, and with each passing second a short beep. In the upper bowl there are 30 grains of sand that should run out in 1 minute, so each grain runs out to the lower bowl in two seconds. 

The grains in the lower bowl are arranged randomly, which is another approximation to a real simulation. After one minute has passed, a sound effect is emitted that indicates the end of the countdown, and now all the sand particles are in the lower bowl. If I now rotate the hourglass 180 degrees, the countdown starts from the beginning.

  And finally, a short conclusion. This is a visually impressive hourglass simulation project, and despite its simplicity, there are many possibilities for modifying most parameters.

 

Code
Schematic and Layout
CAD-Custom parts and enclosures
  • grille 3D

    grille_yZfCnAdXhw_1473335094680a06cede191.stl
    Download(0)

Dynamic LED Hourglass with Sound Effects - ESP32 & 16x16

This is a visually impressive hourglass simulation project, and despite its simplicity, there are many possibilities for modifying most parameters.

49
 
2
0
0

Share your project on social media to expand its influence! Get more people to support it.

  • Comments( 0 )
  • Like( 2 )
/1000
Upload a photo:
You can only upload 1 files in total. Each file cannot exceed 2MB. Supports JPG, JPEG, GIF, PNG, BMP

You May Also Like

View All
Add to cart
Board Type : GerberFile :
Layer : Dimensions :
PCB Qty :
Different PCB Design
PCB Thickness : PCB Color :
Surface Finish : Castellated Hole :
Copper Weight : 1 oz Production Time :
Total: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.

PCB Assembly

PCBA Qty: BomFile:
NO. OF UNIQUE PARTS: NO. of Components:
Assembly Cost: US $
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
3dPrintingFile : Size :
Unit : Volumn :
3D Printing Qty : Material :
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Acrylic Type : AcrylicFile :
Dimensions: Engrave:
Acrylic Qty :
Acrylic Thickness:
Acrylic Color:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
CNC Milling File : Size:
Unit: Volumn:
CNC Milling Qty : Material:
Type of Aluminum: Surface Finish:
Tolerance:
Surface Roughness:
Total: US $12.99
As a sharing platform, our community will not bear responsibility for any issues with this design and parameters.
Add to cart
Item Price Qty Subtotal Delete
Total: US $0.00
Certified Product | Supported Purchase: Full After-sales Protection