Measuring temperatures below 0grade with LM35

Status
Not open for further replies.

soulraven

New Member
how you can help me do some measuring temperatures below 0grade. I need 4 sensors in the project. Until most recently I was racked with ds18b20, but we do nothing, and I appeal to the LM35.
Theoretically I could have something to do offsfet the output voltage variation that you have voltage between 0V (-55grade) and 5V (150grade)
I use pic16f877a​
 
fail to read 4 sensors separately, and separate ROMs. I did nothing after more than 3 weeks of work
 
example I know, but I do not want this solution because I have blocked the ports of entry by other applications.
find a solution quickly and with one signal line temperature​
 
yes, but we managed to make 4 sensors to function normally and delay as low as. Can you help with code for functional ds18b20 for more sensors?​
 
Sounds like a school assignment. There are 100s of 1wire examples on the net for PICs. Lots within these forums too.
Post the code you've done so far.
 
Last edited:
no, not the school project, we plan to make a minicomputer car.
Temperature oil / water / In / Out
Voltmeter, turometru, dimmer Ceiling, litrometru tank
 
use the code below, it seems that now goes not legas good resistance, but now the negative voltages are displayed are ill-0grade post 67grade.
Where is wrong?
how can I do to read 4 sensors at the same time?

Code:
#byte porta = 5 
void main ()
{ 
int16 degC; // this one...
   int16 TempVal;

   set_tris_a(0xFF); // inputs

   // ADC SETUP
   setup_adc_ports(A_ANALOG); // A0 A1 A2 A3 A5 Ref=Vdd
   setup_adc(ADC_CLOCK_INTERNAL); // Internal 2-6us
   set_adc_channel(2); // use AN2

   while(1) {
      delay_ms(1000);
      degC = read_adc(); // *****
      TempVal = (degC - 559L) / 2;
      printf( "Temp is %2lu DegC.\r\n", TempVal);
 
The DS18B20 is a digital 1 wire thermostat, your analog code won't talk to it.

If you want to use an LM35 you must have each one connected to an analog input pin, RA0 thru RA3 would be a good choice.
 
yes I know that code that I gave is for lm335.
just do not know how to solve the problem as negative temperatures to adjust the code for 4 sensors ....
 
schematic is very chaotic right now, I simulate in Proteus ISIS, but the temperature sensor inputs are
AN4, AN5, AN6, AN7.
Temperatures are used all along, I want to appear all together on display.
Then on the same display but other interfaces tachometru, tension and gastank liters
 

hi,
When using the -55C thru +150C configuration of the LM35, its a 'differential' output, ie: LM35 0V [via the 2 diodes] and the LM35 output.

Use a AD623 instrumentation OPA, this will give a single ended output for the PIC's ADC... Use the AD623 'Ref' to offset the output as required.

OK.?
 
lm335 know, but in the meantime I decided to try and LM335 ...... but how to proceed with the conversion? have to put something before OP?
I know that negative temperatures and the output voltage is still positive for LM335​
 
lm335 know, but in the meantime I decided to try and LM335 ...... but how to proceed with the conversion? have to put something before OP?
I know that negative temperatures and the output voltage is still positive for LM335​

Hi.
Are you asking how to amplify the signal from the LM335 before the PIC's ADC input.?
 
yes, actually the question is largest:
- Which is what the best way to connect with LM355 and Vref can measure negative temperatures
- How can I use 4 sensors on the same PIC, how to make cod

We can discuss an IM?
 

hi,
What code have you written, and in what language, assembler or 'C'
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…