DS18B20

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jollybv
Posts: 125
http://meble-kuchenne.info.pl
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

DS18B20

Post 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
DS18B20.png (89.39 KiB) Viewed 2808 times
Example_DS18B20.fcfx
(13.91 KiB) Downloaded 114 times

LeighM
Valued Contributor
Posts: 395
Joined: Mon Dec 07, 2020 1:00 pm
Has thanked: 70 times
Been thanked: 210 times

Re: DS18B20

Post by LeighM »

Hi,
Your UART is set to Software mode, this isn't supported on ESP, could you use a hardware channel?

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: DS18B20

Post 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?

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: DS18B20

Post 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.

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: DS18B20

Post 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

BenR
Matrix Staff
Posts: 1726
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 438 times
Been thanked: 602 times

Re: DS18B20

Post 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.

jollybv
Posts: 125
Joined: Mon Mar 08, 2021 11:25 am
Location: Cape Town South Africa
Has thanked: 40 times
Been thanked: 11 times

Re: DS18B20

Post by jollybv »

Thanks Ben

I will try this and see how I get along

Post Reply