Different Thermister Results using I/O pins vs 3.3V power

Thread Starter

MB107

Joined Jul 24, 2016
400
@Art Vandelay

I have a project I'm using to drive a PWM fan for my car. I am using a Nano 3.3 BLE that has a 3.3V pin. All works fine when using the 3.3V pin to power the three thermisters and the PWM circuit.

But I decided I wanted to use less power when the car was off and not drain the battery, so I moved the three thermisters and the PWM circuit to separate IO pins which I turn on when the car is started and turn off 30 seconds after the car is shut off. Unfortunately I found that this only worked right for the one high resistance thermister that is backed by a 3.3KΩ resistor. I have two lower resistance thermisters that are backed by 220Ω resistors.

I did find I can back the low resistance thermisters with a 3.3KΩ resistor as well and it gets much better but the resolution becomes very low using up ~ 0.1 V for the entire operating range of the thremisters and it becomes close like withing +/- 3° C accuracy but still not as close as it was on the 3.3V buss.

I can get different higher resistance thermisters, but I prefer to use these genuine Delphi automotive ones if possible.

So for the moment I would really like to know why this isn't working. For reference the 3.3V buss on the Nano 3.3 BLE can handle up to 1A total. The IO pins can do 10mA each. I cant see me exceeding that on this circuit.

The first picture is the schematic that works with all power coming from the 3.3V buss.
The second picture is with power taken off individual I/O pins.

1733235902218.png

1733235755412.jpeg


1733235797114.jpeg
 

KeithWalker

Joined Jul 10, 2017
3,603
I may be reading your circuit diagrams wrong, but I can not see how you are getting any voltage readings at all from the thermistors. In the first diagram, the thermistors are connected between the +3.3V reference and the ground on the header. The 5K resistors on the analog inputs are connected to the grounded ends of the thermistors. They will all read 0V !
 

Thread Starter

MB107

Joined Jul 24, 2016
400
I may be reading your circuit diagrams wrong, but I can not see how you are getting any voltage readings at all from the thermistors. In the first diagram, the thermistors are connected between the +3.3V reference and the ground on the header. The 5K resistors on the analog inputs are connected to the grounded ends of the thermistors. They will all read 0V !
I'm not sure if you understand that the thermisters are not shown in the schematic. The are at the end of a harness that connects to the J1 connector. Essentially between A1-B1, A2-B2, A3-B3. A1-B1 and A3 to B3 would be thermisters typically working in the 100Ω to 300Ω range. A2-B2 would be a thermister working in the 1KΩ to 10KΩ range.
 

sagor

Joined Mar 10, 2019
1,046
Tech specs for the 33BLE say maximum current per pin (GPIO) is 10mA. Your 220 ohm resistors, if going to ground (or near ground potential) would draw 15mA at 3.3V I/O, too much. Higher resistance thermistors may help, as long as the lowest resistance is well above 100 ohms (plus your 220 ohm = 320+ohms, close to 10mA or less)
 

panic mode

Joined Oct 10, 2011
4,864
case 1 and 3:
you are using 220 Ohm resistor and thermistor as voltage divider and thermistor is 100-300 Ohm

case 2
the voltage divider resistor is 3.3k and thermistor is 1k-10k.

problem i see is large current through thermistors. this must be causing substantial self heating. the whole point of ANY measurement is to not disturb system under surveillance.

say thermistor is in the mid range or 200 Ohm. with 220 Ohm and 3.3V supply, that means current is 3.3V/420Ohm=7.86mA and dissipated power is more than 12mW. that is pretty significant. for comparison, in my designs i normally use constant current source that has thermistor current fixed at 50 or 100uA and dissipated power at mid range is some 0.02mW. then i use AFE (analog front end) that amplifies the value before sampling by ADC.

but that is just the mid range. with thermistor in 100 Ohm range, current is 3.3V/(220+100 Ohm)= 10.3mA

next problem is that you complain about resolution but i see is that you are using ADC of the MCU. if i recall nano only has 10-bit ADC so this is a bottleneck. if you use Uno Minima, you get 14bit ADCs (0-16383 counts). or if you use external ADC you can get 16-bit or 24bit resolution (at least on paper).

i see sagor beat me to it...


anyway... the next problem is that you are not using stable reference.
and 3.3V while pretty stable is not good enough. and exceeding GPIO current means levels are not the same so accuracy of your readings will suffer.
 
Last edited:

KeithWalker

Joined Jul 10, 2017
3,603
I'm not sure if you understand that the thermisters are not shown in the schematic. The are at the end of a harness that connects to the J1 connector. Essentially between A1-B1, A2-B2, A3-B3. A1-B1 and A3 to B3 would be thermisters typically working in the 100Ω to 300Ω range. A2-B2 would be a thermister working in the 1KΩ to 10KΩ range.
No, I did not understand because you didn't show the components in your diagram that are the subject of discussion.
Now it is obvious that the low resistance thermistors will draw too much current when connected to digital outputs.
 

Thread Starter

MB107

