A to D conversion
Archiver
Posts: 46,084
John-
Your code looks fine to me. My guess is you're just up against the
precision/accuracy limitations of your LTC1298 and/or voltage
source. 12 bits corresponds to 4096 increments, so you're off by
(2047-2033)/4096 or roughly 0.3%, or ~0.017 volts. Pretty good!
Steve
On 19 Feb 01 at 13:46, John DeFeo wrote:
> ...My problem is that the bit pattern is incorrect for the input
> voltage. For example, Vin=2.500 value read is 2033. The expected
> value should be 2047.
Your code looks fine to me. My guess is you're just up against the
precision/accuracy limitations of your LTC1298 and/or voltage
source. 12 bits corresponds to 4096 increments, so you're off by
(2047-2033)/4096 or roughly 0.3%, or ~0.017 volts. Pretty good!
Steve
On 19 Feb 01 at 13:46, John DeFeo wrote:
> ...My problem is that the bit pattern is incorrect for the input
> voltage. For example, Vin=2.500 value read is 2033. The expected
> value should be 2047.
Comments
converter.
The following listing is the program that I am using
to read the ADC;
CS con 1 ' Chip select pin number; 0 = active
CLK con 2 ' Clock to ADC pin number; out on rising, in
on falling edge.
DIO_n con 3 ' Data I/O pin number.
config var nib' Configuration bits for ADC.
AD var word ' Variable to hold 12-bit AD result.
startB var config.bit0 ' Start bit for comm with ADC.
sglDif var config.bit1 ' Single-ended or differential
mode.
oddSign var config.bit2 ' Channel selection.
msbf var config.bit3 ' Output 0s after data xfer
complete.
high CS ' Deactivate ADC to begin.
high DIO_n' Set data pin for first start bit.
again: ' Main loop.
oddSign = 0 ' Select channel 0 only.
gosub convert ' Get data from ADC.
debug "channel ",DEC oddSign, ": ",DEC AD,cr'
Display data.
pause 500 ' Wait a half second.
goto again ' Endless loop.
convert:
config = %1011 ' Set configuration bits except for
single ended, for channel 0, msbf, oddSign, sglDif,
startB.
low CS ' Activate the ADC.
shiftout DIO_n,CLK,lsbfirst,[noparse][[/noparse]config\4]' Send config
bits.
shiftin DIO_n,CLK,msbpost,[noparse][[/noparse]AD\12]' Get data bits.
high CS ' Deactivate the ADC.
return ' Return to program.
My problem is that the bit pattern is incorrect for
the input voltage. For example, Vin=2.500 value read
is 2033. The expected value should be 2047.
Any ideas for this problem
Thanks
John
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
your getting 2.48168 vdc and you are looking for 2.49877 vdc you are off
by .01709 volts, look at the voltage your using for Vref is it of by .017
volts
John DeFeo wrote:
>
> I am using the Basic Stamp 2 with the LTC1298 A to D
> converter.
>
> The following listing is the program that I am using
> to read the ADC;
>
> CS con 1 ' Chip select pin number; 0 = active
> CLK con 2 ' Clock to ADC pin number; out on rising, in
> on falling edge.
> DIO_n con 3 ' Data I/O pin number.
> config var nib' Configuration bits for ADC.
> AD var word ' Variable to hold 12-bit AD result.
>
> startB var config.bit0 ' Start bit for comm with ADC.
> sglDif var config.bit1 ' Single-ended or differential
> mode.
> oddSign var config.bit2 ' Channel selection.
> msbf var config.bit3 ' Output 0s after data xfer
> complete.
>
> high CS ' Deactivate ADC to begin.
> high DIO_n' Set data pin for first start bit.
> again: ' Main loop.
> oddSign = 0 ' Select channel 0 only.
> gosub convert ' Get data from ADC.
> debug "channel ",DEC oddSign, ": ",DEC AD,cr'
> Display data.
> pause 500 ' Wait a half second.
> goto again ' Endless loop.
>
> convert:
> config = %1011 ' Set configuration bits except for
> single ended, for channel 0, msbf, oddSign, sglDif,
> startB.
> low CS ' Activate the ADC.
> shiftout DIO_n,CLK,lsbfirst,[noparse][[/noparse]config\4]' Send config
> bits.
> shiftin DIO_n,CLK,msbpost,[noparse][[/noparse]AD\12]' Get data bits.
> high CS ' Deactivate the ADC.
> return ' Return to program.
>
> My problem is that the bit pattern is incorrect for
> the input voltage. For example, Vin=2.500 value read
> is 2033. The expected value should be 2047.
>
> Any ideas for this problem
>
> Thanks
>
> John
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail - only $35
> a year! http://personal.mail.yahoo.com/
reference is also at 5.00V.
--- "L .Gaminde" <lgaminde@t...> wrote:
> What are you checking it with and is it a real good
> one
> your getting 2.48168 vdc and you are looking for
> 2.49877 vdc you are off
> by .01709 volts, look at the voltage your using for
> Vref is it of by .017
> volts
>
> John DeFeo wrote:
> >
> > I am using the Basic Stamp 2 with the LTC1298 A to
> D
> > converter.
> >
> > The following listing is the program that I am
> using
> > to read the ADC;
> >
> > CS con 1 ' Chip select pin number; 0 =
> active
> > CLK con 2 ' Clock to ADC pin number; out on
> rising, in
> > on falling edge.
> > DIO_n con 3 ' Data I/O pin number.
> > config var nib' Configuration bits for ADC.
> > AD var word ' Variable to hold 12-bit AD
> result.
> >
> > startB var config.bit0 ' Start bit for comm with
> ADC.
> > sglDif var config.bit1 ' Single-ended or
> differential
> > mode.
> > oddSign var config.bit2 ' Channel selection.
> > msbf var config.bit3 ' Output 0s after data
> xfer
> > complete.
> >
> > high CS ' Deactivate ADC to begin.
> > high DIO_n' Set data pin for first start bit.
> > again: ' Main loop.
> > oddSign = 0 ' Select channel 0 only.
> > gosub convert ' Get data from ADC.
> > debug "channel ",DEC oddSign, ": ",DEC AD,cr'
> > Display data.
> > pause 500 ' Wait a half second.
> > goto again ' Endless loop.
> >
> > convert:
> > config = %1011 ' Set configuration bits except
> for
> > single ended, for channel 0, msbf, oddSign,
> sglDif,
> > startB.
> > low CS ' Activate the ADC.
> > shiftout DIO_n,CLK,lsbfirst,[noparse][[/noparse]config\4]' Send
> config
> > bits.
> > shiftin DIO_n,CLK,msbpost,[noparse][[/noparse]AD\12]' Get data
> bits.
> > high CS ' Deactivate the ADC.
> > return ' Return to program.
> >
> > My problem is that the bit pattern is incorrect
> for
> > the input voltage. For example, Vin=2.500 value
> read
> > is 2033. The expected value should be 2047.
> >
> > Any ideas for this problem
> >
> > Thanks
> >
> > John
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> - only $35
> > a year! http://personal.mail.yahoo.com/
>
>
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
Is the output impedance of the 2.5 volt source low enough? The '1298
sampling capacitors will push a brief surge of current out of the pin
and that cause a brief voltage drop across the input impedance. A
0.1uF capacitor across from the input pin to ground can cure that, so
long as you stick to relatively infrequent sampling (which is once
per 0.5 seconds in your program). Let's say the 2.5 volts comes by
way of a 10kohm/10kohm resistive voltage divider from the +5 volt
supply. The output resistance will be 5 kohms, which is too high,
unless you have the capacitor there. A normal voltmeter will average
right past the brief surges, and will read a steady 2.5 volts.
Also, check for noise on the power supply--be sure the chip is well
bypassed right at the pins. Noise would usually show up as random
variation in the output code, but funny things can happen to give
consistently bad results.
One problem with the BASIC Stamp in relation to the LT1298 is that
the SPI clock on the Stamp runs at only 16khz, which is a bit slow
for the LT1298, The LT1298 uses the SPI clock as its conversion
clock. The LT1298 sampling capacitor droops slightly, so you can't
ever get a full scale output of 4095 counts, even when you hook the
input directly to +5 volts. But it should be within 3 counts. There
was a long thread about that here about a year ago. The BS2SX does
better, with its 40khz SPI clock.
What do you see when you connect your input to ground and to +5 volts?
-- Tracy Allen
electronically monitored ecosystems
http"//www.emesystems.com
>The input voltage to the ADC is correct at 2.500V. The
>reference is also at 5.00V.
>
>--- "L .Gaminde" <lgaminde@t...> wrote:
>> What are you checking it with and is it a real good
>> one
>> your getting 2.48168 vdc and you are looking for
>> 2.49877 vdc you are off
>> by .01709 volts, look at the voltage your using for
>> Vref is it of by .017
>> volts
>>
>> John DeFeo wrote:
>> >
>> > I am using the Basic Stamp 2 with the LTC1298 A to
>> D
>> > converter.
>> >
>> > The following listing is the program that I am
>> using
>> > to read the ADC;
>> >
>> > CS con 1 ' Chip select pin number; 0 =
>> active
>> > CLK con 2 ' Clock to ADC pin number; out on
>> rising, in
>> > on falling edge.
>> > DIO_n con 3 ' Data I/O pin number.
>> > config var nib' Configuration bits for ADC.
>> > AD var word ' Variable to hold 12-bit AD
>> result.
>> >
>> > startB var config.bit0 ' Start bit for comm with
>> ADC.
>> > sglDif var config.bit1 ' Single-ended or
>> differential
>> > mode.
>> > oddSign var config.bit2 ' Channel selection.
>> > msbf var config.bit3 ' Output 0s after data
>> xfer
>> > complete.
>> >
>> > high CS ' Deactivate ADC to begin.
>> > high DIO_n' Set data pin for first start bit.
>> > again: ' Main loop.
>> > oddSign = 0 ' Select channel 0 only.
>> > gosub convert ' Get data from ADC.
>> > debug "channel ",DEC oddSign, ": ",DEC AD,cr'
>> > Display data.
>> > pause 500 ' Wait a half second.
>> > goto again ' Endless loop.
>> >
>> > convert:
>> > config = %1011 ' Set configuration bits except
>> for
>> > single ended, for channel 0, msbf, oddSign,
>> sglDif,
>> > startB.
>> > low CS ' Activate the ADC.
>> > shiftout DIO_n,CLK,lsbfirst,[noparse][[/noparse]config\4]' Send
>> config
>> > bits.
>> > shiftin DIO_n,CLK,msbpost,[noparse][[/noparse]AD\12]' Get data
>> bits.
>> > high CS ' Deactivate the ADC.
>> > return ' Return to program.
>> >
>> > My problem is that the bit pattern is incorrect
>> for
>> > the input voltage. For example, Vin=2.500 value
>> read
>> > is 2033. The expected value should be 2047.
>> >
>> > Any ideas for this problem
>> >
>> > Thanks
>> >
>> > John
>> >
>> > __________________________________________________
>> > Do You Yahoo!?
>> > Get personalized email addresses from Yahoo! Mail
>> - only $35
>> > a year! http://personal.mail.yahoo.com/
>>
>>
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Get personalized email addresses from Yahoo! Mail - only $35
>a year! http://personal.mail.yahoo.com/
source resistance is 1K.
The ADC has a 22uF capacitor across the power pin and
common.
Thanks for your comments.
Regards
John
When the input is connected to ground output is 0, and
when connected to +5 output is 4095
--- Tracy Allen <tracy@e...> wrote:
> A couple of things to check--
>
> Is the output impedance of the 2.5 volt source low
> enough? The '1298
> sampling capacitors will push a brief surge of
> current out of the pin
> and that cause a brief voltage drop across the input
> impedance. A
> 0.1uF capacitor across from the input pin to ground
> can cure that, so
> long as you stick to relatively infrequent sampling
> (which is once
> per 0.5 seconds in your program). Let's say the 2.5
> volts comes by
> way of a 10kohm/10kohm resistive voltage divider
> from the +5 volt
> supply. The output resistance will be 5 kohms,
> which is too high,
> unless you have the capacitor there. A normal
> voltmeter will average
> right past the brief surges, and will read a steady
> 2.5 volts.
>
> Also, check for noise on the power supply--be sure
> the chip is well
> bypassed right at the pins. Noise would usually
> show up as random
> variation in the output code, but funny things can
> happen to give
> consistently bad results.
>
> One problem with the BASIC Stamp in relation to the
> LT1298 is that
> the SPI clock on the Stamp runs at only 16khz, which
> is a bit slow
> for the LT1298, The LT1298 uses the SPI clock as
> its conversion
> clock. The LT1298 sampling capacitor droops
> slightly, so you can't
> ever get a full scale output of 4095 counts, even
> when you hook the
> input directly to +5 volts. But it should be within
> 3 counts. There
> was a long thread about that here about a year ago.
> The BS2SX does
> better, with its 40khz SPI clock.
>
> What do you see when you connect your input to
> ground and to +5 volts?
>
> -- Tracy Allen
> electronically monitored ecosystems
> http"//www.emesystems.com
>
>
>
>
> >The input voltage to the ADC is correct at 2.500V.
> The
> >reference is also at 5.00V.
> >
> >--- "L .Gaminde" <lgaminde@t...> wrote:
> >> What are you checking it with and is it a real
> good
> >> one
> >> your getting 2.48168 vdc and you are looking for
> >> 2.49877 vdc you are off
> >> by .01709 volts, look at the voltage your using
> for
> >> Vref is it of by .017
> >> volts
> >>
> >> John DeFeo wrote:
> >> >
> >> > I am using the Basic Stamp 2 with the LTC1298 A
> to
> >> D
> >> > converter.
> >> >
> >> > The following listing is the program that I am
> >> using
> >> > to read the ADC;
> >> >
> >> > CS con 1 ' Chip select pin number; 0 =
> >> active
> >> > CLK con 2 ' Clock to ADC pin number; out
> on
> >> rising, in
> >> > on falling edge.
> >> > DIO_n con 3 ' Data I/O pin number.
> >> > config var nib' Configuration bits for
> ADC.
> >> > AD var word ' Variable to hold 12-bit AD
> >> result.
> >> >
> >> > startB var config.bit0 ' Start bit for comm
> with
> >> ADC.
> >> > sglDif var config.bit1 ' Single-ended or
> >> differential
> >> > mode.
> >> > oddSign var config.bit2 ' Channel selection.
> >> > msbf var config.bit3 ' Output 0s after data
> >> xfer
> >> > complete.
> >> >
> >> > high CS ' Deactivate ADC to begin.
> >> > high DIO_n' Set data pin for first start bit.
> >> > again: ' Main loop.
> >> > oddSign = 0 ' Select channel 0 only.
> >> > gosub convert ' Get data from ADC.
> >> > debug "channel ",DEC oddSign, ": ",DEC AD,cr'
> >> > Display data.
> >> > pause 500 ' Wait a half second.
> >> > goto again ' Endless loop.
> >> >
> >> > convert:
> >> > config = %1011 ' Set configuration bits
> except
> >> for
> >> > single ended, for channel 0, msbf, oddSign,
> >> sglDif,
> >> > startB.
> >> > low CS ' Activate the ADC.
> >> > shiftout DIO_n,CLK,lsbfirst,[noparse][[/noparse]config\4]' Send
> >> config
> >> > bits.
> >> > shiftin DIO_n,CLK,msbpost,[noparse][[/noparse]AD\12]' Get data
> >> bits.
> >> > high CS ' Deactivate the ADC.
> >> > return ' Return to program.
> >> >
> >> > My problem is that the bit pattern is incorrect
> >> for
> >> > the input voltage. For example, Vin=2.500 value
> >> read
> >> > is 2033. The expected value should be 2047.
> >> >
> >> > Any ideas for this problem
> >> >
> >> > Thanks
> >> >
> >> > John
> >> >
> >> >
> __________________________________________________
> >> > Do You Yahoo!?
> >> > Get personalized email addresses from Yahoo!
> Mail
> >> - only $35
> >> > a year! http://personal.mail.yahoo.com/
> >>
> >>
> >>
> >
> >
> >__________________________________________________
> >Do You Yahoo!?
> >Get personalized email addresses from Yahoo! Mail -
> only $35
> >a year! http://personal.mail.yahoo.com/
>
>
>
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
John
--- S Parkis <parkiss@e...> wrote:
> John-
>
> Your code looks fine to me. My guess is you're just
> up against the
> precision/accuracy limitations of your LTC1298
> and/or voltage
> source. 12 bits corresponds to 4096 increments, so
> you're off by
> (2047-2033)/4096 or roughly 0.3%, or ~0.017 volts.
> Pretty good!
>
> Steve
>
> On 19 Feb 01 at 13:46, John DeFeo wrote:
>
> > ...My problem is that the bit pattern is incorrect
> for the input
> > voltage. For example, Vin=2.500 value read is
> 2033. The expected
> > value should be 2047.
>
>
>
__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail - only $35
a year! http://personal.mail.yahoo.com/
> One problem with the BASIC Stamp in relation to the LT1298 is that
> the SPI clock on the Stamp runs at only 16khz, which is a bit slow
> for the LT1298, The LT1298 uses the SPI clock as its conversion
> clock. The LT1298 sampling capacitor droops slightly, so you can't
> ever get a full scale output of 4095 counts, even when you hook the
> input directly to +5 volts. But it should be within 3 counts. There
> was a long thread about that here about a year ago. The BS2SX does
> better, with its 40khz SPI clock.
>
Tracy,
So if the BS2 is off by 3 counts, how much better is the BS2SX? I'm asking
because I'm developing an application that will measure a voltage, compare
it to an expected voltage, and compute if the measured voltage was within
+/-10% of the expected. I need to take into account the errors due to
measuring to make sure that the worst case measuring error is small enough
to enable me to do the +/-10% comparison. A previous message in this thread
listed an error of roughly 0.3% [noparse][[/noparse](2047-2033)/4096]... Thanks in advance for
your time! :-)
Tracy Young
>source resistance is 1K.
>The ADC has a 22uF capacitor across the power pin and
>common.
>When the input is connected to ground output is 0, and
>when connected to +5 output is 4095
> > >> > My problem is that the bit pattern is incorrect
> > >> for
> > >> > the input voltage. For example, Vin=2.500 value
> > >> read
> > >> > is 2033. The expected value should be 2047.
hmm.
What is the signal source?
Are you using a BS2 or a BS2SX?
What are a couple of other readings say at 1 volts and 4 volts input?
How about the possibility of a ground loop. Are you measuring these
values with respect to a node very close to pin 4 of the LT1298?
Can you look at the input signal and the power supply on a 'scope to
see if there is any noise or oscillation, or probe it with the AC
range on the multimeter?
so many questions, so few answers,
-- Tracy Allen
LTC1298. I typically get 4090 - 4091.
The BS2SX should do much better, due to the faster shiftin clock speed. I
have built probably 25 dataloggers using the LTC1298, with BSII, which all
exhibit the less than fullscale output.
The less than FSO can be adjusted for, to retain the relative accuracy of
the device
I'm not sure it applies, but I spoke with an engineer at Linear-tech about
the drooping, and whether it was anything to be concerned with. He thought
that it was possible it could generate significant errors if the drooping
occured at just the right(wrong) time in the conversion process.
I've since switched over to the MAX144 2 channel 12 bit A to D converter
which features an internal conversion clock. Then, finally, I got my FSO.
The LTC1298 datasheet has a graph of conversion clock speed vs temperature,
this is where the mysterious drooping became clear (thanks to Mr. Edwards
of Seetron for spoting this)
good luck,
Steve
At 09:12 AM 02/20/2001 -0800, you wrote:
>>
>> One problem with the BASIC Stamp in relation to the LT1298 is that
>> the SPI clock on the Stamp runs at only 16khz, which is a bit slow
>> for the LT1298, The LT1298 uses the SPI clock as its conversion
>> clock. The LT1298 sampling capacitor droops slightly, so you can't
>> ever get a full scale output of 4095 counts, even when you hook the
>> input directly to +5 volts. But it should be within 3 counts. There
>> was a long thread about that here about a year ago. The BS2SX does
>> better, with its 40khz SPI clock.
>>
>Tracy,
>So if the BS2 is off by 3 counts, how much better is the BS2SX? I'm asking
>because I'm developing an application that will measure a voltage, compare
>it to an expected voltage, and compute if the measured voltage was within
>+/-10% of the expected. I need to take into account the errors due to
>measuring to make sure that the worst case measuring error is small enough
>to enable me to do the +/-10% comparison. A previous message in this thread
>listed an error of roughly 0.3% [noparse][[/noparse](2047-2033)/4096]... Thanks in advance for
>your time! :-)
>Tracy Young
>
>
>
>
Thanks for the information.
John
--- sargent@s... wrote:
> I've never managed to get better than 4092 counts
> fullscale from the
> LTC1298. I typically get 4090 - 4091.
>
> The BS2SX should do much better, due to the faster
> shiftin clock speed. I
> have built probably 25 dataloggers using the
> LTC1298, with BSII, which all
> exhibit the less than fullscale output.
>
> The less than FSO can be adjusted for, to retain the
> relative accuracy of
> the device
>
> I'm not sure it applies, but I spoke with an
> engineer at Linear-tech about
> the drooping, and whether it was anything to be
> concerned with. He thought
> that it was possible it could generate significant
> errors if the drooping
> occured at just the right(wrong) time in the
> conversion process.
>
> I've since switched over to the MAX144 2 channel 12
> bit A to D converter
> which features an internal conversion clock. Then,
> finally, I got my FSO.
>
> The LTC1298 datasheet has a graph of conversion
> clock speed vs temperature,
> this is where the mysterious drooping became clear
> (thanks to Mr. Edwards
> of Seetron for spoting this)
>
> good luck,
>
> Steve
>
>
> At 09:12 AM 02/20/2001 -0800, you wrote:
> >>
> >> One problem with the BASIC Stamp in relation to
> the LT1298 is that
> >> the SPI clock on the Stamp runs at only 16khz,
> which is a bit slow
> >> for the LT1298, The LT1298 uses the SPI clock as
> its conversion
> >> clock. The LT1298 sampling capacitor droops
> slightly, so you can't
> >> ever get a full scale output of 4095 counts, even
> when you hook the
> >> input directly to +5 volts. But it should be
> within 3 counts. There
> >> was a long thread about that here about a year
> ago. The BS2SX does
> >> better, with its 40khz SPI clock.
> >>
> >Tracy,
> >So if the BS2 is off by 3 counts, how much better
> is the BS2SX? I'm asking
> >because I'm developing an application that will
> measure a voltage, compare
> >it to an expected voltage, and compute if the
> measured voltage was within
> >+/-10% of the expected. I need to take into
> account the errors due to
> >measuring to make sure that the worst case
> measuring error is small enough
> >to enable me to do the +/-10% comparison. A
> previous message in this thread
> >listed an error of roughly 0.3%
> [noparse][[/noparse](2047-2033)/4096]... Thanks in advance for
> >your time! :-)
> >Tracy Young
> >
> >
> >
> >
>
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/
the problem.
When you used the MAX144, were you successful in using
it with the BS2?
John
--- sargent@s... wrote:
> I've never managed to get better than 4092 counts
> fullscale from the
> LTC1298. I typically get 4090 - 4091.
>
> The BS2SX should do much better, due to the faster
> shiftin clock speed. I
> have built probably 25 dataloggers using the
> LTC1298, with BSII, which all
> exhibit the less than fullscale output.
>
> The less than FSO can be adjusted for, to retain the
> relative accuracy of
> the device
>
> I'm not sure it applies, but I spoke with an
> engineer at Linear-tech about
> the drooping, and whether it was anything to be
> concerned with. He thought
> that it was possible it could generate significant
> errors if the drooping
> occured at just the right(wrong) time in the
> conversion process.
>
> I've since switched over to the MAX144 2 channel 12
> bit A to D converter
> which features an internal conversion clock. Then,
> finally, I got my FSO.
>
> The LTC1298 datasheet has a graph of conversion
> clock speed vs temperature,
> this is where the mysterious drooping became clear
> (thanks to Mr. Edwards
> of Seetron for spoting this)
>
> good luck,
>
> Steve
>
>
> At 09:12 AM 02/20/2001 -0800, you wrote:
> >>
> >> One problem with the BASIC Stamp in relation to
> the LT1298 is that
> >> the SPI clock on the Stamp runs at only 16khz,
> which is a bit slow
> >> for the LT1298, The LT1298 uses the SPI clock as
> its conversion
> >> clock. The LT1298 sampling capacitor droops
> slightly, so you can't
> >> ever get a full scale output of 4095 counts, even
> when you hook the
> >> input directly to +5 volts. But it should be
> within 3 counts. There
> >> was a long thread about that here about a year
> ago. The BS2SX does
> >> better, with its 40khz SPI clock.
> >>
> >Tracy,
> >So if the BS2 is off by 3 counts, how much better
> is the BS2SX? I'm asking
> >because I'm developing an application that will
> measure a voltage, compare
> >it to an expected voltage, and compute if the
> measured voltage was within
> >+/-10% of the expected. I need to take into
> account the errors due to
> >measuring to make sure that the worst case
> measuring error is small enough
> >to enable me to do the +/-10% comparison. A
> previous message in this thread
> >listed an error of roughly 0.3%
> [noparse][[/noparse](2047-2033)/4096]... Thanks in advance for
> >your time! :-)
> >Tracy Young
> >
> >
> >
> >
>
>
>
__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices!
http://auctions.yahoo.com/
Refresh my memory, is your LTC1298 giving you a fullscale reading(4095)
with the BS2SX when you attach an input channel to the converter's 5 vdc
supply?
Yes the MAX144 works great with the BS2. The MAX has an internal conversion
clock mode, which does not depend upon the clock frequency of the
micro(shiftin clock speed) to drive the conversion process. In fact I'm
working with the MAX144 as we speak, one nice thing about the MAX144 is
that it has a seperate reference terminal(as opposed to the LTC1298) so
that you can power the MAX144 from your 5 vdc supply, but then use a
voltage reference to fine tune the converter.
Many on this list have used the LTC1298, I'm sure we can figure out what's
going on with yours.
let me know if you have any luck
Steve
The LTC1298 when tied to the 5 volt supply reads 4095.
When I use the BS2X I get a reading of 10 less than
what is ecpected when less than 5Volts.
Here is the bit pattern with the BS2X and the LTC1298:
Vin A/D
0.5 400
1.0 806
1.5 1217
2.0 1627
2.5 2025
3.0 2434
3.5 2853
4.0 3250
4.5 3673
5.0 4095
I am tring to locate some one who the MAX144 in stock.
Do you have a supplier that has them?
Thanks,
John
--- sargent@s... wrote:
> Hi John,
>
> Refresh my memory, is your LTC1298 giving you a
> fullscale reading(4095)
> with the BS2SX when you attach an input channel to
> the converter's 5 vdc
> supply?
>
> Yes the MAX144 works great with the BS2. The MAX has
> an internal conversion
> clock mode, which does not depend upon the clock
> frequency of the
> micro(shiftin clock speed) to drive the conversion
> process. In fact I'm
> working with the MAX144 as we speak, one nice thing
> about the MAX144 is
> that it has a seperate reference terminal(as opposed
> to the LTC1298) so
> that you can power the MAX144 from your 5 vdc
> supply, but then use a
> voltage reference to fine tune the converter.
>
> Many on this list have used the LTC1298, I'm sure we
> can figure out what's
> going on with yours.
>
> let me know if you have any luck
>
> Steve
>
>
>
>
>
> Your use of Yahoo! Groups is subject to
> http://docs.yahoo.com/info/terms/
>
>
__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/
Not sure if this has been told before, but what type of instrument are you
using to measure the voltage with?
It looks like your converter is working, though it's not particularily
linear. This is a surprise, you should expect to be within 1 or 2 bits
across the entire range.
What are you powering the LTC1298 from? I'm pretty sure I've seen that your
using a 10 microfarad cap across the LTC 1298 power supply lines?
not sure how much it matters, but be sure and use a series 1 K ohm resistor
from the LTC1298 output pin(Dout) to the data input pin of the stamp.
Sorry if you've answered these questions before, I've been very busy, and
not paying sharp attention.
I bought my MAX144's straight from Maxim,
http://www.maxim-ic.com/
I've never seen a distributer that carried them. Maxim is generally very
good about providing a sample or two, this would be your best bet to aquire
some.
I also may be willing to part with a few, I have about a dozen extra
pieces(never used).
The attracive thing about the MAX144, aside from the internal conversion
clock is that chip provides an external reference input seperate from the
power supply. This allows me to power the chip from 5 vdc, then use an
external reference to set my converter to the range that i want. I'm
currently setting up a MAX144 with a 1.024 vdc reference, giving me a
resolution of 0.25 millivolts and a maximum input voltage of 1.024 vdc
Steve
At 11:10 AM 02/25/2001 -0800, you wrote:
>Steve,
>
>The LTC1298 when tied to the 5 volt supply reads 4095.
>When I use the BS2X I get a reading of 10 less than
>what is ecpected when less than 5Volts.
>
>Here is the bit pattern with the BS2X and the LTC1298:
>Vin A/D
>0.5 400
>1.0 806
>1.5 1217
>2.0 1627
>2.5 2025
>3.0 2434
>3.5 2853
>4.0 3250
>4.5 3673
>5.0 4095
>
>I am tring to locate some one who the MAX144 in stock.
>Do you have a supplier that has them?
>
>Thanks,
>
>John
>--- sargent@s... wrote:
>> Hi John,
>>
>> Refresh my memory, is your LTC1298 giving you a
>> fullscale reading(4095)
>> with the BS2SX when you attach an input channel to
>> the converter's 5 vdc
>> supply?
>>
>> Yes the MAX144 works great with the BS2. The MAX has
>> an internal conversion
>> clock mode, which does not depend upon the clock
>> frequency of the
>> micro(shiftin clock speed) to drive the conversion
>> process. In fact I'm
>> working with the MAX144 as we speak, one nice thing
>> about the MAX144 is
>> that it has a seperate reference terminal(as opposed
>> to the LTC1298) so
>> that you can power the MAX144 from your 5 vdc
>> supply, but then use a
>> voltage reference to fine tune the converter.
>>
>> Many on this list have used the LTC1298, I'm sure we
>> can figure out what's
>> going on with yours.
>>
>> let me know if you have any luck
>>
>> Steve
>>
>>
>>
>>
>>
>> Your use of Yahoo! Groups is subject to
>> http://docs.yahoo.com/info/terms/
>>
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Get email at your own domain with Yahoo! Mail.
>http://personal.mail.yahoo.com/
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
I had to use an accurate 5 volt supply, (REF02).
We used only 1 channel, and had to add a .01 uf bypass from the LTC input to
gnd.
Used a 220uf electrolytic + .1uf ceramic bypass on the 5 volt supply very
close to the chip.
Hope this helps,
Ray McArthur
>
> The LTC1298 when tied to the 5 volt supply reads 4095.
> When I use the BS2X I get a reading of 10 less than
> what is ecpected when less than 5Volts.
>
> Here is the bit pattern with the BS2X and the LTC1298:
> Vin A/D
> 0.5 400
> 1.0 806
> 1.5 1217
> 2.0 1627
> 2.5 2025
> 3.0 2434
> 3.5 2853
> 4.0 3250
> 4.5 3673
> 5.0 4095
>
>The LTC1298 when tied to the 5 volt supply reads 4095.
>When I use the BS2X I get a reading of 10 less than
>what is ecpected when less than 5Volts.
>
>Here is the bit pattern with the BS2X and the LTC1298:
Here they are, with the strange pattern of differences:
Vin A/D expected difference
0.5 400 410 10
1.0 806 819 13
1.5 1217 1229 12
2.0 1627 1638 11
2.5 2025 2048 23
3.0 2434 2457 23
3.5 2853 2867 14
4.0 3250 3276 26
4.5 3673 3686 12
5.0 4095 4095 0
Are those results repeatable?
The LTC1298 is capable of doing better than that with the BS2.
You may have a defective chip, but I always suspect the circuit
layout or measurement error first-off. At least for my own
troubleshooting. It is always nice to have a second chip as a backup
for comparison.
All the stamp readings are too high (except the 5 volt one, which is
saturated), so I would look for something that makes the LTC chip
think it is getting a higher signal than is being measured by the
voltmeter. Bad grounding? High impedance input connection? hmm.
(better luck with the MAX144, but all ADCs require careful layout.)
-- Tracy
operation, I use a moving average over N values, with N/2 forward in time
and N/2 backward in time, to determine each point. I also oversample by a
factor of 5, so I perform the moving average only on every 5th point. Note
that the moving average is a low-pass filter, with a longer N resulting in a
lower filter cut-off frequency.
Dennis
Original Message
From: Tracy Allen [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=Tzf1DFlT8ElvQZRwmM7AjgIvxMdXvl1L_-doa72N-FrcrrH_Bq15Tz52Y1yALLp7_iBwJ8d0NIfv0p2LReI]tracy@e...[/url
Sent: Sunday, February 25, 2001 4:58 PM
To: basicstamps@yahoogroups.com
Subject: RE: [noparse][[/noparse]basicstamps] A to D conversion
>Steve,
>
>The LTC1298 when tied to the 5 volt supply reads 4095.
>When I use the BS2X I get a reading of 10 less than
>what is ecpected when less than 5Volts.
>
>Here is the bit pattern with the BS2X and the LTC1298:
Here they are, with the strange pattern of differences:
Vin A/D expected difference
0.5 400 410 10
1.0 806 819 13
1.5 1217 1229 12
2.0 1627 1638 11
2.5 2025 2048 23
3.0 2434 2457 23
3.5 2853 2867 14
4.0 3250 3276 26
4.5 3673 3686 12
5.0 4095 4095 0
Are those results repeatable?
The LTC1298 is capable of doing better than that with the BS2.
You may have a defective chip, but I always suspect the circuit
layout or measurement error first-off. At least for my own
troubleshooting. It is always nice to have a second chip as a backup
for comparison.
All the stamp readings are too high (except the 5 volt one, which is
saturated), so I would look for something that makes the LTC chip
think it is getting a higher signal than is being measured by the
voltmeter. Bad grounding? High impedance input connection? hmm.
(better luck with the MAX144, but all ADCs require careful layout.)
-- Tracy
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/