Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

66%
+2 −0
Q&A NTC configurations

You say you are using a NTC (negative temperature coefficient) thermistor. That means it's resistance goes lower as the temperature goes higher. With the thermistor as the top leg of the divider,...

posted 11mo ago by Olin Lathrop‭  ·  edited 11mo ago by Olin Lathrop‭

Answer
#2: Post edited by user avatar Olin Lathrop‭ · 2025-10-31T11:17:32Z (11 months ago)
  • You say you are using a NTC (negative temperature coefficient) thermistor. That means it's resistance goes lower as the temperature goes higher. With the thermistor as the top leg of the divider, the voltage goes up with increasing temperature. With the thermistor in the bottom leg of the divider, the voltage goes down with increasing temperature.
  • Since the voltages results in digital A/D values inside the microcontroller, it doesn't matter at all which direction those numbers go in response to temperature changes. Either way can be accommodated easily by the firmware.
  • The choice of thermistor placement is usually due to whether it is easier to connect one side to ground or power. One of the other might be more available in a particular remote location. If both are available, I'd probably connect one side to ground, and thereby put the thermistor in the bottom leg of the divider.
  • <blockquote>Is it recommended to place a parallel capacitor with the NTC thermistor?</blockquote>
  • Yes. Especially since the thermistor is at some physical distance from the measuring circuit, the thermistor signal line can pick up noise. Since temperature signals are very slow, you can do a lot of filtering in the firmware. However, pickup from radio stations and other noise sources can be high enough frequency to confuse the measuring circuitry. A capacitor to ground attenuates the frequencies the A/D and its input circuitry can't handle. Firmware filtering can then take care of the rest.
  • The rolloff frequency of the resistor divider and the capacitor should be such that bothersome high frequencies are attenuated to oblivion. Fortunately there is a lot of room between meaningful temperature frequencies and the maximum allowed frequency to prevent aliasing, even with "slow" sampling in the microcontroller.
  • For example, if the micro is sampling the A/D at 10 kHz (quite slow for a modern micro), then you need to squash frequencies above 5 kHz. Since meaningful temperature information is probably no more than 1 Hz, you have a 5000:1 range between valid signals and noise that causes aliasing. In this case, I'd chose something around 100 Hz based on reasonable capacitor values. I'd then do multi-pole firmware filtering to result in a step response just a little faster than needed.
  • You seem to have decided to use 10 k&Omega; as the pullup/down with your thermistor. The highest output impedance of the divider is then 5 k&Omega;. If you sample at 10 kHz (every 100 &micro;s), then a single pole RC filter with a rolloff frequency of 100 Hz would attenuate aliasing frequencies by at least 50. That would require a 318 nF capacitor, so 500 nF it is.
  • Three poles of software low pass filtering with a filter fraction of 1/256 results in a 95% settling time of 1,600 samples, or 160 ms. That's still way faster than most thermistors can meaningfully change, but provides so much random noise suppression that it's hardly worth going further.
  • You say you are using a NTC (negative temperature coefficient) thermistor. That means it's resistance goes lower as the temperature goes higher. With the thermistor as the top leg of the divider, the voltage goes up with increasing temperature. With the thermistor in the bottom leg of the divider, the voltage goes down with increasing temperature.
  • Since the voltages results in digital A/D values inside the microcontroller, it doesn't matter at all which direction those numbers go in response to temperature changes. Either way can be accommodated easily by the firmware.
  • The choice of thermistor placement is usually due to whether it is easier to connect one side to ground or power. One of the other might be more available in a particular remote location. If both are available, I'd probably connect one side to ground, and thereby put the thermistor in the bottom leg of the divider.
  • <blockquote>Is it recommended to place a parallel capacitor with the NTC thermistor?</blockquote>
  • Yes. Especially since the thermistor is at some physical distance from the measuring circuit, the thermistor signal line can pick up noise. Since temperature signals are very slow, you can do a lot of filtering in the firmware. However, pickup from radio stations and other noise sources can be high enough frequency to confuse the measuring circuitry. A capacitor to ground attenuates the frequencies the A/D and its input circuitry can't handle. Firmware filtering can then take care of the rest.
  • The rolloff frequency of the resistor divider and the capacitor should be such that bothersome high frequencies are attenuated to oblivion. Fortunately there is a lot of room between meaningful temperature frequencies and the maximum allowed frequency to prevent aliasing, even with "slow" sampling in the microcontroller.
  • For example, if the micro is sampling the A/D at 10 kHz (quite slow for a modern micro), then you need to squash frequencies above 5 kHz. Since meaningful temperature information is probably no more than 1 Hz, you have a 5000:1 range between valid signals and noise that causes aliasing. In this case, I'd chose something around 100 Hz based on reasonable capacitor values. I'd then do multi-pole firmware filtering to result in a step response just a little faster than needed.
  • You seem to have decided to use 10 k&Omega; as the pullup/down with your thermistor. The highest output impedance of the divider is then 5 k&Omega;. If you sample at 10 kHz (every 100 &micro;s), then a single pole RC filter with a rolloff frequency of 100 Hz would attenuate aliasing frequencies by at least 50. That would require a 318 nF capacitor, so 500 nF it is.
  • Three poles of software low pass filtering with a filter fraction of 1/256 results in a 95% settling time of 1,600 samples, or 160 ms. That's still way faster than most thermistors can meaningfully change, but provides so much random noise suppression that it's hardly worth going further.
  • <blockquote>I have a demo board built by other team in which the NTC is connected to GND. So I need to keep the capacitor in parallel NTC. May I know can I keep 0.1uF in parallel with NTC.</blockquote>
  • That's your second (right) diagram, just that the leads to the thermistor are long.
