Searching \ for '[PIC] PT100 4-20mA load' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/microchip/ios.htm?key=4%2D20ma
Search entire site for: 'PT100 4-20mA load'.

Exact match. Not showing close matches.
PICList Thread
'[PIC] PT100 4-20mA load'
2009\01\13@043851 by Jinx

face picon face
Designing temperature measurement with a PT100 sensor. I'm using
an 18F4520, with a 5V Vref+, 250 ohm load and nominal 12V for the
sensor. This is what I've done in the past to get a 1V - 5V i/p range
from 4-20mA

Some measurements I've taken so far indicate that the sensor output
equates to 38mV/degC. Rather than use a 1/38 routine on the ADC
result, I thought I'd just use a lower value resistor - which I reckon to
be 210 ohms - and a simple 1/32 shift. Reading the datasheet for the
sensor (a Status SEM203/P), it says

"The load symbol represent any other device connected in the loop, such
as Monitoring equipment, panel indicators and loop isolators. The load
value can range from 0 ohms to the max loop load for given supply, refer
to section 3, "Max load", for more information". Section 3 provides the
equation

Max Load = ((Vsupply - 10)/20) kohms

By that calculation, (13.8 - 10)/20 = 190 ohms. If battery voltage was
low perhaps, (12 - 10)/20 = 100 ohms

I've not used a PT100 before, and haven't come across a resistor limit.
Sensors I've used in the past have suggested 125, 250 or even 500 ohm
loads. Is the above saying that results will suffer if a load resistor > 190
ohms or 100 ohms is used ? What I've measured so far (a little crudely,
comparing against an LM335) seems to be quite linear with a 250 ohm
load

TIA

2009\01\13@051242 by Brent Brown

picon face
On 13 Jan 2009 at 22:37, Jinx wrote: <snip>
> "The load symbol represent any other device connected in the loop, such
> as Monitoring equipment, panel indicators and loop isolators. The load
> value can range from 0 ohms to the max loop load for given supply, refer
> to section 3, "Max load", for more information". Section 3 provides the
> equation
>
> Max Load = ((Vsupply - 10)/20) kohms

I read all your post but the following is still a bit of a guess, apologies if I'm coming
at it from the wrong angle. What you normally worry about in a 4-20mA loop is the
total resistance of all the devices in the loop. You may have for example, one 4-
20mA sensor connected to several 4-20mA measuring devices all connected in
series, and one power supply. If the total resistance is too high the power supply
wont be able to make the required amount of current flow. It's just Ohms law.. eg,
with a 24V power supply you can't have more than 1200 Ohms total resistance and
expect 20mA to flow (24V/20mA=1200Ohms). Dunno what the figures 10 and 20
represent in your equation above. In designing a 4-20mA device it makes sense to
make it present the lowest resistance/voltage drop as possible, thereby minimising
the amount of power it takes from the loop power supply and allowing as much  
headroom as possible so other devices can be placed in the loop.

--
Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  spam_OUTbrent.brownTakeThisOuTspamclear.net.nz


2009\01\13@054815 by Jinx

face picon face
> What you normally worry about in a 4-20mA loop is the total
> resistance of all the devices in the loop

Yup, I'd agree with that. And once I settle on a load I'll see what
happens with Vsupply variations

> Dunno what the figures 10 and 20 represent in your equation

Me neither. Possibly it relates to the conversion performed by the Status
unit. Judging by the manual's instructions on setting it up with its one
button and LED flashes that indicate which menu you're in, there's
probably a micro inside

> In designing a 4-20mA device it makes sense to make it present the
> lowest resistance/voltage drop as possible

As this is the only 4-20mA device on that line/analogue input, there'll be
no consideration needed with regard to any other serial loads. I think I'll
scale the load resistor to get the 32mV/degC I'm looking for, which is a
convenient divisor for the ADC result. It's going to be in the region of 200
ohms, which is within the range (IME) of common 4-20mA loads. If the
results are linear with a range of Vsupply and nothing is being harmed,
that's pretty much a win isn't it ?

2009\01\13@081903 by olin piclist

face picon face
Jinx wrote:
> Some measurements I've taken so far indicate that the sensor output
> equates to 38mV/degC.

I thought you said it was 4-20mA current output.  If so, then the voltage is
a function of whatever resistor you place in the current path.

> Rather than use a 1/38 routine on the ADC

This is a pet pieve of mine.  Why are people so obsessed with units inside a
PIC matching the totally arbitrary units people might be used to?  This only
makes some sense when the PIC is directly responsible for displaying values
to a human, although then you're likely to have the math routines already
needed so that conversion is trivial compared whatever else is going on.

If you're sensing temperature and turning on a fan, a heater, or sounding a
alarm at certain trip points, there is absolutely no reason for the measured
temperature inside the PIC to be in degrees F, degrees C, or some "nice"
round fraction of those.  There is nothing "nice" about human-habituated
units to the PIC.

The nicest units in the PIC are usually whatever you get from a A/D reading,
possibly after some shifting due to low pass filtering.  Let it come out
however it comes out and deal with that directly.  If you need to set trip
points in the source code in deg F or whatever, use assembly time math to
convert that to the PIC units, not run time math or design compromises to
convert the PIC units to it.

> result, I thought I'd just use a lower value resistor - which I
> reckon to be 210 ohms - and a simple 1/32 shift.

If you're asking about the current sense resistor that generates the voltage
from the 4-20mA current loop, then you can make it as small as you want.
The only downside is resolution and noise floor on your end, the current
loop doesn't care.  The current source will have some volage compliance
range.  You have to make sure all the devices in the loop don't cause that
to be exceeded at the maximum current, but the current loop itself will be
just fine with a dead short.


********************************************************************
Embed Inc, Littleton Massachusetts, http://www.embedinc.com/products
(978) 742-9014.  Gold level PIC consultants since 2000.

2009\01\13@150545 by Brent Brown

picon face
On 13 Jan 2009 at 23:47, Jinx wrote:
> > In designing a 4-20mA device it makes sense to make it present the
> > lowest resistance/voltage drop as possible
>
> As this is the only 4-20mA device on that line/analogue input, there'll be
> no consideration needed with regard to any other serial loads. I think I'll
> scale the load resistor to get the 32mV/degC I'm looking for, which is a
> convenient divisor for the ADC result. It's going to be in the region of 200
> ohms, which is within the range (IME) of common 4-20mA loads. If the
> results are linear with a range of Vsupply and nothing is being harmed,
> that's pretty much a win isn't it ?

Yeah, I knew you were on to it. 200 ohms is 4V drop @ 20mA, hard to imagine that
not being acceptable in a typical application. Nice when the scaling works out
convenient for the maths, or can be made to be convenient without too much
compromise.--
Brent Brown, Electronic Design Solutions
16 English Street, St Andrews,
Hamilton 3200, New Zealand
Ph: +64 7 849 0069
Fax: +64 7 849 0071
Cell: +64 27 433 4069
eMail:  .....brent.brownKILLspamspam@spam@clear.net.nz


2009\01\13@163125 by Jinx

face picon face
> > equates to 38mV/degC.
>
> I thought you said it was 4-20mA current output.  If so, then the voltage
> is a function of whatever resistor you place in the current path

Yes, it is 4-20mA. So with a 250 ohm load resistor you get an ADC i/p
range of 1V - 5V. However, this thing has been calibrated or set up, not
by me, to output ~38mV/degC. Which is fine, although other sensors I
use have a more 'user-friendly' relationship. For example a depth sensor
with a 256 ohm load produces 1mV/mm at the ADC i/p, easy on the
maths and conversions with a 5.120V Vref+

> Rather than use a 1/38 routine on the ADC
>
> This is a pet peeve of mine.  Why are people so obsessed with units

I could use a 1/38 routine, no big deal. I only asked about the resistor
because the datasheet had raised issues I'd not encountered before. If
a resistor that scales the ADC to 32mV/degC keeps the end result in
spec there's nothing wrong with that is there ?

> If you're asking about the current sense resistor that generates the voltage
> from the 4-20mA current loop, then you can make it as small as you want.
> The only downside is resolution and noise floor on your end, the current
> loop doesn't care

The PT100 is being used to log temperature. More accurate is better,
so causes of error will need to be assessed - resistor, Vref, Vsupply,
maths, etc. The datasheet claims 0.1degC which is OK, but +/- 0.5C
in the end is acceptable

