Does anyone have experience with temp. sensors?

Hi Guys, I'm part of an open project that is doing some automation for astronomy/astrophotography using an arduino (mega probably) 1 part is an electronic focuser, which someone else is mainly dealing with at the moment, one of the other parts is an automatic dew heater controller, which I am dealing with. The dew heater controller supplies power to a 'heat tape' that is wrapped around the telescope tube where the objective (piece of glass that faces space) is, its purpose is to stop the glass from dewing up or worse still frosting over :confused:

I've already coded something using an LM35 derivative, I'm not really that happy with the sensors, firstly because I bought ones that do 0-100C and these will be used below 0 and I'm not so keen on their accuracy, so I am looking at these:
http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=4&products_id=11
as they give me humidity as well which would give me dewpoint and be a lot more efficient than my current method of setting a threshold temperature and once the scope drops below that threshold (say 1deg above ambient) the heater turns on until its warm enough.

I only need 1 humidity sensor but I will need 1 temperature sensor for each telescope (currently 3 in my imaging setup), does anyone know if there is a comparablely accurate and easy to use temperature sensor like the sht11? I'm hoping that this will reduce costs, as our unit will be modular and it's not unusual for people to be running 3+ scopes at a time.

Would this be sufficient:
http://www.nuelectronics.com/estore/index.php?main_page=product_info&cPath=4&products_id=5
does anyone experience of either/both of these sensors?

Regards,
Reggie.

Alot has been done using the Dallas one wire sensors. Do an Arduino DS18B20 search there is a lot of information out there. Also, check the playground

-wes

Paste "DS18B20" into the search box up the top-right corner of this page, and you'll find multiple threads on the cheap but excellent DS18B20 temperature sensor.
Those threads have plenty of working code and examples too.

I'm not looking for code examples, I'm looking for peoples personal experiences with either/both of these sensors.

I've used the DS18B20. What do you need to know?

Very reliable. 1/2 degree C accuracy for most applications and I have tested it to be fairly true even during fast temperature changes.

Since they are all independently addressable you can use multiple sensors along one parasite power/serial wire and use a standard digital pin on the arduino. I wish more of the one wire products were carried by electronics suppliers that allow single part purchases.

I haven't used the settable alarms and don't think they are part of the one wire library for arduino (arduino will have to run the alarm code or you can make the library complete) If you want a simple alarm code let me know as I made a sketch to sound a buzzer over a high temp. limit or light an LED below a low temp. limit after it has been converted to fahrenheit.

From The data sheet:

Measures Temperatures from -55°C to +125°C
(-67°F to +257°F)

±0.5°C Accuracy from -10°C to +85°C

Data sheet available at:
http://datasheets.maxim-ic.com/en/ds/DS18B20.pdf

Thanks Ribster, that's sort of what i needed to know, being a n00b it's hard to know what questions you actually need to ask about a product. Accuracy was my main concern, I'm going to use at least one of the SHT11 units, this gives me the humidity and ambient temperature measurement from which I can derive the dew point. we're trying to keep costs down with our end product, so looking at the DS18B20 to measure temp for all of the devices that need heating, reducing the costs considerably.

The settable alarms sound interesting, although not entirely sure we would use them as we would be using any triggers in the arduino itself to turn our heaters on, also i think the alarm levels on the DS18B20 would depend entirely whats going on with the SHT11.

What would you define as being a fast temperature change?

It's quite a thin line that astrophotographers have to walk with regard to dew, you need the scope at a level temperature that sits above the dew point, crucially you need the temperature to remain fairly constant as well, as thermal currents create a micro-lensing effect that can play havoc with your images.

I've used the DS18S20 (slight variation on the DS1820), reliable, accurate, easy on arduino resources. No problem :slight_smile:

Several live graphs using them here :

http://pluggy.is-a-geek.com/index.html

There have been doubts expressed on here about the readings validity and long term accuracy of electronic humidity sensors, even to the extent of using a wet bulb, temperature sensor and a fan instead.

Hi Reggie,

It looks like I'm doing the same types of things you are. I am building my own focuser controller using an Arduino and parts from a Starlight instruments focuser. I hate to think I'm reinventing the wheel here if it has already been done. Would you guys be open to sharing what you have accomplished so far?

Regards,
Derek

Of course Derek, we are all about sharing our work, I wouldn't worry too much about reinventing anything, I think that's why we all started down this route as a lot of what has been done needs updating to move with the times and reduce costs.

We've started a yahoogroup http://tech.groups.yahoo.com/group/sgl_observatory_automation/ you are more than welcome to join us.

