1-Wire -- DS18B20, Powered, Multi-Drop


Building upon the results of the previous exercise, now we'll we'll connect two 1-Wire devices on the bus, in particular a pair of DS18B20 temperature sensors. I'll refer you back to the previous project for details on this neat part, and also the library units employed.

As the circuit here shows, all you have to do is hang more devices on the bus, hence the label multi-drop. This schematic is used for two exercises.


Check out the code. Be sure to note how things are easily set up for custom configurations by means of compiler constants. Also observe that you'll need the serial numbers from your 1-Wire devices, but you will already know these from the preceding experiment.

The first exercise illustrates the basic commands in action. When you run the test, you'll see something like this:


To confirm things are working properly, plop a finger on one of the sensors and observe how its temperature rises compared to the other.

The second exercise illustrates the more advanced commands, thinks liking searching the bus for devices, detecting alarm conditions, sorting the devices by family, and so forth. Its run looks something like this:


The source code download, below, contains all the files, including the library units, for both of these exercises.

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

Next Project: 1-Wire -- DS18B20, Parasitic, Multi-Drop

No comments:

Post a Comment