Temperature affects on resistance?

buntay

Senior Member
Good morning picaxe friends,

I am using the picaxe 28 project board and i don't have enough input pins so I am planning on reading several (no more than 4) inputs on the same pin using different resistance levels and the ADC command.
Now I know that ambient and load resistor temperature will have an affect on its resistance, is there a formula to use to give a span in the code? These will be pretty crucial inputs so this needs to be compensated for.

any thoughts?
 

nick12ab

Senior Member
Why would it make a difference? All the resistors would be affected at the same time by temperature change unless you have really shoddy component positioning choice.

A schematic would help.
 

eclectic

Moderator
Why would it make a difference? All the resistors would be affected at the same time by temperature change unless you have really shoddy component positioning choice.

A schematic would help.
Are the "load resistors" in very different environments?

We need buntay to tell us more.

e
 

buntay

Senior Member
I must admit that ambient temperature would be my biggest concern. I plan on using the voltage supplied by the 28 project board so load should not be much concern. However the board and daughter(resistor board) will be potted in epoxy and out in the temperature elements as it will be controlling various aspects of a wind turbine (RPM, gearbox temps,levels, tail boom control..etc). Where I live I see temperature ranges of -60 to 100 degrees and need to know what these temps will have on the resistors. hope this general Schematic helps with what i need to do. advised resistor values would help...need individual as well as worst case all switches closed.untitled.JPG
 

geoff07

Senior Member
You would need the resistors to form a potential divider so that there is a voltage to measure. Clever use of the values would allow you to code all three signals into the one input. But if all the resistors are in the same environment and of the same technology then you can forget temperature variation. Do all the switches need to be grounded on one side or can both sides float? That would affect your design of potential divider.
The adc can have a resolution of 1023 values so it can be quite a sophisticated technique.
 

hippy

Technical Support
Staff member
However the board and daughter(resistor board) will be potted in epoxy and out in the temperature elements as it will be controlling various aspects of a wind turbine (RPM, gearbox temps,levels, tail boom control..etc). Where I live I see temperature ranges of -60 to 100 degrees and need to know what these temps will have on the resistors.
Wouldn't it be better to run separate inputs into a nicer environment ( shed, house, basement, wherever ), then join these signals together ?

Even better, rather than skimp on a smaller PICAXE go for larger with all the I/O pins you need. Why make things difficult, more prone to failure for the sake of a few dollars ?
 

geoff07

Senior Member
I had a free moment so I drew this. Note that the resistor ratios can probably be improved with some calculation, but you should be able to discriminate between any combination of values with enough resolution for reliability. 'R' should probably be 1-2k, no higher. This drawing assumes voltage-free contacts.
 

Attachments

geoff07

Senior Member
Another idea, assuming you don't have the data conductors in the cable to remote all the separate digital inputs as hippy suggests, is to have a local picaxe that sends a serial message with the status of all the switches whenever anything changes, or periodically. If cold is a problem, put the components in a little insulated box, get the picaxe to measure the temp and turn on a little heater if required. If you have a spare 1/2 amp at 5 volts that could be 2.5W through a power transistor and a 10R resistor, which should do it.
 

Dippy

Moderator
Buntay, the way you have your schematic won't be good.
If all your 'sensors' are simply switches then your ADC will vary between floating and ~5V - and variations in resistances will have no effect.
If they are simply switches then why use ADC?
If you wire the inputs as pot dividers (as suggested by Geoff) then you can choose the different levels of voltages way beyond any possible relative drifting value. And as suggested, a divider/bridge can be largely self-cancelling anyway.

And, as an aside, depending on your circuit you can choose good resistors and bad resistors.
Many manufacturers quote coefficients which you can use for good guidance.
So, a lot of any possible drift worries depends on whether you wish to spend the extra 50 pennies.

I think you need to briefly return to drawing board to devise a better circuit.
Will the cables from resistor board to PICAXE be long?
 

Paix

Senior Member
Geoff07 I think has it with the R-2R ladder.

Selecting ranges for each condition and a suitable guard band between them should take care of any drift in resistor value due to temperature or aging.
 

buntay

Senior Member
what I believe I need is a resistive ladder.....correct? I should be able to find what I need as a dip or sip package. I searched a little on google but I dont think I am using the right terminology cause I am not finding alot. Links or correct terminology and what resistances I should be looking for would be great, as I have said, electronic design is not my strong point.

Thanks everybody with your help :D
 

geoff07

Senior Member
Just use a bunch of 1k 1% resistors (x1, x2, x3 in series etc). A sip package probably won't have the right values, which you need to calculate to ensure that you get unique and distinct values for each combination of switch open/closed.

Start with the ratios I suggested, measuring them to ensure a good fit to the calcs. Then compute in a spreadsheet what the adc reading would be for each combination. Make sure that each value is different and they are separate enough for the Picaxe to tell the difference. Tweak the values if necessary. Then build it and test what the readings actually are and determine the ranges that you will accept as valid. Then code for those in a simple select/case statement to set flags that the rest of the code can act upon.
 
Top