2009\01\30@074319 by Jinx

face picon face
Just a follow-up

The PT100 is in service and working well. The person organising
this job/trial asked for more temperature sensors for some general
comparitive measurements around the test area. Not wanting to
spend spend spend on PT100s, I made this inexpensive circuit up
to use LM335s

http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

Range of interest for us is 5-30C. Voltage at PIC pin is within 0.5C
of expected, and within spec for the LM335

Any suggestions for improvement/cheapening or how you did it welcome

2009\01\30@093735 by Michael Rigby-Jones

picon face


> -----Original Message-----
> From: piclist-bouncesspamKILLspammit.edu [.....piclist-bouncesKILLspamspam.....mit.edu] On
Behalf
{Quote hidden}

Joe,

You might want to check the behaviour of your current source when
driving an inductive load, e.g. a long bit of wire.  I don't see any
compensation components, and it's very easy to make current sources
oscillate under those conditions.

Simulating it first in e.g. SwitcherCad might be a good first step to
allow you to check gain and phase margins.

Cheers

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\01\30@173421 by Jinx
face picon face
> You might want to check the behaviour of your current source when
> driving an inductive load, e.g. a long bit of wire.  I don't see any
> compensation components, and it's very easy to make current sources
> oscillate under those conditions.

Mike, currently updating LTSpice (not used it for quite some time) and
will get on to a simulation when able

What sort of compensation components might you install ? I'm trying to
imagine what sort of a load a wire pair would be. As I see it, not wishing
to be obtuse, wouldn't the wire and a static (a temperature sensor probably
won't be changing abruptly) and current be fairly stable ?

There is some possibility of noise induction around. It's a semi-industrial
setting - a couple of smallish (1HP) motors and lighting

How about shielded twin-core cable ? Signal, V+ and ground (braid)


'[PIC] PT100 4-20mA load'
2009\02\03@125254 by Michael Rigby-Jones
picon face
part 1 3299 bytes content-type:text/plain; (decoded quoted-printable)



> -----Original Message-----
> From: EraseMEpiclist-bouncesspam_OUTspamTakeThisOuTmit.edu [piclist-bouncesspamspam_OUTmit.edu] On
Behalf
{Quote hidden}

wishing
> to be obtuse, wouldn't the wire and a static (a temperature sensor
> probably
> won't be changing abruptly) and current be fairly stable ?
>
Sorry for late reply Joe.

The wire will present an inductive load.  The closer the coupling
between the two wires, the lower the inductance, but since coupling is
never perfect there will be some residual inductance.

The problem is that an inductance likes to maintain a fixed current, so
effectively "fights" against your current source.  You then end up with
a phase shift which, if it reaches 180 degrees whilst the loop gain is
greater than unity, will cause oscillation.  This is independent of the
rate of change of your temperature signal.

You also have the added issue of having two cascaded op-amps which is
often bad news anyway since each will give some phase shift, so the
circuit can reach 180 degrees of phase rather more easily.

I have attached the Switcher CAD files using the TL27L4 Spice model
downloaded from TI, and you can see that even with no inductive load the
simulator suggests the circuit is not stable.  In the words of the guy I
sit next to, "It's hooting like an owl".  A real circuit may not
actually do this, since simulations are never 100% accurate, but it does
show that the design is probably marginal.

If you add any significant inductance into the output the simulation
fails to converge, which is nearly always a sign of instability.

If you download "BodeCad" from LT at
http://www.linear.com/designtools/software/ you can use the same
schematic with a minor alteration to plot the frequency/phase response
to see where your problem lies.  The tutorial (pdf link on same page)
shows you how to do this.

Cheers

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

part 2 1195 bytes content-type:application/octet-stream; (decode)

part 3 2232 bytes content-type:application/octet-stream; (decode)

part 4 35 bytes content-type:text/plain; charset="us-ascii"
(decoded 7bit)

2009\02\03@171453 by Jinx

face picon face
Mike, thanks ever so for the reply and files

I've now downloaded BodeCAD and the tutorial. I'm being pulled
from all directions today so won't be able to start my learning curve
until later this evening, if I'm lucky ( unlucky ;-) )

