Arduino Bluetooth Temperature Sensor

This Arduino bluetooth temperature sensor measures the temperature via the DS18B20 integrated digital temperature sensor and makes it available via bluetooth, creating a kind of remote temperature monitor. The temperature reading is then transmitted via the Arduino’s serial port (pin 0 and pin 1) to the Arduino bluetooth module. An assembled view of this bluetooth temperature sensor is shown in figure 1 and the system block diagram in figure 2.

AssembledKitFigure 1: Bluetooth Temperature Sensor, Battery Powered

The DS18B20 digital temperature sensor is a three pin integrated sensor that provides  its readings digitally via a one-wire interface. It has an accuracy of ±0.5°C in the measurement range -10°C to +85°C (14°F to +185°F) making it ideal for hobbyist and some industrial applications. The Arduino sensors community already has libraries to interface with this sensor making it easier to integrate this sensor into projects.

BlockDiagFigure 2: Sensor Block Diagram

The Arduino bluetooth module acts as a transparent link and simply relays what is sent to its serial port to a paired bluetooth receiver.Default settings:

  • Default pairing code: 1234
  • Default baudrate: 9600

The bluetooth receiver can be a pc, laptop, table, smartphone, etc and the readings displayed via a standard bluetooth terminal app.

ScreenshotTablet7inchFigure 3: Example Bluetooth Receiver Software (Android App)

Arduino Code:

#include <OneWire.h>
#include <DallasTemperature.h>

// Data wire is plugged into port 2 on the Arduino
#define ONE_WIRE_BUS 2

// Setup a oneWire instance to communicate with any OneWire devices (not just Maxim/Dallas temperature ICs)
OneWire oneWire(ONE_WIRE_BUS);

// Pass our oneWire reference to Dallas Temperature. 
DallasTemperature sensors(&oneWire);

void setup(void)
  // start serial port
   // Start up the library

void loop(void)
  sensors.requestTemperatures(); // Send the command to get temperatures
  Serial.print("Temperature is: ");
  Serial.println(" degrees Celsius ");

If you would like to implement this project but don’t have all the parts you can get the ones you don’t have on amazon using the following links:

Also if you liked this article please leave a comment and don’t be shy to share it with others who may be interested in using the arduino bluetooth dongle with various arduino sensors including the arduino temperature sensor (DS18B20) to send data to a bluetooth enabled device.

Arduino Home Automation Projects – Book

Arduino XML project

Return Home

1 comment

  1. Have you posted the source for your Android app? I would like to learn from it…


Comments are closed.