Fork me on GitHub

Project Notes

#585 DS1822 1-Wire Reading

Basic interrogation of a DS1822 using 1-wire protocol and results display on a Nokia 5110 LCD.

Build

Notes

The DS1822 is an economy 1-Wire digital thermometer with a range of -55°C to +125°C, at ±2.0°C Accuracy from -10°C to +85°C.

It comes in TO-92 packaging and may be powered directly (using three pins), or take parasitic power from the data line (using two pins).

DS1822

Basic Operation

The sequence of operations boils down to this:

  • Send a search request on the wire to find a device
  • Get the device address and ensure the family code is as expected
  • Issue conversion command (0x44)
  • Wait for conversion, then read the conversion scratchpad from the device
  • Process the data received

Family Codes

Model Code
DS18S20 0x10
DS18B20 0x28
DS1822 0x22

Construction

Breadboard

Schematic

The Program

The Arduino sketch is found in DS1822.ino. It uses:

  • OneWire library for temperature sensor communication
  • u8glib library for driving a simple display on a Nokia 5110 screen.

The sketch was written to work with the DS1822, but it can also handle DS18S20 and DS18B20 devices.

Credits and References

About LEAP#585 SensorsArduinoLCD

This page is a web-friendly rendering of my project notes shared in the LEAP GitHub repository.

Project Source on GitHub Return to the LEAP Catalog
About LEAP

LEAP is my personal collection of electronics projects - usually involving an Arduino or other microprocessor in one way or another. Some are full-blown projects, while many are trivial breadboard experiments, intended to learn and explore something interesting.

Projects are often inspired by things found wild on the net, or ideas from the many great electronics podcasts and YouTube channels. Feel free to borrow liberally, and if you spot any issues do let me know or send a pull-request.

NOTE: For a while I included various scale modelling projects here too, but I've now split them off into a new repository: check out LittleModelArt if you are looking for these projects.

Project Gallery view the projects as an image gallery Notebook reference materials and other notes Follow the Blog follow projects and notes as they are published in your favourite feed reader