Go Down

Topic: RobotLinking 18B20 pinout and circuit board weirdness (Read 837 times) previous topic - next topic


I have a Dallas Semiconductors 18B20 temperature sensor on a RobotLinking board. It's part of the RobotLinking 37 Sensors Kit. The board has a LED to indicate activity. It resembles the attached image tempSensor.jpg.

Here's what's weird. All the guides I can find for the 18B20 say that the pin order is GND, DQ, VDD. That should mean pin 1 goes to GND, pin 2 goes to a GPIO, and pin 3 goes to 3.3V or 5V (this one can take either). Yes, I am looking at the sensor's pins from its bottom.

If I do this, the board's LED is lit solidly. I get 0 degree readings, the same as if no device was connected. (Infinite resistance?)

To make this work, and get valid temperature readings, I have to hook it up this way: sensor GND to the GPIO, sensor DQ to GND, and sensor VDD to 5V or 3.3V. The LED only flashes when the temperature is actually read.

Here's a twist: if you look at the circuit traces on the RobotLinking board, it looks like the paths between the male breadboard connectors and the sensor's pins 2 and 3 are reversed. This means if you think you are connecting to pin 3 via the male connectors, you are in fact connecting to pin 2, and vice versa. The path from pin 1 on the sensor to the male pin 1 where it plugs into the breadboard is straight, so pin 1 probably means pin 1.

When I described the above connections I made, I accounted for this apparent circuit pathing weirdness.

Another twist is in the manual, the sensor is soldered to the middle leads. My sensor is instead on the furthest leads from the pins, like in the attached image.

The manual with this kit didn't explain any of this. I'm at a loss to understand my observations.


That circuit board was probably made to accommodate different types of 3 wire sensors, try connecting S to + volts, - to GND and the data pin to Arduino pin 2. Then run the attached sketch.
The 18B20 is not a resistive type sensor like a thermistor or an IC sensor like a LM35, instead it communicates with the MCU over a single serial wire (+ GND), the data is a string of 1s and 0s, the Wire library takes care of the gory details for you.


Thanks. The single wire thing is neat. Looks like it permits several sensors to communicate over that one wire.


Thanks. The single wire thing is neat. Looks like it permits several sensors to communicate over that one wire.
It does.

Excerpt from the Datasheet:
Each Device has a Unique 64-Bit Serial Code
Stored in an On-Board ROM
// Per.

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131