time-nuts@lists.febo.com

Discussion of precise time and frequency measurement

View all threads

Re: [time-nuts] Poor man's oven

CA
Chris Albertson
Tue, Jun 6, 2017 11:43 PM

On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali attila@kinali.ch wrote:

On Tue, 6 Jun 2017 16:37:27 -0400
Bob kb8tq kb8tq@n1k.org wrote:

. Heck, the STM32F4xx have so much internal noise that the ENOB
of their ADC is below 6bit... so low that they even had to write an
appnote on how to do averaging to get back to the 12 bits the ADC is
spec'ed for. (but don't mention that to an ST sales person, they will
hate your guts afterwards).

Can you actually get back all of those bits?  How many samples would you
need?  My current use case for the STM32 ADC is to track battery voltage
and maybe 6 bits is enough but if I can get to 12 with a software-only fix
I'll take it.  Batteries volts charge slowly so I'd have time to take many
samples.  It's a rather mundane application.  Controlling a battery
powered motor and I can't let theLiPo battery dichange below a limit so I'm
sampling voltage at 1Hz.  Got a link to or the name of the app note?

--

Chris Albertson
Redondo Beach, California

On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali <attila@kinali.ch> wrote: > On Tue, 6 Jun 2017 16:37:27 -0400 > Bob kb8tq <kb8tq@n1k.org> wrote: > > . Heck, the STM32F4xx have so much internal noise that the ENOB > of their ADC is below 6bit... so low that they even had to write an > appnote on how to do averaging to get back to the 12 bits the ADC is > spec'ed for. (but don't mention that to an ST sales person, they will > hate your guts afterwards). > Can you actually get back all of those bits? How many samples would you need? My current use case for the STM32 ADC is to track battery voltage and maybe 6 bits is enough but if I can get to 12 with a software-only fix I'll take it. Batteries volts charge slowly so I'd have time to take many samples. It's a rather mundane application. Controlling a battery powered motor and I can't let theLiPo battery dichange below a limit so I'm sampling voltage at 1Hz. Got a link to or the name of the app note? > > -- Chris Albertson Redondo Beach, California
BK
Bob kb8tq
Wed, Jun 7, 2017 12:04 AM

Hi

You can only get back bits to the degree that the problems are caused by noise.
If it is 1/F noise, averaging over long periods is going to be really tough.

Bob

On Jun 6, 2017, at 7:43 PM, Chris Albertson albertson.chris@gmail.com wrote:

On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali attila@kinali.ch wrote:

On Tue, 6 Jun 2017 16:37:27 -0400
Bob kb8tq kb8tq@n1k.org wrote:

. Heck, the STM32F4xx have so much internal noise that the ENOB
of their ADC is below 6bit... so low that they even had to write an
appnote on how to do averaging to get back to the 12 bits the ADC is
spec'ed for. (but don't mention that to an ST sales person, they will
hate your guts afterwards).

Can you actually get back all of those bits?  How many samples would you
need?  My current use case for the STM32 ADC is to track battery voltage
and maybe 6 bits is enough but if I can get to 12 with a software-only fix
I'll take it.  Batteries volts charge slowly so I'd have time to take many
samples.  It's a rather mundane application.  Controlling a battery
powered motor and I can't let theLiPo battery dichange below a limit so I'm
sampling voltage at 1Hz.  Got a link to or the name of the app note?

--

Chris Albertson
Redondo Beach, California


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi You can only get back bits to the degree that the problems are caused by noise. If it is 1/F noise, averaging over long periods is going to be really tough. Bob > On Jun 6, 2017, at 7:43 PM, Chris Albertson <albertson.chris@gmail.com> wrote: > > On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali <attila@kinali.ch> wrote: > >> On Tue, 6 Jun 2017 16:37:27 -0400 >> Bob kb8tq <kb8tq@n1k.org> wrote: >> > > > >> . Heck, the STM32F4xx have so much internal noise that the ENOB >> of their ADC is below 6bit... so low that they even had to write an >> appnote on how to do averaging to get back to the 12 bits the ADC is >> spec'ed for. (but don't mention that to an ST sales person, they will >> hate your guts afterwards). >> > > Can you actually get back all of those bits? How many samples would you > need? My current use case for the STM32 ADC is to track battery voltage > and maybe 6 bits is enough but if I can get to 12 with a software-only fix > I'll take it. Batteries volts charge slowly so I'd have time to take many > samples. It's a rather mundane application. Controlling a battery > powered motor and I can't let theLiPo battery dichange below a limit so I'm > sampling voltage at 1Hz. Got a link to or the name of the app note? > >> >> > -- > > Chris Albertson > Redondo Beach, California > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
J
jimlux
Wed, Jun 7, 2017 12:12 AM

