DS18B20 - One Wire Temperature Sensor

Hi Karan,

Thanks for the link to the correct sensor for the example code. My design would put sensors in environments probably too wet for an exposed board - not submerged, but exposed to rain and constant high humidity air. Thus my plan to use the 1-wire units that are watertight. I will explore the board-mounted sensor further though - no harm in testing.

Hacking the GrovePi firmware is beyond my skills at this juncture. I have some experience with electronics and fairly dated high-level language programming skills that I’ve not used in years and years. I’m teaching myself Python now. Fiddling hardware using both RasPi and Arduino. If I get to the point of taking on the 1-wire firmware, I will open a thread for assistance. I’ve read the protocol docs and am pretty sure I’d need some guidance!!

Thanks,

Robert

1 Like

OK, first let me say I really like the GrovePi and sensors. They make playing with the Pi pretty easy. However, I am also one of the many who would like to use the DS18B20 sensor with the Pi. And it is also beyond my capability to change the GrovePi firmware.

I found a really well done article from the UK here: https://www.samculley.co.uk/raspberry-pi-temperature-monitor/. The design connects the sensor directly to the Pi on GPIO pin4. The supplied Python code in the article takes advantage of the Pi built-in i2c bus. I believe the GrovePi also uses this same method of communicating with the Pi.

Therefore, to help the many who are interested in this, could someone address the following questions:

  1. Is it likely the design in the UK link above could be used with the GrovePi attached, or would the GrovePi need to be removed first?

  2. Couldn’t the GrovePi firmware be (easily?) modified to add basically a i2c mirror function which would essentially replicate the Pi i2c to the selected GrovePi i2c connector? This would allow folks to use code like the UK code with the convenience of the GrovePi connectors. Seems like a win-win for everyone.
    – -- Duane

1 Like

Hi,
The one wire temp sensor should work like the tutorial says. The sensor does not work with I2C and uses another protocol called 1-wire which does all the communication on a single wire, GPIO 4 on the Pi here. You should be able to use that tutorial or https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing?view=all to make the temperature sensor work.

The GrovePi does not support the sensor right now but the sensor is compatible with the GrovePi http://www.seeedstudio.com/depot/One-Wire-Temperature-Sensor-p-1235.html?cPath=25_27 .

From the looks of it, the sensor would need a lot of work on the Firmware to get it to working with the GrovePi. We don’t have any plans right now to add the functionality on the firmware and the best way for you would be to use the instructions to directly use it with the Raspberry Pi.

-Karan

1 Like

I don’t get it. If the GrovePi doesn’t support this sensor, why would you sell it like this?

Is it still not supported? It seems to me that you’re missing a waterproof temperature sensor and this one is ideal…

1 Like

Hey James, how are we selling the GrovePi+? Sorry, I’m not catching what you mean by “why would you sell it like this?”

1 Like

Not the grovepi+, but the sensor with Grove connector (which is what the link I posted is pointing to). It’s not supported by the grovepi so what’s the point of having the connector…

1 Like

I think the connector on that can be used with regular Grove products. I thought you implied we implied it was supported on the GrovePi+. I think @Karan was clear that it was not supported.

1 Like

How about a label or something that says “Not supported by GrovePi” in the store site. That’s easier than having us look through the forum for each sensor we want to buy… I mean, it happened to me, I didn’t check.

1 Like

Sure, we can ask Seeed to put that up. All the sensors we sell are supported.

1 Like

Honestly I’m a huge supporter of dexter and grove but i agree this temperature sensor could be much better labeled.

It does not appear to work with the GrovePI+ and it does not appear to work with the Grove shield V2 on the Linkit one board so saying its grove compatible is a bit of a stretch.

These are the only two boards i work with and i now have 8 of the sensors. No doubt some one will figure it out or has (i did try the above but seemingly I’m not a seasoned enough developer, but no joy) and/OR i just have not found it yet (if anyone knows of anything let me know).

But as mentioned i think a much better compatibility statement (it would be short in my experience so far) would be good.

1 Like

@rv1,
I am really sorry that there was not enough information available on the grove website whether these sensors worked or not with the GrovePi+. Usually all the information about the supported sensors is avialble here. We usually ask people to post about sensors that are not mentioned there on the forums because there are a lot of sensors which we have not written libraries yet and might work with the GrovePi.