20m of shielded stereo audio cable between the sensor board and
the PIC seems to be OK, at the measurement level anyway, and the
signal is clean on the 'scope. So at least there's something to work
with on the s/w side

When I've a minute I could measure the inductance of that cable,
although until I get BodeCAD running I wouldn't know whether
its inductance is "significant"

2009\02\04@042544 by Vasile Surducan

face picon face
Joe,

PT100 does not need shielded cable even in automotive application.
Why? Because the load is supplied in DC under a current generator. If
you have any noise induced by the engine, a simple electrolytic
capacitor will filter all the noise on the current to voltage
converter side (aka a poor resistor in your situation).
2-10mA or 4-20mA has the lower current  (2 or 4 mA) just for being
able to distinguish a broken wire from a minimum current in the loop
(that's why with 0-10mA you will never be able to know if the problem
is with your RTD or with your circuit as long the output value for a
given temperature will be near 0mA).

best luck,
Vasile

On 2/4/09, Jinx <@spam@joecolquittKILLspamspamclear.net.nz> wrote:
{Quote hidden}

> -

2009\02\04@052247 by Jinx

face picon face
Hi Vasile

> Joe,
>
> PT100 does not need shielded cable even in automotive application

Perhaps you missed the diagram that Mike and I have been referring to

http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

The PT100 is being used as the important sensor, the much cheaper
LM335s are for more general temperature indicators

The possible problem is op-amp instability

> (that's why with 0-10mA you will never be able to know if the problem
> is with your RTD or with your circuit as long the output value for a
> given temperature will be near 0mA).

That's true. The 0mA of a 4-20mA system would be used as error or
fault detection. For this little short-lived project I could go with either
0-10mA, and accept the risk, or 2-10mA

2009\02\04@114925 by Vasile Surducan

face picon face
On 2/4/09, Jinx <KILLspamjoecolquittKILLspamspamclear.net.nz> wrote:
> Hi Vasile
>
> > Joe,
> >
> > PT100 does not need shielded cable even in automotive application
>
> Perhaps you missed the diagram that Mike and I have been referring to
>
> http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

The "sum" and " x10" could be one operational amplifier, summing and
gain in the same time with a convenable reference, also the first
repeater hasn't too much sense because the divider can be choosen 10
times lower than the R (=10k) of the "sum" if you'll use 100K instead
of 10K.
The reference comming from a 5V1 zenner can't be considered reference.
Imagine that ambient temperature around 5V1 zenner is moving between
-20 to +60C... tragedy.

{Quote hidden}

> -

2009\02\04@160006 by Jinx

face picon face
> The reference comming from a 5V1 zenner can't be considered
> reference. Imagine that ambient temperature around 5V1 zenner
> is moving between -20 to +60C... tragedy.

Vasile, you are correct, in this and your other points, but the ambient
isn't going to range 80C. This is a very simple, controlled, temporary
installation to prove a concept. After that, if approved, time and
money can be thrown at the system with gay abandon. I'm trying not
to be sloppy or careless with what's a minor part of the exercise but
it works and "will do for now"

2009\02\05@053654 by Jinx

face picon face
Mike, at last I've had a chance to get back to the project with that
LM335 circuit

As you predicted, it oscillates. Length of wire to a 400R load is
irrelevant. It's 8kHz @ 1Vp-p centred on the DC produced across
the load

I've had a go at it with LTspice but ...... I really don't know what I'm
doing yet. Time is a bit tight and a crash course in LTspice is wishful
thinking

Hoping you can suggest what components and where to place them

Looking past the noise at the DC level, the circuit appears it would
give good results, so it's worth fixing

TIA


2009\02\05@123254 by Michael Rigby-Jones

picon face


> -----Original Message-----
> From: RemoveMEpiclist-bouncesTakeThisOuTspammit.edu [spamBeGonepiclist-bouncesspamBeGonespammit.edu] On
Behalf
{Quote hidden}

I'm
> doing yet. Time is a bit tight and a crash course in LTspice is
wishful
> thinking
>
> Hoping you can suggest what components and where to place them
>
> Looking past the noise at the DC level, the circuit appears it would
> give good results, so it's worth fixing
>
> TIA

Hi Joe,

