# [time-nuts] uC ADC resolution (was: Poor man's oven)

Bob kb8tq kb8tq at n1k.org
Sat Jun 10 14:50:39 EDT 2017

```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 <magnus at 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.
>
> 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 <albertson.chris at gmail.com> 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 <holrum at hotmail.com> 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 at 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 at 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 at 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 at febo.com
> To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
> and follow the instructions there.

```