Thin Metal Risistor Temperature Coefficients

I have set up a voltage measuring system on an LG Chem Resu 10 Lithium battery so that I can use excess solar energy once the battery has been charged. The SMA Sunny Island inverter was supposed to be able to divert excess solar energy once the battery was charged but this function does not work with batteries that have their own battery management system.
I am using a voltage divider to bring the battery voltage of 58 Volts down to 3 Volts so that the Raspberry PI can read the voltage and then convert to a digital reading. When the battery is at 95% (full Charge) the Pi turns on a relay that triggers a contactor to turn on one of 2 hot water systems, that are used to heat the building using thermal mass hydronics. If the battery drops below 90% then the power diversion is shut off. (This saves my battery being depleted if solar production falls during the diversion phase)
I have worked out a temperature coefficient for the resistors based on actual voltage/temperature measurements and use the resulting formula to correct the voltage divider reading for the ambient temperature of the voltage divider enclosure. A DS18B20 temperature probe is mounted in the voltage divider enclosure.
Does anybody have any published data on the thin Metal resistors that are sold on this site? My formula is reasonably accurate but is out by about 1.5% when the temperature is at 30 degrees C and I am pedantically hoping to refine this variance a little further.

2 Likes

Hi Duncan
I think resistor values are quoted for 25degC. If you want the nitty gritty details you may have to google these details and find the manufacturers data sheet for the particular style and type you are using. In reality the difference between 25 and 30 should not be worth worrying about, certainly not 1.5%
Cheers Bob

2 Likes

Hi Duncan
Just had a look at one of Core’s products. 240k 0.5W 1% metal film (which I think is what you mean when you say thin metal) resistor. The temperature coefficient IS quoted, 50ppm I assume is “per degC”
For the sake of easy calculation let’s say 250k. At 50ppm the resistance rise between 25degC and 30degC would be 62.5ohm. A rise of about 0.025%. Your 1.5% may indicate a problem elsewhere and in fact may not be a problem. What is your definition of “reasonably accurate”. I would have thought 1.5% would fall into this category, after all this is only 1.5degC in 100.
Sounds you are comparing with a DS18B20. Now I don’t know what the accuracy or resolution of this device is but if you consider all the tolerances of all the bits and pieces around 1.5% does not sound too bad. Remember what you are trying to compare is only as good as your reference.
In a nutshell I don’t believe your 1.5%error in 5degC is due to resistor heating. Components are usually pretty rugged and remain within tolerance over a wide temperature range, something into the -ve to something in the +ve 70’s and 80’s. In the case of some electrolytic caps 105degC. Years ago it usually did not start to cause concern until the component “fried your spit” or pretty hot.
Cheers Bob
PS. Re-calculated %. 0.025% not 0.0002%

4 Likes

Hi Duncan
Had a few more thoughts re your voltage divider problem.
You can minimise any “problem” fairly easily and forget about any ambient temperature “corrections”.

  1. Choose resistor values so there is minimal current flow to avoid I^2 R (power) self heating. Aim for less than 10% of rated dissipation
  2. Use resistors of the same type/style.
  3. Use 1.0% or even 0.1%. You may have to use 2 or more to get accurate values. You will have a better chance with 0.1% as there are many more values to choose from.
  4. Site all voltage divider resistors in the same place to be subject to the same ambient conditions.

The values then should all rise and fall by the same ratio. Say as in the above example 50ppm (parts per million) per degC. The divider ratio should remain the same and you should scrap any idea of corrections for ambient change.
Anyway I think if the ambient rose to a point where any resistance change became an issue any other electronics would be pretty much destroyed.
Cheers Bob

3 Likes

Hey Duncan and Robert,

Robert was exactly right, it’s 25°C (or very close to that) that resistor measurements are taken.

TCR (temperature coefficient of resistance) is measured in ppm/°C like Robert said, and this fluctuates both below and above approx 25°C. EEPower has this great article about it and includes the TCR’s for some common materials.

It is very likely the fluctuations are due to other factors. If you shoot us through a bit more info we might be able to do some troubleshooting!

2 Likes

Thank you for the replies. The particular resistors I have used are indicating a temperature variance at the 19C mark and a temperature coefficient of approx 400-500ppm.
To answeraf few of the points raised;

  1. The resistor are in a small container with a temperature probe reading the temperature within the container.
    2.When I am measuring 95% of SOC (State of Charge) in the battery (56.9v) which is is a divider reading of 2.943v @ 10C and 2.914v @ 30C.
  2. The Python program sets a trigger point for the relay to activate at 2.930v which is 95% capacity at 19C. As you can see it will trigger the relay at 93% SOC at 10C but at 30C the trigger point is 98.5% charge which the LG Chems BMS (Battery Management System) will not allow the battery to be charged to and as such the relay will never activate at higher temperatures.
  3. Because I am taking such a large voltage and dividing the result and then using this data to trigger a relay, small changes in temperature have a large impact on the trigger point for the relay.