Joined Jul 24, 2016
400
No, I did not understand because you didn't show the components in your diagram that are the subject of discussion.
Now it is obvious that the low resistance thermistors will draw too much current when connected to digital outputs.
I need to figure out a way to make my cad files show a harness without messing up my board files. Maybe I can just stuff a thremister in the schematic and then remove it later.
 

Thread Starter

MB107

Joined Jul 24, 2016
400
Tech specs for the 33BLE say maximum current per pin (GPIO) is 10mA. Your 220 ohm resistors, if going to ground (or near ground potential) would draw 15mA at 3.3V I/O, too much. Higher resistance thermistors may help, as long as the lowest resistance is well above 100 ohms (plus your 220 ohm = 320+ohms, close to 10mA or less)
Ive been considering going to 440Ω just for that reason. But Ive been testing with a 220Ω resistor in place of the thermisters and is really is off even though it within limits at that point.
 

Thread Starter

MB107

Joined Jul 24, 2016
400
case 1 and 3:
you are using 220 Ohm resistor and thermistor as voltage divider and thermistor is 100-300 Ohm

case 2
the voltage divider resistor is 3.3k and thermistor is 1k-10k.

problem i see is large current through thermistors. this must be causing substantial self heating. the whole point of ANY measurement is to not disturb system under surveillance.

say thermistor is in the mid range or 200 Ohm. with 220 Ohm and 3.3V supply, that means current is 3.3V/420Ohm=7.86mA and dissipated power is more than 12mW. that is pretty significant. for comparison, in my designs i normally use constant current source that has thermistor current fixed at 50 or 100uA and dissipated power at mid range is some 0.02mW. then i use AFE (analog front end) that amplifies the value before sampling by ADC.

but that is just the mid range. with thermistor in 100 Ohm range, current is 3.3V/(220+100 Ohm)= 10.3mA

next problem is that you complain about resolution but i see is that you are using ADC of the MCU. if i recall nano only has 10-bit ADC so this is a bottleneck. if you use Uno Minima, you get 14bit ADCs (0-16383 counts). or if you use external ADC you can get 16-bit or 24bit resolution (at least on paper).

i see sagor beat me to it...


anyway... the next problem is that you are not using stable reference.
and 3.3V while pretty stable is not good enough. and exceeding GPIO current means levels are not the same so accuracy of your readings will suffer.
So far all testing has been done with 220Ω resistors in place of the two thermistors therefor the current should have been down to ~7.5ma, well withing spec but I agree those resistors need to at least be doubled.

I can get 12 ATD with the Nano 33 BLE. That might help a bit but I don't think its the real problem because the results with a 3.3K resistor installed are off by about 5 out of 1023. Not great but If it was off by 1 I would say absolutely a resolution problem. I think the real problem is as you say a stable reference. This has also been pointed out on the Arduino forum. So I think the next step is to turn on the thermisters using some kind of MOSFET setup to switch the 3.3V pin on.

Thanks
 

Thread Starter

MB107

Joined Jul 24, 2016
400
Heres what I've come to learn so far after reading up on MOSFETs, SSR relays reed relays etc.

All of the schemes have some kind of resistance that ends up in line with the resistor thermister network. That's OK as long as they are predictable or really small. The MOSFETs have the largest Rds which appears to be a moving target at least for selecting it. It might be stable once its all figured out but I will need to get more comfortable with that. They also are difficult to get working with 3.3V systems.

The reed relay appears to the simplest out of the box solution. They are a little large but nearest I can tell don't require any other supporting resistors etc. The particular one I found has a rated resistance across the contacts of 0.1Ω

So the plan will be to power all 4 circuits using 1 reed relay to turn 3.3V from the 3.3V pin to all the thermisters and the PWM transistor circuit.

I'm not seeing a reason to get any more elaborate, unless anyone can think of one.

https://4a30d8fd18dae1bf393d-df49f4...cf5.rackcdn.com/datasheets/33/3303172171e.pdf
 

panic mode

Joined Oct 10, 2011
4,864
and...do they need to be switched? they are on separate inputs and any switch will introduce some voltage drop and therefore have an effect.. if not needed, do not switch them at all...
 

Thread Starter

MB107

Joined Jul 24, 2016
400
and...do they need to be switched? they are on separate inputs and any switch will introduce some voltage drop and therefore have an effect.. if not needed, do not switch them at all...
They are only switched on when the car is started then switched off when the car is shut down to save power. So no reason for separate channels as long as the 3.3V power source can handel ~ 60mA. The Arduino runs at all times to allow the fan to run a few second after shut off. Without switching the thermisters off the Arduino draws about 4ma. I believe I can get down to about 1ma if I can turn those off.

1733319715188.png
 

panic mode

Joined Oct 10, 2011
4,864
you can switch all three of them with same transistor....
and then you can use AREF to compensate for voltage drop across that transistor
 

Thread Starter

MB107

Joined Jul 24, 2016
400
you can switch all three of them with same transistor....
and then you can use AREF to compensate for voltage drop across that transistor
Sounds too good to be true. And it may be for the Nano 33 BLE. See the last line in the table. But it looks like its turned on at 3.3V by default or could be turned on by analogeReferance(AR_VDD). Or some other voltage with some of the other options.


1733351863221.png
1733354116607.png
 
Last edited:
Top