On 6/6/17 1:37 PM, Bob kb8tq wrote:

Hi

Often when you dig into the details of MCU ADC’s they have a little note “optimized for audio” or
“not recommended for control loops”. It can be a bit of a head scratcher to work out what they are
getting at. The big issues in this case seem to be DC leakage and 1/F noise. Yes, they do sort of go hand in hand :)
You need to be willing to check out the ENOB at DC in order to use them effectively in a simple
OCXO setup. That or be willing to flip the bridge ends on demand and try to cancel out the issues.
Unfortunately that adds both complexity and a string of other fun and games.

This one seems to be designed specifically for this kind of DC
measurement, sure, it will sample at 100kHz, but not with the amplifier
and averaging and such.

Its based on the Freescale (now NXP, I guess..) Kinetis K20 series

It has a bewildering variety of peripherals (touch sensors, etc.), as
well as the usual multiple UARTs, SPI, I2C, timers, counters, etc.
What's nice is that PJRC (who make the teensy series) have written all
the drivers and libraries to integrate into the Arduino environment for
those that don't live for decoding the 1000 page processor family manual
and 600 page package specific manuals that give the specific pinouts and
options on the one YOU have in front of you.  Your "time to first light"
is much shorter. And then you can hack away.

I think this is more a chip designed for embedded controllers and the
like. I don't know if it has the processor and peripherals to do, say, 3
phase induction motor control or Ultrasound processing, but it might.

The Atmel processors are nice (and you can actually get one of the
Arduino flavor ones in a rad hard version.. for those "control the
device in the beamline" applications), but the Kinetis are easily an
order of magnitude better - no bit banging to do serial protocols, USB
built in, decent ADC, floating point, etc.

Op amps are cheap ….

Bob

On Jun 6, 2017, at 3:54 PM, jimlux jimlux@earthlink.net wrote:

On 6/6/17 11:47 AM, Chris Albertson wrote:

Yes, as I wrote.  I would not mess with AREF.  At most you can only get a
multiplication about 4.  Use an op-amp.  Signal conditioning really
almost alway is required in the analog domain before any A/D conversion

Also like the uP is not inside the oven and has a cable of some length so
you'd want a buffered analog signal on the cable, the op-amp can do that
to.

Those $2 parts I linked to have the ADC referenced to 3.3 volts but have 12
bits as compared to the arduino which has 10 bits

or use a Teensy with a 16 bit differential input ADC.  Arduino compatible, cheaper, yeah, you probably get 13 bits real performance from the ADC.  Also has a real analog output (not PWM and a LPF) if you need that.

Programmable gain, sample averaging in hardware, etc.  Not bad for <$20.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

On 6/6/17 1:37 PM, Bob kb8tq wrote: > Hi > > Often when you dig into the details of MCU ADC’s they have a little note “optimized for audio” or > “not recommended for control loops”. It can be a bit of a head scratcher to work out what they are > getting at. The big issues in this case seem to be DC leakage and 1/F noise. Yes, they do sort of go hand in hand :) > You need to be willing to check out the ENOB at DC in order to use them effectively in a simple > OCXO setup. That or be willing to flip the bridge ends on demand and try to cancel out the issues. > Unfortunately that adds both complexity and a string of other fun and games. > This one seems to be designed specifically for this kind of DC measurement, sure, it will sample at 100kHz, but not with the amplifier and averaging and such. Its based on the Freescale (now NXP, I guess..) Kinetis K20 series It has a bewildering variety of peripherals (touch sensors, etc.), as well as the usual multiple UARTs, SPI, I2C, timers, counters, etc. What's nice is that PJRC (who make the teensy series) have written all the drivers and libraries to integrate into the Arduino environment for those that don't live for decoding the 1000 page processor family manual and 600 page package specific manuals that give the specific pinouts and options on the one YOU have in front of you. Your "time to first light" is much shorter. And then you can hack away. I think this is more a chip designed for embedded controllers and the like. I don't know if it has the processor and peripherals to do, say, 3 phase induction motor control or Ultrasound processing, but it might. The Atmel processors are nice (and you can actually get one of the Arduino flavor ones in a rad hard version.. for those "control the device in the beamline" applications), but the Kinetis are easily an order of magnitude better - no bit banging to do serial protocols, USB built in, decent ADC, floating point, etc. > Op amps are cheap …. > > Bob > >> On Jun 6, 2017, at 3:54 PM, jimlux <jimlux@earthlink.net> wrote: >> >> On 6/6/17 11:47 AM, Chris Albertson wrote: >>> Yes, as I wrote. I would not mess with AREF. At most you can only get a >>> multiplication about 4. Use an op-amp. Signal conditioning really >>> almost alway is required in the analog domain before any A/D conversion >>> >>> Also like the uP is not inside the oven and has a cable of some length so >>> you'd want a buffered analog signal on the cable, the op-amp can do that >>> to. >>> >>> Those $2 parts I linked to have the ADC referenced to 3.3 volts but have 12 >>> bits as compared to the arduino which has 10 bits >> >> >> or use a Teensy with a 16 bit differential input ADC. Arduino compatible, cheaper, yeah, you probably get 13 bits real performance from the ADC. Also has a real analog output (not PWM and a LPF) if you need that. >> >> Programmable gain, sample averaging in hardware, etc. Not bad for <$20. >> >> >>> >>> >> >> _______________________________________________ >> time-nuts mailing list -- time-nuts@febo.com >> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts >> and follow the instructions there. > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there. >
BK
Bob kb8tq
Wed, Jun 7, 2017 12:47 AM

