Read temperature online! (from your ENC28J60 module with DS18B20)

Posted by: admin Category: Network Tags: , , , , Comments: 17

Read temperature online! (from your ENC28J60 module with DS18B20)

Get your Arduino ENC28J60 ethernet shield and DS18b20 sensor kit, read the sensor data from ethernet!

This ethernet shield is very easy to use, relevant libraries are provided. You can start your ethernet network in seconds.

Check the ENC28J60 module here which is only $7.9! and then connect it to your arduino as follow pinout

You probably only need VCC, GND, SCK – 13, SO – 12, SI -11, CS – 10 these 6 pins.


and then also connect ds18b20 sensor to your Arduino as follow

Please be aware blue wire are connected to pin 3 as declare in the code, DS18b20 sensor and Ethernet module can use same VCC and GND.

At last, download these codes and use them.

There are some another examples.

Share this post

Comments (17)

  • Albert Reply

    From the wiring for the Ethernet Module it states it is a 3.3v device.
    Wit the Arduino being 5v is there a need to do any level conversions or can I just wire it straight up?

    January 10, 2012 at 12:24 pm
  • admin Reply

    Hello Albert, you can use both 5V or 3.3V power from your Arduino, enc28j60 can handle both of them, good luck!

    January 10, 2012 at 2:17 pm
    • dimple Reply


      i have arduino module and LM 35

      i m trying to got through the code

      But unable to understand how to go about it.

      Can anyone help me through some steps.

      November 7, 2013 at 6:14 pm
  • Albert Reply


    Thanks for coming back to me.

    I wired up directly and also tried buffering INT and SO using a 74HC125 and in both cases I cannot get a connection.

    I used the Library you link to above.

    I also tried the library from

    Same result. No connection.

    I used the web server code and or are both inside my domain (subnet), so should be OK.

    When I try to go to the webserver it just times out.

    If I check my routers LAN clients the IP address is not listed.

    Any ideas where I can start.

    I’m using Arduino 1.0 with the latest of the libraries which state they support 1.0.

    1 thing is the LED on the Ethernet Module is red. Should this be green if it is transmitting or at least connected or is red OK?

    Any advice would be greatly appreciated.


    January 11, 2012 at 11:18 pm
  • admin Reply

    Hey Albert

    Just wire the 6 pins we mentioned in this post, use 3.3V. If it is not working, make sure you use the same module as we have.

    And also for the IP, first check your own IP, click start button in windows, type cmd in search, and type ipconfig /all to see your ip, if your ip is, then the ip address is better to, not

    Good luck!

    January 12, 2012 at 1:56 pm
  • Albert Reply

    Thanks again.

    The module I have looks exactly the same.
    I think I may have seen a hint of my problem.
    I’m using the Arduino 1.0 IDE and the library was built for pre 1.0. I’m going to try this out tonight.

    I’m wiring to 3.3V and my network is, Subnet

    I expect I’m just doing something stupid rather than being a real problem. I know in most cases the problems are my own fault.

    Again, thank you for begin so helpful on this.

    January 12, 2012 at 4:01 pm
  • Albert Reply


    Thank you so much for your help.

    I used Arduino 0021 IDE and the webserver test from the library from Nuelectronics that you link to worked 1st time with just the 6 wires recommended connected. No buffers needed.

    So, this library does not work with Arduino 1.0 IDE.

    Really Easy.
    From start to finish it took me 30 minutes to wire up and run the test code.

    A little tip for those prototyping.
    I have male-male jumper wires so I had no way to connect to the pins on the ENC28C60 board. What I used in the end was 1 end of an old IDE cable. This converted the pins from to sockets so I could use my male-male wires.

    January 12, 2012 at 8:28 pm
  • Ciprian Reply


    I inserted the library, but when i try to compile i have this error
    “arduino-1.0\libraries\etherShield\enc28j60.c:18:55: error: WConstants.h: No such file or directory”

    and after that a lot of other errors linked to this.

    What should i do?

    April 19, 2012 at 7:24 pm
  • Chao Reply

    Hello Ciprian,

    Please use the lastest arduino IDE software, otherwise it’s not working.
    You seems put the library in the right folder, it should work.

    April 19, 2012 at 9:42 pm
    • http://www./ Reply

      That’s going to make things a lot easier from here on out.

      January 30, 2017 at 3:46 pm
    • kredit unterschreiben Reply

      Hehe, om ikke annet fikk du meg til å le her jeg sitter bak min egen pc. Jeg er nemlig litt småsinna på blogger for tiden:) Herlig fantastisk tolkning av mandagstema!

      February 8, 2017 at 12:10 am
  • Read temperature online! | | ElectroDragonElectroDragon Reply

    […] have tutorial discussed about how to put your data from sensor on internet, it still difficult to get start, a lot of code need to write and make a good web page. But now, […]

    June 6, 2012 at 9:13 pm
  • Tomas Reply


    I have problem to assign Ethernet shield IP address. My home router request for static IP address DHCP request from Arduino. (My router only reserves always same IP for unique MAC address, but always wait for DHCP request).
    Any suggest?

    November 18, 2012 at 9:49 pm
  • speedy Reply

    That Wconstants problems can be solved by replacing wconstants.h with arduino.h in the library files.
    But I am not able to get it to work. The Ethernet doesn’t connect to the computer. Which cable should I use if I am directly connecting the module to the computer, without a router, a straight cable or cross cable?

    December 6, 2012 at 12:58 am
  • Jackson Reply

    I am trying this exciting tutorial. I need to connect the Ethernet module direct to PC with “cross over cable”. Please advise on this.

    July 19, 2013 at 10:30 pm
  • Chao Reply

    Hello Jackson,

    Then you need to make the ethernet module “wireless”, try some bluetooth modules or RF modules for it.

    July 20, 2013 at 11:33 pm
  • poulbran Reply

    Using with the Rasberry Pi would make an awesome weather server.

    September 12, 2016 at 8:04 am

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.