So, it is not other variables that are causing an issue, as the tracking of temperature and voltage divider readings are tracking exactly (well almost exactly) to the temperature table that I have in Excel which is based on a 19C temperature axis point and a 500ppm coefficient.

I could shoot through the divider reading and the temperature readings that are taken at one minute intervals but because they correspond with the temperature coefficient table I have in Excel, I don’t think you will glean anything of value but I would be happy to forward the SQL file.

I was just hoping that there may have been a temperature coefficient table produced by the manufacturer of these particular resistors (1/4 Watt Metal) so that I could compare and or adjust the parameters that I have set up the Excel spreadsheet.

1 Like

Duncan.
That is a huge temp coefficient. I think most resistors are way better than that.

There are figures. As stated earlier Core publish the figure for the one I looked at… 50ppm/degC.

Of course it will track. As I advised above if you keep both elements of your divider subjected to the same ambient and apply the same coefficient it won’t matter much what the coefficient is exactly, the ratios will be the same.

I am afraid I would prefer to use published coefficient figures above your measured ones. You are introducing more variables like your temp measuring device tolerances. If you get to detailed specs you may find a maximum resistor temperature too.

A link which you may find interesting. I havn’t looked at it in detail myself yet.

I still stand by my 4 bits of advice above. I think if you follow this you will have no need for ambient temp compensation. In fact I believe you will only add complexity and confuse the issue. I don’t know anything about Pi or the Pi DAC resolution but if similar to Arduino provides numbers 0 - 1023 for 0V - 3.3V (with a reference of 3.3V) which is a resolution of 3.23mV per step.

My understanding at the moment is you are measuring volts and temperature changes then trying to calculate the temperature coefficient. I believe to do this successfully you need laboratory grade references and laboratory conditions. Much easier to use published figures. I think you can believe them.

As pointed out above. I believe if you use the same type and series resistors and most importantly the same temp coefficient and keeping the same environment there will be no need for any confusing compensation.

Cheers Bob

2 Likes

H Duncan
Just had a bit of a browse.
There are some resistors that go up to 400ppm.
If you want figures try Element 14 web site. Search Metal Film Resistors. Apply some filters or you will have thousands.
I just did a search with filters 1%, 250mW, through hole, 50ppm. This whittles it down to a few hundred. You can filter on 0.5% and 0.1% as well if you like. The important thing here is that all I saw supply Data sheets from which you can get most info. What I am getting at here is the data is published and is in the public domain. I am sure other web sites have similar info. You are better off searching suppliers who will have stock from multiple manufacturers as it would take forever to search each manufacturer assuming you know who they are.

Cheers Bob

1 Like

Hi Duncan
Me back again. Duncan there is something wrong here. If the resistors in your divider are the same type and the same temperature coefficient the voltages measured should be far closer than what they are. I put forward an imaginary scenario. I will use a high TC to emphasise. 500ppm.
R1 and R2 as a voltage divider. R1 the “upper” element, R2 the “lower”.
R1 = 9Mohm, R2 = 1Mohm. Division ratio = (R1+R2)/R2 = (9+1)/1 = 10. All good so far.
Apply TC 500ppm over 20degC. R1 now 9.09Mohm, R2 now 1.01Mohm.
Division ratio = (R1 + R2)/R2 = (9.09+1.01)/1.01 = 10.
Can you see where I am coming from. If the temperature coefficient of all the divider resistors are the same and are all in the same ambient environment then the measured voltages should be the same over a fairly wide ambient range. Not the discrepancies you are experiencing.

Before you go too far down the compensation path I think you should get some resistors that ARE the same temp Coefficient and try again. You may save yourself a lot of time and frustration.

There may be something else. Could you post your required division ratio and your resistor values. If the values are a bit low you may be passing enough current for the higher one to self heat which would add to the ambient and produce the lower voltage reading you are experiencing. You did indicate they are only 1/4 watt.

I still believe you should not have to compensate for ambient temperature changes on the voltage divider. You should still go for the lowest number you can get and MAKE SURE they are all the same.

Cheers Bob

PS: Or you could do what we have done in the past and make the ambient so hot that smaller changes don’t matter. For instance like a crystal oven.

Apologise for the maths. R1 = 9.009, R2 = 1.001
Should read (9.009+1.001)/1.001 = 10
Same result.

2 Likes

My initial request was for published temperature coefficients for the resistors that I indicated.