For a quick fix try a ~100n capacitor from the output of the first
op-amp (the one that supplies current to the load) to the inverting
input of the same amp.


Cheers

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\02\05@131823 by Paul Hutchinson

picon face
> -----Original Message-----
> From: TakeThisOuTpiclist-bouncesEraseMEspamspam_OUTmit.edu On Behalf Of Jinx
> Sent: Thursday, February 05, 2009 6:35 AM
>
> Mike, at last I've had a chance to get back to the project with that
> LM335 circuit
>
> As you predicted, it oscillates. Length of wire to a 400R load is
> irrelevant. It's 8kHz @ 1Vp-p centred on the DC produced across
> the load

I noticed the circuit uses TLC27L series op-amps, like LM324s they tend to
oscillate with even small capacitive loads (<200pF). This is easy to check
for by using small capacitors as loads and watching for the oscillation.

The cure is to de-couple the op-amp output from the load with a small series
resistance. 10 to 100 ohms in series with the output will usually cure the
problem and if you take the feedback from the other end of the resistor the
voltage drop in the resistor won't affect the final output.

Capacitive load problem information is usually buried deep down in the data
sheet (page 32 of 37 in my old TLC27L4 data sheet).

Paul Hutch

{Quote hidden}

2009\02\05@185922 by Jinx

face picon face
> For a quick fix try a ~100n capacitor from the output of the first
> op-amp (the one that supplies current to the load) to the inverting
> input of the same amp

Thanks, that seems to have done the job. Currently have 6m of
shielded stereo cable, no problems. There's just a few mV of noise
on the DC which is insignificant as 0C will be ~ 340mV and 30C
wil be ~ 2650mV. Most importantly the PIC is reporting the remote
temperature correctly and stably, not wobbling 4 degrees !!

Vasile mentioned that the Sum and x10 functions can be combined
into one amp. I notice in the TLC27L4 d/s such a configuration so
the next 3 sensors will be that arrangement. I'll update the previously
posted gif as and when. And once this unit is finished I'll do some
temperature tests on the board to check the effect on the IC, zener etc,
see if anything needs changing to suit a wider ambient range. Which
isn't necessary for this test, ~ 25-30C presently, but ambient for the
sensors will fall below 0C in winter


2009\02\05@191010 by Jinx

face picon face
Paul, thanks for the resistor suggestion. I have the d/s to read
when I have time to investigate that. For now the 100nF in
the -ve feedback path has stopped the oscillation, for this set-up
anyway, but I really do want to look into this further to avoid
any embarrassing moments with field units

2009\02\06@162927 by Russ Hensel

picon face

Just use a 100Ω resistor:

Google it, it may help. or not.

Hope this has not already be covered in the thread.

Russ

2009\02\06@170837 by Jinx

face picon face

> Just use a 100Ω resistor:

Russ, I'm intrigued. Could you elaborate ?

2009\02\07@131630 by Gerhard Fiedler

picon face

Jinx wrote:

>> Just use a 100Ù resistor:
>
> Russ, I'm intrigued. Could you elaborate ?

I think he's talking about the resistor in series with the opamp output,
before the connection to any feedback resistors (as has been mentioned
before in this thread).

Gerhard

2009\02\07@174410 by Jinx

face picon face
> I think he's talking about the resistor in series with the opamp output,
> before the connection to any feedback resistors (as has been mentioned
> before in this thread).

x
|
|
x ?

http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

2009\02\08@065325 by Gerhard Fiedler

picon face
Jinx wrote:

>> I think he's talking about the resistor in series with the opamp output,
>> before the connection to any feedback resistors (as has been mentioned
>> before in this thread).
>
> x
>|
>|
> x ?
>
> http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

Exactly. Not sure whether the 100n cap that goes to the non-inv input
wouldn't be better on the other end of the 100R resistor.

Gerhard

2009\02\08@072916 by Jinx

face picon face
> Not sure whether the 100n cap that goes to the inv input wouldn't
> be better on the other end of the 100R resistor

OK. The 100R isn't in there yet, so I can't say either. Been side-
tracked with another part of the s/w for the weekend, be back to
the sensors later today and then I can find out

2009\02\08@104206 by Russ Hensel

picon face

