4-Digit Countdown Timer (Minutes and Seconds) - Arduino Tutorial

by RonFrtek in Circuits > Arduino

3297 Views, 1 Favorites, 0 Comments

4-Digit Countdown Timer (Minutes and Seconds) - Arduino Tutorial

4-Digit Countdown Timer (Minutes and Seconds) - Arduino Tutorial

In this tutorial we will learn how to make a 4-Digit Countdown Timer displaying Minutes and seconds using Arduino.

Watch the Video!

What You Will Need

RobotDynDisplay.png
VisuinoAdvrtisementVersion8.jpg
FZEK4WBK3XGYAP0.LARGE.jpg
jumper-wires.jpg
VisuinoAdvrtisementVersion8.jpg
  • Arduino UNO or any other Arduino board
  • LED Display TM1637
  • Jumper wires
  • Visuino software: Download here

Circuit

2021-01-22_11-51-54.jpg
  • Connect LED Display pin[CLK] to Arduino digital pin[10]
  • Connect LED Display pin[DI0] to Arduino digital pin[9]
  • Connect LED Display pin[GND] to Arduino pin[GND]
  • Connect LED Display pin[VCC] to Arduino pin[5V]

Start Visuino, and Select the Arduino UNO Board Type

F5ZAEMUK36U3RS2.LARGE.jpg
F311FBVK5AHN5HJ.LARGE.jpg

The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.

Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2

In Visuino ADD Components

2021-01-22_11-58-23.jpg
2021-01-22_11-57-59.jpg
2021-01-22_11-57-30.jpg
2021-01-22_11-57-06.jpg
2021-01-22_11-56-46.jpg
2021-01-22_11-56-29.jpg
  • Add "TM1637 7 Segment Display 4 Digits Module + 2 Vertical Points (CATALEX)" component
  • Add "Up/Down Counter" component
  • Add "Pulse generator" component
  • Add "Divide Integer By Value" component
  • Add "Multiply Integer By Value" component
  • Add "Subtract Integer Value" component

In Visuino Set Components

2021-01-22_12-13-22.jpg
2021-01-22_12-00-27.jpg
2021-01-22_12-02-49.jpg
2021-01-22_12-03-01.jpg
2021-01-22_12-03-23.jpg
2021-01-22_12-11-57.jpg
2021-01-22_12-11-04.jpg
2021-01-22_12-09-10.jpg
  • Select "Display1" and in the properties window set "Points" to True
  • Double click on "Display1" component and in the "Digits" window
    • drag "Integer Display 7 Segments" to the left side
    • On the left side of the "Digits" window select "Integer Display 7 Segments1" and in the properties window set "Count Digits" to 2
    • drag another "Integer Display 7 Segments" to the left side
    • On the left side of the "Digits" window select "Integer Display 7 Segments2" and in the properties window set "Count Digits" to 2 and "Leading Zeroes" to True
  • Close the "Digits" window
  • Select "UpDownCounter1" and in the properties window set:
    • "Initial Value" to 300 <<< This is the Amount of seconds that it will Count Down, change it to your desired time
    • "Max > Roll Over" to False
    • "Min > Roll Over" to False
  • Select "DivideByValue1" and in the properties window set Value to 60
  • Select "MultiplyByValue1" and in the properties window set Value to 60
  • Select "SubtractValue1" and in the properties window select Value and click on the Pin Icon and select "Integer SinkPin"

In Visuino Connect Components

2021-01-22_12-33-42.jpg
2021-01-22_12-33-57.jpg
countdown.png
  • Connect "PulseGenerator1" pin Out to "UpDownCounter1" pin Down
  • Connect "UpDownCounter1" pin Out to "DivideByValue1" pin In and "SubtractValue1" pin In
  • Connect "DivideByValue1" pin Out to "MultiplyByValue1" pin In and "Display1" > "Integer Display 7 Segments1" pin In
  • Connect "MultiplyByValue1" pin Out to "SubtractValue1" pin Value
  • Connect "SubtractValue1' pin Out to "Display1" > "Integer Display 7 Segments2" pin In
  • Connect "Display1" pin Clock to Arduino digital pin 10
  • Connect "Display1" pin Data to Arduino digital pin 9

Generate, Compile, and Upload the Arduino Code

2020-10-30_13-20-50.jpg

In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.

Play

If you power the Arduino module the LED Display will start to Count Down.

Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Instructable, you can download it and open it in Visuino: https://www.visuino.eu