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

Picture of 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

Picture of 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

Picture of 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

Picture of 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 !


AhmedE456 (author)2017-02-19

Hello,how this code could be implemented to multiple ds18b20

LukasF16 (author)2016-10-25

Hi Mohamant,

I would like to make your project, but before I have a question whether the code will work with following device:

Or may be you can share exactly which version of Arduino you used.

Thank you in advance.

mohamant (author)LukasF162016-10-26

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.

LukasF16 (author)mohamant2016-10-26

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.

polmourgos (author)2016-10-13

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.

mohamant (author)polmourgos2016-10-18

Sorry, I have no background about WIZnet.

AndyStrings (author)2016-10-01

Hello Mohamant,

Great project, and worked for me first time. Thanks


mohamant (author)AndyStrings2016-10-01

That is great !!! Thanks for the feedback.


AbdelKarimB (author)2016-04-11

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

mohamant (author)AbdelKarimB2016-04-11

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.


Bestseller09 (author)2016-03-19


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 !

mohamant (author)Bestseller092016-03-20

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:


Pablo Cracovia (author)2015-11-02


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,

midnightcow (author)2015-10-01


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.

mohamant (author)midnightcow2015-10-01

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


midnightcow (author)mohamant2015-10-01

Thanks for your sharing.

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

sepilrat (author)2015-07-29

Hi. thanks to share.

how did you power the kit?

mohamant (author)sepilrat2015-07-31

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

RodrigoF2 (author)2015-02-25

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.

mohamant (author)RodrigoF22015-02-25

Hi RodrigoF2,
I think you mean to make another unit similar to mine and sell it to you. Is that what you mean?
If yes, then sorry I cannot sell you one because the sketch is not belong to me, you can make it by your own. It is very easy. Believe me. Tell us what difficulties you are encountered and we will help you.

RodrigoF2 (author)2015-02-23

Boa tarde senhor, eu Tenho Só Uma duvida aonde o senhor conseguiu esse suporte da última foto. Por que eu estou querendo para colocar no meu projeto.

mohamant (author)RodrigoF22015-02-25

I dont understand what you write.

(Eu não entendo o que você escreve.) by google translate :)

Nurul AqilahM (author)2015-02-16

hye...may i know..the ip address u assigned follow ip address from computer ?

mohamant (author)Nurul AqilahM2015-02-16

I am not sure if I understand your question. Are you looking for the IP address which I assigned to my Arduino? if yes, then you will find it in the code file. Just search for this line:

IPAddress ip(192, 168, 1, 102); // Set your IP address for Arduino Board

MsSweetSatisfaction (author)2015-01-12

What a cool gizmo! Definitely a futuristic build, and you did an awesome job explaining your process!

About This Instructable




Add instructable to: