[SOLVED] Etherten: Trouble with DS18B20 Temp sensor

The EtherTen combines an Uno-equivalent Arduino-compatible board and Wiznet-based Ethernet support, along with a microSD card slot and Power-over-Ethernet support. [Product page]
Post Reply
Joined:Sat May 18, 2013 1:01 am
[SOLVED] Etherten: Trouble with DS18B20 Temp sensor

Post by heisenzombie » Sat May 18, 2013 1:19 am


I just bought a Freetronics EtherTen.

The Arduino IDE is configured as "Arduino Uno" board, "AVRISP mkII" bootloader, and appropriate serial port.

Seems to generally work fine (e.g. the "Blink", "Button", and ethernet "WebClient" example sketches upload and work as expected).

I have downloaded the "OneWire" and "DallasTemperature" libraries from http://www.pjrc.com/teensy/td_libs_OneWire.html and http://milesburton.com/Dallas_Temperatu ... ol_Library

I connected the DS18B20 to 5V, GND, and digital pin 2, with a 4.7k resister between 5V and digital pin 2.

Running the DallasTemperature "Tester" example sketch, I get:
Locating devices...Found 0 devices.
on the serial monitor.

I've not managed any successful communication with the sensor after:
* Connecting to different digital pins
* Swapping DS18B20
* Trying different OneWire and DallasTemperature sketches.

However, if I connect my other Arduino, a "Seeeduino Mega", to the same breadboard on the same pins, and upload the same sketch, everything works just fine and the oneWire address is shown, and temperature readings work fine.

Any ideas for troubleshooting this? I'm at a loss!

Joined:Sat May 18, 2013 1:01 am

Re: Etherten: Trouble with DS18B20 Temp sensor

Post by heisenzombie » Sat May 18, 2013 2:34 am

Okay — can someone fire up their 3d printer and make me a dunce cap, please? I worked out what I was doing wrong.

In a silly moment I read the resistor backwards, and so got a 270k instead of a 4.7k. Damn. Usually, nothing would have worked and I would have noticed pretty much straight away. (I hope)

But! It turns out that this configuration does actually power the DS18b20, but just at a lower logic level voltage.

Also! The Seeeduino mega has a switch on it that switches between 3.3V and 5V operating voltages. Coincidentally, this happened to be set to 3.3V when I grabbed it to test. Also coincidentally, this made the lower logic level of the DS18B20 with a 270k resistor work just fine.

So that's why it worked on the Seeeduino Mega and not the Freetronics EtherTen.

I've cured my resistor dyslexia and put a 4.7k in place. All is working now.

I will leave this post here as a testament to my daftness.

Freetronics Staff
Freetronics Staff
Joined:Tue Apr 09, 2013 11:19 pm
Location:Melbourne, Australia

Re: [SOLVED] Etherten: Trouble with DS18B20 Temp sensor

Post by angusgr » Sun May 19, 2013 10:32 pm

No need for a dunce cap, I think the people who don't seem to make these kind of mistakes are just keeping them secret. :)

Glad you got it sorted out.

Post Reply