Right now these temperature sensors are not supported directly with the GrovePi.

However, we had received these sensors from Seeed which manufactures them and I took a bit of time to test them with the GrovePi. I was not able to get it running directly with the GrovePi but was able to get it working with the Pi. Getting it to work with the GrovePi directly might be a bit difficult though we’ll work on it in the near future.

If you want to get this sensor to work with the Raspberry Pi, you can try out this tutorial. Though the connections would be a bit different. If you look closer to the Grove connector at the end, you’ll see that only 3 metal tabs of the 4 slots at the end are. The one connector which is singled is the Signal line and the other two are Ground and 3.3V. (refer to the picture here)

You should connect the GND and 3.3V to the GND and 3.3V pins on the raspberry pi and the signal to Pin7 or BCM4 on the Pi header (https://pinout.xyz/pinout/pin7_gpio4).

Once it is connected, power the Pi, and try running the commands from the Add OneWire support in the section of the tutorial linked above.

Do let us know if it works for you. We’ll test it on the GrovePi and will keep you posted about that.

1 Like

Hello,
I just read the discussion and I’m interested if One Wire Temperature Sensor (DS18B20) is ready to plug in the GrovePI. Has anyone fix it?
Thank you!
By the way, connecting the wires as says karan works for me. But I want just to know if it is ready to plug&play.

1 Like

Been reading through the thread…has there been any progress made on running this connected to the Grovepi+?

1 Like

Hi,

Is there something new with the sensor on the grovepi+??

1 Like

Hate to break the bad news to you folks but Seeed Studio and Dexter Industries are two different companies.

Since there are a lot of interesting things that Seeed Studios puts out using their “Grove” connectors, the Grove Pi was produced (AFAIK) as a way to leverage that ecosystem.

However it is a monumental job to expect anyone to support all of Seeed Studios products.

Hi

And what that mean? I cant use them with my Raspberry or my GrovePi+??

1 Like

No. That’s not what it means.

What it does mean is that Dexter Industries has decided not to create software specifically for one-wire. However, you are free to research one-wire on the Pi and implement support on the Grove Pi.

What they have done is to create a series of robots/development tools and hardware - and then developed a relatively large set of utilities and software items that apply to the majority of potential use-cases.

Does it cover every possible sensor? No.

Does it cover every possible configuration? No.

Does this mean that these sensors and/or configurations absolutely won’t work? Of course not.

What it does mean is this:

  1. If you want to do something different and interesting, go right ahead. If you want/need one-wire, you are welcome to work on it and share your experiences, (and results), here.

  2. If you are a bit confused about how to do a particular thing - or even where/how to start - ask. That’s why we’re here.

There is a wide pool of talent here - from people who program AI in their sleep to people like me who have been hardware mavens their entire life. Somewhere here there is someone who can help, or at least suggest possible ways to find a solution.

We all started as clueless idiots, but worked hard to gain what knowledge we have. We all are - literally - “standing on the shoulders of giants”. We have, all of us, learned from some of the best and most brilliant people in the industry and we, all of us, are willing to pay that debt by helping those that come after us.

  1. If you expect to be spoon fed without being willing to do at least something for yourself - sorry Charlie, not going to happen here.

Bottom line:
Dexter does not support one-wire directly. But Dexter - and all the rest of us - will help you figure it out for yourself. That’s part of the fun; taking something that doesn’t exist yet and creating a way to make it happen!

You learn a lot and your efforts help everyone else too.

Interesting!

If I remember correctly, (I’m not at my computer), the Pi via raspi-config supports the one-wire interface.

If I am remembering correctly, this means it should be possible to hack coverage, but maybe not directly through the Grove Pi board.

Ok thx for your answers.

I used the sensorcable with normal cables on the GPIO from the grovepi+. It functions well. Nothing to build with an additional board.

Next time i want to try the grove i2c-hub. Plug there the ds18bs20 sensor and then with an normal pin-cable to the GPIO ports

1 Like

What I was trying to say is that, even if it won’t work with the Grove Pi directly, if using that particular part is absolutely essential for whatever reason, (like chemical corrosion resistance, or wet environment use), you might be able to use it directly with the Pi itself. (Or is there an address conflict that cannot be changed?)

We care because we want to help others. Even if I/we are not subject matter experts, our ideas may guide them to the correct solution.

AND

We might just learn something that could be useful in the future.