Monday, October 11, 2010

PIC 16F88 Digital Thermometer Light Meter and resistance ohm meter.

My original idea for this project was simply to try and interface the WINTEK WD-C2401P lcd panel to the pic (see my previous post). I figured it would be fun to add a couple of ADC readings to display something useful on the lcd. 

Theory of Operation:

PORTB on the PIC is used as the data port for the LCD. The Enable, Register Select and Reset are tied to PORTA. Once the LCD is initialized, the PIC reads the ADC values from the thermistor, CDS cell and resistor (if connected) via a voltage divider. The voltage divider translates any change in resistance from the sensors into changes in voltage. The Vout is calculated as 
Vdd*(R2/R2+R1). ) So any change in R1 (the sensor's resistance) will result in a change in the output voltage. In order to translate this into the ADC value, a 10 bit ADC resolution microcontroller will have 1024 (2 to the power of 10) possible steps. So if the controller is operating on 5V then each step will increment the voltage by 5/1024 = 0.004882813V every increment. So the value in the ADC will be the voltage input at the ADC divided by 0.004882813. This allows for an accurate calculation of the resistance of the sensor. In order to translate the resistance to useful human readable form, its necessary to calibrate the sensors using real life instruments and extrapolating the values to the resistance offered. Since the display does not have any backlight, an LED is connected to PORTA4 to turn on whenever the light falls below a certain threshold. 

PIC 16F88
78L05 Voltage regulator
C1 - 1uf capacitor
R1,R3,R4 - 10K Ohm
R2 - 1K Ohm
R5 - 120 Ohm
CDS Cell
Wintek WD-C2401P LCD display

Circuit Diagram:

Designed by Mindfront Technologies for    
The complete kit is available at


  1. Hello,
    Thank you for your nice sharing. The diagram is very nice. This diagram shows your hard work. Thank you for sharing your experience.

    1. Great Article Cyber Security Projects projects for cse Networking Security Projects JavaScript Training in Chennai JavaScript Training in Chennai The Angular Training covers a wide range of topics including Components, Angular Directives, Angular Services, Pipes, security fundamentals, Routing, and Angular programmability. The new Angular TRaining will lay the foundation you need to specialise in Single Page Application developer. Angular Training

  2. Hi,
    Thank you for your brilliant post. Its been a long time I could not found this types of helpful post. Its solve my problem easily. Hope your next post will be more attractive and more helpful.

  3. It is so nice of you sharin this, your extensive article and its well labeled diagram makes this posta very constructive one. Keep up the good job.

  4. Digital Thermometer is better than normal one since i think that it is more accurate and is cheap too. But both of them work fine and do their job perfectly.

  5. Thanks for sharing this quality information with us. I really enjoyed reading. Will surely going to share this URL with my friends.
    Mason Soiza

  6. Wonderful article, thanks for putting this together! This is obviously one great post. Thanks for the valuable information and insights you have so provided here. best thermometer for adults

  7. Wow, What a Excellent post. I really found this to much informatics. It is what i was searching for.I would like to suggest you that please keep sharing such type of info.Thanks BLS CPR San Bernardino County


YDLidar (lidar) X4 API in golang

YDLidar X4 This is a demo of the YDLidar using a golang API. The software supplied with the device only contains the drivers in C++ an...