Page 1 of 1
DS18B20
Posted: Wed Sep 08, 2021 7:51 am
by jollybv
Hi guys
I ordered some probes from china and the ended up being DS18B20, I found the example on wiki but for some reason it will not compile to the esp32, Keep getting warnings and then it fails Could this be something I'm doing or a problem with the 1 wire component?
![DS18B20.png](./download/file.php?id=1539&sid=b42242b0139b05ee0d176c8922496436)
- DS18B20.png (89.39 KiB) Viewed 3138 times
Re: DS18B20
Posted: Wed Sep 08, 2021 8:10 am
by LeighM
Hi,
Your UART is set to Software mode, this isn't supported on ESP, could you use a hardware channel?
Re: DS18B20
Posted: Wed Sep 08, 2021 8:39 am
by jollybv
Hi Leigh
Thanks that worked now to figure out why I'm getting a loads of 0000 probably not connected to the right pin on the esp32 module Is the pin 10 (esp module) Port A25 the correct pin for this?
Re: DS18B20
Posted: Wed Sep 08, 2021 10:31 am
by BenR
The OneWire pin can be any of the digital IO pins. Yes it is pin IO25 currently in the example.
Do you have a pull up resistor between A25 and VCC. I used a 1K resistor for my testing and that worked well.
Re: DS18B20
Posted: Wed Sep 22, 2021 7:49 am
by jollybv
Hi Ben
The 1K did the job I was using a 47k which i saw on some web site it would work then stop working. Is it possible to use floating values in the PID conversion? say I want to set the set-point to 78.1, 78.2, 78.3 etc
Re: DS18B20
Posted: Wed Sep 22, 2021 12:36 pm
by BenR
Currently you would have to say multiply everything by 10 so instead of controlling to the degree you would control to the nearest tenth of a degree.
78.1 would therefore become 781.
You would have to divide back down before displaying the number again etc.
I am considering adding a Float buffer type to the DSP components but it's tricky and so far I'm not 100% sure how to do it cleanly.
Re: DS18B20
Posted: Thu Sep 23, 2021 6:44 am
by jollybv
Thanks Ben
I will try this and see how I get along