Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wiring for DS18B20 #8

Closed
MattSpeakman opened this issue Jan 22, 2018 · 13 comments
Closed

Wiring for DS18B20 #8

MattSpeakman opened this issue Jan 22, 2018 · 13 comments
Labels

Comments

@MattSpeakman
Copy link

For the DS18B20 thermistor do you just need to connect it to any one of the GPIO ports?

Thanks

@Rinsen
Copy link
Owner

Rinsen commented Jan 22, 2018

You don't connect it to any GPIO pin at all since a RaspberryPi have no native OneWire support.

What you need is a DS2482 chip in between like this one.
https://www.modmypi.com/raspberry-pi/sensors-1061/kits-and-interface-boards-1062/r-pi-i2c-1-wire-owfs-expansion-module-

@chrisahardie
Copy link

chrisahardie commented Mar 12, 2018

@Rinsen Do you have a Fritzing diagram / pictures to indicate how things are wired up? Thanks!

Update: Presume this would do the trick? http://raspberrypi.tomasgreno.cz/thermal-sensor-i2c.html

@Rinsen
Copy link
Owner

Rinsen commented Mar 14, 2018

Yes, that is how I use it @chrisahardie

@chrisahardie
Copy link

@Rinsen I picked up the unit you linked to above, but I can't find a datasheet for it anywhere. My DS18B20 has three wires for ground, power, and data, but there are 6 terminals in the unit:

1-wire

The terminals are labelled:

GND
+5v

DQ
1wire GND
PWR GND
+5v

I presume my data wire should be screwed into DQ and the ground wire into 1wire GND - should the power wire be screwed into the bottom +5v?

I've tried different combinations and I am getting No DS2482-100 detected, check that AD0 and AD1 is correct in ctor and that the physical connection to the DS2482-100 one wire bridge is correct.'

Thanks!

@Rinsen
Copy link
Owner

Rinsen commented Apr 15, 2018

Hi!

I am not at home right now, but will get back to you as soon as I am so I know that I answer in the same way as I use it.

@chrisahardie
Copy link

Thanks @Rinsen !

@Rinsen
Copy link
Owner

Rinsen commented Apr 17, 2018

That error is related to not finding any DS2482-100 chip to talk with. Are you sure that the connector is mounted in the correct position?
It should be mounted on pin one to six with the first pin connected to the top left connection in the picture that you have provided. This makes the board sit more or less on top of the display port.

Test to run the board without connection any One Wire devices at all to begin with to try tog get rid of that error. Also make sure to double check that the AD0 and AD1 is in the same position as in the ctor.

@chrisahardie
Copy link

I wasn't getting an error when I had no wires screwed into any terminal - I would just get an empty collection for my device list.

Will I get this error if my wires have been inserted incorrectly? I am unclear about which wire goes into which terminal, and once I start guessing I get the aforementioned error. Can you please let me know which terminals do I screw in the power, ground, and data wires?

Thanks!

@Rinsen
Copy link
Owner

Rinsen commented Apr 19, 2018

I have connected my sensor to +5V, GND and DQ to each pin on the sensor so I don't use it with parasite power.

Here is the datasheet for the chip https://datasheets.maximintegrated.com/en/ds/DS2482-100.pdf

There are some diagnostics that can be used in the chip but I have never had a need for that.

@chrisahardie
Copy link

Thanks @Rinsen! Turns out this thermometer has different configurations for the yellow and green wires (https://github.com/espruino/EspruinoDocs/blob/master/devices/DS18B20.md)

I apparently bought a version with the colour coding I wasn't expecting - I reversed the green and yellow and now everything works great!

Sorry for wasting your time, many thanks for writing this useful library!

@Rinsen
Copy link
Owner

Rinsen commented Apr 23, 2018

It gave me some new insight also so no problems 😊
I will close this issue now.

@Rinsen Rinsen closed this as completed Apr 23, 2018
@DrouSoft
Copy link

DrouSoft commented Sep 8, 2018

Hello

I am trying to use your bookseller in a project with the following elements:

-RPi 3 Model B on Windows IoT
-Arduino Shield
(https://www.dfrobot.com/wiki/index.php/Arduino_Shield_for_Raspberry_Pi_2B_and_3B_SKU:DFR0327)
-A DS18B20 sensor
-A UWP application.

I always get the same error message whatever connection I make with my sensor.

This error message is as follows:

Thrown Exception: ' Rinsen. IoT. OneWire. DS2482100DeviceNotFoundException ' in OneWireHeaded. exe

Could you tell me how to connect this sensor to the RPi?

Thank you

@Rinsen
Copy link
Owner

Rinsen commented Sep 12, 2018

@DrouSoft The reason for getting that error is probably just that you don't have a DS2482 chip on that board?

What you could do is run one wire from the arduino and then talk with the arduino from .Net on your Pie. But that is a whole other beast to build than what this library provides.

For this Library the only supported setup is RPi -> DS2482 chip -> One Wire device like the DS18B20 or some other.

Please get back if I have missunderstod.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants