Arduino Digital Up/Down Counter with Grove 4-Digit Display

This Arduino project shows how to build a 4-digit digital up/down counter using Seeed Studio Grove 4-digit display. This counter is incremented and decremented using two Grove button modules.

The Grove 4-digit display module is shown below (face):

Seeed Studio Grove 4-digit 7-segment display TM1637

And the following image shows its back:

Seeed Studio Grove 4-digit 7-segment display TM1637

The Grove 4-digit display module consists of TM1637 integrated circuit (datasheet), 2x10k SMD resistors, 4 SMD capacitors and Grove 4-pin cable socket. SMD: Surface Mounted Device.
With the TM1637 IC, number of pins required by the 4-digit 7-segment display is minimized to 2.
This module supports 3.3V and 5V systems.

This display module is connected to Seeed Studio Base Shield via 4-pin Grove cable, the base shield is an add-on board that directly mounted to the Arduino/Genuino uno board.
The 4-pin cable pins are: GND, VCC, DIO (data input/output) and CLK (clock).
The digital pins DIO and CLK control the displayed content and the brightness of the display.

The displayed number of the digital counter is controlled from 2 Grove button modules connected to the base shield.
The following image shows the Grove button module:

Seeed Studio Grove button

The button module has a pull down resistor of 10k ohm, if the button is pressed the state of SIG (signal) pin will change from low to high.

Hardware Required:

Arduino 4-digit counter circuit:
The following image shows the connection of the 3 modules with the Grove base shield where three 4-pin cables are used for the connection between the Grove modules.
Note that the base shield is directly mounted to the Arduino UNO board.

Arduino up/down counter with SeeedStudio Grove modules

The Grove 4-digit display is connected to base shield port D2 where:
GND pin is connected to Arduino GND,
VCC pin is connected to Arduino +5V pin,
DIO is connected to Arduino digital pin 3,
CLK is connected to Arduino digital pin 2.

The UP button module is connected to base shield port D4 where:
GND pin is connected to Arduino GND,
VCC pin is connected to Arduino +5V pin,
NC (not connected) is not connected pin (using the 4-pin cable it looks as it is connected to base shield D5 pin),
SIG pin is connected to Arduino digital pin 4.

The DOWN button module is connected to base shield port D5 with its SIG pin connected to Arduino digital pin 5.

Arduino up/down counter with SeeedStudio Grove modules

Arduino 4-digit counter code:
Seeed Studio provides a nice open source library for their module which can be installed from Arduino IDE library manager (Sketch —> Include Library —> Manage Libraries …, in the search box write “tm1637” and install the one from Seeed Studio).

Or it can be installed manually, first download library compressed file from the following link:
Grove 4-digit display Library   —> direct link

then, go to Arduino IDE —> Sketch —> Include Library —> Add .ZIP Library … and browse for the .zip file (previously downloaded).

Full Arduino code:

Arduino 4-digit counter video:

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top