• 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.

LM35 on logomatic

Status
Not open for further replies.
Hello,

I want to log room and environment temperatures using LM35 and a logomatic V2 SparkFun Electronics - Logomatic v2 Serial SD Datalogger
Sounds easy, but I got say
0 0 361 62 61
0 0 361 60 61
0 0 361 61 61
0 0 361 61 61
0 0 361 61 61
0 0 360 60 61
0 0 360 61 61
0 0 360 60 61
0 0 360 61 61
0 0 360 61 60
0 0 360 59 60
0 0 360 62 61
0 0 360 58 60
0 0 360 60 61
0 0 360 60 60
0 0 360 61 61
0 0 360 60 61
0 0 360 60 60
0 0 360 60 62
0 0 360 60 59
0 0 360 58 61
0 0 360 61 60
0 0 360 61 61
0 0 361 59 61
0 0 360 61 61
0 0 360 58 61
0 0 360 64 61
0 0 360 58 60

0 and 0 is input on gound, 360 is a battery and the other two columns are room temperatures. Logged at 1 Hz.
Now the trouble: battery does well, but the temperature readings meant to be around 66 and they would not change by 1°C within one second.
Would I be better off using an amplifier? Or is there some trouble with the ADC inputs, resistance to low? Or pull ups needed? Its reading between 1.7 and 2.8V with open inputs.

Thanks in advance!
 

ericgibbs

Well-Known Member
Most Helpful Member
hi,
You know that the LM35 gives 10mV/Cdeg change in output.
For a standard LM35 configuration the range is +2C thru +150C.

So for a room tempr of say 20C thats only 0.2V, assuming a 10bit adc [1023]
thats [0.2/3.3]*1023 = 62 decimal, which is close to what you are reading.

You could amplify the LM35 output to give say 3.3V at 100C, this would improve the reading resolution, but not the accuracy, which is about +/-0.5C.

Look on my Forum Blog for a LM35 OPA.:)
 
can put some offset in. My trouble is that it reads the battery voltage with not much oscillations, but the temperature readings are quite whacky. Its 1Hz, I put the multimeter on, the voltage at the LM35s does not change that quickly.
Funnily the average is the same between the 2 sensors.
 
Last edited:

ericgibbs

Well-Known Member
Most Helpful Member
can put some offset in. My trouble is that it reads the battery voltage with not much oscillations, but the temperature readings are quite whacky. Its 1Hz, I put the multimeter on, the voltage at the LM35s does not change that quickly.
Funnily the average is the same between the 2 sensors.
hi,
Looking at you readings, the value in 'C' terms is only changing by about 1C.

How long are the leads from the LM35 to the pcb.??
 

ericgibbs

Well-Known Member
Most Helpful Member
next to nothing, set it up on veroboard. Thats why I am a bit concerned, finally I want to log data all over the house.
hi,
If you look at the LM35 datasheet, it gives advice/dwgs on how to use long cable conenctions to the LM35.

I would amplify at the LM35 end of the cabling.
 
yes, seen the datasheet. Should wire a 2k R in, see what happens.

Is there an easy way to amplify it by say 3? Won't be more than 70° in the roof space I hope, so would br 2.1V after amplification. Suppose I need a more decent power supply then if running 8 LM35s then just batteries.
 

ericgibbs

Well-Known Member
Most Helpful Member
yes, seen the datasheet. Should wire a 2k R in, see what happens.

Is there an easy way to amplify it by say 3? Won't be more than 70° in the roof space I hope, so would br 2.1V after amplification. Suppose I need a more decent power supply then if running 8 LM35s then just batteries.
hi,
Look at this amp.

Set the gain to give +3.3Vout at your required max temperature.

The LM35 and the amp draw very little current, use a 3 or 4 core cable system.
+V, 0V, Vout, spare.
 

Attachments

9V min, so maybe 2 stacks of accus. Lot of work (8 sensors=8 amps), should try if it works without and add the amps later. Just moved in, heaps to do in the house. Data logging is just one of it, want to check if the house improves with the things I have in mind. As long as all 8 sensors do the same I can at least see the differences. Say between outside and inside temp. (pretty much the same at the moment)
 

Sceadwian

Banned
Use a multi sample buffer and record the average instead of individual readings, room temperature doesn't change very quickly, averaging over 30 seconds or more isn't gonna hurt you any.
 
yes, could modify the logmomatics firmware to do so, just a bit much for my humble programming skills. Or use Excel to smooth it out.

I just tested the logomatic at 1Hz so I don't have to wait for too long for results. Will at the end run it at 1 reading a minute, but of course the measurements are random numbers as well.
 

Sceadwian

Banned
1hz? I thought that was what your previous sampling rate already was? I was suggesting a minute or so.
 
