Digital clock with thermometer and hygrometer


Posted on Oct 8, 2012

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 and settime 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.


Digital clock with thermometer and hygrometer
Click here to download the full size of the above Circuit.

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. 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".




Leave Comment

characters left:

New Circuits

.

 


Popular Circuits

Dual 8051S Execute In Lock-Step
Atv Video Sampler Circuit Circuit
211 SET amp built
Opamp VHF FM Transmitter
Noise generator circuit
DIY Dual Fan Controller Project
lights 5GM168 control circuit diagram



Top