1-Wire -- DS18B20, Parasitic, Multi-Drop


In this fourth exercise we finally get to see some DS18B20's on a multi-drop bus, running off of parasitic power. The basic idea is that the devices draw their operating voltages directly from the data line.

To make this possible, the DS18B20 contains a capacitor that stores a charge, drawn parasitically from the data line. This charge is sufficient and held long enough for the chip to complete some operations, but not all. In particular, the actual temperature conversion process lasts longer than the cap's storage can handle, so for that particular command we pull the data line directly to +5V while the conversion is in progress. This provides the extra oomph needed. In the following schematic, you'll note transistor Q3 which shunts the data line to the power line.


Be sure to observe that both the ground and the power pins (pins 1 and 3) of the DS18B20 are grounded when configuring the circuit for parasitic powering.

The software makes good use of the two library units I've written for doing 1-Wire communication with the DS18B20. Take a moment to read them over, for there's all sorts of valuable information there. Also note how compiler constants can be used in the program proper to configure things; it really is all quite versatile.

When you run the program, you'll see something like this. Click the screen shot to enlarge it:


Click to get the source code.
Click to get the schematic PDF.

Next Project: TI Link Protocol -- Calculator Demo

No comments:

Post a Comment