Quite often, devices use active sensors (thermistors, strain gauges, photoresistors, timeresistors, happyresistors, etc.).
To measure the appropriate value, the sensor is included in the divider circuit in one of its arms.
It is recommended to do this almost everywhere, especially where accuracy is not as important as cost. On the Internet, there are many lessons for arduinschikov about reading the temperature with the help of a thermistor. So do more serious applications.
For the example below, I presented a part of the circuit from the VESC 4.2 driver, which measures the temperature of the keys.
On the size of the resistor in the second shoulder, all express themselves differently. Someone connects the value only with the current limit on the thermistor heating.
Somewhere there are estimates and tips .
But I did not find specific instructions on the type: “Do this because this is the way.”
The engineering approach keeps me awake. There is a place for estimation in life, but sometimes the question arises: “Why exactly such resistance?”
Interest fueled the argument with a colleague. Well, the challenge is accepted.
I must say that the calculation was performed in the program SMath Studio. I attach the source . You can use it in your calculations.
It is necessary to enter only the range of resistance change, and the formula should return the optimal resistance of the second arm. The optimality criterion is the maximum voltage swing at the output.
There may be two variants of switching schemes: either the varying resistance is in the pads of the ADC, or vice versa.
From the point of view of optimality, the choice does not matter where to put the resistor with varying resistance, since the total resistance change in the circuit is important both as a result of current and as a result of a voltage drop, and it does not matter on which shoulder.
But then comes the consideration of the first option.
The voltage at the input of the ADC depends on the resistance of the constant resistor and the limits of variation of the variable:
Where - resistance of a constant resistor;
- the greatest resistance of the changing resistor;
- the smallest resistance of the changing resistor;
- supply voltage.
If we plot the dependence of this voltage on the resistance of a constant resistor, then we can see a pronounced peak, and this is exactly what we need (the graph is constructed for the case of a supply voltage of 1 V using an NTC thermistor in a wide temperature range).
If you need to find the maximum function, then we take the derivative. (I deliberately equated the input voltage to zero, since the resistance ratios are important here).
The roots will tell us either a piece of paper or computer algebra (thanks to GarryC for a kick in the direction of symbolic calculations):
Naturally, we are more suitable resistance more than zero. Since the delivery time of resistors with negative resistance is too long.
It happens that counting numbers is difficult, but I want to shake my thinking offhand. It happens, people offhand consider decibels, and everyone is amazed at their wits. In fact, they know a few secrets of how to do it.
Allocate and we have a few rules for clever in the future. According to the schedule, such estimations are easier to do. Just below it is presented (but it only demonstrates the dependency described earlier).
1 rule: If the change in resistance is insignificant, then the constant resistance should be approximately equal to the average change. But the voltage change will be negligible. Use a better bridge circuit.
2 rule: If the resistance changes many times, then the constant resistance should be less than the maximum possible for the variable.
Rule 3: The more changes the resistance in a variable resistor, the less should be the resistance constant relative to the maximum variable.
For example, when the difference between the boundary conclusions of the resistance of a variable resistor is 10 times, the recommended constant resistance should be about three times less than the maximum, and in case of a change of 50 times, the fixed resistor should already be 0.14 from the maximum in the range of the variable resistor.
If someone outlines additional rules or does not agree with the existing ones, share, and we will make our world more literate.
If you don’t want to delve at all, but you want to put a “conscious” divider project in your arduino, you can use the ready-made answer.
Which resistor to be paired with an NTC thermistor of 10 kΩ with V = 3950.
Below I have presented a table that shows the different ranges of measured temperatures and the corresponding resistance of the second arm.
Resistance range, degrees aim | Application | Recommended second shoulder resistance, kΩ | The percentage of use of the dynamic range of the ADC,% |
---|---|---|---|
0 .. + 125 | Monitoring indoor temperature inside devices | 3.3 | 81 |
-50 ... + 125 | Maximum speed for this thermistor | 18 | 96 |
-20 .. + 50 | Outdoor temperature | 20 | 68 |
If there are more common applications, then write, add more.
I hope you can now evaluate the correctness of the divider you use. Of course, all the tips for choosing the value of this resistor, which I mentioned earlier, are correct. But it's great to know that you did everything optimally.
Source: https://habr.com/ru/post/441514/
All Articles