Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD One Wire Digital Temperature Sensor

License:

Mode: Editors' pick

  • 4.5k
  • 0
  • 0
Update time: 2021-04-10 22:44:16
Creation time: 2015-12-20 13:44:43
Description
## Arduino drives A single wire digital temperature sensor ## DS18B20 fromMaxim (formerly Dallas) is a great chip to measure temperature in your project. Fortunately, the Dallas emperature library which makes use of the sensor is easy to Arduino. In the latest version of the library can be found here http://www.milesburton.com/?title=Dallas_Temperature_Control_Library We used version 3.6.0 for this tutorial which can also be downloaded in last Drag and drop the DallasTemperture folder into my arduino/libraries folder The DS18B20 can be powered by 5.5V to 3.0V, so you can simply connect the GND pin to the 0V and VDD pins for the +5V from the Arduino. However, DS18B20 can also be extracted from the data line, which means that we only need two wires to connect their power. Which makes it very suitable for use as an external sensor. Arduino is received from the DQ pin to pin 2 on the board (which can be any Arduino digital pin) Pull it up to 5V a 10k ohm on pull resistor, which is required in the DQ pin Here is our sensor installed on the bread board ![ One Wire Digital Temperature Sensor][1] Next, add the following sketch and upload it to your Arduino mega 2560. The use of the Dallas temperature library makes it easy to get the temperature.

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

OneWire oneWire(ONE_WIRE_BUS);
 
DallasTemperature sensors(&oneWire);
 
void setup(void)
{
  // start serial port
  Serial.begin(9600);
  Serial.println("Dallas Temperature IC Control Library Demo");

  // Start up the library
  sensors.begin();
}
 
 
void loop(void)
{

  Serial.print(" Requesting temperatures...");
  sensors.requestTemperatures(); 
  Serial.println("DONE");

  Serial.print("Temperature for Device 1 is: ");
  Serial.print(sensors.getTempCByIndex(0)); 

When you have uploaded the sketch, click on the Serial Monitor and you should see output like the following. The temperature is in degrees C ![One Wire Digital Temperature Sensor - DS18B20][2] [1]: /editor/20151221/5676da6ec7542.JPG [2]: /editor/20151221/5676dc6b7e4eb.jpg
Design Drawing
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
ID Name Designator Footprint Quantity
1 Arduino MEGA 2560 U1 DIP 1
2 DS18B20 U2 DS18B20_SOIC 1
3 10k R1 R3 1

Unfold

Project Attachments
Order File name Download times
1

DallasTemperature_easyeda.zip

0
Project Members
Target complaint
Related Projects
Change a batch
Loading...
Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn