I'm not exactly sure what your application is, but if you're
collecting data samples (as opposed to displaying or otherwise using the
temperature in real time), you can just sample the raw ADC values, and then
worry about compensating "off line" with a PC. It takes the pressure off in
terms of schedule, risk, etc., and you have all the horsepower you need. And
programming math with Excel is a lot easier than the on the MSP430!
Stuart
--- In m..., Franco Bucafusco wrote: >
> Hi.
>
> I am going to explain you how I did the compensation in a metrological
> device. We used a sd16 of a MSP430F427. Also we used the sd16A from a
> MSP430F2013. Results were almost the same. We compensanted ( for both adCs)
> from -30 to +60 C (we included within the compensation the transducer
> nonlinearities).
>
> We had a matrix with coeficients. One row of a the matrix, were for one
> specific temp. So, we sample temperature then we calculate the index within
> the matrix for that temp and then linear interpolate the coeficients for
the
> 2 vectors near the measured temperature. example:
> c0 c1 c2
> -20 1 2 3
> -10 1.1 2.2 3.3
>
> the coecifiecnts, for any temp were the 2 orden polinomial coefficients
> using the adc code (for the measured variable) as x.
>
> if the temp code gave me -15 we calculate, c0= 1.05 c1= 2.1 c2= 3.15
(-15
> falls in the middle of the 2 vectors)
>
> this method worked very well. We got errors (%fsr) better than 0.1%fsr .
>
> When the product was in streets, i tried a different aproach (I have
noticed
> that coefficients variations with temp were very predictable, and they
> follow a cuatratic shape). I have tried using a 3x3 matrix, that contains
> the coefficients (2orden poly) of the coefficients.
>
> so: C0= C00 + C01.temp + C02.temp^2 and so on.. then outpu_value=
> C0+C1*adc_code+C2*adc_code^2
>
> This explanation maybe goes beyond your needs, but maybe helps.
>
> Bye
>
>
>
> On Wed, Oct 14, 2009 at 6:03 AM, FabWar wrote:
>
> >
> >
> >
> >
> > Dear all,
> >
> > I want to compensate the adc value with chnaging of temperature ? any
idea?
> > Regards,
> >
> > Muhammad Firdaus B. Abu Bakar
> >
> > ________________________________
> > From: Michael >
> > To: m...
> > Sent: Tue, October 13, 2009 11:08:56 PM
> > Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
> >
> > Your description is very confusing. You don't clearly specify which
changes
> > are done by you on purpose and which are unwanted events.
> >
> > What Do you mean you switch off the device? Do you mean you suspend the
> > device like one would suspend a laptop instead of turning it off?
> >
> > You need to take a step back, read what you wrote, and then write it all
> > over again so that anybody that isn't sitting next to you may
understand
> > what you're doing and what you are having trouble with.
> >
> > Regards,
> > Michael K.
> >
> > --- In msp430@yahoogroups. com, arunangshu Chandra
wrote:
> > >
> > > Dear All,
> > > I have declared in a variable (unsigned int power_on_count= 0;) and
then
> > incremented it once in program (not in timer function) power_on_count+ +,
> > and displaying it on LCD. the variable increment till 0 to 30 while i
switch
> > on and off the device. during that period, the microcontroller switch
from
> > normal to lpm4 mode during this period. after that a variable reaches 30
> > either device gets reset or variable change to garbage.
> > >
> > > Arun
> > >
> > >
> > >
> > >
> > >
> > >
> >
> >
> >
> >
> >
>
>
>
>
But If i use least squares regression, how many data possible? if the data not
repeatable ?
Regards,
Muhammad Firdaus B. Abu Bakar
________________________________
From: Glenn
To: m...
Sent: Fri, October 16, 2009 4:47:39 AM
Subject: Re: [msp430] How to compensate the adc value when temperature change?
Help me!!
You may want to try a least squares regression.
----- Original Message -----
From: FabWar
To: msp430@yahoogroups. com
Sent: Thursday, October 15, 2009 8:27 PM
Subject: Re: [msp430] How to compensate the adc value when temperature change?
Help me!!
Waht you mean 2 point calibration? How to get zero delta and gain delta?
Regards,
Muhammad Firdaus B. Abu Bakar
____________ _________ _________ __
From: "Jitendra Chauhan, Noida"
To: "msp430@yahoogroups. com"
Sent: Thu, October 1the s5, 2009 3:00:31 PM
Subject: RE: [msp430] How to compensate the adc value when temperature change?
Help me!!
You need to Calibrate the ADC for entire temperature range, you can maintain the
table of offset if single point calibration works, if error is still more then
go for 2 point calibration.
Table will look like : -
{Temp, zero delta, gain delta)
{-20 M1 , C1}
{-10 M2 , C2}
......
Temp will be constant whether zero and gain delta to be updated during ADC
calibration. .
Best regards,
Jitendra
From: msp430@yahoogroups. com [mailto:msp430@ yahoogroups. com] On Behalf Of
FabWar(r)
Sent: Wednesday, October 14, 2009 2:34 PM
To: msp430@yahoogroups. com
Subject: [msp430] How to compensate the adc value when temperature change? Help
me!!
Dear all,
I want to compensate the adc value with chnaging of temperature ? any idea?
Regards,
Muhammad Firdaus B. Abu Bakar
____________ _________ _________ __
From: Michael >
To: msp430@yahoogroups. com
Sent: Tue, October 13, 2009 11:08:56 PM
Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
Your description is very confusing. You don't clearly specify which changes
are done by you on purpose and which are unwanted events.
What Do you mean you switch off the device? Do you mean you suspend the device
like one would suspend a laptop instead of turning it off?
You need to take a step back, read what you wrote, and then write it all over
again so that anybody that isn't sitting next to you may understand what
you're doing and what you are having trouble with.
Regards,
Michael K.
--- In msp430@yahoogroups. com, arunangshu Chandra
wrote: >
> Dear All,
> I have declared in a variable (unsigned int power_on_count= 0;) and then
incremented it once in program (not in timer function) power_on_count+ +, and
displaying it on LCD. the variable increment till 0 to 30 while i switch on and
off the device. during that period, the microcontroller switch from normal to
lpm4 mode during this period. after that a variable reaches 30 either device
gets reset or variable change to garbage.
>
> Arun
>
>
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately.
Before opening any mail and
attachments please check them for viruses and defect.
----- Original Message -----
From: FabWar
To: m...
Sent: Thursday, October 15, 2009 8:27 PM
Subject: Re: [msp430] How to compensate the adc value when temperature change?
Help me!!
Waht you mean 2 point calibration? How to get zero delta and gain delta?
Regards,
Muhammad Firdaus B. Abu Bakar
________________________________
From: "Jitendra Chauhan, Noida"
To: "m..."
Sent: Thu, October 1the s5, 2009 3:00:31 PM
Subject: RE: [msp430] How to compensate the adc value when temperature change?
Help me!!
You need to Calibrate the ADC for entire temperature range, you can maintain
the table of offset if single point calibration works, if error is still more
then go for 2 point calibration.
Table will look like : -
{Temp, zero delta, gain delta)
{-20 M1 , C1}
{-10 M2 , C2}
......
Temp will be constant whether zero and gain delta to be updated during ADC
calibration. .
Best regards,
Jitendra
From: msp430@yahoogroups. com [mailto:msp430@yahoogroups. com] On Behalf Of
FabWar(r)
Sent: Wednesday, October 14, 2009 2:34 PM
To: msp430@yahoogroups. com
Subject: [msp430] How to compensate the adc value when temperature change?
Help me!!
Dear all,
I want to compensate the adc value with chnaging of temperature ? any idea?
Regards,
Muhammad Firdaus B. Abu Bakar
____________ _________ _________ __
From: Michael >
To: msp430@yahoogroups. com
Sent: Tue, October 13, 2009 11:08:56 PM
Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
Your description is very confusing. You don't clearly specify which
changes are done by you on purpose and which are unwanted events.
What Do you mean you switch off the device? Do you mean you suspend the device
like one would suspend a laptop instead of turning it off?
You need to take a step back, read what you wrote, and then write it all over
again so that anybody that isn't sitting next to you may understand what
you're doing and what you are having trouble with.
Regards,
Michael K.
--- In msp430@yahoogroups. com, arunangshu Chandra
wrote:
>
> Dear All,
> I have declared in a variable (unsigned int power_on_count= 0;) and then
incremented it once in program (not in timer function) power_on_count+ +, and
displaying it on LCD. the variable increment till 0 to 30 while i switch on and
off the device. during that period, the microcontroller switch from normal to
lpm4 mode during this period. after that a variable reaches 30 either device
gets reset or variable change to garbage.
>
> Arun
>
>
>
>
>
>
The contents of this e-mail and any attachment(s) are confidential and
intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender
immediately. Before opening any mail and
attachments please check them for viruses and defect.
Waht you mean 2 point calibration? How to get zero delta and gain delta?
Regards,
Muhammad Firdaus B. Abu Bakar
________________________________
From: "Jitendra Chauhan, Noida"
To: "m..."
Sent: Thu, October 1the s5, 2009 3:00:31 PM
Subject: RE: [msp430] How to compensate the adc value when temperature change?
Help me!!
You need to Calibrate the ADC for entire temperature range, you can maintain the
table of offset if single point calibration works, if error is still more then
go for 2 point calibration.
Table will look like : -
{Temp, zero delta, gain delta)
{-20 M1 , C1}
{-10 M2 , C2}
......
Temp will be constant whether zero and gain delta to be updated during ADC
calibration. .
Best regards,
Jitendra
From: msp430@yahoogroups. com [mailto:msp430@yahoogroups. com] On Behalf Of
FabWar(r)
Sent: Wednesday, October 14, 2009 2:34 PM
To: msp430@yahoogroups. com
Subject: [msp430] How to compensate the adc value when temperature change? Help
me!!
Dear all,
I want to compensate the adc value with chnaging of temperature ? any idea?
Regards,
Muhammad Firdaus B. Abu Bakar
____________ _________ _________ __
From: Michael >
To: msp430@yahoogroups. com
Sent: Tue, October 13, 2009 11:08:56 PM
Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
Your description is very confusing. You don't clearly specify which changes
are done by you on purpose and which are unwanted events.
What Do you mean you switch off the device? Do you mean you suspend the device
like one would suspend a laptop instead of turning it off?
You need to take a step back, read what you wrote, and then write it all over
again so that anybody that isn't sitting next to you may understand what
you're doing and what you are having trouble with.
Regards,
Michael K.
--- In msp430@yahoogroups. com, arunangshu Chandra
wrote: >
> Dear All,
> I have declared in a variable (unsigned int power_on_count= 0;) and then
incremented it once in program (not in timer function) power_on_count+ +, and
displaying it on LCD. the variable increment till 0 to 30 while i switch on and
off the device. during that period, the microcontroller switch from normal to
lpm4 mode during this period. after that a variable reaches 30 either device
gets reset or variable change to garbage.
>
> Arun
>
>
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately.
Before opening any mail and
attachments please check them for viruses and defect.
Reply by "Jitendra Chauhan, Noida"●October 15, 20092009-10-15
You need to Calibrate the ADC for entire temperature range, you can maintain the
table of offset if single point calibration works, if error is still more then
go for 2 point calibration.
Table will look like : -
{Temp, zero delta, gain delta)
{-20 M1 , C1}
{-10 M2 , C2}
......
Temp will be constant whether zero and gain delta to be updated during ADC
calibration..
Best regards,
Jitendra
From: m... [mailto:m...] On Behalf Of FabWar(r)
Sent: Wednesday, October 14, 2009 2:34 PM
To: m...
Subject: [msp430] How to compensate the adc value when temperature change? Help
me!!
Dear all,
I want to compensate the adc value with chnaging of temperature ? any idea?
Regards,
Muhammad Firdaus B. Abu Bakar
________________________________
From: Michael >
To: m...
Sent: Tue, October 13, 2009 11:08:56 PM
Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
Your description is very confusing. You don't clearly specify which changes
are done by you on purpose and which are unwanted events.
What Do you mean you switch off the device? Do you mean you suspend the device
like one would suspend a laptop instead of turning it off?
You need to take a step back, read what you wrote, and then write it all over
again so that anybody that isn't sitting next to you may understand what
you're doing and what you are having trouble with.
Regards,
Michael K.
--- In msp430@yahoogroups. com, arunangshu Chandra
wrote: >
> Dear All,
> I have declared in a variable (unsigned int power_on_count= 0;) and then
incremented it once in program (not in timer function) power_on_count+ +, and
displaying it on LCD. the variable increment till 0 to 30 while i switch on and
off the device. during that period, the microcontroller switch from normal to
lpm4 mode during this period. after that a variable reaches 30 either device
gets reset or variable change to garbage.
>
> Arun
>
>
DISCLAIMER:
-----------
The contents of this e-mail and any attachment(s) are confidential and intended
for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates.
Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the
opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification,
distribution and / or publication of
this message without the prior written consent of the author of this e-mail is
strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately.
Before opening any mail and
attachments please check them for viruses and defect.
-----------
Reply by ●October 14, 20092009-10-14
Dear all,
I want to compensate the adc value with chnaging of temperature ? any idea?
Regards,
Muhammad Firdaus B. Abu Bakar
________________________________
From: Michael
To: m...
Sent: Tue, October 13, 2009 11:08:56 PM
Subject: [msp430] Re: RAM variable getting garbage while power on to lpm4
Your description is very confusing. You don't clearly specify which changes
are done by you on purpose and which are unwanted events.
What Do you mean you switch off the device? Do you mean you suspend the device
like one would suspend a laptop instead of turning it off?
You need to take a step back, read what you wrote, and then write it all over
again so that anybody that isn't sitting next to you may understand what
you're doing and what you are having trouble with.
Regards,
Michael K.
--- In msp430@yahoogroups. com, arunangshu Chandra
wrote: >
> Dear All,
> I have declared in a variable (unsigned int power_on_count= 0;)
and then incremented it once in program (not in timer function) power_on_count+
+, and displaying it on LCD. the variable increment till 0 to 30 while i switch
on and off the device. during that period, the microcontroller switch from
normal to lpm4 mode during this period. after that a variable reaches 30 either
device gets reset or variable change to garbage.
>
> Arun
>
>