Forum 2005-2010 (read only)
(Read 1 time)
Oct 22, 2006, 06:49 pm
I have a bunch of these 1-wire temp sensors from a dead PIC project.
Any ideas on how I may interface them to one of the Arduino boards
DS18B20 is the temp sensor
Oct 22, 2006, 07:52 pm
hmm, one wire? they'd have to have two to actually do anything, and then they'd be thermistors, in which case they'd be variable resistors.
1. measure their resistance at room temperature.
2. find a fixed resistor with that measured value (or something near it)
3. connect one between VCC and an analog-in on the Arduino
4. connect the fixed resistor between analog-in and ground.
This makes a voltage divider based on the value of your thermistor, and the numbers from reading the analog in will have a linear relationship to temperature. you just have to find out what that relationship is and write a function to translate. I keep everything integer in my thermistor readings to keep things simple. Thus 989 means 98.9 degrees Fahrenheit, etc.
Oct 22, 2006, 08:31 pm
1-wire is a bus networking system from Dallas semiconductor.
it is a thermistor attached to a its own A/D converter,
and the sensor I was talking about is here
Oct 23, 2006, 08:01 pm
i'd save those for a non-Arduino project, since the A/D would be wasted on it. it's too easy to just use a cheap thermistor.
Oct 23, 2006, 08:04 pm
unless, of course, you're making a generic USB-to-one-wire interface with an Arduino board. that would be a useful gizmo. i imagine the protocol is some sort of serial thing with device addressing, sort of like usb but half-duplex.
Oct 23, 2006, 08:22 pm
The rreason they are so very very useful is that several dozen or even hundreds can exist on a single digital pin, and they can be placed any distance away from the processor (within reason) and not suffer any ill effects from the buildup in wire resistance.
So instead of 4 or 5 analog thermistors connected near to the board you can have 100 and never use more than 1 digital pin to do it.
each sensor is individually addressable using its 64bit address
Oct 24, 2006, 12:52 am
Dunno about the software part of your question. I guess you need to code the 1 wire protocol by hand.
Oct 24, 2006, 01:16 am
I have a thread running in the software interface section now.