I want to do 1 sample per min once it is all working, but for testing a few settings I used 1 Hz first, so I don't have to wait too long to get a set of readings. But it does not matter, it comes up with these values at 1Hz or at one per minute. It should be fairly consistant readings, the 360 for the battery does nearly not change.
I have the sneaking suspicion its the batteries. Left it logging all night, it gave up after 4 or so hrs, batteries flat, sensors at 420mV for 15°C this morning. Suppose I should get a 6V power supply.
Is there a way to set the internal clock speed of the logomatic, want to set it as slow as possible, saves energy, crucial when on batteries.
 

ericgibbs

Well-Known Member
Most Helpful Member
I want to do 1 sample per min once it is all working, but for testing a few settings I used 1 Hz first, so I don't have to wait too long to get a set of readings. But it does not matter, it comes up with these values at 1Hz or at one per minute. It should be fairly consistant readings, the 360 for the battery does nearly not change.
I have the sneaking suspicion its the batteries. Left it logging all night, it gave up after 4 or so hrs, batteries flat, sensors at 420mV for 15°C this morning. Suppose I should get a 6V power supply.
Is there a way to set the internal clock speed of the logomatic, want to set it as slow as possible, saves energy, crucial when on batteries.
hi,
To get a meaningful steady reading from the LM35 or any other sensor its advisable to get say at least 8 or 16 samples and take an average of these samples.

As I explained yesterday a 1Cdeg change will give a 10mV change in output of the LM35.

So, [0.01/3.3] * 1023 = 3 [decimal] change in adc value per 1Cdeg.
The specified accuracy of the LM35 is +/-0.5C.
 
hi,
As I explained yesterday a 1Cdeg change will give a 10mV change in output of the LM35.
but it does not change its mind within 1 s by about 15mV. Anyhow, will do the RC thing as shown in the datasheet.
Tor the time beeing I will use Excel to do the smoothening, but the nicest way would be so modify the logomatics firmware to do that job.
 

ericgibbs

Well-Known Member
Most Helpful Member
but it does not change its mind within 1 s by about 15mV. Anyhow, will do the RC thing as shown in the datasheet.
Tor the time beeing I will use Excel to do the smoothening, but the nicest way would be so modify the logomatics firmware to do that job.
Im not saying it changes its mind in 1sec, I'm trying to point out that the changes you are seeing on the '60' number set are within spec, especially as you taking one sample together with any background noise that will be present.

Thats why sampling is the best way to get a steady average, I agree that changing the program would be the best way.:)
 
I would not mind that in 60s. But, first I did some tests at 1Hz, just to check a few things. Just too long to wait if you set it to 1min. And already then it comes up with these values as shown. If the LM 35 is 0.5° out of whack it will be that all the time, sort of once too small, always too small I assume. Mostly these specs are just to cover the manufacturers rear ends, does not mean every sensor is 0.5° off. Actually I measured only about 1mV difference between two sensors that are just 2cm apart (so, no way there will massive temperature differences between them).

Logomatics source code is open source, so one can program a buffer if one can.

Anyway, bought a 9V power supply, just in case. The sensors can handle that, gives me room for amplifierers and for the board I throw a 5V voltage thingy in.
 

ericgibbs

Well-Known Member
Most Helpful Member
hi,
Im not saying there is any tempr diff between the two LM35.:)

I use the LM35 a lot and they do vary at least +/-0.5 between adjacent sensors and they do vary +/-0.5C over +2C thru +100C, for home use this isnt a problem.

They will work at +9V ok.
 
measured 221mV versus 220 mV on the two on my vero board.
Anyhow, all I want to do is measure outside temp, roof temp, subfloor temp and a few rooms and see what happens during the day and what results I get from doing what to my rice paper house. So I will get some graphs and if the logomatic has some offset would not matter because all the graphs have the same offset. So I still would see if the inside temp differs to outside and roof (which is hardly the case at the moment, hence 12kW airconditioner)
 

ericgibbs

Well-Known Member
Most Helpful Member
measured 221mV versus 220 mV on the two on my vero board.
Anyhow, all I want to do is measure outside temp, roof temp, subfloor temp and a few rooms and see what happens during the day and what results I get from doing what to my rice paper house. So I will get some graphs and if the logomatic has some offset would not matter because all the graphs have the same offset. So I still would see if the inside temp differs to outside and roof (which is hardly the case at the moment, hence 12kW airconditioner)
hi,
For outside you could use the modified circuit from the datasheet, -55C thru +150C.
The only draw back is the output is taken from the Vout and raised 0V of the LM35.

Have you looked at the LM135 spec.?
 
Status
Not open for further replies.

Latest threads

EE World Online Articles

Loading
Top