So the idea is that AIN1 accepts a 0-5 V signal which is protected against short circuits to 30 V.
I also want to connect a thermistor between GND and AIN1 with no external components (resistor and power supply) so I have the left hand side of the circuit which provides a 5V reference voltage. The FDv304Ps switch between the 4k02 and 560R provide better resolution across a wide temp range.
At the moment AIN1 is protected with a SMBJ5.0A
AIN1B is the output then connects to an ADC on an STM32F
This was my first idea:
Please ignore the lack of ground symbol, it's because I have multiple analog grounds and multiple different symbols would get confusing.
AINB is the output.
But after doing some research I found the following problems:
When using a thermistor it would be very hard to scale due to having one voltage divider (the thermistor and TR1/2) feeding another (R122&125).
The SMBJ5.0 will introduce an error into the voltage divider but I think I can overcome this by using an SMBJ13A which has a much lower leakage current.
Is it best to add a voltage follower op amp between AIN1 and R122 or just to use a SMBJ13A instead of the SMBJ5.0A?
This question is only relevant if I do use the second Op Amp. I will need to power the first op amp (IC11B) with 5V so I can accept the 5V input or if a MOSFET is activated without a thermistor connected. This will mean powering the second (IC11A) with 5V. Will this affect the output AIN1B or will it still have a maximum of around 2.5V? I now know that the output will not be affected by the power supply to the OA
At the moment the resistors are set to allow a max of 2.5V and I am using a precision 2.5V reference to supply the Vref+ pin of the STM32F. This was done on a recommendation but I'm unsure why. Should I leave it like it is or use 17k & 33k resistors and a 3v3 reference? What are the benefits of both options?
Thermistor values are vague at best but one would have the following values:
- 20 °C 2.1 - 2.9kΩ
- 50 °C 0.68 - 1.00kΩ
- 90 °C 0.236 - 0.260kΩ
Temp range would be -5 to 100 °C.
I'm more concerned if the actual circuit will work reliably, be protected against shorts to up to 30 V and be able to read the full 0-5V analog input.
Update based on comments and Dorian's brilliant answer:
The thermistor will be connected between AIN1 and an external ground with a current capacity greater than any nearby live so the ground side of the thermistor connection can be considered fully protected. I am only after protecting the analog input (AIN1).
When not using a thermistor the FETs will be turned off and a sensor with an analog output of 0-5V will be connected to the analog input. A typical sensor will be a 3-wire automotive pressure sensor, with 5V, Ground and the Output signal. 5V is already protected and the ground is the same as above.
I am no longer worried about scaling as the sensors will need to be reverse-engineered and I'll have to use look up tables etc.
So will this circuit work as intended and be protected from permanent shorts of up to 30V?
What other way can I achieve this?
As above what is the benefit of setting a max output and reference voltage of 2.5V rather than using 17k & 33k resistors and using a reference voltage of 3.3V? What would you do and why?