how to measure temperature using lM3555?

Tahmid

Joined Jul 2, 2008
343
What do you mean measure temperature?
You keep it lying there, it'll measure your room temperature.
Take a candle near it (not too close, keep it some distance farther away) and you'll see an increase in reading.

Hope this helps.
Tahmid.
 

corsair

Joined Mar 6, 2010
51
No, you're not going to need to dip it in hot water, lol. The way temperature sensors work is that it has variable resistance, depending on the temperature. For example, the higher the temperature it senses, the more resistance it will put out. This can work either way depending on which temperature sensor you will be using. Using a potentiometer to test this would be highly recommended.

I just did a project on it, and although this may not be the best way, the way I did it was this:
1) Set up the ADC (Analog to Digital Converter) on the PIC

2) Determine where you want the input to come from (aka the temperature sensor). I used AN0 of Port A.

3) Program it and test with a potentiometer so that it can convert the AD signal (0x0-0x3FF) to something useful, such as voltage or current.

NOTE: After you get your ports and stuff set up (something I'll let you figure out, hehe), your result with be located in the registers ADRESH and ADRESL (at least with the PIC18F4550). I would suggest learning to do this in C because it's a headache in assembly. I used a mix of the two since I started with assembly. After I set up the ports in assembly, I just did the math in C, and called it from my asm code.

4) Create (or find?) a look-up table according to the sensor's datasheet. This is where the voltage/current you calculated in step 3 will be handy. By using this voltage/current, you can look at the table, see what the temperature should be, then display it. Voila!

If you want to know how I progressed through this, just browse around on this forum somewhere rather recent. It will have a bunch of noob-questions that I asked these guys while I was going through it. Good luck!
 

Tahmid

Joined Jul 2, 2008
343
Hi jyothi,
The lookup table Corsair talks about, is quite easy if you use an LM35. As, LM35 output voltage (in mV) = 10 * temperature.
So when you read your ADC value, your calculation should be like: temperature = voltage (in mV) / 10.

Hope this helps.
Tahmid.
 
Top