Waterproof thermometer DS18B20 with TinkerPie
A metal probe you can put in water, soil or tea.
| Type | Timing sensors |
|---|---|
| Connect to | any accessory pin (4.7 k pull-up on the module) |
| Gives | °C (-55 to 125) |
| Simulator | Yes: a control appears under the simulated board |
How it works
The DS18B20 is a digital thermometer chip inside a waterproof steel tube. It uses the 1-Wire bus: data and timing travel on a single wire, and every sensor has its own unique ID, so several can share one pin.
How to wire it
One or two signal pins on S1-S4 or P10-P13. Studio reads them with precise timing in the board firmware.
Code
In blocks: Accessories category in TinkerPie Studio. As code:
// JavaScript
sensors.ds18b20Temperature(Pin.S1)
// Arduino C++
sensors::ds18b20Temperature(Pin::S1) Good to know
- Range -55 to 125 °C, about ±0.5 °C between -10 and 85 °C.
- Needs a 4.7 kΩ pull-up resistor (most modules already have it).
- Keep the cable end and the board dry; only the steel tip is waterproof.
Projects with the Waterproof thermometer DS18B20
Similar modules
More projects to try
Questions
Can I try the Waterproof thermometer DS18B20 without buying one?
Yes. In TinkerPie Studio the simulator shows a control for it under the board, so you can test your program before you build it.
Can I put the DS18B20 in hot tea or soil?
Yes, the steel probe can go into water, soil or a cup of tea. Keep the wires and the board dry, and let an adult handle very hot liquids.