Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On 6/11/2017 6:09 AM, Magnus Danielson wrote: Hi, What papers would you recommend reading? One of the things that we experimented on and improved was the passive wall to prohibit quick cooling of oven. A puff of air or the forced convection (fans) needed for other electronics would tie the metal shield very well to surrounding environment. Using a simple plastic wall/box as a windshield has a quite drastic effect at the rate of change in temperature, and allowed the oven to react better to it. It has proven a very good strategy to reduce the systematic effect that eats up stability. As systematic effect, it should not be part of ADEV, but if you ADEV it is there loud and clear. Cheers, Magnus On the E1938A, we tried externally cooling it by spraying it with canned "freeze mist" and there was no observable fluctuation in crystal temperature using the crystal in B mode (20 ppm/degree C). Rick N6RK ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi A great starting point is Rick’s paper on the Hockey Puck. Bob > On Jun 11, 2017, at 9:09 AM, Magnus Danielson > wrote: > > Hi, > > What papers would you recommend reading? > > One of the things that we experimented on and improved was the passive wall > to prohibit quick cooling of oven. A puff of air or the forced convection > (fans) needed for other electronics would tie the metal shield very well to > surrounding environment. Using a simple plastic wall/box as a windshield has > a quite drastic effect at the rate of change in temperature, and allowed the > oven to react better to it. > It has proven a very good strategy to reduce the systematic effect that eats > up stability. As systematic effect, it should not be part of ADEV, but if you > ADEV it is there loud and clear. > > Cheers, > Magnus > > On 06/11/2017 04:45 AM, Bob kb8tq wrote: >> Hi >> >> One of the bigger unknowns in all this is how tight your control point >> needs to be held >> in order that your crystal only sees 0.1C. So far we have sort of assumed >> that the >> control point and the crystal see the same thing. That’s never the case. >> >> If the outside temperature goes from -30 to +70 (100C range), a 0.1 C change >> would >> be a thermal gain of 1,000. A +/- 0.1 C change would be a thermal gain of >> 500. Both >> are pretty respectable numbers for a basic single oven. >> >> It is not at all uncommon to see references to “0.0001C temperature control” >> (or some >> looney number) on ovens that obviously do not have a thermal gain of much >> over 100. >> Yes, those references were a lot more common 40 years ago than they are >> today. The >> take away is that often set point control is much tighter at the sensor than >> at the crystal. >> >> It is not uncommon for people to ask “what is the control at a constant >> ambient (room >> conditions maybe). The answer is inevitably a very small change. If your >> room varies >> by 1 C and you have a thermal gain of 1,000, the oven changes by 0.001C. If >> your room >> changes by 0.1 C then the oven would change by 0.0001 C. Inevitably the >> phrase “plus >> circuit noise” needs to be added in there somewhere as the numbers get ever >> smaller. >> ADEV is a more common way to look at controller noise than TC. >> >> As I keep pointing out, there are some good papers on all of this. I claim >> absolutely >> no original insight in any of the above. >> >> Bob >> >>> On Jun 10, 2017, at 9:11 PM, Hal Murray wrote: >>> >>> >>> albertson.ch...@gmail.com said: I say "effective" because we can dither the low order bits to gain maybe 6 effective bits form 4 real bits (we can filter the switching noise from a low frequency dither) >>> >>> It's hard to filter low frequencies and the more bits you gain by dithering >>> the lower the filter you need and the closer in the spurs move. >>> >>> Lets say my goal is regulation within 0.1C. After filtering I have 10 "good" bits in my ADC. That is 1024 counts. My set point is S. >>> I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means that each ADC count is 0.001 degree C and within the 0.1C range there are 100 ADC counts. >>> >>> That's not enough to describe the system so you can decide if it will meet >>> your 0.1C goal. >>> >>> You also need to know the sampling rate, the delay time from heater to >>> temperature sensor, the PID parameters, and maybe the rate of change of the >>> environmental temperature and the delay from the environment to your system. >>> ("delay" should probably be transfer function or impulse response but a >>> simple exponential is probably good enough.) >>> >>> >>> >>> -- >>> These are my opinions. I hate spam. >>> >>> >>> >>> ___ >>> 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, What papers would you recommend reading? One of the things that we experimented on and improved was the passive wall to prohibit quick cooling of oven. A puff of air or the forced convection (fans) needed for other electronics would tie the metal shield very well to surrounding environment. Using a simple plastic wall/box as a windshield has a quite drastic effect at the rate of change in temperature, and allowed the oven to react better to it. It has proven a very good strategy to reduce the systematic effect that eats up stability. As systematic effect, it should not be part of ADEV, but if you ADEV it is there loud and clear. Cheers, Magnus On 06/11/2017 04:45 AM, Bob kb8tq wrote: Hi One of the bigger unknowns in all this is how tight your control point needs to be held in order that your crystal only sees 0.1C. So far we have sort of assumed that the control point and the crystal see the same thing. That’s never the case. If the outside temperature goes from -30 to +70 (100C range), a 0.1 C change would be a thermal gain of 1,000. A +/- 0.1 C change would be a thermal gain of 500. Both are pretty respectable numbers for a basic single oven. It is not at all uncommon to see references to “0.0001C temperature control” (or some looney number) on ovens that obviously do not have a thermal gain of much over 100. Yes, those references were a lot more common 40 years ago than they are today. The take away is that often set point control is much tighter at the sensor than at the crystal. It is not uncommon for people to ask “what is the control at a constant ambient (room conditions maybe). The answer is inevitably a very small change. If your room varies by 1 C and you have a thermal gain of 1,000, the oven changes by 0.001C. If your room changes by 0.1 C then the oven would change by 0.0001 C. Inevitably the phrase “plus circuit noise” needs to be added in there somewhere as the numbers get ever smaller. ADEV is a more common way to look at controller noise than TC. As I keep pointing out, there are some good papers on all of this. I claim absolutely no original insight in any of the above. Bob On Jun 10, 2017, at 9:11 PM, Hal Murray wrote: albertson.ch...@gmail.com said: I say "effective" because we can dither the low order bits to gain maybe 6 effective bits form 4 real bits (we can filter the switching noise from a low frequency dither) It's hard to filter low frequencies and the more bits you gain by dithering the lower the filter you need and the closer in the spurs move. Lets say my goal is regulation within 0.1C. After filtering I have 10 "good" bits in my ADC. That is 1024 counts. My set point is S. I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means that each ADC count is 0.001 degree C and within the 0.1C range there are 100 ADC counts. That's not enough to describe the system so you can decide if it will meet your 0.1C goal. You also need to know the sampling rate, the delay time from heater to temperature sensor, the PID parameters, and maybe the rate of change of the environmental temperature and the delay from the environment to your system. ("delay" should probably be transfer function or impulse response but a simple exponential is probably good enough.) -- These are my opinions. I hate spam. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi One of the bigger unknowns in all this is how tight your control point needs to be held in order that your crystal only sees 0.1C. So far we have sort of assumed that the control point and the crystal see the same thing. That’s never the case. If the outside temperature goes from -30 to +70 (100C range), a 0.1 C change would be a thermal gain of 1,000. A +/- 0.1 C change would be a thermal gain of 500. Both are pretty respectable numbers for a basic single oven. It is not at all uncommon to see references to “0.0001C temperature control” (or some looney number) on ovens that obviously do not have a thermal gain of much over 100. Yes, those references were a lot more common 40 years ago than they are today. The take away is that often set point control is much tighter at the sensor than at the crystal. It is not uncommon for people to ask “what is the control at a constant ambient (room conditions maybe). The answer is inevitably a very small change. If your room varies by 1 C and you have a thermal gain of 1,000, the oven changes by 0.001C. If your room changes by 0.1 C then the oven would change by 0.0001 C. Inevitably the phrase “plus circuit noise” needs to be added in there somewhere as the numbers get ever smaller. ADEV is a more common way to look at controller noise than TC. As I keep pointing out, there are some good papers on all of this. I claim absolutely no original insight in any of the above. Bob > On Jun 10, 2017, at 9:11 PM, Hal Murray wrote: > > > albertson.ch...@gmail.com said: >> I say "effective" because we can dither the low order bits to gain maybe 6 >> effective bits form 4 real bits (we can filter the switching noise from a >> low frequency dither) > > It's hard to filter low frequencies and the more bits you gain by dithering > the lower the filter you need and the closer in the spurs move. > > >> Lets say my goal is regulation within 0.1C. After filtering I have 10 >> "good" bits in my ADC. That is 1024 counts. My set point is S. > >> I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means >> that each ADC count is 0.001 degree C and within the 0.1C range there are >> 100 ADC counts. > > That's not enough to describe the system so you can decide if it will meet > your 0.1C goal. > > You also need to know the sampling rate, the delay time from heater to > temperature sensor, the PID parameters, and maybe the rate of change of the > environmental temperature and the delay from the environment to your system. > ("delay" should probably be transfer function or impulse response but a > simple exponential is probably good enough.) > > > > -- > These are my opinions. I hate spam. > > > > ___ > 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
albertson.ch...@gmail.com said: > I say "effective" because we can dither the low order bits to gain maybe 6 > effective bits form 4 real bits (we can filter the switching noise from a > low frequency dither) It's hard to filter low frequencies and the more bits you gain by dithering the lower the filter you need and the closer in the spurs move. > Lets say my goal is regulation within 0.1C. After filtering I have 10 > "good" bits in my ADC. That is 1024 counts. My set point is S. > I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means > that each ADC count is 0.001 degree C and within the 0.1C range there are > 100 ADC counts. That's not enough to describe the system so you can decide if it will meet your 0.1C goal. You also need to know the sampling rate, the delay time from heater to temperature sensor, the PID parameters, and maybe the rate of change of the environmental temperature and the delay from the environment to your system. ("delay" should probably be transfer function or impulse response but a simple exponential is probably good enough.) -- These are my opinions. I hate spam. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi > On Jun 10, 2017, at 5:15 PM, Poul-Henning Kamp wrote: > > > In message , Bob kb8tq writes: > >> If you want the controller noise to *not* be the limiting factor at an ADEV >> floor of 1x10^-12, >> that drives you to a noise floor of < 0.1 mK. You can then work through the >> various thermal >> gains to come up with a level of DAC bits that you need. You could equally >> as well decide >> on a 1x10^-13 floor and / or might have a 1x10^-9 sensitivity. Sounds like a sound plan. Bob > > Which gets us back to what SRS does for low noise: > > Implement the low noise stuff, the PI(D) loop, in analog, but > tune/calibrate/adjust the analog circuitry with DAC's set (infrequently) > by a uC. > > -- > Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 > p...@freebsd.org | TCP/IP since RFC 956 > FreeBSD committer | BSD since 4.3-tahoe > Never attribute to malice what can adequately be explained by incompetence. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
In message , Bob kb8tq writes: >If you want the controller noise to *not* be the limiting factor at an ADEV >floor of 1x10^-12, >that drives you to a noise floor of < 0.1 mK. You can then work through the >various thermal >gains to come up with a level of DAC bits that you need. You could equally as >well decide >on a 1x10^-13 floor and / or might have a 1x10^-9 sensitivity. Which gets us back to what SRS does for low noise: Implement the low noise stuff, the PI(D) loop, in analog, but tune/calibrate/adjust the analog circuitry with DAC's set (infrequently) by a uC. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi > On Jun 10, 2017, at 4:10 PM, Chris Albertson > wrote: > > On Sat, Jun 10, 2017 at 12:59 PM, Poul-Henning Kamp > wrote: > >> >> >> Delta-Sigma strategies for spreading the noise-spectrum are >> interesting, but will not save you if the required heater power >> ends up being a small rational fraction (1/2, 1/3, 1/4 ...) of the >> full scale. >> > > How many output bits are required? Most uPs have quite a few digital > output pins. Each pin could drive a heater resister. Values of the > resisters organized by power of two. Again note the title (poor mans...) > resisters cost almost zero. Even of driver transistors are needed you'd > get change back from a dollar bill. If you believe that you have a “background” TC of 1x10^-8 / C (for a variety of reasons), that will drive a few things. For right now simply take it as another arbitrary parameter, just like the +/- 0.1C we started with. If you want the controller noise to *not* be the limiting factor at an ADEV floor of 1x10^-12, that drives you to a noise floor of < 0.1 mK. You can then work through the various thermal gains to come up with a level of DAC bits that you need. You could equally as well decide on a 1x10^-13 floor and / or might have a 1x10^-9 sensitivity. Bob > > The reason I ask "how many bits" is because the above is reasonable with 4 > to 6 effective bits but not reasonable with 24 > > I say "effective" because we can dither the low order bits to gain maybe 6 > effective bits form 4 real bits (we can filter the switching noise from a > low frequency dither) > > -- > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
In message <73a71ef4-eb76-4965-b3d5-53f9dd5bf...@n1k.org>, Bob kb8tq writes: >If we want to hold the oven at some temperature +/- 0.1 C, the control loop >needs to go from full on to full off over that range. ...ehhh, what ? >You will map (somehow) the full range of the output into a 0.2 C input range. Uhmm... no ? The full DAC range maps to the heat you need for supply at the two ambient temperature extremes. For instance if you were building a -40...+70C OCXO, *ideally* DAC code 0 should correspond to +70C and DAC code 65535 to -40C ambient That means that one DAC step corresponds to a change in ambient temperature of (+70 - -40) / 65536 = 1.7 milliKelvin. A more realistic temperature range for a time-nut build would be +10...+40C. DAC bitsmK 10 29.3 12 7.3 14 1.8 16 0.5 10 bits would cause I-hunting in your PI(D) but the measurement noise would probably dither that for you. 12 bits would allos a trivial implementation. If you go for a double or tripple oven/dewar design, you probably need 14 bits. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, As a side comment. I've seen an OCXO misbehave such that it was bang-bang regulating. For a short while it was heating up and then the crystal was cooling down slowly until the heater was turned on again, shortly. The effect being that the temperature of the crystal was essentially a saw-tooth shaped thing, and the frequency and phase reflected that very clearly, and ADEV is full of the systematic noise of the oven. For another OCXO I noticed a distinct bump in the ADEV at 7 s. I looked carefully and could even see the oscillation in the phase-data. Then I also found it in the oven current. Turned out that as I turned the oven on, it GREATLY overshot and rang as a bell on the overn current/temperature. The vendor was given notice and they dug into it and sent out two engineers to explain it to me. They could explain it correctly, and then tried the sales-guy to cover it up and say it worked well enough for others and THAT is when I decided they where running an uphill game. Anyway, I think some engineers learned the hard way that you need to adjust the design as you change critical parts of the design. Even a "simple" setup for testing can be quite revealing. Cheers, Magnus On 06/10/2017 09:50 PM, Bob kb8tq wrote: Hi The next issue is that “noise” has a pretty broad definition in this case. If you are looking at set point, it also would include temperature drift and aging. Neither one seem to show up on the standard MCU ADC data sheets :) It can even be a bit difficult to find them on some (but certainly not all) standalone ADC specs. Next layer to the onion: If we want to hold the oven at some temperature +/- 0.1 C, the control loop needs to go from full on to full off over that range. For grins, let’s assume that the output is a 16 bit DAC. You will map (somehow) the full range of the output into a 0.2 C input range. If you have a P only controller, the output will step at the granularity of the ADC over the 0.2C range. If you have 4 extra bits, you will get 16 x 2 = 32 output levels. That’s not really making the 16 bit DAC earn it’s living. A PI controller can (at least theoretically) fill in all of the states of the 16 bit DAC regardless of the input granularity. If the P is very small and the I is very large it will do this fairly seamlessly. In the example above setting P to < 1/ 2^11 would likely do the trick. This all may (or may not) let you hit the P value (or P to I ratio) you desire. Why does the output DAC matter? Each time the DAC steps, the current in the heater changes. That power change times the thermal resistance gives you a temperature step. It is yet another source of “noise” to the crystal. Minimizing thermal noise is one of the many things that gets you better ADEV. Bob On Jun 10, 2017, at 3:24 PM, Chris Albertson wrote: On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson < mag...@rubidium.dyndns.org> wrote: Hi, I was about to make this very point myself. The resolution of the ADC needs to be higher than the limit you try to achieve. There is several ways to reason about it, but one is that the system is a bit slugish you want to have higher resolution in order to react of changes before they overshot the limits you want to keep. Another benefit is that you get away from the bang-bang behavior you get when having too few bits. For an oven you can however cheat some by not requiring linearity in the "too cold" region of temperature. You do want some linearity as you start to come into the right range in order to slow down the heating in order not to do a big overshot. I have seen a little too much cases where there been too few bits both on ADC and DAC sides. Some of it you can overcome, but it runs into trouble. Get good dynamics, it makes the rest of the design easier. OK, following the advice both above and below. Let's try some real-world numbers... Lets say my goal is regulation within 0.1C. After filtering I have 10 "good" bits in my ADC. That is 1024 counts. My set point is S. I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means that each ADC count is 0.001 degree C and within the 0.1C range there are 100 ADC counts. But what if there are only 8 good bits after filtering The each count is 0.004 degree C and there are 25 counts within the 0.1C range. The uP's ADC is nominally 12 bits. Getting 10 "good" noise free bits might be asking to much but 8-bits is pretty reasonable. Cheers, Magnus On 06/07/2017 08:32 PM, Bob kb8tq wrote: Hi There is a gotcha with the initial assumption: You want the loop to be *quiet* at a level well below 0.1C. If it is bouncing around that much, the second order (rate defendant) tempco of a normal crystal will become a pretty major issue. Simple rule of thumb - add at least two bits past whatever the target is. More or less, if you *are* after 0.1C and that comes out to 6 bits, you need eight solid bits to get things to work properly. -- Chris Albert
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi The next issue is that “noise” has a pretty broad definition in this case. If you are looking at set point, it also would include temperature drift and aging. Neither one seem to show up on the standard MCU ADC data sheets :) It can even be a bit difficult to find them on some (but certainly not all) standalone ADC specs. Next layer to the onion: If we want to hold the oven at some temperature +/- 0.1 C, the control loop needs to go from full on to full off over that range. For grins, let’s assume that the output is a 16 bit DAC. You will map (somehow) the full range of the output into a 0.2 C input range. If you have a P only controller, the output will step at the granularity of the ADC over the 0.2C range. If you have 4 extra bits, you will get 16 x 2 = 32 output levels. That’s not really making the 16 bit DAC earn it’s living. A PI controller can (at least theoretically) fill in all of the states of the 16 bit DAC regardless of the input granularity. If the P is very small and the I is very large it will do this fairly seamlessly. In the example above setting P to < 1/ 2^11 would likely do the trick. This all may (or may not) let you hit the P value (or P to I ratio) you desire. Why does the output DAC matter? Each time the DAC steps, the current in the heater changes. That power change times the thermal resistance gives you a temperature step. It is yet another source of “noise” to the crystal. Minimizing thermal noise is one of the many things that gets you better ADEV. Bob > On Jun 10, 2017, at 3:24 PM, Chris Albertson > wrote: > > On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson < > mag...@rubidium.dyndns.org> wrote: > >> Hi, >> >> I was about to make this very point myself. The resolution of the ADC >> needs to be higher than the limit you try to achieve. There is several ways >> to reason about it, but one is that the system is a bit slugish you want to >> have higher resolution in order to react of changes before they overshot >> the limits you want to keep. Another benefit is that you get away from the >> bang-bang behavior you get when having too few bits. >> >> For an oven you can however cheat some by not requiring linearity in the >> "too cold" region of temperature. You do want some linearity as you start >> to come into the right range in order to slow down the heating in order not >> to do a big overshot. >> >> I have seen a little too much cases where there been too few bits both on >> ADC and DAC sides. Some of it you can overcome, but it runs into trouble. >> Get good dynamics, it makes the rest of the design easier. >> > > > > > OK, following the advice both above and below. Let's try some real-world > numbers... > > Lets say my goal is regulation within 0.1C. After filtering I have 10 > "good" bits in my ADC. That is 1024 counts. My set point is S. > > I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means > that each ADC count is 0.001 degree C and within the 0.1C range there are > 100 ADC counts. > > But what if there are only 8 good bits after filtering The each count is > 0.004 degree C and there are 25 counts within the 0.1C range. > > The uP's ADC is nominally 12 bits. Getting 10 "good" noise free bits > might be asking to much but 8-bits is pretty reasonable. > > > > > >> >> Cheers, >> Magnus >> >> On 06/07/2017 08:32 PM, Bob kb8tq wrote: >> >>> Hi >>> >>> There is a gotcha with the initial assumption: You want the loop to be >>> *quiet* at a level well below 0.1C. If it is bouncing around that much, >>> the second order (rate defendant) tempco of a normal crystal will >>> become a pretty major issue. >>> >>> Simple rule of thumb - add at least two bits past whatever the target is. >>> More or less, if you *are* after 0.1C and that comes out to 6 bits, you >>> need >>> eight solid bits to get things to work properly. >>> >> > -- > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, On 06/10/2017 09:59 PM, Poul-Henning Kamp wrote: In message <017ac7d5-751b-4084-a3b3-e5132509c...@n1k.org>, Bob kb8tq writes: You may well use a custom set of control parameters for the warmup phase. The easiest way to avoid overshoot is to use a properly damped PI(D), which is _exactly_ the same thing you want once you are out of the warmup phase, so why bother with two different code paths ? But related to this is the question of output/heater resolution[1]. While it is tempting to use a PWM output, it is a recipe for noise injection, and I would not even try it. Delta-Sigma strategies for spreading the noise-spectrum are interesting, but will not save you if the required heater power ends up being a small rational fraction (1/2, 1/3, 1/4 ...) of the full scale. So a proper DAC is called for. I wonder if a "4-20mA" DAC like the AD5421 is a usable programmable heater ? [1] It is relevant to point out that, as *always* the 'I' term should not be enabled until the P(ID) *output* is no longer clamped. A proper DAC is clearly called for. PWM is worst possible waveform, as it puts highest amplitude to the lowest frequency etc, thus it has a 6 dB/Oct roll-off. I once decided to move the spectrum components around so that the MSB has the highest frequency and LSB the lowest. With a simple one-pole filter this creates overtones of even amplitude. I used this to cram a few more bits out of a DAC, with really good result. The sigma/delta approach is even better in doing this, even if my approach gets similar results, with a fairly crude approach. Cheers, Magnus ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Sat, Jun 10, 2017 at 12:59 PM, Poul-Henning Kamp wrote: > > > Delta-Sigma strategies for spreading the noise-spectrum are > interesting, but will not save you if the required heater power > ends up being a small rational fraction (1/2, 1/3, 1/4 ...) of the > full scale. > How many output bits are required? Most uPs have quite a few digital output pins. Each pin could drive a heater resister. Values of the resisters organized by power of two. Again note the title (poor mans...) resisters cost almost zero. Even of driver transistors are needed you'd get change back from a dollar bill. The reason I ask "how many bits" is because the above is reasonable with 4 to 6 effective bits but not reasonable with 24 I say "effective" because we can dither the low order bits to gain maybe 6 effective bits form 4 real bits (we can filter the switching noise from a low frequency dither) -- 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
In message <017ac7d5-751b-4084-a3b3-e5132509c...@n1k.org>, Bob kb8tq writes: >You may well use a custom set of control parameters for the warmup phase. The easiest way to avoid overshoot is to use a properly damped PI(D), which is _exactly_ the same thing you want once you are out of the warmup phase, so why bother with two different code paths ? But related to this is the question of output/heater resolution[1]. While it is tempting to use a PWM output, it is a recipe for noise injection, and I would not even try it. Delta-Sigma strategies for spreading the noise-spectrum are interesting, but will not save you if the required heater power ends up being a small rational fraction (1/2, 1/3, 1/4 ...) of the full scale. So a proper DAC is called for. I wonder if a "4-20mA" DAC like the AD5421 is a usable programmable heater ? [1] It is relevant to point out that, as *always* the 'I' term should not be enabled until the P(ID) *output* is no longer clamped. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson < mag...@rubidium.dyndns.org> wrote: > Hi, > > I was about to make this very point myself. The resolution of the ADC > needs to be higher than the limit you try to achieve. There is several ways > to reason about it, but one is that the system is a bit slugish you want to > have higher resolution in order to react of changes before they overshot > the limits you want to keep. Another benefit is that you get away from the > bang-bang behavior you get when having too few bits. > > For an oven you can however cheat some by not requiring linearity in the > "too cold" region of temperature. You do want some linearity as you start > to come into the right range in order to slow down the heating in order not > to do a big overshot. > > I have seen a little too much cases where there been too few bits both on > ADC and DAC sides. Some of it you can overcome, but it runs into trouble. > Get good dynamics, it makes the rest of the design easier. > OK, following the advice both above and below. Let's try some real-world numbers... Lets say my goal is regulation within 0.1C. After filtering I have 10 "good" bits in my ADC. That is 1024 counts. My set point is S. I scale the ADC so that 0 == (S - 0.5) and 1023 == (S + 0.5)This means that each ADC count is 0.001 degree C and within the 0.1C range there are 100 ADC counts. But what if there are only 8 good bits after filtering The each count is 0.004 degree C and there are 25 counts within the 0.1C range. The uP's ADC is nominally 12 bits. Getting 10 "good" noise free bits might be asking to much but 8-bits is pretty reasonable. > > Cheers, > Magnus > > On 06/07/2017 08:32 PM, Bob kb8tq wrote: > >> Hi >> >> There is a gotcha with the initial assumption: You want the loop to be >> *quiet* at a level well below 0.1C. If it is bouncing around that much, >> the second order (rate defendant) tempco of a normal crystal will >> become a pretty major issue. >> >> Simple rule of thumb - add at least two bits past whatever the target is. >> More or less, if you *are* after 0.1C and that comes out to 6 bits, you >> need >> eight solid bits to get things to work properly. >> > -- 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi At least in my experience, a properly functioning OCXO will rarely (if ever) be outside +/- 1 degree of the set point when in full PID (integrator enabled) mode. You may well use a custom set of control parameters for the warmup phase. You might even use a non-PID based control (shut off all power when these things happen. Then coast to the set point …). I suppose that like many of my posts, the term “fuzzy logic” could easily be used in more than one way :) Bob > On Jun 10, 2017, at 3:10 PM, Magnus Danielson > wrote: > > Hi, > > Very good point Poul-Henning, very good point. > The mux is there, we don't need the resolution far out, and with only a > little though code-wise and hardware wise we get the best of resolution and > range where we need it. > > Cheers, > Magnus > > On 06/10/2017 09:06 PM, Poul-Henning Kamp wrote: >> >> In message <3897c09a-d76c-474c-8907-9ea25f8c3...@n1k.org>, Bob kb8tq writes: >> >>> The “limited range” part of it is why the op-amp makes so much >>> sense. If the ADC can “see” +/-10C that’s way more than will ever be useful. >> >> Most uC's have a pile of mux'ed ADC inputs, so do all of the above: >> >> AI0 = Full range >> >> AI1 = +/- 10C >> >> AI2 = +/- 2C >> >> A big upside to this is that you will not need to invent heuristics >> for clamped inputs in your PI(D) controller, something which is a bit >> harder than most people realize. >> >> Assuming a 10-bit ADC, the code will look something like this: >> >> double >> get_temp(void) >> { >> >> T = read_AI2(); >> if (T > 50 && T < 975) { >> T += T2_offset; >> T *= T2_scale; >> return (T); >> } >> T = read_AI1(); >> if (T > 50 && T < 975) { >> T += T1_offset; >> T *= T1_scale; >> return (T); >> } >> T = read_AI0(); >> if (T > 50 && T < 975) { >> T += T0_offset; >> T *= T0_scale; >> return (T); >> } >> abort("You have problems..."); >> } >> > ___ > 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, Very good point Poul-Henning, very good point. The mux is there, we don't need the resolution far out, and with only a little though code-wise and hardware wise we get the best of resolution and range where we need it. Cheers, Magnus On 06/10/2017 09:06 PM, Poul-Henning Kamp wrote: In message <3897c09a-d76c-474c-8907-9ea25f8c3...@n1k.org>, Bob kb8tq writes: The “limited range” part of it is why the op-amp makes so much sense. If the ADC can “see” +/-10C that’s way more than will ever be useful. Most uC's have a pile of mux'ed ADC inputs, so do all of the above: AI0 = Full range AI1 = +/- 10C AI2 = +/- 2C A big upside to this is that you will not need to invent heuristics for clamped inputs in your PI(D) controller, something which is a bit harder than most people realize. Assuming a 10-bit ADC, the code will look something like this: double get_temp(void) { T = read_AI2(); if (T > 50 && T < 975) { T += T2_offset; T *= T2_scale; return (T); } T = read_AI1(); if (T > 50 && T < 975) { T += T1_offset; T *= T1_scale; return (T); } T = read_AI0(); if (T > 50 && T < 975) { T += T0_offset; T *= T0_scale; return (T); } abort("You have problems..."); } ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
In message <3897c09a-d76c-474c-8907-9ea25f8c3...@n1k.org>, Bob kb8tq writes: >The “limited range” part of it is why the op-amp makes so much >sense. If the ADC can “see” +/-10C that’s way more than will ever be useful. Most uC's have a pile of mux'ed ADC inputs, so do all of the above: AI0 = Full range AI1 = +/- 10C AI2 = +/- 2C A big upside to this is that you will not need to invent heuristics for clamped inputs in your PI(D) controller, something which is a bit harder than most people realize. Assuming a 10-bit ADC, the code will look something like this: double get_temp(void) { T = read_AI2(); if (T > 50 && T < 975) { T += T2_offset; T *= T2_scale; return (T); } T = read_AI1(); if (T > 50 && T < 975) { T += T1_offset; T *= T1_scale; return (T); } T = read_AI0(); if (T > 50 && T < 975) { T += T0_offset; T *= T0_scale; return (T); } abort("You have problems..."); } -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 p...@freebsd.org | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, Indeed. I prefer to have margins and dynamics, as it makes it easier. Cutting in on that will require more work to ensure it works, hence you have to work more to save money in order to maintain stable operations. Cheers, Magnus On 06/10/2017 08:50 PM, Bob kb8tq wrote: Hi The “limited range” part of it is why the op-amp makes so much sense. If the ADC can “see” +/-10C that’s way more than will ever be useful. You could make a pretty good case for -5/ +1 C as being way more than you will ever use. The only real issue with the +1 is ok argument is when you offset the oven off turn to balance out the temperature coefficient of the oscillator circuit. Yes, one *could* use a bridge circuit to reduce the need for that offset. I believe it has been suggested and tried :) Bob On Jun 10, 2017, at 2:33 PM, Magnus Danielson wrote: Hi, I was about to make this very point myself. The resolution of the ADC needs to be higher than the limit you try to achieve. There is several ways to reason about it, but one is that the system is a bit slugish you want to have higher resolution in order to react of changes before they overshot the limits you want to keep. Another benefit is that you get away from the bang-bang behavior you get when having too few bits. For an oven you can however cheat some by not requiring linearity in the "too cold" region of temperature. You do want some linearity as you start to come into the right range in order to slow down the heating in order not to do a big overshot. I have seen a little too much cases where there been too few bits both on ADC and DAC sides. Some of it you can overcome, but it runs into trouble. Get good dynamics, it makes the rest of the design easier. Cheers, Magnus On 06/07/2017 08:32 PM, Bob kb8tq wrote: Hi There is a gotcha with the initial assumption: You want the loop to be *quiet* at a level well below 0.1C. If it is bouncing around that much, the second order (rate defendant) tempco of a normal crystal will become a pretty major issue. Simple rule of thumb - add at least two bits past whatever the target is. More or less, if you *are* after 0.1C and that comes out to 6 bits, you need eight solid bits to get things to work properly. Bob On Jun 7, 2017, at 2:10 PM, Chris Albertson wrote: One question for the control theory experts. Assume me goal is to regulate temperer of an aluminum block to within 0.1C, how good must my ADC be? Is an effective 6-bits good enough? It seems to me the problem with fewer bits is only quantization noise. Lets assume 6-bits. This is 1 part in 64. If I scale the input to the ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C which is about 6 times better then my allowed error of 0.6 C. My gut-feel is that this is marginal but could work ("work" is defined as holds temperature within the range) but I'd be happier using 8 bits. Im pretty sure I can get 8-bits by over sampling and filtering. I don't know how to analyze this but I'm guessing with n-bits each each sample has a 1/2 bit error so my I and D terms in the PID controller will accumulate lots of 1/2 bit errors. I thing I want them "a couple orders of magnitude" smaller then the allied temperature range. Of cose one could buy the best ADC on the market. But this is POOR MAN's project. So he asks, "What is the lowers performance/cost part that will allow the system to meet its specification? BTW, a related story.I'm on another couple lists that deal with vacuum tube audio. We see the same things there people correctlypointing out how to make something better but the question is always how much better and at what cost an does it matter. So a fun project was proposed. Set a budget of $200 to build a tube based stereo Hi Fi amplifier. Who can do the best. Youhade to publish the BOM with prices and suppliers. Extra points if you came in under budget. This eliminated all the suggestions to buy high end hand made transformers from Sweden. IT turrets out that you see MUCH more interesting designs when you lower the budget. Anyone can make a high performance system even enough money. They waste half the cost on useless stuff and the product costs double what it should and is over complex but is works real, really well. That's easy. Harder and more interesting is "Can you make something just as good at 1/2 the price?" Answer is usually Yes. Then you say "what much do you loose if I set the price to 1/4? The answer is surprisingly little if you get smart about sourcing parts. Turns out about $180 is the minimum for pretty decent quality HiFi vacuum tube. An interesting graph would be Oven Specification vs. Price. What is the minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. I did an exercise a while back to see what is the minimum price and complexity to build a GPSDO that was good enough only t
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi The “limited range” part of it is why the op-amp makes so much sense. If the ADC can “see” +/-10C that’s way more than will ever be useful. You could make a pretty good case for -5/ +1 C as being way more than you will ever use. The only real issue with the +1 is ok argument is when you offset the oven off turn to balance out the temperature coefficient of the oscillator circuit. Yes, one *could* use a bridge circuit to reduce the need for that offset. I believe it has been suggested and tried :) Bob > On Jun 10, 2017, at 2:33 PM, Magnus Danielson > wrote: > > Hi, > > I was about to make this very point myself. The resolution of the ADC needs > to be higher than the limit you try to achieve. There is several ways to > reason about it, but one is that the system is a bit slugish you want to have > higher resolution in order to react of changes before they overshot the > limits you want to keep. Another benefit is that you get away from the > bang-bang behavior you get when having too few bits. > > For an oven you can however cheat some by not requiring linearity in the "too > cold" region of temperature. You do want some linearity as you start to come > into the right range in order to slow down the heating in order not to do a > big overshot. > > I have seen a little too much cases where there been too few bits both on ADC > and DAC sides. Some of it you can overcome, but it runs into trouble. Get > good dynamics, it makes the rest of the design easier. > > Cheers, > Magnus > > On 06/07/2017 08:32 PM, Bob kb8tq wrote: >> Hi >> >> There is a gotcha with the initial assumption: You want the loop to be >> *quiet* at a level well below 0.1C. If it is bouncing around that much, >> the second order (rate defendant) tempco of a normal crystal will >> become a pretty major issue. >> >> Simple rule of thumb - add at least two bits past whatever the target is. >> More or less, if you *are* after 0.1C and that comes out to 6 bits, you need >> eight solid bits to get things to work properly. >> >> Bob >> >>> On Jun 7, 2017, at 2:10 PM, Chris Albertson >>> wrote: >>> >>> One question for the control theory experts. >>> >>> Assume me goal is to regulate temperer of an aluminum block to within 0.1C, >>> how good must my ADC be? Is an effective 6-bits good enough? >>> >>> It seems to me the problem with fewer bits is only quantization noise. >>> Lets assume 6-bits. This is 1 part in 64. If I scale the input to the >>> ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C >>> which is about 6 times better then my allowed error of 0.6 C. >>> >>> My gut-feel is that this is marginal but could work ("work" is defined as >>> holds temperature within the range) but I'd be happier using 8 bits. Im >>> pretty sure I can get 8-bits by over sampling and filtering. >>> >>> I don't know how to analyze this but I'm guessing with n-bits each each >>> sample has a 1/2 bit error so my I and D terms in the PID controller will >>> accumulate lots of 1/2 bit errors. I thing I want them "a couple orders >>> of magnitude" smaller then the allied temperature range. >>> >>> Of cose one could buy the best ADC on the market. But this is POOR MAN's >>> project. So he asks, "What is the lowers performance/cost part that will >>> allow the system to meet its specification? >>> >>> BTW, a related story.I'm on another couple lists that deal with vacuum >>> tube audio. We see the same things there people correctlypointing out how >>> to make something better but the question is always how much better and at >>> what cost an does it matter. So a fun project was proposed. Set a budget >>> of $200 to build a tube based stereo Hi Fi amplifier. Who can do the >>> best. Youhade to publish the BOM with prices and suppliers. Extra points >>> if you came in under budget. This eliminated all the suggestions to buy >>> high end hand made transformers from Sweden. >>> >>> IT turrets out that you see MUCH more interesting designs when you lower >>> the budget. Anyone can make a high performance system even enough money. >>> They waste half the cost on useless stuff and the product costs double what >>> it should and is over complex but is works real, really well. That's >>> easy. Harder and more interesting is "Can you make something just as good >>> at 1/2 the price?" Answer is usually Yes. Then you say "what much do you >>> loose if I set the price to 1/4? The answer is surprisingly little if you >>> get smart about sourcing parts. Turns out about $180 is the minimum >>> for pretty decent quality HiFi vacuum tube. >>> >>> An interesting graph would be Oven Specification vs. Price. What is the >>> minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? >>> Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. >>> >>> I did an exercise a while back to see what is the minimum price and >>> complexity to build a GPSDO that was good
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi, I was about to make this very point myself. The resolution of the ADC needs to be higher than the limit you try to achieve. There is several ways to reason about it, but one is that the system is a bit slugish you want to have higher resolution in order to react of changes before they overshot the limits you want to keep. Another benefit is that you get away from the bang-bang behavior you get when having too few bits. For an oven you can however cheat some by not requiring linearity in the "too cold" region of temperature. You do want some linearity as you start to come into the right range in order to slow down the heating in order not to do a big overshot. I have seen a little too much cases where there been too few bits both on ADC and DAC sides. Some of it you can overcome, but it runs into trouble. Get good dynamics, it makes the rest of the design easier. Cheers, Magnus On 06/07/2017 08:32 PM, Bob kb8tq wrote: Hi There is a gotcha with the initial assumption: You want the loop to be *quiet* at a level well below 0.1C. If it is bouncing around that much, the second order (rate defendant) tempco of a normal crystal will become a pretty major issue. Simple rule of thumb - add at least two bits past whatever the target is. More or less, if you *are* after 0.1C and that comes out to 6 bits, you need eight solid bits to get things to work properly. Bob On Jun 7, 2017, at 2:10 PM, Chris Albertson wrote: One question for the control theory experts. Assume me goal is to regulate temperer of an aluminum block to within 0.1C, how good must my ADC be? Is an effective 6-bits good enough? It seems to me the problem with fewer bits is only quantization noise. Lets assume 6-bits. This is 1 part in 64. If I scale the input to the ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C which is about 6 times better then my allowed error of 0.6 C. My gut-feel is that this is marginal but could work ("work" is defined as holds temperature within the range) but I'd be happier using 8 bits. Im pretty sure I can get 8-bits by over sampling and filtering. I don't know how to analyze this but I'm guessing with n-bits each each sample has a 1/2 bit error so my I and D terms in the PID controller will accumulate lots of 1/2 bit errors. I thing I want them "a couple orders of magnitude" smaller then the allied temperature range. Of cose one could buy the best ADC on the market. But this is POOR MAN's project. So he asks, "What is the lowers performance/cost part that will allow the system to meet its specification? BTW, a related story.I'm on another couple lists that deal with vacuum tube audio. We see the same things there people correctlypointing out how to make something better but the question is always how much better and at what cost an does it matter. So a fun project was proposed. Set a budget of $200 to build a tube based stereo Hi Fi amplifier. Who can do the best. Youhade to publish the BOM with prices and suppliers. Extra points if you came in under budget. This eliminated all the suggestions to buy high end hand made transformers from Sweden. IT turrets out that you see MUCH more interesting designs when you lower the budget. Anyone can make a high performance system even enough money. They waste half the cost on useless stuff and the product costs double what it should and is over complex but is works real, really well. That's easy. Harder and more interesting is "Can you make something just as good at 1/2 the price?" Answer is usually Yes. Then you say "what much do you loose if I set the price to 1/4? The answer is surprisingly little if you get smart about sourcing parts. Turns out about $180 is the minimum for pretty decent quality HiFi vacuum tube. An interesting graph would be Oven Specification vs. Price. What is the minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. I did an exercise a while back to see what is the minimum price and complexity to build a GPSDO that was good enough only to drive the lab bench instruments I have. I implements only 1/2 od Lars W's design and cut his lines of code by about 90%. Turns outhe cost is the XO and about $10. Compared to my Thunderbolt, performance was not nearly as good but the ratio of performance over parts cost might be better. On Tue, Jun 6, 2017 at 2:39 PM, Mark Sims wrote: Another thing to watch out for on processor ADCs is their performance near the supply rails... the AVR ADCs are particularly entertaining below around 300 mV (with a 5V Vref). ___ 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. -- Chris Albertson Redondo Beach, California ___ time-nuts mailin
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi > On Jun 8, 2017, at 3:41 AM, Hal Murray wrote: > > > att...@kinali.ch said: >> 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) > > That applies when using a thermocouple. If using a bridge (or just a > divider), you can use the same voltage that powers the bridge as the > reference for the ADC and any drift cancels out. If you go utterly crazy and get into the $1,000 and up “traceable standard” thermistors or RTD’s just about everything matters :) Bob > > > -- > These are my opinions. I hate spam. > > > > ___ > 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
att...@kinali.ch said: > 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) That applies when using a thermocouple. If using a bridge (or just a divider), you can use the same voltage that powers the bridge as the reference for the ADC and any drift cancels out. -- These are my opinions. I hate spam. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi Folks, This discussion of temperature measurement with ADCs has crossed into my professional life and without being too much of a commercial plug just wanted to mention that I support Linear Technology's temp-to-bits family of ICs: LTC2983, LTC2984, LTC2986. Overview: each part has 3 24-bit delta-sigma ADCs along with low leakage input buffers, excitation sources, an internal mux, and a small linearization engine. They can measure just about any type of temperature sensor and digitize it to deg C or F with really good accuracy. Ultimately accuracy will depend on the sensor, your implementation, environmental conditions, etc. but the parts have a lot of features that help you get the most out of a given sensor. They aren't super cheap (Digi-Key pricing is particularly bad, if you can order from Linear direct it's much better) but they are to my knowledge by far the simplest way to interface to a thermistor, RTD, thermocouple, etc. and get <1degC accuracy. Ping me off-list if you want to know more or have an application question in mind. -Logan http://www.linear.com/product/LTC2983 On Wed, Jun 7, 2017 at 8:04 PM, jimlux wrote: > On 6/7/17 7:35 PM, Bob kb8tq wrote: > >> Hi >> >> Metal actually makes things a bit worse since it has a lower thermal >> resistance than glass. >> This is also why a high performance dewar is made from glass rather than >> metal. Yes, you >> can go to weird stuff like titanium (it has been done). You can’t afford >> that …. >> >> If you fill the entire dewar with a heat conductor you make things worse >> still. The idea is to >> *block* heat flow out of the heated area. Even without fill, the wall of >> the dewar goes from the outside >> world to the heart of the heated area. It is the perfect “sneak" path >> into the oven. Actually >> it’s not that much of a sneak path since it’s a well known effect :) >> >> Again, none of this is particularly original. Take a hammer to any dewar >> based OCXO and >> the details are going to be similar. >> >> > And the wires provide a thermal path - you've got to get power to it and > the oscillator signal out. > > In dewar OCXOs (like the USOs made by APL), the leads are essentially the > only thermal path in/out. > > > BTW, you don't want to do oil filled. All oil filled electronics (unless > welded closed) inevitably leaks, oozes, or otherwise puts oil on the > outside. If you *must* have oil, then use solid, uninsulated wires to > penetrate the surface of the oil. Otherwise you'll gain new appreciation > for what capillary action is. > > > ___ > time-nuts mailing list -- time-nuts@febo.com > To unsubscribe, go to https://www.febo.com/cgi-bin/m > ailman/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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On 6/7/17 7:35 PM, Bob kb8tq wrote: Hi Metal actually makes things a bit worse since it has a lower thermal resistance than glass. This is also why a high performance dewar is made from glass rather than metal. Yes, you can go to weird stuff like titanium (it has been done). You can’t afford that …. If you fill the entire dewar with a heat conductor you make things worse still. The idea is to *block* heat flow out of the heated area. Even without fill, the wall of the dewar goes from the outside world to the heart of the heated area. It is the perfect “sneak" path into the oven. Actually it’s not that much of a sneak path since it’s a well known effect :) Again, none of this is particularly original. Take a hammer to any dewar based OCXO and the details are going to be similar. And the wires provide a thermal path - you've got to get power to it and the oscillator signal out. In dewar OCXOs (like the USOs made by APL), the leads are essentially the only thermal path in/out. BTW, you don't want to do oil filled. All oil filled electronics (unless welded closed) inevitably leaks, oozes, or otherwise puts oil on the outside. If you *must* have oil, then use solid, uninsulated wires to penetrate the surface of the oil. Otherwise you'll gain new appreciation for what capillary action is. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi Metal actually makes things a bit worse since it has a lower thermal resistance than glass. This is also why a high performance dewar is made from glass rather than metal. Yes, you can go to weird stuff like titanium (it has been done). You can’t afford that …. If you fill the entire dewar with a heat conductor you make things worse still. The idea is to *block* heat flow out of the heated area. Even without fill, the wall of the dewar goes from the outside world to the heart of the heated area. It is the perfect “sneak" path into the oven. Actually it’s not that much of a sneak path since it’s a well known effect :) Again, none of this is particularly original. Take a hammer to any dewar based OCXO and the details are going to be similar. Bob > On Jun 7, 2017, at 9:51 PM, Chris Albertson wrote: > > On Wed, Jun 7, 2017 at 3:18 PM, Bob kb8tq wrote: > >> Hi >> >> Consider that a lot of the heat flow is through the glass wall of the >> vacuum gizmo. You want to tie your heater(s) to it in order to create >> an iso-thermal “wall”. Often this is done by gluing the whole assembly >> together. >> > > Not glass walls. Stainless steel. The metal wall make it uniform. > > I occurred to be that you could fill the container with a liquid. > Something that has good thermal conductivity and it would be very uniform > inside. I don't know what, transformer oil perhaps? > > -- > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Wed, Jun 7, 2017 at 3:18 PM, Bob kb8tq wrote: > Hi > > Consider that a lot of the heat flow is through the glass wall of the > vacuum gizmo. You want to tie your heater(s) to it in order to create > an iso-thermal “wall”. Often this is done by gluing the whole assembly > together. > Not glass walls. Stainless steel. The metal wall make it uniform. I occurred to be that you could fill the container with a liquid. Something that has good thermal conductivity and it would be very uniform inside. I don't know what, transformer oil perhaps? -- 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
For under $20 you can get a OCXO with Si5351A multi output oscillator chip from QRP-Labs. http://www.qrp-labs.com/ocxokit.html No idea just how good it is but this link gives insight into how it was developed. Designed for WSPR radio transmissions. GPS discipline can be added. http://www.hanssummers.com/ocxosynth Cheers, Will On 06/08/2017 06:10 AM, Chris Albertson wrote: > IT turrets out that you see MUCH more interesting designs when you lower > the budget. Anyone can make a high performance system even enough money. > They waste half the cost on useless stuff and the product costs double what > it should and is over complex but is works real, really well. That's > easy. Harder and more interesting is "Can you make something just as good > at 1/2 the price?" Answer is usually Yes. Then you say "what much do you > loose if I set the price to 1/4? The answer is surprisingly little if you > get smart about sourcing parts. Turns out about $180 is the minimum > for pretty decent quality HiFi vacuum tube. > > An interesting graph would be Oven Specification vs. Price. What is the > minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? > Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. > > I did an exercise a while back to see what is the minimum price and > complexity to build a GPSDO that was good enough only to drive the lab > bench instruments I have. I implements only 1/2 od Lars W's design and > cut his lines of code by about 90%. Turns outhe cost is the XO and about > $10. Compared to my Thunderbolt, performance was not nearly as good but > the ratio of performance over parts cost might be better. > > > ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi Consider that a lot of the heat flow is through the glass wall of the vacuum gizmo. You want to tie your heater(s) to it in order to create an iso-thermal “wall”. Often this is done by gluing the whole assembly together. In addition, you probably also want a foam plug in the end of the beast to keep from creating an even more non-uniform (= very directional) heat flow. Yes, the directivity issue is inherent in the design approach. It’s not clear that you want to exaggerate it …. Bob > On Jun 7, 2017, at 6:03 PM, Attila Kinali wrote: > > On Wed, 7 Jun 2017 22:20:50 +0100 > Peter Vince wrote: > >>> Additionally: if I would set out to build my own OCXO today, I would >>> go and buy one of those lunch thermos flasks to house everything. Their >>> isolation is higher than anything you can easily build yourself, >>> especially at that size. I would place the (inner) oven at the bottom, >>> probably using a puck design similar to the E1938, place the electronics >>> on top of it and close the lid using an aluminium plate which forms >>> the outer oven. >> >> Might there be a problem that a thermos flask is TOO well insulated, and >> even the minimal heat generated in the electronics would be more than could >> escape through the vacuum, and so the unit would cook? > > That's why the top of the flask is closed with an aluminium plate. > Assuming the plate on the top is around 5x5cm, that should give a > thermal resistance in the order of 20-40°C/W. That's not low, but > should be enough to support 100-400mW of heat generated inside > with a moderate temperature differential. If it turns out not to > be enough, making the plate bigger and attaching a few fins, or > having a small fan blowing lightly on it should solve the problem. > > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Wed, 7 Jun 2017 22:20:50 +0100 Peter Vince wrote: > > Additionally: if I would set out to build my own OCXO today, I would > > go and buy one of those lunch thermos flasks to house everything. Their > > isolation is higher than anything you can easily build yourself, > > especially at that size. I would place the (inner) oven at the bottom, > > probably using a puck design similar to the E1938, place the electronics > > on top of it and close the lid using an aluminium plate which forms > > the outer oven. > > Might there be a problem that a thermos flask is TOO well insulated, and > even the minimal heat generated in the electronics would be more than could > escape through the vacuum, and so the unit would cook? That's why the top of the flask is closed with an aluminium plate. Assuming the plate on the top is around 5x5cm, that should give a thermal resistance in the order of 20-40°C/W. That's not low, but should be enough to support 100-400mW of heat generated inside with a moderate temperature differential. If it turns out not to be enough, making the plate bigger and attaching a few fins, or having a small fan blowing lightly on it should solve the problem. 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Chris wrote: Assume me goal is to regulate temperer of an aluminum block to within 0.1C, how good must my ADC be? Is an effective 6-bits good enough? * * *If I scale the input to the ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C which is about 6 times better then my allowed error of 0.6 C. The required number of bits depends on the range it represents -- it is all about scale, as your second paragraph above seems to recognize. You are right, 6 bits is enough to represent a 1C span to the nearest 1/64C. But that is not the whole answer. This representation will be mapped to 64 steps of oven output. If the oven has very little power, these can be reasonably fine steps -- but recovery from large errors will be painfully slow. On the other hand, if the oven has normal-ish power, the steps will be much too large to control the oven temperature finely. You need both sufficient range and sufficient resolution to accomplish the task at hand. In reality, 6 bits will be *both* too coarse for fine control and will also have insufficient range. Experience has shown that 12 bits (actual, not nominal) is barely to not really enough to do the job with real crystal ovens if you want fine temperature control over a useful range of temperatures. Consider digital audio. 6 bits is plenty to digitize audio to the nearest 30uV (typical LSB value for CD-quality audio) -- BUT, only over a 1.9mV range. Actual CD-quality audio requires one to maintain this same resolution over a range of 2V, which requires 16 bits. Best regards, Charles ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi > On Jun 7, 2017, at 4:40 PM, Attila Kinali wrote: > > On Wed, 7 Jun 2017 15:25:38 -0400 > Charles Steinmetz wrote: > >> Chris wrote: >> >>> Assume me goal is to regulate temperer of an aluminum block to within >>> 0.1C, how good must my ADC be? Is an effective 6-bits good enough? >>> >>> * * *If I scale the input to the ADC such that it os 1.0C from 0 to >>> 63 >>> counts then each cunt is 1/64 C which is about 6 times better then my >>> allowed error of 0.6 C. >> >> The required number of bits depends on the range it represents -- it is >> all about scale, as your second paragraph above seems to recognize. >> >> You are right, 6 bits is enough to represent a 1C span to the nearest >> 1/64C. But that is not the whole answer. This representation will be >> mapped to 64 steps of oven output. If the oven has very little power, >> these can be reasonably fine steps -- but recovery from large errors >> will be painfully slow. On the other hand, if the oven has normal-ish >> power, the steps will be much too large to control the oven temperature >> finely. > > Addedum to what Charles wrote: > If you want to build a temperature control for something similar > like an quartz oven, just get one of the modern delta-sigma ADCs. > You'll pay €10 for one, but it's really a hassle free way to > precisely measure temperature. As most of these have a large > number of channels, you can measure multiple sensors as well > at no additional cost (beside the thermistor). > > Additionally: if I would set out to build my own OCXO today, I would > go and buy one of those lunch thermos flasks to house everything. Their > isolation is higher than anything you can easily build yourself, > especially at that size. I would place the (inner) oven at the bottom, > probably using a puck design similar to the E1938, place the electronics > on top of it and close the lid using an aluminium plate which forms > the outer oven. > > Such a design allows to have low temperature gradients within the flask > (due to the metal walls). The outer oven allows to optimize the inner > oven for stability without the need to deal with large temperature ranges. > And all together it is still quite cheap. I certainly do not disagree with the idea of using a thermos or a cheap eBay dewar in a home brew OCXO project. It’s not all a free lunch. You still have issues. One somewhat counter intuitive one is the gradient / cooling issue. The same super duper insulation that helps you also hurts you. Your internal circuitry will have a finite power requirement. Yes it can be pretty low, but it’s still there. You have very high thermal resistance. Even small power sources will generate noticeable temperature rise(s). No that observation is not original to me. It’s been passed down over the generations of OCXO designers. I’d love to identify just who passed it on. Unfortunately it’s been way to long for me to remember exactly who. Bob > > One drawback, though, is the large size of the flask. But for a hobby > project that does not need to fit into another product, this is fine. > > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On 7 June 2017 at 21:40, Attila Kinali wrote: > > Additionally: if I would set out to build my own OCXO today, I would > go and buy one of those lunch thermos flasks to house everything. Their > isolation is higher than anything you can easily build yourself, > especially at that size. I would place the (inner) oven at the bottom, > probably using a puck design similar to the E1938, place the electronics > on top of it and close the lid using an aluminium plate which forms > the outer oven. Might there be a problem that a thermos flask is TOO well insulated, and even the minimal heat generated in the electronics would be more than could escape through the vacuum, and so the unit would cook? ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Wed, 7 Jun 2017 15:25:38 -0400 Charles Steinmetz wrote: > Chris wrote: > > > Assume me goal is to regulate temperer of an aluminum block to within > > 0.1C, how good must my ADC be? Is an effective 6-bits good enough? > > > > * * *If I scale the input to the ADC such that it os 1.0C from 0 > > to 63 > > counts then each cunt is 1/64 C which is about 6 times better then my > > allowed error of 0.6 C. > > The required number of bits depends on the range it represents -- it is > all about scale, as your second paragraph above seems to recognize. > > You are right, 6 bits is enough to represent a 1C span to the nearest > 1/64C. But that is not the whole answer. This representation will be > mapped to 64 steps of oven output. If the oven has very little power, > these can be reasonably fine steps -- but recovery from large errors > will be painfully slow. On the other hand, if the oven has normal-ish > power, the steps will be much too large to control the oven temperature > finely. Addedum to what Charles wrote: If you want to build a temperature control for something similar like an quartz oven, just get one of the modern delta-sigma ADCs. You'll pay €10 for one, but it's really a hassle free way to precisely measure temperature. As most of these have a large number of channels, you can measure multiple sensors as well at no additional cost (beside the thermistor). Additionally: if I would set out to build my own OCXO today, I would go and buy one of those lunch thermos flasks to house everything. Their isolation is higher than anything you can easily build yourself, especially at that size. I would place the (inner) oven at the bottom, probably using a puck design similar to the E1938, place the electronics on top of it and close the lid using an aluminium plate which forms the outer oven. Such a design allows to have low temperature gradients within the flask (due to the metal walls). The outer oven allows to optimize the inner oven for stability without the need to deal with large temperature ranges. And all together it is still quite cheap. One drawback, though, is the large size of the flask. But for a hobby project that does not need to fit into another product, this is fine. 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Tue, 6 Jun 2017 16:43:30 -0700 Chris Albertson 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 ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
albertson.ch...@gmail.com said: > Assume me goal is to regulate temperer of an aluminum block to within 0.1C, > how good must my ADC be? Is an effective 6-bits good enough? I don't think you are asking the right question. You can build a control loop with a 1 bit ADC. Think of your typical household thermostat. I'm not sure what the right question is. I expect it will involve the sampling rate, the response time of the system, and the nature of the heater. You also have to consider stability. -- These are my opinions. I hate spam. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
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" wrote: On Tue, 6 Jun 2017 16:37:27 -0400 Bob kb8tq 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
Hi There is a gotcha with the initial assumption: You want the loop to be *quiet* at a level well below 0.1C. If it is bouncing around that much, the second order (rate defendant) tempco of a normal crystal will become a pretty major issue. Simple rule of thumb - add at least two bits past whatever the target is. More or less, if you *are* after 0.1C and that comes out to 6 bits, you need eight solid bits to get things to work properly. Bob > On Jun 7, 2017, at 2:10 PM, Chris Albertson wrote: > > One question for the control theory experts. > > Assume me goal is to regulate temperer of an aluminum block to within 0.1C, > how good must my ADC be? Is an effective 6-bits good enough? > > It seems to me the problem with fewer bits is only quantization noise. > Lets assume 6-bits. This is 1 part in 64. If I scale the input to the > ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C > which is about 6 times better then my allowed error of 0.6 C. > > My gut-feel is that this is marginal but could work ("work" is defined as > holds temperature within the range) but I'd be happier using 8 bits. Im > pretty sure I can get 8-bits by over sampling and filtering. > > I don't know how to analyze this but I'm guessing with n-bits each each > sample has a 1/2 bit error so my I and D terms in the PID controller will > accumulate lots of 1/2 bit errors. I thing I want them "a couple orders > of magnitude" smaller then the allied temperature range. > > Of cose one could buy the best ADC on the market. But this is POOR MAN's > project. So he asks, "What is the lowers performance/cost part that will > allow the system to meet its specification? > > BTW, a related story.I'm on another couple lists that deal with vacuum > tube audio. We see the same things there people correctlypointing out how > to make something better but the question is always how much better and at > what cost an does it matter. So a fun project was proposed. Set a budget > of $200 to build a tube based stereo Hi Fi amplifier. Who can do the > best. Youhade to publish the BOM with prices and suppliers. Extra points > if you came in under budget. This eliminated all the suggestions to buy > high end hand made transformers from Sweden. > > IT turrets out that you see MUCH more interesting designs when you lower > the budget. Anyone can make a high performance system even enough money. > They waste half the cost on useless stuff and the product costs double what > it should and is over complex but is works real, really well. That's > easy. Harder and more interesting is "Can you make something just as good > at 1/2 the price?" Answer is usually Yes. Then you say "what much do you > loose if I set the price to 1/4? The answer is surprisingly little if you > get smart about sourcing parts. Turns out about $180 is the minimum > for pretty decent quality HiFi vacuum tube. > > An interesting graph would be Oven Specification vs. Price. What is the > minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? > Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. > > I did an exercise a while back to see what is the minimum price and > complexity to build a GPSDO that was good enough only to drive the lab > bench instruments I have. I implements only 1/2 od Lars W's design and > cut his lines of code by about 90%. Turns outhe cost is the XO and about > $10. Compared to my Thunderbolt, performance was not nearly as good but > the ratio of performance over parts cost might be better. > > > > On Tue, Jun 6, 2017 at 2:39 PM, Mark Sims wrote: > >> Another thing to watch out for on processor ADCs is their performance near >> the supply rails... the AVR ADCs are particularly entertaining below >> around 300 mV (with a 5V Vref). >> ___ >> 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. >> > > > > -- > > 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
One question for the control theory experts. Assume me goal is to regulate temperer of an aluminum block to within 0.1C, how good must my ADC be? Is an effective 6-bits good enough? It seems to me the problem with fewer bits is only quantization noise. Lets assume 6-bits. This is 1 part in 64. If I scale the input to the ADC such that it os 1.0C from 0 to 63 counts then each cunt is 1/64 C which is about 6 times better then my allowed error of 0.6 C. My gut-feel is that this is marginal but could work ("work" is defined as holds temperature within the range) but I'd be happier using 8 bits. Im pretty sure I can get 8-bits by over sampling and filtering. I don't know how to analyze this but I'm guessing with n-bits each each sample has a 1/2 bit error so my I and D terms in the PID controller will accumulate lots of 1/2 bit errors. I thing I want them "a couple orders of magnitude" smaller then the allied temperature range. Of cose one could buy the best ADC on the market. But this is POOR MAN's project. So he asks, "What is the lowers performance/cost part that will allow the system to meet its specification? BTW, a related story.I'm on another couple lists that deal with vacuum tube audio. We see the same things there people correctlypointing out how to make something better but the question is always how much better and at what cost an does it matter. So a fun project was proposed. Set a budget of $200 to build a tube based stereo Hi Fi amplifier. Who can do the best. Youhade to publish the BOM with prices and suppliers. Extra points if you came in under budget. This eliminated all the suggestions to buy high end hand made transformers from Sweden. IT turrets out that you see MUCH more interesting designs when you lower the budget. Anyone can make a high performance system even enough money. They waste half the cost on useless stuff and the product costs double what it should and is over complex but is works real, really well. That's easy. Harder and more interesting is "Can you make something just as good at 1/2 the price?" Answer is usually Yes. Then you say "what much do you loose if I set the price to 1/4? The answer is surprisingly little if you get smart about sourcing parts. Turns out about $180 is the minimum for pretty decent quality HiFi vacuum tube. An interesting graph would be Oven Specification vs. Price. What is the minimum cost for keeping temperature to within 1.0 C, for 0.1C, 0.01 C? Can you do 1.0C for under $5? or 0.1C for under $10.I bet yes. I did an exercise a while back to see what is the minimum price and complexity to build a GPSDO that was good enough only to drive the lab bench instruments I have. I implements only 1/2 od Lars W's design and cut his lines of code by about 90%. Turns outhe cost is the XO and about $10. Compared to my Thunderbolt, performance was not nearly as good but the ratio of performance over parts cost might be better. On Tue, Jun 6, 2017 at 2:39 PM, Mark Sims wrote: > Another thing to watch out for on processor ADCs is their performance near > the supply rails... the AVR ADCs are particularly entertaining below > around 300 mV (with a 5V Vref). > ___ > 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. > -- 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.
[time-nuts] uC ADC resolution (was: Poor man's oven)
Another thing to watch out for on processor ADCs is their performance near the supply rails... the AVR ADCs are particularly entertaining below around 300 mV (with a 5V Vref). ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
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 wrote: > > On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali wrote: > >> On Tue, 6 Jun 2017 16:37:27 -0400 >> Bob kb8tq 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. ___ 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.
Re: [time-nuts] uC ADC resolution (was: Poor man's oven)
On Tue, Jun 6, 2017 at 2:17 PM, Attila Kinali wrote: > On Tue, 6 Jun 2017 16:37:27 -0400 > Bob kb8tq 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.
[time-nuts] uC ADC resolution (was: Poor man's oven)
On Tue, 6 Jun 2017 16:37:27 -0400 Bob kb8tq 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.