Voltage clamping reconstruction

Thread Starter

Gt_max

Joined Jun 14, 2025
6
Hello!I’m using an thermistor with an instrumentation amp. The output can go above 5 V or below 0 V, so I added a Zener and another diode to clamp it before sending it to Arduino but now the voltage Arduino reads isn’t the real one when clamping kicks in.
I want to measure temperature over a wider range, bc now it’s only working for a small range before the diodes are on . Is there a way to calculate the original voltage before clamping Or should I just change my resistor values or gain so the voltage stays within 0–5 V for a wider range?
Thanks !

1749919008622.png
 

Thread Starter

Gt_max

Joined Jun 14, 2025
6
Hi GT,
Welcome to AAC.
What is the purpose of D2 diode?
E
Hi, so when the temperature I’m measuring gets very high, the resistance of my thermistor gets smaller and smaller, which gives me negative voltages. My plan was to clamp both negative and above-5V voltages. D2 and the 100k pull-down resistor are responsible for clamping the negative voltages here.


1749920763451.png
 

Thread Starter

Gt_max

Joined Jun 14, 2025
6
Hi Gt,
This circuit shows the result of using two BAT54 diodes.

Input swings _/+10V but Vo is clamped to ~0V and +5V

E
View attachment 351043
Thanks so much for your response! This clamping result (0–5 V) is exactly what I needed to protect my Arduino. But now we’re feeding Vo directly into the Arduino, so my calculations only work in that unclamped range. Outside of that, the voltage is clipped and I lose accuracy.
I’m trying to figure out how to widen the usable temperature range so that more thermistor readings fall within the 0–5 V window. Right now, the thermistor only works properly between about 17 °C and 33 °C. Below 17 °C, the voltage gets too high, the Zener turns on, and the signal gets clamped at 5 V.
 

Thread Starter

Gt_max

Joined Jun 14, 2025
6
So what exactly is the useable range you want?
My plan is to be able to measure some lower and higher temperatures as well, not just room temperature. Around 5 to 45 degrees is what I'm hoping to get eventually bc with my current set up the result I'm getting is only accurate for smaller range bc of those safety diodes I'm using.
 

ericgibbs

Joined Jan 29, 2010
21,400
hi, Gt,
If you reduce the INA Gain to give 0v thru +5V for 5C thru 45C.
Set the Zero Vout to 0V for +5C and the Span to give +5Vout for 45C

E
 

Ian0

Joined Aug 7, 2020
13,100
Why is it so complicated? Connect the thermistor between 0V and the ADC input. Connect a resistor between the ADC input and the 5V supply.
Choose the resistor so that it is equal to the thermistor value at the centre of the range.
 

Thread Starter

Gt_max

Joined Jun 14, 2025
6
hi, Gt,
If you reduce the INA Gain to give 0v thru +5V for 5C thru 45C.
Set the Zero Vout to 0V for +5C and the Span to give +5Vout for 45C
I changed my gain and now my readings are accurate for the range of 4–47 degrees, which is perfect for what I need. The Zener diode is working fine to clamp the voltage at 5 V, but only when I disconnect it from the other diode and the pull down resistor. If I keep them connected, the setup prevents negative voltages, but the main problem is that I get wrong voltage readings all the time even in the normal range.

I think this happens because the diode and pull down resistor are constantly pulling the voltage down.Screenshot 2025-06-14 at 1.18.22 PM.pngScreenshot 2025-06-14 at 1.17.42 PM.png
 

Thread Starter

Gt_max

Joined Jun 14, 2025
6
Why is it so complicated? Connect the thermistor between 0V and the ADC input. Connect a resistor between the ADC input and the 5V supply.
Choose the resistor so that it is equal to the thermistor value at the centre of the range.
So just use a simple voltage divider ? That was actually the first thing I did but I noticed it wasn't precise when I had small temp changes, and right now with my current set up accuracy is 0.1 degree for this range 4-47 C
 

Ian0

Joined Aug 7, 2020
13,100
So just use a simple voltage divider ? That was actually the first thing I did but I noticed it wasn't precise when I had small temp changes, and right now with my current set up accuracy is 0.1 degree for this range 4-47 C
I use a 5k thermistor and 4.7k pull-up. For an 8-bit lookup table it gives 0.4°C per step at 4°C, 0.3°C per step at 25°C, and 0.5°C per step around 45°C.
If you have a 10-bit ADC, then you get a quarter of that, which is about 0.1°C step. If you then average a few readings, the noise in the system should and another bit of resolution by "dither".
 

