Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help with PIC16F716 and thermistor

Status
Not open for further replies.

tomishome

New Member
Hi,

I'm a Physics degree student with no real experience of digital electronics. Part of my project involves making a temperature measuring system which can operate over a range of -10 to 100 degrees celcius. So far I have managed to preform an analogue to digital conversion (via a PIC) on an LM35C thermistor. I then output the digital value via RS232 to a PC.

The problem is the range of values I get out. The voltage on the signal pin of the LM35C ranges between approximately 0.24V at room temp to 0.51 V at approximately 60 degrees C. This seems ok however this only corresponds to a small change in the PICs digital output.

At the moment I have set the PIC output to be a 3 digit number between 0 and 255. This means that I should get 256 divisions in the thermistors range, right? However, the above temperature change only gives a digital change of 15!!!

Does anyone know how I can fix this without Op-amps?
Will lowering the the Vref on the PIC fix this problem?
If I do lower Vref for the A2D will I increase the error on the A2D significantly?


All help gratefully received.

Tom
 
I'm actually working on temperature sensing too. Lowering Vref will help you resulting in doubling the resolution. Therefore you will get a change of 30. This corespodents to 2.5V Vref and 10 Bit A2D resolution. If you use lower Vref, it should help more, but A2D's resolution may drop to 8 bits. Better solution is to use OP amp, to amplify it so you will get 5V @ 100C. You can try to use 2 bottom bits from the A2D, but it will be not as acure as with using OP amp.

BTW: Using OP amp is not a big deal, it's simple and elegant solution, and you can get full 10Bit resolution.
 
Hi

I made this one in last year, to monitor my aquarium temperature !
Since my tropical fishes really don't like water below +2C I had no reason to worry for the full scale range.
On the 1st pic you can see, basic config only give you +2C-- +150C
To get the full scale see the 2nd pic !

I designed my shc from the 3rd pic.
Did not have LM385 or other precision ref, only the Lm431 in my parts bin.
@+2C the output is +20mV, @ +102C +1020 mV,
there is 1000mV to use.
10bit =1024, 1000/1024=0.99609375 ~ so 1mV/bit if your refV is 1024mV

If your AD read 256, the C=256/10=25.6, if 258 then C=258/10=25.8
@1024 C=1024/10=102.4~

I hope this help :idea:

Don't ask for the CODE, I wrote it in BASIC, and the PIC molded in epoxy with the tepm sensor and collecting algae in my aquarium :lol:

Use this only as reference, I don't make documentation for myself !
There might be error's or flaw in my design !!
Works for me !! :wink:

STEVE
 

Attachments

  • ttdc.gif
    ttdc.gif
    12.1 KB · Views: 933
  • full_range.gif
    full_range.gif
    5.7 KB · Views: 809
  • basic.gif
    basic.gif
    6.1 KB · Views: 817
hi guys
m making a temprature sensor project
using LM35DZ and PIC16F716
THE output is to be displayed using 8 led
it is to measure room temprature
can some one help with the circuit diagram and pic programming
thanks
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top