Duncan
And I advised where to find them. Element 14 was the place I tried but there will be other suppliers who supply data sheets.
To find data for the resistors you have used may be a daunting task. “Metal Film” describes the construction method. There are a number of manufacturers making “metal film” resistors and probably each one making this style of resistor with varying temp coefficients and tolerances, 5%, 2%, 1% etc down to 0.1%. In your request for advice you did not specify any of this, just “metal film” (I think that is what you meant). If you purchased from Jaycar or similar you just may be able to find out the manufacturer but I would not depend on it. There will be no markings to indicate this.

In my replies I have been trying to see why your voltage reading would change 30mV for a 20deg temp rise. I think you and I agree on the possibility of different TCs. Measurement of this would be pretty tedious and outside of lab conditions pretty iffy. Your measurement of 400 to 500 is a variation of 25% for a start.

I stand by my statement that if the characteristics of all divider resistors are the same the divider ratio will not change with ambient change. Any inaccuracy will be due to resistor tolerances but that will remain stable and should not change with temperature.

I also stand by my suggestion of re-purchase being the most expedient way out. Select the values tolerance and TC required and start again. The lower tolerances have a greater range of values.
If Jaycar, Core or your preferred supplier can’t guarantee the same TC then you will have to go elsewhere to someone who can like Element 14, RS Components etc.

What are your divider resistor values. Too low and your current may be high enough to cause self heating in the higher value which will unbalance the ratio. Too high and the 10M meter resistance could be significant. This is effectively in parallel with the lower divider resistor and becomes another resistor of unknown TC not affected by ambient changes. I might point out that this is only present while actually measuring and would be considered an introduced error. If this is the scenario then it may be better to monitor the ADC numbers if that is possible. I am not familiar with Pi or python.

Sorry about being long winded but am trying to be as much help as possible.
Cheers Bob

3 Likes

Hi Duncan.
Have taken the liberty of doing a couple of sums.
Your divider ratio seems to be about 20:1
I looked at Jaycar catalog (Core don’t seem to have many values) and they have quite a range of 1% 500mW metal film devices.
130k and 6k8 would probably suit nicely, even if only for experiment.
Division ratio 20.11:1, current about 0.4mA, dissipation in 130k about 26mW well inside 500mW so self heating should not be a problem. 6k8 low enough so 10M of multimeter resistance can be ignored.
If you make sure the temp coefficients are the same (probably be 50ppm) this should work without ambient changes being a problem.
Good experimenting, we are all learning.
Cheers Bob

3 Likes

Hi Duncan.
You have not come forward re info on your divider resistors so I have no more ideas on why you had a change of 30mV in 20degC during your tests. I put up some ideas re same temperature coefficients, self heating etc.
I have previously stated my ideas of the correct criteria would be:
Co-sited so temperature changes affect all resistors of divider.
Same type of resistors and same temperature coefficient.
Values high enough so divider current does not cause self heating in the higher value.
Low side resistor low enough so 10M DMM resistance does not contribute to divider and cause measurement error.
I maintain that if these criteria are met there should be no need for compensation due to ambient temperature change.
I suggested 130k and 6k8 1% 500mW as these values are close to what you have, meet the above requirements and are readily available values from Jaycar. The unknown is are they the same temperature coefficient. They are probably the same type and series so there is a good chance they are.

Yesterday I did the experiment myself. I had on hand 130k and 6k81 metal film 1% of the same type. Temperature coefficient unknown.
Arranged resistors and K thermocouple in close proximity. K type TC is not super accurate but I was only interested in relative change so did not matter.
Adjusted input V to obtain 2.943V at divider junction to approx simulate your values.
My standing ambient - 30degC. Higher than you but I was only interested in change, not actual.
Using a hot air gun I gently (gently as possible) heated the arrangement to 100degC. The TC being much smaller heats up quicker than the resistors so held 100deg as close as I could for 5 mins to allow the resistors to “catch up”.
The result: The output at the divider junction 2.942V. A difference of just 1mV for a temperature rise of 70degC. This could even be the DMM toggling the last digit.
I think this confirms all of my previous statements.
I really don’t think I can add any more at this stage but please let us all know how you go and your ultimate solution. As I have said I don’t believe temp compensation will be required and probably only complicate the issue.
This really sounds like a project with lots of practical value and I as well as most others will be interested in the outcome.
Cheers Bob

2 Likes

I agree with Robert93820. If you are worrying about temperature coefficients of resistors in a divider network, the resistors are rubbish for the purpose. Get thin film ones with similar temperature coefficients, any variations due to temperature cancel. I looked at Raspberry Pi specs, it doesn’t seem to have an ADC capability. What are the specs of the ADC? My approach to this problem would be to look at the range of measurements required (about 0.15V) and use an op amp to amplify this to something near the limits of the ADC (x20 could be arranged to give an output of 1-4V). The op amp needs a low temperature coefficient of input offset voltage and the -ve leg of the op amp needs a stable reference voltage. The ADC can then be 8 bit referenced to the +5V rail (doesn’t need to be very accurate).

