Skip to content

A simple DS18B20 thermometer with SSD1306 display, controlled by Arduino.

Notifications You must be signed in to change notification settings

MateuszJanda/thermometer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

About

A simple thermometer (DS18B20 on 1-Wire) and a display (SSD1306 on SPI) controlled by Arduino.

Hardware

  • DS18B20 Programmable Resolution 1-Wire Digital Thermometer
  • SSD1306 Display - 0.96inch OLED (B) - connected to 4-wire SPI (default case)

Setup

Install required libraries.

In Arduino IDE (2.3.1) | Sketch | Include Library | Manage Libraries...

For DS18B20 thermometer:

For SSD1306 display:

Connections

SPI for 4-wire OLED WaveShare 0.96inch (SSD1306)

Arduino UNO R3 has one Serial Peripheral Interface (SPI) controller with predefined pins. In this case CIPO (D12) is not used.

Arduino Pin Name Other common names Description
D10 SS CS, nCS, CSB, CSN, nSS, STE, SYNC Chip Select
D11 COPI MOSI, SIMO, SDO, DO, DOUT, SO, MTSR Master out, slave in
D12 CIPO MISO, SOMI, SDI, DI, DIN, SI, MRST Master in, slave out
D13 SCK SCLK, CLK Serial Clock

WaveShare 0.96inch (SSD1306) configured in 4-wire mode.

OLED Pin - signatures on the device Description in 4-wire mode Connected with Arduino Pin
VCC +3.3V/+5V Power input +5V
GND Ground GND
NC - Not used
DIN COPI (MOSI - Master out, slave in) D11
CLK SCK (SCLK - Clock input) D13
CS CS (Chip select, low active) D10
D/C Command signal, low level for command, high level for data D7
RES Reset signal, low active D8

1-Wire for Digital Thermometer (DS18B20)

With 4.7 kΩ resistor between DQ and +5V.

Digital Thermometer Pin Description Connected with Arduino Pin
GND Ground GND
DQ Data Input/Output. Open-drain 1-Wire interface pin D2
VDD Supply Voltage +3.0V/+5.5V +5V

References

About

A simple DS18B20 thermometer with SSD1306 display, controlled by Arduino.

Topics

Resources

Stars

Watchers

Forks

Languages