Main Menu

search

You are here

Compost Temperature Meter - DS18B20 on Nano with 7-segment display

[last update: 2021-06-13]
-----

  • A handheld temperature meter for reading temperature of my garden compost pile.

  • This version uses an Arduino Nano, reading a DS18B20 temperature sensor, and sending temperature to a 4-digit, 7-segment LED display with Adafruit backpack.
    The Nano communicates with the DS18B20 with Maxim's one-wire library, and the Nano connects to the displays with i2C.

  • go to: OLED version
    ---------------------------

  • Hardware notes:
    schematic

    display data line to i2C SDA A4
    display clock line to i2C SCL A5
    DS18B20 data line to A3, with 4.7k pullup resistor

    SDA & SCL lines need pullup resistors,
    however my build works fine without them.
    I read that the wire library enables the Arduino's internal pullups
    when initializing with Wire.begin().

    OTOH, the DS18B20 data line indeed Does Need a pullup to +5.

    This version is powered by a rechargeable battery pack that puts out nom. 12v,
    which is input to the Vin (pin 30) on the Nano,
    then the 5v regulated power output from the Nano (pin 27)
    is used to drive the DS18B20 and the LED readout with backpack.
    ---------------------------

  • Hardware enclosure:

    ---------------------------

  • Software:

    Started with a sketch I developed some time ago which started with an Adafruit example from their backpack tutorial.

    After adding backpack, gfx, oneWire, and DallasTemperature libraries as contributed libraries to my IDE, and setting programmer to ArduinoISP, it finally verified/compiled. And when I remembered to connect the 4.7k pullup on the DS18B20 data line, it read temperature. :-)
    ----------------------------------

    Current version: DS_Nano02 - see: DS18B20 on Nano on Programs-all

    This version uses these libraries:
    Adafruit_GFX
    Adafruit_LEDBackpack
    OneWire
    DallasTemperature

    I'm not sure where I got any of them, or how old or what rev they are, however searching now on gitHub finds multiple versions of OneWire and DallasTemperature. Since everything is working, I'll leave it all as is.

.

.

.

eof