AnalogKid

Joined Aug 1, 2013
12,061
0.1 degree accuracy is extremely difficult to achieve. A big part of the difficulty is calibrating the circuit.

What I've done in the past is a single-resistor bias for the thermistor, with a *very* accurate ($) thermistor, 0.1% tolerance bias resistor (back when they were expensive), and a tightly regulator bias voltage. In my case I ran that through a gain and offset opamp circuit to partially linearize the signal voltage and get it in the scale and range I needed. In your case I would linearize the signal with a lookup table in the uC.

And BTW, in your first schematic you do not need D2. D1 will clamp both positive and negative peaks, one at the zener voltage above GND, and the other at the zener diode's Vf below GND. If you want to clamp the negative peaks closer to GND, make D2 a Shottkey signal diode in parallel with D1. (anode to anode, cathode to cathode)

ak
 
Last edited:

Ian0

Joined Aug 7, 2020
13,100
0.1 degree accuracy is extremely difficult to achieve. A big part of the difficulty is calibrating the circuit.

What I've done in the past is a single-resistor bias for the thermistor, with a *very* accurate ($) thermistor, 0.1% tolerance bias resistor (back when they were expensive), and a tightly regulator bias voltage.

ak
It's a ratiometric measurement, so a regulated supply is totally unnecessary,
but curve matched thermistors are essential.
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,061
It's a ratiometric measurement, so a regulated supply is totally unnecessary,
I thought that right up to the point when I built it and found (intentional) power supply ripple in the output; not a lot, but still there. It was cheaper to regulate the supply than to use an instrumentation amplifier with 16-bit accurate common mode rejection. And, or course, it was worse when using a fixed voltage reference in a gain-and-offset circuit.

but curve matched thermistors are essential.
Totally agree. My favorite is the DC95F series by Thermometrics / Amphenol / GE / whatever. The newer datasheets are too brief, but the original Thermometrics catalog had a table with the resistance value *to 6 decimal places* at 1 degree increments over the entire operating range - perfect for linearizing with a look-up table. Page 12 of this document has an abbreviated table, plus the equations needed to fill in the gaps.

https://f.hubspotusercontent40.net/...-Temperature-resistance-curves-071816-web.pdf

ak
 
Last edited:

Ian0

Joined Aug 7, 2020
13,100
I thought that right up to the point when I built it and found (intentional) power supply ripple in the output; not a lot, but still there. It was cheaper to regulate the supply than to use an instrumentation amplifier with 16-bit accurate common mode rejection. And, or course, it was worse when using a fixed voltage reference in a gain-and-offset circuit.



Totally agree. My favorite is the DC95F series by Thermometrics / Amphenol / GE / whatever. The newer datasheets are too brief, but the original Thermometrics catalog had a table with the resistance value *to 6 decimal places* at 1 degree increments over the entire operating range - perfect for linearizing with a look-up table. Page 12 of this document has an abbreviated table.

https://f.hubspotusercontent40.net/...-Temperature-resistance-curves-071816-web.pdf

ak
It appears I'm using the same device, but it is badged "RSPro", and the RS Pro products all seem to have dreadful datasheets. After being pressed on the subject "You say it's curve matched, but what curve is it matched to?" they relented and told me where they got it.
Curve matched is essential as our customers lose or break them, then we get a call "The charger won't start", so we sell them and replacement, and it needs to be interchangeable.
 

AnalogKid

Joined Aug 1, 2013
12,061
Our final system had just one adjustment, the voltage reference for both the ratiometric bridge and the gain-and-offset circuit. Replace thermistor with a 0.01%, 4.xxxx K resistor, adjust the reference voltage such that the 3-1/2 digit DPM read 45.0 degrees, rock the trimpot back and forth so the wiper was in the middle of the position range for the 45.0 reading, and you're done. Remove the precision resistor, connect the thermistor, and ship it. That one adjustment brought everything into the middle of the error band for zero error in the middle of the range. From +20 to +70 C, the system had perfect field interchangeability with no re-calibration, accurate to 0.5 degC.

ak
 
Top