Thermistor!

For general Flowcode discussion that does not belong in the other sections.
Post Reply
jgu1
Posts: 777
http://meble-kuchenne.info.pl
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 174 times

Thermistor!

Post by jgu1 »

Hi!

In My curiosity I would try an experiment and test the thermistor component. I think it was you who made it Martin. When I simulate it work nice
but in real world nothing happend. If I set the Wiring to Pullup the display only show 125.00 If I flip to pull down it show -25 No matter what I do to the analog input, no change.
I have a divider with a 10k resistor in serie with the thermistor and take the signal out in the "middle". just like a potentiometer. Suppose that is ok?

I made a test macro to check the analog input, and it work.

What am I do wrong, please.

Br Jorgen.
Attachments
Thermistor.fcfx
(12.76 KiB) Downloaded 142 times

medelec35
Matrix Staff
Posts: 1920
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 622 times
Been thanked: 645 times

Re: Thermistor!

Post by medelec35 »

Hi.
No that's not one of my components.
What I believe is going on with the thermistor component is the Vref option is default to AREF instead of AVCC.
Can you try connecting the AREF on the Arduino to +supply.
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 174 times

Re: Thermistor!

Post by jgu1 »

Thank´s Martin. Though it was you, sorry :D

You mean in Properties, no it is not possible to change? Edit, ohh you mean on the Arduino, I test.

Connect the Aref to the 5V on the Arduino, now it fluactivating up and down.?

medelec35
Matrix Staff
Posts: 1920
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 622 times
Been thanked: 645 times

Re: Thermistor!

Post by medelec35 »

jgu1 wrote:
Wed Mar 16, 2022 8:30 pm
Thank´s Martin. Though it was you, sorry :D
Not a problem. :)
jgu1 wrote:
Wed Mar 16, 2022 8:30 pm
You mean in Properties, no it is not possible to change?
Not at the moment.
I will be changing the component so Vref options will be able to be changed.
jgu1 wrote:
Wed Mar 16, 2022 8:30 pm
Connect the Aref to the 5V on the Arduino, now it fluactivating up and down.?
You could have a poor connection, especially if using Dupont wires?
An easy way to test is to make the ADC input exactly 1/2 the supply voltage with two resistors of the same value or a pot.
You should then see 25C on the display.
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 174 times

Re: Thermistor!

Post by jgu1 »

Again you are rigth Martin Thank´s, bad wire work now and stable and react fast. Only need calibration.

I dare to ask again, why should the 5V be connected to Aref and who could know this, can´see it anywhere? :lol: Now the device is an Arduino, what if I change to some kind Pic? ;)

Thank´s in advance

Jorgen

medelec35
Matrix Staff
Posts: 1920
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 622 times
Been thanked: 645 times

Re: Thermistor!

Post by medelec35 »

jgu1 wrote:
Thu Mar 17, 2022 4:27 pm
Again you are rigth Martin Thank´s,
That's great, I'm glad it's stable now.
jgu1 wrote:
Thu Mar 17, 2022 4:27 pm
I dare to ask again, why should the 5V be connected to Aref and who could know this, can´see it anywhere?
That is a very reasonable question to ask.
The issue is ADC for AVR default is to use the external reference (AREF) for Vref options.
Therefore either need to connect external reference to a voltage source
Or
Change Vref option to AVCC = VDD.
You can change the Vref option for the standard ADC component, as that is an exposed property.
Unfortunately, you can't change the Vref option on components like thermistor that uses ADC component, but the Vref option has not been exposed to properties.
I can correct that this morning
So, when Ben pushes the update on the system, the updated thermistor component will have the Vref option within properties.
All you will need to do is change Vref option from AREF to AVCC, then the wire from AREF can be removed.

The PIC is not affected as VREF option defaults to VDD
Martin

jgu1
Posts: 777
Joined: Thu Dec 03, 2020 8:25 pm
Location: Denmark
Has thanked: 670 times
Been thanked: 174 times

Re: Thermistor!

Post by jgu1 »

Thank you very much for your explanation Martin. and thanks for the update concerning Vref. I will test when Ben update.
I'm actually amazed at how accurate NTC is, so far, just now it working need to play a bit more with this. I know that NTC not is linear. I have to test "on the way up" and need adjustment in config.

Jorgen.

Post Reply