Measure Temperature on the Web With Arduino Ethernet and DS18B20 Sensor




Introduction: Measure Temperature on the Web With Arduino Ethernet and DS18B20 Sensor

Dear all,

First, I would like to tell you that I am not a programmer. But I love to do new things especially when it is related to electronics. Here I have integrated a webserver to Arduino Ethernet with a temperature sensor attached. Actually the code was prepared by Hans. You may refer to his project at the following link:

Step 1: Arduino+Temperature Sensor Wiring

Follow the photo (sketch) for wiring your Arduino Ethernet with the temperature sensor. The sketch was prepared by Hens. You can see the other two photos are for my breadboard during the test and my arduino ethernet board.

Step 2: Compile & Upload the Code

Download the the code and modify the Mac address, assign IP address for arduino and what ever changes you want. Compile and upload the code to your arduino board.

Attach the arduino board to your modem.

Go to your web explorer and write your IP address with the port number you assigned for access your arduino webserver. For example:

And you are done.

Step 3: My Final Product

Here is my final product. I did not find an arduino enclosure at my local market, so I utilized the electrical box instead :P.

If you have any question, you are most welcome. But please remember, I am not a programmer.

If you have any suggestion for improvement, please feel free.

Have fun everyone !



    • Tiny Home Contest

      Tiny Home Contest
    • Fix It! Contest

      Fix It! Contest
    • Water Contest

      Water Contest

    26 Discussions

    Hello, nice work. Can I ask you how can I add another one DS18B20 and print it on web? I tried to add one more, both on one wire, but the values of temperatures are mess

    Hello,how this code could be implemented to multiple ds18b20

    Hi LukasF16,

    Actually, I got my code from a person who uses Uno+Ethernet Shield. So it shall work with you without any problem. For me, I am using Arduino Ethernet.

    Hi Mohamant,

    thank you for confirmation. I ordered the goods already and eager to acomplish the project.
    I also do have a DYI dashboard website, collecting various information. I post it here as soon as I get the temperature monitor running.

    Hi.I am trying to make your project.The only defernet is i have the ethernet 2 module WIZnet W5500.And it is not working.Of course iI have added the corect library for this device.I also use 5 meters ds18B20 sensor.And i put fixed the device address.When i run the project returns -127 C' .Are days now that I am trying.But now i need help.I would apriciate if you can help me in some way.Thank you for you time.

    1 reply

    Hello Mohamant,

    Great project, and worked for me first time. Thanks


    1 reply

    That is great !!! Thanks for the feedback.


    Hello Mohamed,

    Nice work.

    I am looking for a "vise-versa" code. i.e. to read for example a temperature set point from a webpage to Arduino & then control the replay of the AC system.

    Any help?

    Thanks in advance

    1 reply

    Hello Abdelkarim,
    Thanks. Your query is interesting, but I am very sorry I dont know how to do it. I have seen some experiments in this website where they control RC car over Internet using Arduino, may be it can help you somehow. If you find out the solution, please share it with me.

    All the best brother.



    Thanks for the project but I do not understand why it says "on the web", what I understood is you made the arduino as a Local web server, and you are connecting through ethernet "Local network" with local IP on browser. I do not see any transmission to a server that we can access to it through internet.

    Maybe I am wrong.

    Thanks !

    1 reply

    Hellow Bestseller09,

    Well if you succeeded in connecting your device locally through Ethernet, then you just need to set a port in your router and have dyndns address with port number (i.e., where 1234 is your port number. After that you will be able to access your arduino page from any place.

    Please have a look in my other project which simpler than this one:



    Thank you for very nice project. I have only one question. What should I add to the sketch if I want to read temperature from more 18b20 sensors connected via OneWire?

    Kind regards,


    This project is so good.

    I'm an engineer work at wiznet provides W5x00 to Arduino for Ethernet shield.

    Can I introduce your project on WIZnet musuem(

    Thank in advance.

    2 replies

    Yes for sure. But how about this project in the following link. I think it is better than this.


    Thanks for your sharing.

    I have already known your link was introduced on WIZnet mesuem.

    I utilized 9V power adapter. You can power your Arduino Ethernet with any power adapter ranged from 7 to 12V DC.

    Good morning , sir. I really enjoyed your web working temperature, but I wanted to know the last picture what you posted an Arduino support, wanted to know where you got and wanted to know if you have to sell , I put on my Arduino project. Thank you for listening and I hope your answer back.