Welcome! Log In Create A New Profile

Advanced

Resistance Calculations

Posted by degroof 
Resistance Calculations
January 21, 2008 07:21PM
I tried an experiment. I took a handful of resistors, measured each with a multimeter, then attached each to the thermistor connector. I used the RepRap host software in debug mode in eclipse to look at what it thought the resistance was. Here are the results:

Real Measured
101 141
6650 6020
26900 24140
46200 41180
99000 87000

What it comes down to is that there's a scale factor plus an offset. The equation come out to something like y=0.88x+52. Now, I can understand the scaling. That could be C3. And I can compensate for that by adjusting the capacitor setting. What I don't get, though, is where the offset comes from. It's acting as if there's a 50ohm resistor in series with the thermistor.

Any thoughts on where that might be coming from?
Re: Resistance Calculations
January 22, 2008 04:24AM
You are assuming the PIC output pin has zero impedance. In practice as you draw more current its voltage will fall. This is equivelent to a perfect buffer with a small resistance in series.

5V across 100R would draw 50ma which exceeds the drive capability of the PIC. This is why the 10K themistor is no good for high temperatures with the UCB circuit.


[www.hydraraptor.blogspot.com]
Re: Resistance Calculations
January 22, 2008 01:01PM
Ah, so that explains it. The 144 figure is really the only anomalous value. The rest scale properly (.88-.9) but the should've translated to 90-something. The 101 ohm value was a bit on the small side anyway. It works out to about 360C for the 100K thermistors. I'll try again using a larger value.
Re: Resistance Calculations
January 22, 2008 01:52PM
Yes, from memory the PIC can drive 30ma so trying to measure less than 167R is going to give an erroneous value.

I would guess its output impedance would be a few tens of ohms so you could calibrate that out by doing what you are doing and adding an extra host parameter. It will vary from PIC to PIC and with the temperature (of the PIC!).


[www.hydraraptor.blogspot.com]
Re: Resistance Calculations
January 22, 2008 03:11PM
Makes sense. And the scale factor can be explained by cap tolerance. It's entirely possible it's off be ~10%.

I guess I could compensate for the impedance by adding it to the original resistance measurements and plugging that into the beta/Rz formula. But, yeah, it might be better in the long run to have it as a parameter.

What I'm shooting for is getting reasonably accurate temperature readings at the high end of the scale. Personally, I don't mind if it's off a bit at room temperature but, if it's reading 270C when it's really 250C, that could be a problem.
Re: Resistance Calculations
January 22, 2008 06:26PM
The data sheet for the PIC is 20mA they will push a little more but I would spec to run max 18mA


Ian
[www.bitsfrombytes.com]
Re: Resistance Calculations
January 23, 2008 08:21AM
By the way, this is how I'm getting the resistance value. Open RepRap in eclipse, run Main in debug mode. Put a breakpoint in GenericExtruder, on the next line of code after this one:

double resistance = calculateResistance(rawHeat, calibration);

In the source I'm using, that's line 809. Open up the extruder exerciser and wait for the breakpoint. Hovering the cursor over "resistance" should give you the current value. You can then compare that to a reading using a multimeter.
Sorry, only registered users may post in this forum.

Click here to login