Arduino Hourglass

by davidfp00 in Circuits > Arduino

6856 Views, 66 Favorites, 0 Comments

Arduino Hourglass

WhatsApp Image 2023-01-09 at 12.50.37.jpeg
ARDUINO HOURGLASS

Mathias Ferreira and David Flores, students of 'Creative Electronics', a Beng Electronics Engineering module at the University of Málaga, School of Telecommunications. What about to apply Arduino and electronics knowledge over an ancient invention as the hourglass is? Well, that is what we did for our Creative Electronics final project. We combined both ideas in order to improve and create a more attractive device. We give thanks to Edison Science Corner because they gave us a wide range of ideas about the Arduino Hourglass and we added some other improvements.

The functioning consists in a led hourglass with gravity sensitivity, where we added the way to set up the time in minutes and seconds that the hourglass is working.

Supplies

WhatsApp Image 2023-01-09 at 12.50.34.jpeg
WhatsApp Image 2023-01-09 at 12.50.36(2).jpeg
  • Arduino (we use Arduino Leonardo)
  • 2x 8*8 led matrix MAX7219
  • ADXL335 GY-61 3 axis accelerometer
  • Display 7 seg, 4 digits TM1637
  • 2x buttons 6*6*5 mm
  • 2x 330 ohms pull-up resistances for buttons conection

Fabrication suplies needed: wires, welder and tin.

Circuit Diagram

FOAH7RMKPTRPPZ6.jpg

In addition, we connect the display and the buttons circuit.

Note:

  • Pins 10 and 11 are assigned to CLK and DIO, respectively, from the display.
  • Pins 3 and 7 are assigned to button 1 and button 2, respectively.


How Does It Work?

Hourglass is a simple device that consists of two glass bulbs that are connected vertically with a narrow neg and that allows the flow of sand or fluid from top to bottom.

In order to detect the orientation we need an accelerometer. We use ADXL335 3 axis accelerometer. To represent the sand we need LEDs for easy connections. We use two 8*8 led matrix (one for the top and one for the bottom) which is driven by max7219ic so we can control this matrix with just three pins.

In addition, we use a display to set the time in minutes and seconds that the hourglass is working. To change the modes among minutes-seconds-performance, the right button must be pushed for 2-3 seconds. Then, we use both buttons to increase/reduce the value of the time.

Circuit Building

WhatsApp Image 2023-01-09 at 12.50.31.jpeg
WhatsApp Image 2023-01-09 at 12.50.32.jpeg
WhatsApp Image 2023-01-09 at 12.50.36.jpeg
WhatsApp Image 2023-01-10 at 12.30.43.jpeg

In this part, we tested the whole circuit before the building, with a protoboard, in order to check that everything works perfectly fine. After that, we soldered everything permanently.



Making the Box

Captura.JPG
Captura3.JPG
Captura2.JPG
Captura5.JPG
Captura4.JPG

In order to simplify the fabrication of the circuit cover, we use a 3D Printer, including the holes for the two led matrix, the buttons and the display. Before the design, we took measaures of the Arduino and we took the rest from datasheets of each component.

The programs used to make the 3D printing are:

Autodesk Inventor: used for the design of the box we will use. From this design, we also exported the file in STL format.

PrusaSlicer: to laminate our design using the file with extension .stl exported from our design software. In PrusaSlicer, after the completion, we have exported our design in GCODE format and we have sent it into our 3D printer.


PARTS OF 3D DESIGN

Box base: contains the whole circuit inside. Box dimensions: 131 x 86 x 37 mm

Cover: thin part that contains the buttons and the display.

Coding and Finishing

In the following link to our GitHub page, you can find useful information about the Arduino code