Digital & Binary clock with thermometer & hygrometer

Here we have a clock. It’s not “another clock”. It has digital and binary output. It also has a thermometer and a hygrometer. It’s not “another thermo-hygrometer”. It display’s absolutely humidity (gr/m3) also.

Digital & Binary clock with thermometer & hygrometer

SchematicSchematic Digital & Binary clock with thermometer & hygrometer

 

MCU

I build it around Microchip PIC16F917, with internal Oscillator at 4MHz. I also build a serial port programmer, so I can programming it on-line, using the DL4YHF WinPic.

Clock

I use a RealTimeClock Maxim DS1305. The RTC backup power is a supercapacitor (0,22F). I test  it for 4 weeks, works fine. For this reason it don’t have the capability to change the time, but you can do small-corrections. Once you push the button, the seconds change to 30, with no effect to minutes, hours etc. The routine is in lines 1878-1887 “sec30“.

You set the time when you program the PIC. You have to program two times. The first time without line 91 (goto  rdtime). The routines setDS andsettime is execute.

SetDS is setting RTC’s control and trickle charger registers. In the settime routine, you set the time. After this, you add line 91 (goto  rdtime) and you reprogram it. Now the routines do not execute. RTC can keep the setting and time at least for 28 days. The routines DST3 and DST10 are for DaySavingTime. The check register is flag, 1. The checking routine is in lines 434-460. In the last Sunday of March, the 02:00 o’clock became 03:00 o’clock. In the last Sunday of October, the 02:00 o’clock became 01:00 o’clock. I set the RTC for 12H mode, leds for 12H and display for 24H.

Temperature – Humidity

I use a digital humidity and temperature sensor Sensirion SHT11.
I bought it in a PCB, with the pull-up resistor and decoupled capacitor ready in place.
Measurements make every 10 seconds.
At 00, 20 and 40 seconds it measures the temperature and calculate the temperature and Absolutely Humidity (“gr/m3” grams at cubic meter of air).
At 10, 30 and 50 second it measures the humidity and calculate the Relative Humidity (%).
The check register is flag, 0. The checking routine is in lines 464-475.
The measure temperature routine is in lines 477-514 “measTEMP” and lines 625-714 “measure“.
The calculate temperature routine is in lines 1793-1820 “calcTEMP“.
The measure Relative humidity routine is in lines 560-590 “measRH” and lines 625-714 “measure“.
The measure Absolute humidity routine is in lines 515-555 “measAH“.
The calculate Relative humidity routine is in lines 717-1470 “calcRH“.
The calculate Absolute humidity routine is in lines 1473-1728 “calcAH“.

For more detail: Digital & Binary clock with thermometer & hygrometer

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