More on Just use a 100Ω resistor:

Was>>  Google it, it may help. or not.

( ? was ohm symbol but google works anyway )

If you do google it the first hit is:
http://www.edn.com/article/CA6615600.html

Just use a 100Ω resistor: Understanding a rule of thumb for oscillating
amplifiers

Gist of it that “Oh, put a 100Ω load resistor between the amplifier
output and the load capacitor.” When I asked why, the engineer said,
“Just do it. Trust me; it will work.”

Amusing and useful article.

Russ

2009\02\08@104410 by Paul Hutchinson

picon face
> -----Original Message-----
> From: RemoveMEpiclist-bouncesspamTakeThisOuTmit.edu On Behalf Of Jinx
> Sent: Saturday, February 07, 2009 6:43 PM
>
> x
> |
> |
> x ?
>
> http://home.clear.net.nz/pages/joecolquitt/0-10mA_remote_lm335.gif

That is what I was thinking of _but_, now that I've looked more carefully at
your circuit I think I was all wet in my original suggestion. When I first
looked at the circuit for some reason I thought the output lead was directly
connected to an op-amp output. Now I see that the op-amp output is
de-coupled from the output wire with 147 ohms already.

My best guess now, without actually building the circuit, is that noise
originating from the zeners (especially the Vref zener) and/or output lead
is the culprit. Any noise from the reference Zener will be divided by ~2,
summed with the sensor signal then multiplied by 10 so, 5X the original
noise would be in the output.

Paul Hutch

2009\02\08@161652 by Alan B. Pearce

face picon face

>If you do google it the first hit is:
> http://www.edn.com/article/CA6615600.html
>
>Just use a 100Ω resistor: Understanding a rule of thumb for oscillating
>amplifiers
>
>Gist of it that “Oh, put a 100Ω load resistor between the amplifier
>output and the load capacitor.” When I asked why, the engineer said,
>“Just do it. Trust me; it will work.”
>
>Amusing and useful article.
>
>

Ah, yes Bonnie Baker, late of Microchip, now TI. I was looking for that
article, having read  it recently, so I could post the link. You beat me to
it.

2009\02\27@210347 by Jinx

face picon face
I'm measuring and logging temperature over 4-20mA lines. There are
two types of sensor, PT100 and LM335. Both are driving 250R loads
at the PIC AD pins, distance is about 10m. I now need to relay the
voltages at one PIC to another PIC, a further 10m away from the sensors

Using this (including the 100n feedback capacitor between pins 1 and 2)

http://www.piclist.com/techref/microchip/aout.htm

configured for 4-20mA. Taking the voltage at PIC1, for example AN0,
feed it into the above circuit to convert it to current, and this in turn drives
the 250R on PIC2's AN0. However, the copying isn't perfect. There's a
slight discrepancy. eg if the original is 1.650V (6.6mA) what arrives at
PIC2 is about 25mV higher, 1.675V (6.7mA). This equates to 0.5 degC
in this application, which is tolerable, but I would like to trim the circuit
to remove that 25mV. I'm using the LM358, which has no offset pins, if
that's relevant

Any suggestions ?

TIA

2009\02\27@213921 by Jinx

face picon face
Just a couple of notes re question, and a bit of thinking out loud

I'm using the LM358 because that's what I picked out of the box. I've
many other single and dual op-amps

Did some more comparisons and found that the differences at 5C, 20C
and 40C are all pretty close to 1.5%. So in theory I could use a divider
on the input of the voltage-current converter to knock it down to 98.5%
of the source AN0 voltage

If it was 1k5:100k (near enough) that would be in parallel with the 250R
load on PIC1's AN0, dropping its effective resistance value by ~ 0.25%

The other option is to reduce the gain of the converter by 1.5%, which
was my original question


'[PIC] PT100 4-20mA load'
2009\03\02@070303 by Michael Rigby-Jones
picon face


> -----Original Message-----
> From: piclist-bouncesEraseMEspam.....mit.edu [EraseMEpiclist-bouncesspammit.edu] On
Behalf
{Quote hidden}

