pcbway




18B20 in proteus, 18b20 arduino code, 18B20 code in proteus, 18b20 simulation,interfacing of temperature sensor with arduinoHello friends, hope you all are fine and having fun with your lives. In today’s post we are gonna have a look at How to use Temperature Sensor 18B20 in Proteus ISIS. I will use Arduino board as a microcontroller and will connect the temperature sensor with it and then will display the code on LCD. I have already posted the same tutorial in which I have done Interfacing of Temperature Sensor 18B20 with Arduino but in that project I have used the real components and designed the hardware. But today, I will just show you the simulation so that you could test the simulation first and then design it in hardware.

Temperature Sensor 18B20 is the most commonly used temperature sensor. Its a one wire sensor means it sends data through a single wire and we can connect multiple sensors with a single wire, that’s why its quite efficient and easy to use as well. I have also posted a tutorial on How to Interface LM35 sensor with Arduino in Proteus ISIS which is another temperature sensor so give it a try as well and let me know which one you think is better. Anyways let’s get started with temperature sensor 18B20 in Proteus ISIS.

How to use 18B20 in Proteus ISIS ???

  • First of all, get these components from Proteus components list as shown in below figure:

18B20 in proteus, 18b20 arduino code, 18B20 code in proteus, 18b20 simulation,interfacing of temperature sensor with arduino

  • Now design the circuit as shown in below figure:

18B20 in proteus, 18b20 arduino code, 18B20 code in proteus, 18b20 simulation,interfacing of temperature sensor with arduino

  • As you can see in above simulation, we have used Arduino UNO board along with LCD and 18B20 temperature sensor.
  • 18B20 in Proteus can’t detect the real temperature but we can change the temperature by pressing + and – buttons.
  • So, now we have interfaced the temperature sensor and the LCD with Arduino. Next we are gonna design the code for Arduino and will upload it in Arduino baord.

Note:

  • Now download these three libraries, one is “one wire” library which is the protocol for 18B20 temperature sensor, next is the Dallas Temperature sensor library which is the actua library for temperature sensor 18B20 and uses one wire library. Third library is the Crystal LCD library which is used for displaying character on LCD.
  • So, download all these three libraries by clicking on below buttons and then paste them in your libraries folder of Arduino software.

Download One Wire LibraryDownload Dallas Temperature LibraryDownlaod Liquid Crystal Library

  • Now after adding these libraries, open your Arduino software and paste the below code into it.

  • Now get your hex file from Arduino and upload it to your Proteus Arduino board and hit the RUN button.
  • If everything goes fine then you will something like this at the start:

18B20 in proteus, 18b20 arduino code, 18B20 code in proteus, 18b20 simulation,interfacing of temperature sensor with arduino

  • After a delay of around 5 sec you will start receiving the Temperature sensor 18B20 values on your LCD as shown in below figure:

18B20 in proteus, 18b20 arduino code, 18B20 code in proteus, 18b20 simulation,interfacing of temperature sensor with arduino

  • Now you can see the value shown in the temperature sensor is the same as in LCD.
  • So, now by clicking the + and – buttons on temperature sensor, you can increase and decrease the value of temperature and same will be changed in LCD.

That’s how you can do simulation of Temperature sensor 18B20 in Proteus ISIS. Its quite simple and easy to use. That’s all for today, hope you get some knowledge out of it.

2 Comments

  1. Thanks for your great tutorial! However, I’m getting a -127.00 value from the DS18B20. Do I have to put some delay after the requestTemperature() function, or it is something to do with the Proteus configuration? I get some correct values, but the most of data is just the -127.00 value…
    I’ve done some research but with no results…
    PS: I’m using Arduino Mega 2560

Leave a Reply

Your email address will not be published. Required fields are marked *

Post comment