DIY Digital Clock with Temperature Display using PIC Controller

Summary of DIY Digital Clock with Temperature Display using PIC Controller


This article details the construction of a digital desk clock with temperature display using SoloPCB design tools. The project utilizes a PIC18F252 microcontroller to manage time via a DS1307 RTC and temperature readings from an LM335 sensor, displaying data on seven-segment displays driven by a MAX7219CNG. Power is regulated from 12VDC to 5V using an LM2574N-5.0 converter. The build includes various capacitors, resistors, LEDs, switches, crystals, and connectors, all assembled as through-hole components.

Parts used in the Digital Desk Clock:

  • CR2032 Battery Holder
  • 22uF 16V Tantalum Capacitor
  • 10uF 16V Electrolytic Capacitor
  • 220uF 16V Electrolytic Capacitor
  • 100nf 63V Ceramic Capacitor
  • 22pF 50V Ceramic Capacitor
  • MBR-150 1A 50V Schottky Diode
  • 3mm Red LED
  • 3mm Green LED
  • LM335 Temperature Sensor
  • BAT42 200mA 30V Schottky Diode
  • DC-001 Power Connector
  • 1×5 2.54mm Male Header
  • 2×4 2.54mm Male Header
  • 150uH 850mA Inductor
  • 38mm Common Anode 7 Segment Display
  • 330R 1/4W Resistor
  • 10K 1/4W Resistor
  • 2K 1/4W Resistor
  • 27K 1/4W Resistor
  • SPST-NO 6mmx3.5mm Tactile Switch
  • LM2574N-5.0 0.5A Step-Down Converter
  • PIC18F252-I/SP Microcontroller
  • 28 Pin DIP Socket 300mil
  • MAX7219CNG 8 Digit Display Driver
  • DS1307+ Real Time Clock
  • 32.768KHz Crystal
  • 10Mhz Crystal

One of the most enjoyable part of being an electronics person is creating your own gadgets and using them in daily life. In this article, we are building one of those with the help of SoloPCB design tools, a digital desk clock with temperature display feature.

DIY Digital Clock with Temperature Display using PIC Controller

The brain of the circuit is a Microchip PIC18F252 microcontroller. It acquires precise time information from DS1307 real time clock via I2C interface and displays it on four digit 38 mm seven-segment display with the help of MAX7219CNG display driver. The temperature data is read by the on-chip ADC module of the microcontroller from LM335 temperature sensor which outputs 10mV per kelvin degree linearly. The temperature data is also displayed periodically.

The PIC microcontroller and the peripheral ICs mentioned above needs 5V regulated supply to operate. The step-down converter in the power section of the circuit, LM2574N-5.0, converts 12VDC input voltage to 5VDC and lets to draw 500mA without any significant heating problem.

There are two LEDs on the board indicates power and functional status and the buttons let the user adjust the time and display the temperature manually.

The Circuit and the PCB Design

The circuit and the PCB of the project are drawn in SoloPCB. SoloPCB is a very powerful tool which integrates the circuit design to the PCB design and the fabrication. You can download SoloPCB from FabsSream for free. The circuit and the PCB files of the project are provided in SoloPCB format. You can download the design files including the symbol and the footprint libraries by using the download link below.

The circuit schematic of the digital desk clock and a screenshot from its PCB can be seen below.

After the PCBs fabrication, the components listed below are assembled on the board.

Bill of Materials:

Quantity Part Description Designator
1 CR2032 Battery Holder B1
1 22uF 16V Tantalum Capacitor C1
1 10uF 16V Electrolytic Capacitor C10
1 220uF 16V Electrolytic Capacitor C2
5 100nf 63V Ceramic Capacitor C3 C6 C7 C8 C9
2 22pF 50V Ceramic Capacitor C4 C5
1 MBR-150 1A 50V Schottky Diode D1
1 3mm Red LED D2
1 3mm Green LED D4
1 LM335 Temperature Sensor D3
1 BAT42 200mA 30V Schottky Diode D5
1 DC-001 Power Connector J1
1 1×5 2.54mm Male Header J2
1 2×4 2.54mm Male Header J3
1 150uH 850mA Inductor L1
4 38mm Common Anode 7 Segment Display LD1 LD2 LD3 LD4
3 330R 1/4W Resistor R1 R2 R11
6 10K 1/4W Resistor R3 R4 R5 R7 R8 R10
1 2K 1/4W Resistor R6
1 27K 1/4W Resistor R9
3 SPST-NO 6mmx3.5mm Tactile Switch SW1 SW2 SW3
1 LM2574N-5.0 0.5A Step-Down Converter U1
1 PIC18F252-I/SP Microcontroller U2
1 28 Pin DIP Socket 300mil U2 Socket
1 MAX7219CNG 8 Digit Display Driver U3
1 DS1307+ Real Time Clock U4
1 32.768KHz Crystal Y1
1 10Mhz Crystal Y2

 

All the components are through hole type so there is no need for a very good soldering skill.

 

Read More:    DIY Digital Clock with Temperature Display using PIC Controller

Quick Solutions to Questions related to Digital Desk Clock:

  • What is the brain of the circuit?
    The brain of the circuit is a Microchip PIC18F252 microcontroller.
  • How does the system acquire precise time information?
    It acquires precise time information from a DS1307 real time clock via the I2C interface.
  • What component converts 12VDC input to 5VDC?
    The LM2574N-5.0 step-down converter converts 12VDC input voltage to 5VDC.
  • How does the temperature sensor output data?
    The LM335 temperature sensor outputs 10mV per kelvin degree linearly.
  • Can users manually adjust the time?
    Yes, buttons let the user adjust the time and display the temperature manually.
  • What type of components are used for assembly?
    All the components are through hole type so there is no need for very good soldering skill.
  • Which tool was used to draw the circuit and PCB?
    The circuit and the PCB were drawn in SoloPCB.
  • Does the power section have significant heating problems?
    No, the converter lets you draw 500mA without any significant heating problem.
  • How many digits are on the display?
    The time is displayed on four digit 38 mm seven-segment displays.
  • What indicates the functional status?
    Two LEDs on the board indicate power and functional status.

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:
LinkedinTwitter