Go Down

Topic: Arduino(Output) to Arduino(Input) (Read 4574 times) previous topic - next topic

janno0718

May I ask if range 0.5m or 1m is alright from the LM35 temp sensor to the Arduino. Can i Ask what formula will i use to get an accurate measurement

winner10920

It puts out 10mv per celsius
so first you convert the 10 bit value to millivolts

AnalogRead(pin); //dummy read to get rid of possibly false reading
Rawvalue = analogRead(pin); //reading from lm35
Mvvalue = rawvalue / 5; // convert to mv

Then interpret to celsuis

Celsiusvalue = mvvalue / .01; //to celsuis mv/c

You can then convert to fahreinheit if u want or use  that
you may also want to average a punch of reading to smooth it out
But warning the adc isn't always perfect and you may get spikes from other sources, even on a short line, a longer line just means more possible interference, a small cap will help that


janno0718


Grumpy_Mike

Yes, use wire thicker than 26 SWG.

janno0718


Yes, use wire thicker than 26 SWG.


Do you have any idea what is the name of that wire?
Sorry i don't have any information about different kinds of wires.

putyn

SWG would mean standard wire gauge and a 26 SWG would be a 0.457(0.018") mm in diameter any hardware store will sell that

Grumpy_Mike

The name of the wire was Dean Wheraham, or was he in the Wire?

janno0718

Can i ask why do I need thicker wire?
How can it make my LM35 more accurate?

winner10920

Since it is an analog read, an accurate reading depends entirely on an accurate voltage at the pin, the longer and smaller the wire, the more voltage drop or loss you will get,
I would say that if you used something like 18-20 awg wire, something shielded preferably, you could have 1 meter length easily without problems,
and if you add a 10uf capacitor at the actual sensor from ground to the output, you will get nice smooth results
Using shielded wire would greatly expand your possible length,  but the need depends on the enviroment and surrounding electrical noise

janno0718

Can you guys help me. I have another question.
1.) Does the wire that you are saying is like the normal wire (solid wire)
2.) Is it applicable with 5 LM35 because i will use 5 LM35 and I will get the average temp from the 5 sensors
3.) How can I test my LM35 sensor if its accurate
4.) How can I get a temperature of 12degree celsius measurement from my LM35 (Cause I need it to test my device)

I need to get measurement of hot and cold.
I'm planning to use hair blower for the hot part. But i don't have any idea how can i get a temperature measurement of 12 degress Celsiuss.
Please help me guys.

winner10920

Yes, solid or stranded either is fine
Yes, so long as you mean 1 wire to each sensor, not 1 wire to all 5
by comparing it to another temperature sensor that you know is accurate
an ice cube will bring it nice and low, just makre sure you don't get everything wet

janno0718


Yes, solid or stranded either is fine
Yes, so long as you mean 1 wire to each sensor, not 1 wire to all 5
by comparing it to another temperature sensor that you know is accurate
an ice cube will bring it nice and low, just makre sure you don't get everything wet


Solid wire that is thick? Is that right? (Lame question: How can i connect it to breadboard if its thicker than the normal one?)
Can I compare it to room thermometer? But some of my friends say LM35 is much more accurate than the room thermometer.
What will i do to the ice cube? Thank you for the idea, but i don't know what to do.


Grumpy_Mike

Quote
How can i connect it to breadboard if its thicker than the normal one

You shouldn't be using breadboard at all if you are worrying about accuracy. Otherwise just solder a smaller wire to it and then plug it in the bread board.

Quite honestly you are worrying too much about this, it is not a big issue and those sensors are not too accurate anyway.

winner10920

Just touch the ice cube to it and watch it drop lol,
and you don't need the thicker wire for prototyping, just keep it short and simple until its time for the finished stage

Go Up