We've not got a lot of data so far, we're looking at the focuser, motors (servo, dc, stepper) and providing support for each type as well as ascom support, the project is modular, so we are doing a dew heater controller, there may be a thermopile cloud dectector if it is viable as well, this may in turn incorporate an 'smart' intervalometer for canon/nikon DSLR cameras.

Pluggy, thanks for that, accurate humidity sensing would be an issue, then again it will be in open air, anything approaching fog/mist/rain will result in in a wary eye on the sky and the chance that all the kit gets packed away pronto. reading through the posts the only issue seems to be with using longer cables on the SHTxx sensors, where there is a timing issue (which is easily fixed) and possibly multiple SHTxx devices, we only need 1 + the DS sensors :slight_smile:

Reggie,
you'll find reasonable priced SHT11 based modules and lots of related information at WBA Consulting - Sensirion SHT11 Temperature/Humidity Sensor Module

He's had these modules working at "200+ foot stretch" using Cat5 cable.

That's a very good length of cabling :slight_smile: I went and bought one from a UK supplier, for about £8 so comes in about the same sort of price. It works very nicely indeed, so it should help to keep the telescopes nice and dry.

Just need to get my 3 dallas sensors stable now.

Just need to get my 3 dallas sensors stable now.

What's the issue?.

If it's unreliable comms, then it's probably a cable length issue. Read what Maxim say about this:

"The 1-Wire® communication protocol can be generated with an IO pin on a microprocessor; however, care must be taken to provide the correct timing and proper slew rates to create a reliable 1-Wire network.
Improper timing sent by the 1-Wire master may cause communication with 1-Wire slave devices to be intermittent or fail altogether. Uncontrolled slew rates can severely limit the length of a network and
create sporadic behavior. If a serial communication UART is available, using a serial-to-1-Wire bridge (DS2480B) will eliminate these problems."

Basically, your microcontroller communicates with the DS2480B using serial (over Cat5 cable), while the DS2480B communicates with your DS18B20s using the 1-Wire® communication protocol (over short cables).

Read http://pdfserv.maxim-ic.com/en/an/AN192.pdf and http://datasheets.maxim-ic.com/en/ds/DS2480B.pdf

my cable length is about 6 inches at the moment.

I have used a CAT-5e cable with one end cut off, about 5' long, with a sensor on one end and the other end plugged into my Duemilanove, and my readings seem perfectly stable. What is happening with your readings? What code are you using?

Hi, I'm using the Dallas Temperature Lib, I have 3 sensors, sometimes only 2 of them get seen, when this happens the 2nd or 3rd instance actually 'discovers' the first sensor again and I get 2 of the same serial number/data sensor show up.

I've been discussing this issue in another thread and pretty much come to the conclusion that whilst the library has all the functions I need it will be far quicker and easier to write my own code from the ground up. Seems easier to write the functions that work out how someone expected theirs to be used with minimal explanation of the function.

Try taking a look at this
http://docmorbius.net/arduino/libraries.html

Thanks DocMorbius, there's some neat ideas in your code and it looks small and compact, the only function I have issue with really is getTempC, it has delay(1000) which is not good for my system to be tied up that long but it does look very promising though much more compact and lightweight library than the dallasTemperature lib.

Reggie,

Thanks.

The delay(1000) is there because the Dallas Datasheet says that in parasitic power mode (where the chip is powered by the data flowing
in the protocol, and not by a separate power wire), the software must wait for at least 750ms after issuing the command to start the conversion until it reads the data. There is a mechanism mentioned in the datasheet for polling the chip to see when the data is ready but only when not using parasitic power. I have not experimented with this, so the code doesn't attempt to use it. You could try shortening the delay to 750 and see if that works reliably. If you (or anyone else) figures out the polling mechanism and would like to submit the code to do that, I would be happy to incorporate that into the library, and give due credit of course.

Hi Doc, I can't submit any code, I don't feel I am compentent enough with the subject, however, my suggestion would be to take the getTempC function and split it into 2 extra ones, requestTempC and retreiveTempC the former starting the conversion and the latter gets that information, this would leave the user to set the delays according to the resolution specifications. This would give your library flexibility without having to

or you could take try looking at the other dallas library MilesBurton.com

he has a method where he sets flags on the sensor but again I haven't quite worked out how to setup the sensors how I want them, 1 slave gets a global temp request, all sensors convert at the same time, then its just a question of waiting the 750ms and grabbing the result. I thought I had it working last night.

Try this library, it is the original library with some modifications, including setting the resolution on the B series chips for a faster conversion.

http://download.milesburton.com/Arduino/MaximTemperature/DallasTemperature_250.zip