DS18B20 connection

Sergejs
Posts: 45
http://meble-kuchenne.info.pl
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 25 times
Been thanked: 3 times

DS18B20 connection

Post by Sergejs »

Hello everyone!

How to connect DS18B20 to MCU 16F721 with one-wire if there is no pin available in settings of component?

Is there power supply need to DS18B20 or it get power from MCU?

How about self heating problem of this sensor?

medelec35
Matrix Staff
Posts: 494
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 154 times
Been thanked: 184 times

Re: DS18B20 connection

Post by medelec35 »

If you right-click on the DS18B20 component & select help, A help window will open, contacting a practical Example.
The example which you can download shows you how to connect one or more DS18B20.
The power for DS18B20 you will get from VDD and GND.
No, I don't believe self-heating will be of any concern.
Martin

BenR
Matrix Staff
Posts: 799
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 169 times
Been thanked: 255 times

Re: DS18B20 connection

Post by BenR »

Further to Medelec's post.

The DS18B20 component requires the OneWire component which hosts the bus and has the pin connection properties you're looking for. The OneWire component is available under Comms -> Comms: Interface.

It's been done like this to allow for multiple different types of device to be hooked onto a single OneWire bus and to keep things as simple and efficient as possible.

For example.
OneWire.jpg
OneWire.jpg (24.08 KiB) Viewed 596 times
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

Amtor
Posts: 20
Joined: Thu Dec 17, 2020 4:35 pm
Has thanked: 9 times
Been thanked: 7 times

Re: DS18B20 connection

Post by Amtor »

Hello
I had a DS18B20 connected to a 18F4620 and I noticed that it would read up to a certain temp and then an error occured,
I increased the clock speed then it would read further up the scale before the error occured. I ended up leaving it running at 32MHz.
It worked perfectly then. I expect it would work a bit slower than that but I think you may need a fast clock speed. I think the pullup
resistor size affected it a bit as well.
Maybe it was just me doing something wrong somewhere.
All the best
Mark

Sergejs
Posts: 45
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 25 times
Been thanked: 3 times

Re: DS18B20 connection

Post by Sergejs »

This very bad that I must buy more than I need. For example DS18B20 + OneWire components I need in one package. But it is not possible to do because they both sells in different packages.

Amtor
Posts: 20
Joined: Thu Dec 17, 2020 4:35 pm
Has thanked: 9 times
Been thanked: 7 times

Re: DS18B20 connection

Post by Amtor »

Hello
If you just add the onewire component and down grade it to version 5 that might solve your problem.
Version 5 has DS18B20 commands built into it.
Its worth a try.
Or I think maybe the onewire component is not in the version you have. You might be stuck then.
Mark
onewire version 5.JPG
onewire version 5.JPG (28.37 KiB) Viewed 455 times
library update section on flowcode downgrage to version 5.JPG
library update section on flowcode downgrage to version 5.JPG (33.79 KiB) Viewed 455 times

medelec35
Matrix Staff
Posts: 494
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 154 times
Been thanked: 184 times

Re: DS18B20 connection

Post by medelec35 »

Hi.
To use the DS18B20, only Comms A is required to be purchased.
There are discussions going on behind the scenes on how this can be made clearer on the Flowcode website.
Hopefully, this can be cleared up soon to your satisfaction.
Sorry for any inconvenience caused.
Martin

Sergejs
Posts: 45
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 25 times
Been thanked: 3 times

Re: DS18B20 connection

Post by Sergejs »

It is Ok now. Alfie resolve my problem very fast and easy. I just want tell him very Thanks.

Sergejs
Posts: 45
Joined: Tue Oct 19, 2021 9:31 am
Has thanked: 25 times
Been thanked: 3 times

Re: DS18B20 connection

Post by Sergejs »

Can I see example with Arduino Nano + OneWire + DS18B20 please?

This combination just give errors when compilied. May be I do something wrong?
Attachments
2021-12-15_214550.jpg
2021-12-15_214550.jpg (105.52 KiB) Viewed 320 times

medelec35
Matrix Staff
Posts: 494
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 154 times
Been thanked: 184 times

Re: DS18B20 connection

Post by medelec35 »

Hi.
Screenshots don't help, unfortunately.
Have you made sure you have downloaded the latest version and assigned one wire component to a suitable pin?
If you have then can you post your flowchart and .msg.txt file.
Martin

Post Reply