Hi

The Freescale ADC’s are pretty good compared to a lot of other MCU ADC’s. They still are not as good as you might
think from the audio ENOB numbers. Something in the 10~11 bit range is doing quite well at DC in a control loop, even for them.

Bob

On Jun 6, 2017, at 8:12 PM, jimlux jimlux@earthlink.net wrote:

On 6/6/17 1:37 PM, Bob kb8tq wrote:

Hi

Often when you dig into the details of MCU ADC’s they have a little note “optimized for audio” or
“not recommended for control loops”. It can be a bit of a head scratcher to work out what they are
getting at. The big issues in this case seem to be DC leakage and 1/F noise. Yes, they do sort of go hand in hand :)
You need to be willing to check out the ENOB at DC in order to use them effectively in a simple
OCXO setup. That or be willing to flip the bridge ends on demand and try to cancel out the issues.
Unfortunately that adds both complexity and a string of other fun and games.

This one seems to be designed specifically for this kind of DC measurement, sure, it will sample at 100kHz, but not with the amplifier and averaging and such.

Its based on the Freescale (now NXP, I guess..) Kinetis K20 series

It has a bewildering variety of peripherals (touch sensors, etc.), as well as the usual multiple UARTs, SPI, I2C, timers, counters, etc. What's nice is that PJRC (who make the teensy series) have written all the drivers and libraries to integrate into the Arduino environment for those that don't live for decoding the 1000 page processor family manual and 600 page package specific manuals that give the specific pinouts and options on the one YOU have in front of you.  Your "time to first light" is much shorter. And then you can hack away.

I think this is more a chip designed for embedded controllers and the like. I don't know if it has the processor and peripherals to do, say, 3 phase induction motor control or Ultrasound processing, but it might.

The Atmel processors are nice (and you can actually get one of the Arduino flavor ones in a rad hard version.. for those "control the device in the beamline" applications), but the Kinetis are easily an order of magnitude better - no bit banging to do serial protocols, USB built in, decent ADC, floating point, etc.

Op amps are cheap ….

Bob

On Jun 6, 2017, at 3:54 PM, jimlux jimlux@earthlink.net wrote:

On 6/6/17 11:47 AM, Chris Albertson wrote:

