Desktop Clock & Thermometer with Humidity

Desktop Clock / Thermometer

The Project

This project started as an idea to build a desktop clock that could do more than simply tell the time.

The result is a USB-powered electronic clock incorporating a large LED matrix display, digital temperature and humidity readings, and an external temperature probe.

The clock is built around an Arduino Uno R4 Minima and uses commercially available display modules and sensor boards. All the electronics are assembled on stripboard, rather than using a custom printed circuit board.

The finished unit is housed in a custom 3D-printed enclosure, with the displays mounted into the front panel.

The project combines electronics, Arduino programming, sensor technology and 3D printing into a compact desktop device.


The Finished Clock

The finished clock has two separate display areas.

The upper display consists of four 8×8 LED matrix modules connected together to form a large 32×8 display. This is used to show the time in large, easy-to-read digits.

Below this is an eight-digit seven-segment LED display, which provides the temperature and humidity readings.

The green matrix display shows the time in hours and minutes, with a flashing colon between the hours and minutes.

The lower red display shows the temperature and relative humidity.

The enclosure was designed to hold both displays securely, with the USB-C power connection exiting from the side.


Display System

The clock uses two different types of LED display, each with a separate purpose.

Main Clock Display

The main display is constructed from four MAX7219 8×8 LED matrix modules.

Connected together, these provide a display area of 32 columns by 8 rows.

The Arduino draws large seven-segment-style numbers across the matrix to display the time in HH:MM format.

The display also includes a flashing colon, making it immediately recognisable as a digital clock.

The Arduino program includes custom routines to draw the numbers and control individual LEDs across all four display modules.

Temperature and Humidity Display

The lower display uses an eight-digit MAX7219 seven-segment module.

This provides space to show both temperature and humidity readings.

The display is divided into two sections:

  • Temperature on the left

  • Relative humidity on the right

The readings are displayed to one decimal place.

The two display systems share the same SPI connections, with separate chip-select control managed through the MAX7219 daisy chain.


Temperature and Humidity Sensors

The project uses two different temperature sensors, together with a humidity sensor.

SHT31 Temperature and Humidity Sensor

The SHT31 is used to measure the relative humidity only.

It communicates with the Arduino using the I²C interface.

The sensor provides digital readings and is polled periodically by the Arduino program.

DS18B20 Temperature Probe

A DS18B20 digital temperature sensor provides an additional temperature measurement through a separate 1-Wire connection.

This allows an external temperature probe to be used so that the probe can be mounted outside the equipment case.  This reduces the effects of internally generated heat on the temperature reading.

The DS18B20 uses a 4.7kΩ pull-up resistor on its data connection.

The Arduino program uses non-blocking temperature conversion so that the display and clock functions can continue operating while the sensor takes its measurement.


Real-Time Clock

Accurate timekeeping is provided by a DS3232 real-time clock module.

The RTC includes battery-backed timekeeping, allowing it to maintain the time when the main USB power is disconnected, provided its backup battery is fitted and working.

The clock communicates with the Arduino over the I²C bus.

Two push buttons are fitted to allow the displayed time to be adjusted:

  • Hour adjustment

  • Minute adjustment

The Arduino program includes button debouncing to prevent unwanted multiple adjustments when a button is pressed.


Arduino Controller

The main controller is an Arduino Uno R4 Minima.

This controls the displays, reads the sensors and communicates with the real-time clock.

The Arduino program uses the following libraries:

  • LedControl

  • Wire

  • RtcDS3232

  • Adafruit SHT31

  • OneWire

  • DallasTemperature

The firmware handles the clock display, temperature and humidity updates, button inputs and communication with the various modules.

Display updates and sensor readings are scheduled using the Arduino's millis() timing, avoiding unnecessary delays in the main program.


Electronics and Wiring

One of the objectives of this project was to keep the electronics relatively simple and avoid designing a custom PCB.

All the components are mounted on stripboard, with common 5V and ground connections distributed across the board.

The design uses short wiring runs, generally kept below 100mm, to help keep the assembly neat and reliable.

The main connections are:

SPI Connections

The MAX7219 display modules share the SPI interface:

  • MOSI – Arduino D11

  • SCK – Arduino D13

  • Chip Select – Arduino D10

I²C Connections

The DS3232 real-time clock and SHT31 sensor use the Arduino's I²C connections:

  • SDA

  • SCL

1-Wire Connection

The DS18B20 temperature probe connects to:

  • Arduino D2

  • 4.7kΩ pull-up resistor

Clock Adjustment Buttons

The two adjustment buttons connect to:

  • Hour – Arduino D6

  • Minute – Arduino D7

The inputs use the Arduino's internal pull-up resistors.


Power Supply

The clock is designed to operate from a standard 5V USB-C power supply.

The USB-C input is connected through a breakout board incorporating the required CC pull-down resistors.

The power circuit includes:

  • USB-C power input

  • 2A fuse

  • Power switch

  • 470µF bulk capacitor

  • 100nF local decoupling capacitors

  • Common regulated 5V supply

The design estimates a worst-case current consumption of approximately 1A, with a 2A USB supply recommended.

All the electronic modules operate from the common 5V supply.


3D-Printed Enclosure

The enclosure was designed specifically for the displays and electronics used in the project.

The front panel contains openings for the four LED matrix modules and the lower seven-segment display.

The display modules are mounted into the front of the enclosure, with the electronics and stripboard housed behind them.

The USB-C connector exits through the side of the case, allowing the clock to be powered without having a cable running across the front.

The enclosure was 3D printed and designed to give the finished clock a neat desktop appearance.

Enclosure Gallery


Design and Construction

The project went through several stages of development.

The Arduino software was developed and tested alongside the electronics, with successive sketches used to develop the display routines, sensor readings, clock adjustment and display layout.

The original breadboard and circuit development was followed by the final stripboard design.

The final arrangement avoids the need for a custom PCB and keeps the individual modules accessible for servicing or replacement.

The design document also records the wiring arrangements, component requirements and mechanical integration of the finished unit.


Schematic

Main Components

The main components used in the project are:

ComponentPurpose
Arduino Uno R4 MinimaMain controller
4 × MAX7219 8×8 LED matricesLarge clock display
MAX7219 8-digit displayTemperature and humidity
DS3232 RTC moduleBattery-backed timekeeping
SHT31 sensorAmbient temperature and humidity
DS18B20 probeAdditional temperature measurement
USB-C breakout board5V power input
4.7kΩ resistorDS18B20 pull-up
470µF capacitorPower supply smoothing
100nF capacitorsLocal decoupling
StripboardElectronics construction
3D-printed enclosureHousing

Project Documentation

The project files include:

  • Arduino source code

  • KiCad circuit schematic

  • Fritzing circuit designs

  • Stripboard design information

  • Component datasheets

  • RTC documentation

  • SHT31 sensor documentation

  • DS18B20 sensor documentation

  • MAX7219 display documentation

  • USB-C breakout board information

  • 3D-printed enclosure photographs

These files provide a useful record of the electronic design and construction of the clock.

DOWNLOAD PROJECT FILES (ZIP)


Final Result

The finished Desktop Clock / Thermometer combines several useful functions into one compact USB-powered device.

It provides a large, easily readable clock display, temperature and humidity monitoring, and an additional external temperature probe.

The project also provided an opportunity to experiment with multiple MAX7219 displays, digital sensors, real-time clock modules, Arduino programming, stripboard construction and 3D-printed enclosures.

The final result is a custom-built desktop clock that is both practical and an interesting electronics project.


 

This article was updated on December 3, 2026