Pages: [1]   Go Down
Author Topic: Wrong temp sensor value when using Ethernet shield  (Read 856 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am reading two temperatures with my Arduino using LM35 and KTY81-210 (http://arduino.cc/playground/Main/Kty81-110) sensors. It works ok, but when I put Ethernet shiled on Arduino and try to read temperature its not working, I get very wrong values.
I measured a voltage on LM35 and its about 4V but it should be 0.27V like it was when I didn't use Ethernet shiled.
What is wrong here? Why I get wrog data when I put Ethernet shiled on Arduino?
I am using Arduino Uno.
« Last Edit: August 18, 2012, 06:32:13 pm by uzo007 » Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 205
Check twice, etch once
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Could you provide some more information, like what pins you're using.

If you're using A0 like in the tutorial: That pin is used by the ethernet shield.

Try changing the pin to A2-A5
Logged

Offline Offline
Full Member
***
Karma: 0
Posts: 205
Check twice, etch once
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

If you're using the basic code, just change
Code:
float read_temp = kty(0);
to
Code:
float read_temp = kty(2);
and connect the sensor to analog pin 2.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 3
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thank you very much for the answer. That was the problem, I was using pin 0 and 1.
I was reading on http://arduino.cc/en/Main/ArduinoEthernetShield about Ethernet shield and I didn't read nothing about Ethernet shield using analog pins only for digital pins.
Thank you again lyron.
Logged

Tasmania - Australia
Offline Offline
Sr. Member
****
Karma: 10
Posts: 298
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm curious, can someone point me in the right direction to where it mentions the ethernet shield on the Arduino uses analogue input 0, (A0)?
I use a freetronics EtherTen, which they say as being "100% Arduino compatible with onboard Ethernet".
With this EtherTen, I use the first few analogues to read in sensor voltages in my program.
The program crunches and does a little pid stuff and makes all this available to see with a http request.

From what I understand, you should be able to use A0 or any of the other analogues with the Ethernet shield installed.
Why wouldn't it be mentioned it the description of the Ethernet Shield as posted by uzu007?
I wish to be enlightened   smiley-confuse
Logged


Offline Offline
Full Member
***
Karma: 0
Posts: 205
Check twice, etch once
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I use Shieldlist to find info about shields.

According to their info, your shield only uses D10-D13.
Logged

Pages: [1]   Go Up
Jump to: