While this is a lot more resistance than the 4.7K ohms specified for the 1-Wire pull-ups, we can still make it work for many cases. These internal pull-ups are specified in the Data Sheet as 20K-50K ohms… The pull-up will hold the pin at high unless the switch connects it to ground. These pull-ups can be very handily because they let you, say, connect a switch between a pin and ground. It turns out that the processor in the Arduino has built-in internal pull-ups on the I/O pins that can be enabled via software. There is a neat protocol that everyone follows that lets them carry on orderly communication on this shared wire. This is handy because multiple devices can pull the bus low at the same time and nothing bad happens. In the time-tested tradition, the 4.7K ohm pull-up resistor is always connected between the power and the bus and holds the bus high unless either the master or one of the salves is actively pulling it down. Outrageous claims demand outrageous proof, so let’s start with a brief demo that proves beyond a shadow of a doubt that this is not just a cockamamie theory, but cold hard fact… Yes – it is now possible to connect DS18B20 sensors without any external pull-up resistor at all! If you were banking on your stockpiles of 4.7K ohm resistors to be the one reliable store of value in these uncertain times, you need to rethink your long-term asset preservation strategy because the decade-long run of stable demand for this part is about to plummet. I am here to tell you that everything is about to change. AdaFruit is even generous enough to include one of these resistors with every DS18B20-based temperature sensor they sell (be it bare, waterproof, or hi-temp) because they know you are going to need it. Every one of the seemingly endless Arduino DS18B20 tutorials on the web starts with some version of the line “You will not be able to do anything with this senor until you go out and procure yourself a 4.7K ohm resistor”. If you’ve ever used the ubiquitous (and amazingly useful!) DS18B20 family of 1-Wire temperature sensors, you’ve almost certainly used a 4.7K ohm pull-up resistor as well.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |