Using the Chainable DS18B20 Extender Breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller with a DS18B20 sensor, installing the Dallas Temperature Control Library library, and running the provided example code.


Wiring
Wire as shown for a 5V board like an Uno. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the breakout VIN.
Here is an Adafruit Metro wired up to the breakout with a DS18B20 sensor:
- Breakout GND to DS18B20 ground (blue wire)
- Breakout Signal to DS18B20 1-wire output (yellow wire)
- Breakout V+ to DS18B20 VIN (red wire)
-
Board 3V to breakout JST PH VIN (red wire)
-
Board GND to breakout JST PH GND (black wire)
- Board pin 2 to breakout JST PH Signal (white wire)
Library Installation
You can install the Dallas Temperature Control Library library for Arduino using the Library Manager in the Arduino IDE.
Click the Manage Libraries ... menu item, search for DS18B20, and select the DallasTemperature library:
If asked about dependencies, click "Install all".
If the "Dependencies" window does not come up, then you already have the dependencies installed.
If the dependencies are already installed, you must make sure you update them through the Arduino Library Manager before loading the example!
Example Code
Open the Simple example in the DallasTemperature library by going to File - Examples - DallasTemperature - Simple.
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the temperature reading from your attached DS18B20 sensor print to the Serial Monitor.
Multiple Sensors
What makes this breakout special though is right in its name: you can chain multiple DS18B20 sensors together! To do this, you'll wire up multiple breakouts with DS18B20 sensors to your microcontroller and then upload the Multiple example from the Arduino Library for Maxim Temperature Integrated Circuits library.
Each breakout will be wired to a DS18B20 sensor with its terminal block:
- Breakout GND to DS18B20 ground (blue wire)
- Breakout Signal to DS18B20 1-wire output (yellow wire)
- Breakout V+ to DS18B20 VIN (red wire)
The breakouts will be daisy chained together via their JST PH cables. The final breakout in the chain will be connected to the microcontroller:
-
Board 3V to breakout JST PH VIN (red wire)
-
Board GND to breakout JST PH GND (black wire)
- Board pin 2 to breakout JST PH Signal (white wire)
Open the Multiple example in the DallasTemperature library by going to File - Examples - DallasTemperature - Multiple.
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the temperature readings from your attached DS18B20 sensors print to the Serial Monitor.
Page last edited June 04, 2024
Text editor powered by tinymce.