Summary of Arduino DS18B20 Thermometer on iOS or Android
This article guides users on building a remote temperature monitoring system using an Arduino UNO clone, Ethernet shield, and DS18B20 sensor. The project connects the sensor to the Arduino, which sends data via the Blynk app to iOS or Android devices for real-time display.
Parts used in the Remote Temperature Monitor:
- Arduino UNO clone
- Ethernet shield
- Dallas DS18B20 sensor
- 4k7 resistor
- Breadboard (optional)
- iOS or Android device
Step 1: Introduction
In this Instructable I am going to attempt to show you how to put together a little project to use the Blynk app (optainable at http://www.blynk.cc/) to display the temperature remotely on a iOS or Android device.
I came across an posting on my Google+ where somebody required some help with this. It looked interesting, so I decided to have a try myself.
This is my first attempt to write an Instructable. I have found many articles published here useful. So I thought it is time to do my part.
The main parts I used are:
Arduino UNO clone
Ethernet shield
Dallas DS18B20 sensor
A 4k7 resistor is also required as a pull-up resistor for the data line.
Optional Breadboard
An iOS or Android device
Step 2: The DS18B20 Sensor
The DS18B20 sensor connections are as follows, looking at the label:
Left leg = GND
Middle leg = Data
Right leg = 5 V
Step 3: Let’s Start
I used a mini breadboard just to connect the pull-up resistor to the 5 V and Data connection. You could just solder the resistor straight onto the legs.
Step 4: Wiring
That is how it is all wired up.
Vcc -> 5V
GND -> Gnd
Data -> pin 7
4k7 resistor between 5 V and Data legs
Step 5: Getting Some Code to Work
I don’t believe in reinventing the wheel. Download the library from the Blynk website and install it into your Arduino libraries folder.
I used the BlynkBlink scetch from the Blynk examples and the DS18x20_temperature example from the OneWire Library. I combined the two into one sketch. I did change the pin for the DS18B20 data into the Arduino to pin 7. The reason for this is because pin 10 is used by the Ethernet shield. I also added a line to the end of the DS18x20 data processing section. Blynk.virtualWrite(V5, celsius); This sends the celsius result. You can change that to Blynk.virtualWrite(V5, fahrenheit); to send the Fahrenheit result.
Step 6: Result
On the device side, you have to use V5 as an input and set up the range. Detailed instructions relating to the software side and iOS and Android device setup are in the sketch and on the Blynk website. Once you worked out the basics, it is easy to change it to use a different display mode on your device, like “Value Display”, “Gauge”, “LCD” and “Graph”.
I want to thank all the people who made this possible. The people who designed and made the hardware and wrote the software that I have used for this project. Without them life would be different.
Do not hesitate to make suggestions and ask questions, if you get stuck. I’m still learning how to write a good Instructable.
- How do I connect the DS18B20 sensor legs?
Looking at the label, the left leg is GND, the middle leg is Data, and the right leg is 5 V. - Can I use pin 10 for the sensor data line?
No, pin 10 is used by the Ethernet shield, so the author uses pin 7 instead. - What is the purpose of the 4k7 resistor?
The 4k7 resistor acts as a pull-up resistor required for the data line between 5 V and the Data leg. - Does the code support Fahrenheit readings?
Yes, you can change the code from Blynk.virtualWrite(V5, celsius) to Blynk.virtualWrite(V5, fahrenheit). - Which virtual pin should be used on the Blynk app?
You must use V5 as an input on the device side to receive the temperature data. - What display modes are available on the Blynk app?
Users can switch to Value Display, Gauge, LCD, or Graph modes once the basics are set up. - Where can I download the necessary libraries?
The Blynk library is downloaded from the Blynk website and installed into the Arduino libraries folder. - Do I need a breadboard for this project?
A breadboard is optional; you can solder the resistor directly onto the sensor legs if preferred.
