DS18B20 wiring help
#1
Posted 20 December 2011 - 03:31 AM
#2
Posted 20 December 2011 - 09:50 AM
Attached Files
#3
Posted 24 December 2011 - 03:16 PM
#4
Posted 24 December 2011 - 08:26 PM
You DO need the resistor to tie the com line high, otherwise it would be floating = noise sensitive. It may work without it mos of the time but that's just luck.4.7kohm resistor you don't need to use.
#5
Posted 24 December 2011 - 08:56 PM
The resistor is required by the 1-Wire specification - when in doubt, check the datasheet, it usually contains recommended application circuits (it is not current limiting resistor on a power supply line, it is open-drain data line pull-up to ensure the logic level is high when there is no communication happening). Even though the resistor is mandatory, it does not necessarily mean the external one - you can use microcontroller's internal pull-up resistor, if it meets the 1-Wire specification requirements.I don't understand why that is stated though. The sensor says it works off of 3-5v so i don't see why one would be needed in the supply line from the N+ to the sensor.
Also, 1-Wire devices do not require external power supply, they are powered from the data line ("parasite power"). DS18B20 is kind of exceptional in this regard, it allows external power supply connection - the advantage of this is that you don't need the external MOSFET to switch 'strong pull-up' during temperature conversion.
#6
Posted 25 December 2011 - 03:46 AM
#7
Posted 25 December 2011 - 09:10 AM
Yes, these are fine.Sorry for being such a newbie but are these the correct type of resistors to use on the datalink line? http://www.amazon.co...n/dp/B0017KG038
No, the resistor should go from the DQ line to +5V (see the attached picture; it is basically connected between sensor pins 2 and 3).To wire it would one pin be in the DQ port on the sensor and the other end of it going to ground?
Marry Christmas to you too!
Attached Files
#8
Posted 26 December 2011 - 07:51 PM
#10
Posted 28 December 2011 - 05:08 AM
#11
Posted 28 December 2011 - 10:14 AM
Well, it depends - if you need to identify individual sensors, you can either check their ROM id (then you'd probably need to update the code when you replace sensor with a different one) or place each sensor on different IO port. You can have many sensors on one line, as long as you don't exceed electrical ratings (e.g. max. IO port current when they are "parasite" powered).Do you think it it would be best to have the sensors wired into the same digital i/o port? I'm going to be using 5 total.
Alternatively, you can use DS1825 thermometer, which is basically DS18B20 with 4-bit location address used for identification. Also check out Stuart's DS18*20 Temperature Sensor Auto Identity Circuit.
#12
Posted 29 December 2011 - 05:26 PM
#13
Posted 30 December 2011 - 06:58 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users