Arduino Ethernet Shield + DS18S20

In this post, using a temperature sensor DS18S20 and an Arduino Ethernet Shield, we will build a thermometer that can be read in the local network, and that will show the current temperature and the maximum and minimum temperature.

First, we need to have the library ‘One Wire’ in Arduino which is necessary to use the sensor. You can download it here. You can find some help here for installing it, in case you need.

We will need a 4.7kΩ resistor for the DS18S20 connection. The way to connect it, is shown in the following image.

The code we will use is the following one:

After the code is loaded in Arduino, a web, like the one in the image, will be shown when we enter the IP of the Ethernet Shield.

5 thoughts on “Arduino Ethernet Shield + DS18S20

  1. Hola. Queria preguntarte si sabes si es posible agregar mas de 1 sensor DS18S20. Es porque quiero utilizar Arduino para monitorizar la temperatura de un datacenter en varios puntos. Desde ya muchas gracias.

    • Si, es posible usar varios sensores a la vez ya que ésta librería permite que cada sensor tenga un código único que los identifique. Para ello habría que modificar el código para que tome lecturas del número de sensores deseados y que posteriormente muestre sus lecturas.

  2. me salen estos errores favor necesito ayuda

    ReadWrite:25: error: ‘OneWire’ does not name a type
    ReadWrite.ino: In function ‘float getTemp()’:
    ReadWrite:122: error: ‘ds’ was not declared in this scope
    ReadWrite:128: error: ‘OneWire’ has not been declared
    ReadWrite:138: error: ‘ds’ was not declared in this scope

  3. me sale este error
    sketch_may02a.cpp: In function ‘void setup()’:
    sketch_may02a:32: error: no match for ‘operator!’ in ‘!Serial’
    sketch_may02a.cpp:37: note: candidates are: operator!(bool)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>