Pages: [1]   Go Down
Author Topic: Need to monitor temperature sensor  (Read 1223 times)
0 Members and 1 Guest are viewing this topic.
South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 403
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I need to monitor temperature in a closed area in another room.

Looking at something like a LM35DT/NOPB sensor : http://za.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=5359458

I am using existing cabling from my breadboard ( where my Mega is located ) - it is a 12 core cable used for domestic alarm systems.

What would be a safe maximum distance (if distance would be a factor) that the sensor could be away from the board and still get a reasonably accurate reading. Will be powering the sensor with 12VDC.
Logged

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

For something like 40' or so... maybe even 70' at a pinch...

Consider the Dallas 1-Wire chips, e.g. the DS1820.

They aren't so hard to use as you might at first think.
Logged

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 403
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks tkbyd

I see the DS1820 available from my online supplier.

Although a lot more expensive than the analog sensors, I 'think' the digital signal would be less affected by the length of the cable from board to sensor.

Do you possibly have a wiring sketch for connecting these to a board ( digital or analog input ? ) and any sample code to get the temperature reading from the sensor into a variable in the code would be very greatly appreciated.

This is for a home DIY project and I need to get all my parts ordered online together to reduce delivery charges.
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13478
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Check out the - http://www.milesburton.com/Dallas_Temperature_Control_Library - for the DS18B20 as it contains many working examples. If you have multiple sensors and you have pins to spare it is possible to have multiple instances of the Dallas lib (I tried it recently) . This way you dont need the addresses, as there is only one sensor on the one-wire bus.

wrt length my max cable was ~ 4 meters / 13 feet , was a single sensor.

Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

South Africa
Offline Offline
Sr. Member
****
Karma: 2
Posts: 403
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the replies and guidance.

It looks like the DS18B20 is the route to go, and will probably be using the external power setup due to the distances involved.

Can you tell me if it is possible to isolate the data line from the sensor to the boards input pin with an optocoupler ? 

If so, what would be the best part number to use ?

Would the Vcc and Gnd for the sensors need to be from the board, or can it be from a seperated power supply, or do I just need a common ground ?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 211
Posts: 13478
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Would the Vcc and Gnd for the sensors need to be from the board, or can it be from a seperated power supply, or do I just need a common ground ?
never tried that for a DS18B20 but your common ground proposal at least seems to make sense. Let us know your results.
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Sussex UK / CT USA
Offline Offline
Edison Member
*
Karma: 0
Posts: 1028
Forums forever
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Can you tell me if it is possible to isolate the data line from the sensor to the boards input pin with an optocoupler ? 

That won't work in any simple scenario...

Both the Arduino and the DS1820 "hanging" on the data line need to be able to pull the data line low. The pin switches between being an input and being an output.
Logged

Pages: [1]   Go Up
Jump to: