Hardware
To follow this guide you'll need the following parts:
- DS18B20 Dallas one-wire temperature sensor. Â You can use a simple standalone DS18B20 sensor, a waterproof DS18B20 probe sensor, or a high temperature DS18B20 probe sensor.
- 4.7 KΩ Resistor. One-wire devices need a pull-up resistor connected to their signal line to be properly read by your board. Luckily all the DS18B20 sensors sold by Adafruit include the necessary pull-up resistor!
- A board running CircuitPython. You'll need a board capable of running CircuitPython like the Feather M0 Express, Trinket M0 etc!.
- Breadboard and jumper wires. You'll need these parts to connect components to your development board.
Wiring
Connect your DS18B20 sensor to a digital input on your development board. You'll also need to add the 4.7 KΩ pull-up resistor to the signal line to ensure the board can read the sensor. Here's an example of wiring a standalone DS18B20 to a Feather M0 board:
- Left-most leg of the sensor (with the flat part facing you) to board ground.
- Middle leg of the sensor to board D5.
- Right-most leg of the sensor to board 3.3V.
- 4.7 KΩ resistor connected to both the middle leg (data) and right-most leg (3.3V).
Or if you're using a waterproof or high-temperature probe here's an example of the wiring to a Feather M0 board:
- Black wire (or solid white on high-temperature probe)Â to board ground.
- Orange wire (or white with blue stripe on high-temperature probe)Â to board D5.
- Red wire (or white with orange stripe on high-temperature probe)Â to board 3.3V.
- 4.7KΩ resistor connected to both the data line on one side (D5 or whatever pin) and power line (3.3V) on the other side
Text editor powered by tinymce.