[SOLVED] Unable to detect DS18B20 temperature sensor

This is the message I get when I've connected a DS18B20 sensor to the relevant connectors on my emonTxV3. Has anyone else got the temperature sensor working on the V3 ?

How can I debug whether there is a problem with the sensor, or with the sketch?

Thanks,

Allen

AllenConquest's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

Ok, found the problem. The version of the emonTxV3_RFM12B_DiscreteSampling.ino sketch I was using had the PWR and DATA pins swapped around. I see that was corrected in github quite recently.

However, what confused me was that the Wiki was incorrect as well. I have now updated the Wiki to have the correct pins.

 

xrayman's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

The wording on the wiki is still a bit confusing as the text does not match the table regarding power and data lines.

I'm also not receiving any temperature from my DS18B20 connected to my emonTx V3 can you confirm the pins please?

xrayman's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

This is really odd now. I rebooted my Pi and now I am detecting temperature readings from my emonTX unit? But not the VMRS anymore (this stopped after I updated to v 8.3.2 of emoncms).

Robert Wall's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

"The wording on the wiki is still a bit confusing"
I can't trace that - can you cite a complete reference please?

xrayman's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

From wiki

To do this power (3.3V) is supplied to the DS18B20's power pin from Dig5, this digital pin is switched off between readings. The data connection from the DS18B20 is connected to Dig19, this I/O pin has got a 4K7 pull-up resistor on-board the emonTx V3's PCB as required by the DS18B20.
 

To connect an external DS18B20 to the emonTx V3 screw terminal block connections are as follows

DS18B20 emonTx V3 screw terminal connections
Screw terminal pin DS18B20 Connection
3 - GND GND (Black)
5 - Dig19 Power (Red)
6 - Dig5 Data (White)

I have tried to mark the where the sentence does not appear to match the table. Although it could simply be that I do not understand the sentence.

xrayman's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

I have also fixed the VMRS feed issue. Oddly I had to:

  1. reboot my Pi
  2. turn off AC-AC
  3. unplug AC-AC from wall
  4. unplug all the emonTX connections
  5. plug back in all emonTX connections
  6. plug back in AC-AC to wall
  7. turn back on AC-AC

After that the emonTX rebooted long red led, rapid led pulsing, then pulse after 10 seconds.

I had also noticed my recorded power in Watts had gained 30 W for no obvious reason. After getting the VMRS feed back or the reboot it now has gone back to previous observable levels - probably a calibration issue?

 

Robert Wall's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

A link to the Wiki page would help.

Robert Wall's picture

Re: [SOLVED] Unable to detect DS18B20 temperature sensor

Finally, I found the offending passage. The table is correct, the text was wrong. I have corrected it. Thanks for pointing that out.
It appears that AllenConquest had changed the table but not the text, and the error was copied into the emonTx V3.4.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.