Yes, as I wrote.  I would not mess with AREF.  At most you can only get a
multiplication about 4.  Use an op-amp.  Signal conditioning really
almost alway is required in the analog domain before any A/D conversion

Also like the uP is not inside the oven and has a cable of some length so
you'd want a buffered analog signal on the cable, the op-amp can do that
to.

Those $2 parts I linked to have the ADC referenced to 3.3 volts but have 12
bits as compared to the arduino which has 10 bits

or use a Teensy with a 16 bit differential input ADC.  Arduino compatible, cheaper, yeah, you probably get 13 bits real performance from the ADC.  Also has a real analog output (not PWM and a LPF) if you need that.

Programmable gain, sample averaging in hardware, etc.  Not bad for <$20.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.

Hi The Freescale ADC’s are pretty good compared to a lot of other MCU ADC’s. They still are not as good as you might think from the audio ENOB numbers. Something in the 10~11 bit range is doing quite well at DC in a control loop, even for them. Bob > On Jun 6, 2017, at 8:12 PM, jimlux <jimlux@earthlink.net> wrote: > > On 6/6/17 1:37 PM, Bob kb8tq wrote: >> Hi >> >> Often when you dig into the details of MCU ADC’s they have a little note “optimized for audio” or >> “not recommended for control loops”. It can be a bit of a head scratcher to work out what they are >> getting at. The big issues in this case seem to be DC leakage and 1/F noise. Yes, they do sort of go hand in hand :) >> You need to be willing to check out the ENOB at DC in order to use them effectively in a simple >> OCXO setup. That or be willing to flip the bridge ends on demand and try to cancel out the issues. >> Unfortunately that adds both complexity and a string of other fun and games. >> > > This one seems to be designed specifically for this kind of DC measurement, sure, it will sample at 100kHz, but not with the amplifier and averaging and such. > > Its based on the Freescale (now NXP, I guess..) Kinetis K20 series > > It has a bewildering variety of peripherals (touch sensors, etc.), as well as the usual multiple UARTs, SPI, I2C, timers, counters, etc. What's nice is that PJRC (who make the teensy series) have written all the drivers and libraries to integrate into the Arduino environment for those that don't live for decoding the 1000 page processor family manual and 600 page package specific manuals that give the specific pinouts and options on the one YOU have in front of you. Your "time to first light" is much shorter. And then you can hack away. > > I think this is more a chip designed for embedded controllers and the like. I don't know if it has the processor and peripherals to do, say, 3 phase induction motor control or Ultrasound processing, but it might. > > The Atmel processors are nice (and you can actually get one of the Arduino flavor ones in a rad hard version.. for those "control the device in the beamline" applications), but the Kinetis are easily an order of magnitude better - no bit banging to do serial protocols, USB built in, decent ADC, floating point, etc. > > > > >> Op amps are cheap …. >> >> Bob >> >>> On Jun 6, 2017, at 3:54 PM, jimlux <jimlux@earthlink.net> wrote: >>> >>> On 6/6/17 11:47 AM, Chris Albertson wrote: >>>> Yes, as I wrote. I would not mess with AREF. At most you can only get a >>>> multiplication about 4. Use an op-amp. Signal conditioning really >>>> almost alway is required in the analog domain before any A/D conversion >>>> >>>> Also like the uP is not inside the oven and has a cable of some length so >>>> you'd want a buffered analog signal on the cable, the op-amp can do that >>>> to. >>>> >>>> Those $2 parts I linked to have the ADC referenced to 3.3 volts but have 12 >>>> bits as compared to the arduino which has 10 bits >>> >>> >>> or use a Teensy with a 16 bit differential input ADC. Arduino compatible, cheaper, yeah, you probably get 13 bits real performance from the ADC. Also has a real analog output (not PWM and a LPF) if you need that. >>> >>> Programmable gain, sample averaging in hardware, etc. Not bad for <$20. >>> >>> >>>> >>>> >>> >>> _______________________________________________ >>> time-nuts mailing list -- time-nuts@febo.com >>> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts >>> and follow the instructions there. >> >> _______________________________________________ >> time-nuts mailing list -- time-nuts@febo.com >> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts >> and follow the instructions there. >> > > _______________________________________________ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts > and follow the instructions there.
DJ
Didier Juges
Wed, Jun 7, 2017 6:37 PM