divider
> on the input of the voltage-current converter to knock it down to
98.5%
> of the source AN0 voltage
>
> If it was 1k5:100k (near enough) that would be in parallel with the
250R
> load on PIC1's AN0, dropping its effective resistance value by ~ 0.25%
>
> The other option is to reduce the gain of the converter by 1.5%, which
> was my original question
>

There could be two contributions, gain error and offset error.  Gain
error will be dictated primarily by the tolerance of your resistors
(including the 250R remote sense resistor).  This would be the easiest
to fix; one method would be to trim the 100R current sense resistor.
Possibly make it a little larger e.g. 110R and add a larger value
resistor in parallel to get the gain correct.

Note that any imbalance between the two arms of your diff amp will cause
the behaviour of the circuit to deviate away from a perfect current
source because you will degrade the common mode rejection, e.g. if you
change your remote sense resistor value from 250R to say 100R (or if the
cabling between units has significant resistance), you would normally
expect to get the same current, but this would not be the case if the
100K and 10K resistors were not well matched.

In terms of offset error, the input offset voltage of the LM358 isn't
particularly good, typical 2.9mv, max 7mv.  You diff amp has a gain of
5, so this would translate to a typical voltage error of 14.5 mv.
Across your 100R sense resistor this would give a nominal 0.145mA, which
is about the error you are seeing.  This is a little more difficult to
fix with minimal circuit changes since you need to add or subtract a
voltage, preferably without changing the overall gain.  A higher
performance op-amp (i.e. one with lower input offset voltage) would
reduce this error.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\03\02@074153 by Xiaofan Chen

face picon face
On Mon, Mar 2, 2009 at 8:02 PM, Michael Rigby-Jones
<RemoveMEMichael.Rigby-JonesEraseMEspamEraseMEbookham.com> wrote:

> Note that any imbalance between the two arms of your diff amp will cause
> the behaviour of the circuit to deviate away from a perfect current
> source because you will degrade the common mode rejection, e.g. if you
> change your remote sense resistor value from 250R to say 100R (or if the
> cabling between units has significant resistance), you would normally
> expect to get the same current, but this would not be the case if the
> 100K and 10K resistors were not well matched.
>
> In terms of offset error, the input offset voltage of the LM358 isn't
> particularly good, typical 2.9mv, max 7mv.  You diff amp has a gain of
> 5, so this would translate to a typical voltage error of 14.5 mv.
> Across your 100R sense resistor this would give a nominal 0.145mA, which
> is about the error you are seeing.  This is a little more difficult to
> fix with minimal circuit changes since you need to add or subtract a
> voltage, preferably without changing the overall gain.  A higher
> performance op-amp (i.e. one with lower input offset voltage) would
> reduce this error.

Gain error and offset error can normally be mitigated by calibration
since this is a MCU based design.

Temperature drift is difficult to be calibrated away though.

Xiaofan

2009\03\02@075523 by Michael Rigby-Jones

picon face


{Quote hidden}

True, but the temperature sensor and 4-20mA conversion is purely analog so calibration through the micro would only be useful if a remote sensor and the base unit are always paired i.e. if you changed the remote sensor, you'd have to re-calibrate.

Regards

Mike

=======================================================================
This e-mail is intended for the person it is addressed to only. The
information contained in it may be confidential and/or protected by
law. If you are not the intended recipient of this message, you must
not make any use of this information, or copy or show it to any
person. Please contact us immediately to tell us that you have
received this e-mail, and return the original to us. Any use,
forwarding, printing or copying of this message is strictly prohibited.
No part of this message can be considered a request for goods or
services.
=======================================================================

2009\03\02@143752 by Jinx

face picon face
> There could be two contributions, gain error and offset error

Mike, thanks for the analysis

Presently I'm using 5% carbon resistors that were simply to hand, and
the LM358, so in this first-draft circuit some error could have been
expected. The project is a proof-of-concept demo, which is no excuse
for not doing it properly, but......

I'll get some 1% and a better amp for a revision

As only a resolution of whole degrees is needed, for the time being I
can use the circuit as is, if I don't have time to revise, and compensate
for the extra gain by changing the comparison number used for rounding
in PIC2's s/w. It's there anyway, so no extra code is needed. The more
important reading is at PIC1, and that's correct

More... (looser matching)
- Last day of these posts
- In 2009 , 2010 only
- Today
- New search...