PDA

View Full Version : 16F88 and temperature sensor



DynamoBen
- 26th September 2005, 18:38
I have one open pin available on a project I'm working on. I would like to add a temperature sensor to give me air temp. What is the best option to go with?

I've looked at the LM35 but it requires a negative source to utilize the full range....thats not an option for me. Thoughts?

CocaColaKid
- 26th September 2005, 20:00
I found the DS18B20 to be quite a nice chip to play with. This one has 0.0625ºC increments with a range of -55 to +125ºC. The best part is that all the data is in a digital format.

DynamoBen
- 26th September 2005, 20:54
Pretty pricey for what I'm doing. I don't need several sensors....just one.

achilles03
- 26th September 2005, 21:50
What other peripherals do you have on your current project? You may be able to share a clock pin, or a data pin, with another peripheral. For instance, if you have an SPI eeprom, you can share the clock and data lines, and whatever you do with those two pins is transparent to the eeprom so long as the chipset is held high. In other words, you might not be limited to 1 pin.

Dave

DynamoBen
- 27th September 2005, 02:00
I currently have a switch, LCD (4-bit), DS1307, MAX232. This gives me one open, unused pin.

Darrel Taylor
- 27th September 2005, 02:54
You might use a LM75A, and put it on the I2C bus with the DS1307, and you'll still have a Pin left.
<br>

DynamoBen
- 27th September 2005, 03:13
My big concern with IC based sensors is that I will only be able to get the temp of the inside the project box everything is going into. I'm thinking I need something that I can either use remote or attach to the side of a metal project box.

markedwards
- 27th September 2005, 03:28
DynamoBen

I use LM34, AD592 and AD590 solid state sensors. The AD592 and resistor makes a simple wide range sensor into an analog input. I am currently using an inexpensive 10K NTC thermistor, 10K fixed resistor voltage divider connected to an analog input on a 16F819. I get approximately 6 counts per degree F resolution. The NTC thermistor is not linear so I use a lookup table. My current application only requires a 30F control window.
I also use the hardware PWM to control 400 watts of fan motors based on temperature and it works excellent.
I also recommend Darrel Taylor's averaging routine. It works great!
http://www.pbpgroup.com/modules/wfs...php?articleid=7

Mark

Darrel Taylor
- 27th September 2005, 04:49
Actually, it's ...
http://www.pbpgroup.com/modules/wfsection/article.php?articleid=7

I know it looks the same, but the link is different.

Thanks for the referral.
<br>

Acetronics2
- 27th September 2005, 07:32
I've looked at the LM35 but it requires a negative source to utilize the full range....thats not an option for me. Thoughts?

Hi, Ben,

Did you had a look to it's brother : the LM335 ...gives Kelvin degrees. A 273.15 °C offset is easy with the PIC !!!
You also have the SMT 160-30 ...with a PWM output.

Alain

DynamoBen
- 27th September 2005, 14:10
I've been pouring through the LM335 datasheet. Its starting to look like a really good option. Price looks good...range looks good.

Any gotchas with this one? Disadvantages?

Acetronics2
- 27th September 2005, 14:29
Hi, Ben

The Only disadvantage WAS in Analog meters : needed to have a precise 2.7315 ref voltage to calibrate ( TL 431, generally ...).

nothing to add, except it's analog ... take care with long cables, if so ...

Alain

DynamoBen
- 27th September 2005, 15:56
I'm looking to do time and temp on a motorcycle. Originally I was looking at the I2C temp ICs. This was due to the fact that they are easy to interface to and are fairly accurate. However my concern is protecting the electronics from the environment and getting fairly accurate outside air temp. (within a degree) However if there is a way to use these ICs and keep the rest of the electronics out of harms way I'm all for it.

This is what started my thread. My hope is that if you know my application that will give you insight into what I'm trying to do.

CocaColaKid
- 27th September 2005, 20:10
I run the DS18B20 using the parasite power option and a 22 AWG twisted pair cable with adhesive lines heatshrink over it. The heatshrink seals the sensor making it perfect for harsh environments. Yes they are expensive but I found they work perfect and you don't need to calibrate anything :)

picnaut
- 27th September 2005, 20:55
Hi,

Analog Devices make a current-based temperature probe called the AD590.
It takes a bit of signal conditioning at the processor side, but you can run the sensor for a hundred feet on a twisted pair. It comes in a small 3-pin package (ideal for heat-shrinking) and is highly resistant to noise.

Here are some links:

http://www.picbasic.org/forum/showthread.php?t=3595&highlight=AD590

http://www.picbasic.co.uk/forum/showthread.php?t=1726&highlight=AD590

http://list.picbasic.com/forum/messages/5820/6521.html?


Good luck!

DynamoBen
- 27th September 2005, 22:58
"22 AWG twisted pair cable with adhesive lines heatshrink over it"

What do you mean by adhesive lines?

CocaColaKid
- 27th September 2005, 23:45
Oops, that should have been lined, not lines.

Acetronics2
- 28th September 2005, 10:30
I'm looking to do time and temp on a motorcycle. Originally I was looking at the I2C temp ICs. This was due to the fact that they are easy to interface to and are fairly accurate. However my concern is protecting the electronics from the environment and getting fairly accurate outside air temp. (within a degree) However if there is a way to use these ICs and keep the rest of the electronics out of harms way I'm all for it.

This is what started my thread. My hope is that if you know my application that will give you insight into what I'm trying to do.

Hi, Ben,

There's no problem on a bike ...I have such a thermometer home for outside temp, a silicone seal and therm schrinkable protects the LM from snow and rain for now 15 years !!!
I think it would be convenient to use shielded cable ( for Alarm wiring i.e. ) not to be disturbed by the ignition system ( ? )

If I understand you well , you're looking for a freeze alert smart device ... isn't it ???

read you soon
Alain

DynamoBen
- 28th September 2005, 14:05
I don't really care about the freez alarm.

Just looking for an outdoor ambient temp when riding. Because everything is going to be in a water tight project box I will need to somehow get the sensor into the air outside the box. (inches at best)

webstern
- 28th September 2005, 19:57
SMT160-30 only need power, ground and signal.

Dave
- 29th September 2005, 11:44
Why not look at the Analog Devices TMP-03. It outputs a ratiometric pulse which can be measured with PULSIN. They make real nice remote sensors and only use 1 pin. I ues them in an weather station I designed and also in my house to control the zone temperature of my hot water heating system.

Dave Purola,