The good news is that for oven control, you can typically filter the heck
out of the data and the noise may actually help you with dithering if it's
fairly random, so you should be able to get close to the specs. The main
thing you need is stability, linearity should not be a factor. One
limitation will be the built in reference so unless you can switch to an
external reference, that may be the main issue.

I have been using the Silabs line of 8051 uCs and I found their ADCs
handily meeting their specs, at least on the devices I have tried (I have
used up to 12 bit ADC on their parts).

I also have used the MSC1210 (from originally Burr Brown, now TI). The only
board that came close to the 24 bit advertised performance of their ADC was
the demo board from Burr Brown themselves, and it was very slow. Anything
that I designed with it (with their help and advice) never got anywhere
near that and I gave up on that chip.

Didier KO4BB

On Jun 6, 2017 4:17 PM, "Attila Kinali" attila@kinali.ch wrote:

On Tue, 6 Jun 2017 16:37:27 -0400
Bob kb8tq kb8tq@n1k.org wrote:

Often when you dig into the details of MCU ADC’s they have a little note

“optimized for audio” or

“not recommended for control loops”. It can be a bit of a head scratcher

to work out what they are

getting at. The big issues in this case seem to be DC leakage and 1/F

noise. Yes, they do sort of go hand in hand :)

You need to be willing to check out the ENOB at DC in order to use them

effectively in a simple

OCXO setup. That or be willing to flip the bridge ends on demand and try

to cancel out the issues.

Unfortunately that adds both complexity and a string of other fun and

games.

uC ADCs are only good for low resolution, slow signals. For anything else
you need an external ADC. Even if your uC datasheet claims that you have
a 12bit ADC, the reality is quite different. For one, these ADCs are not
well specified, the surounding digital logic has a profound effect that
changes dramatically depending on what other periphery you use or not.

You can always just subtract two bits of the ADCs resolution and you
wouldn't be wrong. Losing 3 bits to internal noise isn't unehard of
either. Heck, the STM32F4xx have so much internal noise that the ENOB
of their ADC is below 6bit... so low that they even had to write an
appnote on how to do averaging to get back to the 12 bits the ADC is
spec'ed for. (but don't mention that to an ST sales person, they will
hate your guts afterwards).

Rule of thumb: If you need your ADC DC stable, more than 8bit resolution,
or more than 10-1000 samples per second: use an external ADC.

                    Attila Kinali

--
You know, the very powerful and the very stupid have one thing in common.
They don't alters their views to fit the facts, they alter the facts to
fit the views, which can be uncomfortable if you happen to be one of the
facts that needs altering.  -- The Doctor


time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/
mailman/listinfo/time-nuts
and follow the instructions there.

