THERMO LM35 DZ with PIC16F877

Status
Not open for further replies.
just to double check eric

my new code with the ones output a low for PNP type.. is it correct now? for the above posted diagram which has PNP transsitors
 
eng1 said:
Hi Eric, is your observation directed at me? I totally agree with your point of view.

hi eng1,
No, it was just a comment to re-enforce to Derrick the limitations of using PIC sims..
 
derrick,
Which lines did you change?

I had to cut and paste the original, losing the formatting, had to reformat a line at a time.!
 
LOL sorry eric ... the ones in bold is the one i have changed and added ( at the display subroutine)

 
hi derrick,
Thats a lot better.
Digit select from msd to lsd is C2,C1,C0, nice regular selection on SIM.

Results:
0.25Vin = 025
0.5V = 051
1.0 =102

Is this what you are expecting?
 
yea thanks a lot eric and the rest who have helped me... i must try in on the real hardware first.... thanks a bunch guys... might have some problems then i will post them as i need guidance... thanks a bunch!
 
if u need to measure room temperature,

then u can measure 0-100C temp easly w/o any software calculations

if u get 10mv/C then use an op-amp with gain 5, so max voltage to input be 5000mv = 5V (for 100C temp)

n use internal reference to VDD = 5 volts

so u get exact reading in 10bit ADC

e.g

At 30C, LM35 gives 300mv then op-amp will give 1.5V. on ADC

10 bit shows u around 300, convert it to Digits n place decimal.
 
Hi guys, it works perfectly well and i have some questions to ask,

why must we put a 1kohm resistor at the RC0,Rc1 and RC2 pin of the PIC microcontroller?

how come the resistor value which I put, 470ohm at the RB0- RB7 differs from the 1kohm resistor at RC0-RC2.... ?

what is the purpose of having this resistors for?

thanks in advance
 

They are all current limiters, the 1K's limit the base current to the transistors, and the 470 ohms limit the current to the LED's.
 
derrick826 said:
why must we put a 1kohm resistor at the RC0,Rc1 and RC2 pin of the PIC microcontroller?
They limit the current into the base of the transistors when they're switched on.

derrick826 said:
how come the resistor value which I put, 470ohm at the RB0- RB7 differs from the 1kohm resistor at RC0-RC2.... ?
The 470 ohm resistors limit the current into the LEDs.


The two values (1k and 470) are calculated with the same formula (Omh's law) but with different values of current and voltage drop accross the resistors.
 
so your are actually saying that if i do not put any resistors, the current flowing to both the transistors and the LEDs are big and therefore it might damage those components for a long period?
 
blueroomelectronics said:
X4ce your math is off, the A/D has 1024 steps not 1000. The ideal solution is a vref of 4.096 V

thx for reminding me that , i know there r 1024 steps in 10bit A2D.

BTW he needs to measure room temperature, don;t need any high accuracy.
 
negative temperature reading

Hi, I wanted to add a negative temperature reading into this project. what will I add in the circuit? tnx
 
Hi, I wanted to add a negative temperature reading into this project. what will I add in the circuit? tnx

Hi,
The LM35 in the basic configuration only goes as low a +2Cdeg.

If you look at the datasheet you can add 2 diodes and a 18K resistor to get as low as -55Cdeg.
The only problem is that the output from LM35 is from the top of the 2 diodes and the LM35 output, so the signal is not referenced to 0V.

A better choice of sensor is the LM135 that output values related to Kelvin.
 
If you want to avoid A/D conversions and want the temperature values directly in digital format, you can try DS1820 1-wire device. I have used it with PIC16F628A microcontroller which does not have in-built A/D converter.
- Raj
Experiments with PIC16F628A
 
This is my circuit. The button is for switching between C and F


Ive tried doing what's in the datasheet (adding the diodes and res) to be able to measure negative degrees. I think I can work with the negative, just altering my codes. But now, the problem lies with the positive ones.
**broken link removed**
 

Attachments

  • neg.jpg
    44.5 KB · Views: 263
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…