2 Likes

Hi Guys.
I stress this is only my idea.
I know very little of Pi and Python and am more an analog type of person it is undoubtedly a lot of fun and brain scratching to go down this path to get this result. Probably a lot easier to manipulate small changes in a sketch than change components also.
However being me I would have been a little bit different.
A stable reference voltage, 2 open collector comparators (LM393) and the relay arranged to be self latching. The “lower” comparator to trigger at 90% and enable the latching circuit. The “upper” comparator triggers the relay at 95% which latches. The relay remans on until voltage reduces to 90% when the “lower” comparator switches off and releases the latch. An added back up to prevent battery damage could be a low voltage shut off to disconnect the water systems in case of malfunction.
Fairly simple but not as much fun probably as Pi and Python or I would probably use Arduino being more familiar with that.
Just thought I would pop this little snippet in for general info.
Cheers Bob

2 Likes

In the absence of any data sheets for the 1/4 watt thin film resistors that I mentioned. And Robert please don’t tell me they are on Element 14 because without knowing who manufactured the resisters and their model/series, it is impossible to obtain a data sheet. I have ordered some 0.6W 1% 50ppm 180k and 10k resistors made by Vishay. They should arrive tomorrow and I will swap out the existing divider resistors. I have an excel spreadsheet with the modeled values for voltage and temperature. If the results follow the model, then the tolerances of the initial resistors was large, as I had indicated. The Vishay resistors, if they perform per spec will not need a formulae to adjust the recorded voltage.

2 Likes

Hi Duncan.
Excellent choice. Vishay are good and 0.6W makes sure of no self heating. Keep both resistors in the same ambient and I will guarantee you will have no compensation problems.

Sorry but Element 14 DO publish data sheets. I just looked.
Searched “metal film through hole resistors”
Filters:
Manufacturer, no filter then all manufacturers of this particular item are listed.
Resistance 10k
Tolerance 1%
TCR +/- 50ppm/degC
35 results including the one you selected. They ALL have data sheets available. Directly under Element 14 stock code you should see a little Adobe reader icon with “data sheet” alongside or under. Click on this icon and the data sheet will open in another window.
I put in a 125mW filter and 4 results found. Once again data sheets are provided.
You may have missed this little icon but no matter you have made a good product choice.

I did mention previously it would be a daunting if not impossible task to find data sheets for resistors you have used without knowing the manufacturer and type/style and it would be far less trouble to purchase new ones where this information is available.
Looks like you are going down this path, good.
Cheers Bob

2 Likes

Outcome: There was no data sheets available for “nofrills” resistors, at least none that anyone was willing to provide. My data from thee cheap resistors is; 180K resister measured at 184.1K and the 10K resistor measured at 9.77K. I estimate that the axis point for the resistors is 19 degrees celcius and a temperature coefficient of between 450-500ppm.
The resistors have been replaced by Vishay resistors which have a data sheet. The 180K resistor measured 180.3K and the 10K resistor measured 9.98K. The stated temperature coefficient is 50ppm. The results from the Vishay resistors have so far held almost exactly to the result that an Excel model anticipated.
I have attached two screenshots of the results of the two resistor divider output. The no frills resistor graph shows a decrease in measured voltage as the temperature rises, whereas the Vishay resistors show negligible variance.
The moral of the story, if any, is that the quality of the components that comprise the system is very important.

3 Likes

Hi Duncan
Thank you for letting us know the results of everyone’s efforts. Good result and I hope we have all learned something.

Yes there is such a moral and it is right on the money.

When a high reliability product is designed for manufacture there is a figure which has to be calculated and quoted maybe guaranteed. It is MTBF or Mean Time Between Failures. Quality and traceability in this case is EXTREMELY important. This calculation was way beyond my level but I do know some customers specs included this figure and it had to be bettered unless this was proven to be impossible.

One of the last projects I worked on before retirement had another cute one. Mean (or Maximum, not sure which now) Time To Repair. Which was would, you believe 30 min. I had to change the whole layout of some cabinet racks because due to the bulk of cables it was difficult to hinge down the rear panel of a unit and a fan could not be changed within the specified time. Fun?? Caught this one very early in the project which was just as well. Horrible job after installation.


Cheers Bob

5 Likes

That’s a fairly impressive install Bob!

This forum thread reminds me of the Challenger disaster - it was a swiss cheese of problems, but the part that physically failed and brought the whole thing was just an O-ring worth a few cents.

1 Like