#1: Initial revision by user avatar Olin Lathrop‭ · 2025-10-30T21:30:33Z (11 months ago)
You say you are using a NTC (negative temperature coefficient) thermistor.  That means it's resistance goes lower as the temperature goes higher.  With the thermistor as the top leg of the divider, the voltage goes up with increasing temperature.  With the thermistor in the bottom leg of the divider, the voltage goes down with increasing temperature.

Since the voltages results in digital A/D values inside the microcontroller, it doesn't matter at all which direction those numbers go in response to temperature changes.  Either way can be accommodated easily by the firmware.

The choice of thermistor placement is usually due to whether it is easier to connect one side to ground or power.  One of the other might be more available in a particular remote location.  If both are available, I'd probably connect one side to ground, and thereby put the thermistor in the bottom leg of the divider.

<blockquote>Is it recommended to place a parallel capacitor with the NTC thermistor?</blockquote>

Yes.  Especially since the thermistor is at some physical distance from the measuring circuit, the thermistor signal line can pick up noise.  Since temperature signals are very slow, you can do a lot of filtering in the firmware.  However, pickup from radio stations and other noise sources can be high enough frequency to confuse the measuring circuitry.  A capacitor to ground attenuates the frequencies the A/D and its input circuitry can't handle.  Firmware filtering can then take care of the rest.

The rolloff frequency of the resistor divider and the capacitor should be such that bothersome high frequencies are attenuated to oblivion.  Fortunately there is a lot of room between meaningful temperature frequencies and the maximum allowed frequency to prevent aliasing, even with "slow" sampling in the microcontroller.

For example, if the micro is sampling the A/D at 10 kHz (quite slow for a modern micro), then you need to squash frequencies above 5 kHz.  Since meaningful temperature information is probably no more than 1 Hz, you have a 5000:1 range between valid signals and noise that causes aliasing.  In this case, I'd chose something around 100 Hz based on reasonable capacitor values.  I'd then do multi-pole firmware filtering to result in a step response just a little faster than needed.

You seem to have decided to use 10 k&Omega; as the pullup/down with your thermistor.  The highest output impedance of the divider is then 5 k&Omega;.  If you sample at 10 kHz (every 100 &micro;s), then a single pole RC filter with a rolloff frequency of 100 Hz would attenuate aliasing frequencies by at least 50.  That would require a 318 nF capacitor, so 500 nF it is.

Three poles of software low pass filtering with a filter fraction of 1/256 results in a 95% settling time of 1,600 samples, or 160 ms.  That's still way faster than most thermistors can meaningfully change, but provides so much random noise suppression that it's hardly worth going further.