Community
OpenEnergyMonitor

OpenEnergyMonitor Community

DS18B20 not detected with terminal block breakout

Tags: #<Tag:0x00007f88bebaebb0>

Hello, I tried to connect several DS18B20 to my emonPi but it shows 0 DS18B20 temperature sensor when restarting my EmonPi, I’ve tried several times.
However, I do have a pulse count even though I plugged the terminal block breakout and no pulse sensor is plugged.
The RJ45 is connected on the left side as it is supposed to be. I checked the output voltage. I have 5V between GND and +5V and about 3,88V between GND and 1 - w
I looked for answers on other topics but couldn’t find an answer.
Thank you for your support

Hello @Ecoterrien are these DS18B20 temperature sensors bought in the shop? I think there has been an issue with non genuine DS18B20 temperature sensors but that might not be the issue here.

Encapsulated DS18B20 temperature sensor were out of stock and I had DS18B20 so I chose to purchase the terminal block instead and I didn’t get the sensors from the shop.
Is there a way to test it? I tried with 3 different ones

You could start here:

I’m assuming you have the connections correctly identified, and you restarted the emonPi front end (NOT just rebooted the Pi) after you had connected the sensors - because they are only checked and identified when the ATMega 328P that’s the “emon” part of the emonPi starts up.

The safe way is to do a controlled shut-down of the emonPi, remove power, then power up again.

Thanks!

That’s what I did, but from your thread, it may look like I have fake sensors.
I’m fairly new to EmonPi and Arduino so unfortunately, you’re losing me when it comes to adding a sketch…

It’s not something you can do easily (and maybe not at all) if all you have is an emonPi. It’s easy if you have an Arduino (preferably a UNO) or an emonTx, plus you need a programmer and set up the Arduino IDE.

If you haven’t got any of these, then the obvious question is, where did you get the sensors from? If you look at the article, it lists accredited suppliers where there’s the nearest you get to a cast iron guarantee that the sensor is genuine.

If you read some of the stories about fakes, it appears some were even TO3 transistors with DS18B20 printed on them. Of course, there are also clones that are good, unfortunately there’s no way of knowing until you get them in your hands.

1 Like

I got it from a reseller back home, which is not on the list (I usually prefer those than Amazon/Ebay/Aliexpress), who would have known… I’ll file a complaint and see how it goes.

You’re certain you’ve identified the sensor lead-out correctly, and the breakout? If you’re sure both are correct, then it does indeed look like a out-of-specification sensor.

Here is how it’s plugged


and wired:
IMG_6647

Is your Ethernet jumper cable wired pin-pin, or is it a crossover one? i.e., are both plugs wired to T-568A or to T-568B, and not one of each? (Though that should not affect the GND, + 5 V or the OneWire connections.)
Can you check the 5 V is present, and continuity from the terminal screws to the plug at the emonPi end:

It’s pin to pin jumper cable, T568.B. As I mentioned in the beginning, I do get the 5V (actually 4,55 V) on the +5V and 3,75V on the Onewire connection.

I also had trouble with some ebay ones, they wouldn’t show up on the Pi, but on the emontx they would.

@Ross

That’s interesting.

The main difference is, the sensors are permanently powered when connected using the RJ45 connector, whether that is on the emonPi or the emonTx; but when connected via the screw terminals on the emonTx, the power is switched on just before a reading, and off after.

There are also small differences in the software - the emonPi relies almost exclusively on the Dallas library, whereas emonLibCM in the emonTx only uses a small part of that and for the most part reads the sensor and computes the temperature itself.

@Ecoterrien
The OneWire bus is normally high, it is pulled down by data either from the Pi to command the sensors, or by the sensors responding. You should see activity at startup as it detects the sensors and they respond, after that, only if it found sensors will it command them to “convert” the temperature and send the result. So a steady “high” indicates what we already know - it couldn’t find a sensor.

The yellow trace is the One-Wire bus, with two sensors first commanded to “convert” the temperature, then polled sequentially to get the result.

1 Like

Hello, so I did connect one sensor to a raspberry Pi OS and it returned me a temperature so it does work with some conditions.

Both connected by the RJ45 socket?

Yes both by RJ45 block