The good news is that for oven control, you can typically filter the heck out of the data and the noise may actually help you with dithering if it's fairly random, so you should be able to get close to the specs. The main thing you need is stability, linearity should not be a factor. One limitation will be the built in reference so unless you can switch to an external reference, that may be the main issue. I have been using the Silabs line of 8051 uCs and I found their ADCs handily meeting their specs, at least on the devices I have tried (I have used up to 12 bit ADC on their parts). I also have used the MSC1210 (from originally Burr Brown, now TI). The only board that came close to the 24 bit advertised performance of their ADC was the demo board from Burr Brown themselves, and it was very slow. Anything that I designed with it (with their help and advice) never got anywhere near that and I gave up on that chip. Didier KO4BB On Jun 6, 2017 4:17 PM, "Attila Kinali" <attila@kinali.ch> wrote: On Tue, 6 Jun 2017 16:37:27 -0400 Bob kb8tq <kb8tq@n1k.org> wrote: > Often when you dig into the details of MCU ADC’s they have a little note “optimized for audio” or > “not recommended for control loops”. It can be a bit of a head scratcher to work out what they are > getting at. The big issues in this case seem to be DC leakage and 1/F noise. Yes, they do sort of go hand in hand :) > You need to be willing to check out the ENOB at DC in order to use them effectively in a simple > OCXO setup. That or be willing to flip the bridge ends on demand and try to cancel out the issues. > Unfortunately that adds both complexity and a string of other fun and games. uC ADCs are only good for low resolution, slow signals. For anything else you need an external ADC. Even if your uC datasheet claims that you have a 12bit ADC, the reality is quite different. For one, these ADCs are not well specified, the surounding digital logic has a profound effect that changes dramatically depending on what other periphery you use or not. You can always just subtract two bits of the ADCs resolution and you wouldn't be wrong. Losing 3 bits to internal noise isn't unehard of either. Heck, the STM32F4xx have so much internal noise that the ENOB of their ADC is below 6bit... so low that they even had to write an appnote on how to do averaging to get back to the 12 bits the ADC is spec'ed for. (but don't mention that to an ST sales person, they will hate your guts afterwards). Rule of thumb: If you need your ADC DC stable, more than 8bit resolution, or more than 10-1000 samples per second: use an external ADC. Attila Kinali -- You know, the very powerful and the very stupid have one thing in common. They don't alters their views to fit the facts, they alter the facts to fit the views, which can be uncomfortable if you happen to be one of the facts that needs altering. -- The Doctor _______________________________________________ time-nuts mailing list -- time-nuts@febo.com To unsubscribe, go to https://www.febo.com/cgi-bin/ mailman/listinfo/time-nuts and follow the instructions there.
AK
Attila Kinali
Wed, Jun 7, 2017 7:51 PM

On Tue, 6 Jun 2017 16:43:30 -0700
Chris Albertson albertson.chris@gmail.com wrote:

. Heck, the STM32F4xx have so much internal noise that the ENOB
of their ADC is below 6bit... so low that they even had to write an
appnote on how to do averaging to get back to the 12 bits the ADC is
spec'ed for. (but don't mention that to an ST sales person, they will
hate your guts afterwards).

Can you actually get back all of those bits?

No

How many samples would you need?

White Gaussian noise goes down with the square root of the number of samples.
1/f^a noise does not average out the same way.

My current use case for the STM32 ADC is to track battery voltage
and maybe 6 bits is enough but if I can get to 12 with a software-only fix
I'll take it.  Batteries volts charge slowly so I'd have time to take many
samples.  It's a rather mundane application.  Controlling a battery
powered motor and I can't let theLiPo battery dichange below a limit so I'm
sampling voltage at 1Hz.  Got a link to or the name of the app note?

Keep in mind that you will need a good voltage reference as well
to reach anything close to 12bit. Your LDO is not a good voltage
reference (depending on type and load/source conditions they vary
eaily by 1-2%... not to talk about their noise)

		Attila Kinali

--
You know, the very powerful and the very stupid have one thing in common.
They don't alters their views to fit the facts, they alter the facts to
fit the views, which can be uncomfortable if you happen to be one of the
facts that needs altering.  -- The Doctor

On Tue, 6 Jun 2017 16:43:30 -0700 Chris Albertson <albertson.chris@gmail.com> wrote: > > . Heck, the STM32F4xx have so much internal noise that the ENOB > > of their ADC is below 6bit... so low that they even had to write an > > appnote on how to do averaging to get back to the 12 bits the ADC is > > spec'ed for. (but don't mention that to an ST sales person, they will > > hate your guts afterwards). > > > > Can you actually get back all of those bits? No > How many samples would you need? White Gaussian noise goes down with the square root of the number of samples. 1/f^a noise does not average out the same way. > My current use case for the STM32 ADC is to track battery voltage > and maybe 6 bits is enough but if I can get to 12 with a software-only fix > I'll take it. Batteries volts charge slowly so I'd have time to take many > samples. It's a rather mundane application. Controlling a battery > powered motor and I can't let theLiPo battery dichange below a limit so I'm > sampling voltage at 1Hz. Got a link to or the name of the app note? Keep in mind that you will need a good voltage reference as well to reach anything close to 12bit. Your LDO is _not_ a good voltage reference (depending on type and load/source conditions they vary eaily by 1-2%... not to talk about their noise) Attila Kinali -- You know, the very powerful and the very stupid have one thing in common. They don't alters their views to fit the facts, they alter the facts to fit the views, which can be uncomfortable if you happen to be one of the facts that needs altering. -- The Doctor