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).
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@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@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
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@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@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@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.
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
On Wed, 7 Jun 2017 15:25:38 -0400
Charles Steinmetz csteinmetz@yandex.com 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
On 7 June 2017 at 21:40, Attila Kinali attila@kinali.ch 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?
Hi
On Jun 7, 2017, at 4:40 PM, Attila Kinali attila@kinali.ch wrote:
On Wed, 7 Jun 2017 15:25:38 -0400
Charles Steinmetz csteinmetz@yandex.com 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.
On Wed, 7 Jun 2017 22:20:50 +0100
Peter Vince petervince1952@gmail.com 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
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 attila@kinali.ch wrote:
On Wed, 7 Jun 2017 22:20:50 +0100
Peter Vince petervince1952@gmail.com 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.
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:
<snip>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 Wed, Jun 7, 2017 at 3:18 PM, Bob kb8tq kb8tq@n1k.org 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
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 albertson.chris@gmail.com wrote:
On Wed, Jun 7, 2017 at 3:18 PM, Bob kb8tq kb8tq@n1k.org 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.
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.
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 jimlux@earthlink.net 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.
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@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@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@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.
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@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@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@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@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.
time-nuts mailing list -- time-nuts@febo.com
To unsubscribe, go to https://www.febo.com/cgi-bin/mailman/listinfo/time-nuts
and follow the instructions there.
Hi,
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 magnus@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@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@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@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.
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.
In message 3897C09A-D76C-474C-8907-9EA25F8C3451@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
phk@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.
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-9EA25F8C3451@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...");
}
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 magnus@rubidium.dyndns.org 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-9EA25F8C3451@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.
On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson <
magnus@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
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 albertson.chris@gmail.com wrote:
On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson <
magnus@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.
In message 017AC7D5-751B-4084-A3B3-E5132509C180@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
phk@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.
On Sat, Jun 10, 2017 at 12:59 PM, Poul-Henning Kamp phk@phk.freebsd.dk
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
Hi,
On 06/10/2017 09:59 PM, Poul-Henning Kamp wrote:
In message 017AC7D5-751B-4084-A3B3-E5132509C180@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
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 albertson.chris@gmail.com wrote:
On Sat, Jun 10, 2017 at 11:33 AM, Magnus Danielson <
magnus@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.
In message 73A71EF4-EB76-4965-B3D5-53F9DD5BF0FA@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 bits mK
--------------------
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
phk@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.
Hi
On Jun 10, 2017, at 4:10 PM, Chris Albertson albertson.chris@gmail.com wrote:
On Sat, Jun 10, 2017 at 12:59 PM, Poul-Henning Kamp phk@phk.freebsd.dk
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.
In message B90B65D3-5E09-4C1C-ADE1-100A0A26D418@n1k.org, 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
phk@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.
Hi
On Jun 10, 2017, at 5:15 PM, Poul-Henning Kamp phk@phk.freebsd.dk wrote:
In message B90B65D3-5E09-4C1C-ADE1-100A0A26D418@n1k.org, 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
phk@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.
Hi,
On Sat, 10 Jun 2017 13:10:39 -0700
Chris Albertson albertson.chris@gmail.com wrote:
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.
You are asking a lot of question regarding control systems.
But, there are no easy answers there. Especially if you want
to build it cheap. The cheaper you want to be the more you
need to know and understand the problem.
I suggest you reading an introductory text into control systems
like e.g. "Feedback Control of Dynamic Systems", by Franklin, Powell,
Emami-Naeini. That should answer 90% of your questions, if not more.
If you want to go into details of digital control systems, a book
like the one by Landau/Zito "Digital Control Systems" will fill the
gaps.
If you have never heard anything about Laplace and z-Transformation,
then I highly suggest reading the first few chapters of "Linear Systems
and Signals" by Lathi (and keep it as a reference), before you start
with any control theory book.
There is really no easy way around learning this stuff if you want
to build a control system that does more than just "barely work".
You don't need to apply all the fancy methodology, people have developed
over the years, in most cases. But even just getting a simple PI-loop
working correctly without oscillation requires a few calculations.
Attila Kinali
--
It is upon moral qualities that a society is ultimately founded. All
the prosperity and technological sophistication in the world is of no
use without that foundation.
-- Miss Matheson, The Diamond Age, Neil Stephenson
On Sun, Jun 11, 2017 at 9:28 AM, Attila Kinali attila@kinali.ch wrote:
Hi,
You are asking a lot of question regarding control systems.
But, there are no easy answers there. Especially if you want
to build it cheap. The cheaper you want to be the more you
need to know and understand the problem.
This has been my opinion for a LONG time. It is easy to come up with good
solutions if to just throw money at the problem. So you see here people
proposing just going top of the line all across but an engineer earns his
money
by comping up with cost effective solutions that meet all the stated
requirements.
This is my interest in mechanics too. Can a $200 3D printed plastic robot
arm
with poor absolute repeatability place an M6 screw into an M6 nut?
Certainly
not if it runs open loop. But what if you add visual feedback?
Yes everything requires more expertise if you reduce the budget
So you understand my questions are all like this: "If you back down from
top of the line solution how does that effect real world performance?"
No one answers.
I suggest you reading an introductory text into control systems
like e.g. "Feedback Control of Dynamic Systems", by Franklin, Powell,
Emami-Naeini.
--
Chris Albertson
Redondo Beach, California
On Sun, 11 Jun 2017 11:21:15 -0700
Chris Albertson albertson.chris@gmail.com wrote:
This has been my opinion for a LONG time. It is easy to come up with good
solutions if to just throw money at the problem. So you see here people
proposing just going top of the line all across but an engineer earns his
money
by comping up with cost effective solutions that meet all the stated
requirements.
Yes, I have done plenty of that. If the production run will be >100k
then it's well worth spending a month or two to shave off 1€.
But on a small volume project, or even worse a one-off project,
I am not going to try save 10€ if I that would cost me a day of reading
and doing calculations.
So you understand my questions are all like this: "If you back down from
top of the line solution how does that effect real world performance?"
No one answers.
Because there are no easy answers. What you are asking requires
someone sitting down and do the math (or simulations) and figure
out what the limiting parameters are, when restricting the design
in this or that way.
To give this a little perspective:
For one of my many side-projects, I do need an DAC with a very
high resolution (>23bit). It took me a few days to figure out that I
really need this resolution and cannot do with anything lower. I have
probably poured another 3-4 (man)weeks just calculating and simulating
different designs that looked promising enough to deliver the needed
performance. I have settled on two designs I want to try, but I am
still reading up on different issues and refining the design for those.
I guess it will take me another (man)month or two until I a can say
with confidence that the design is good, will with high probability
deliver the performance I need and there are no easy ways to improve it.
And then I will start the implementation (ie schematics, layout and software).
Like you asked for your temperature control loop, I could have asked
how to build such a DAC. But I would not have gotten any answer.
Because there simply isn't anyone who knows the answer. At least not for
a design with my constraints. If you read carefully what I have asked
on time-nuts and volt-nuts in the last half year or year, you will find
quite a few of my questions relate to this project in some way or other.
Questions on how to do this or that. Questions on whether X is possible
or not and if yes, under what conditions. To some questions I got answers,
to others I didn't. If I didn't get an answer, I knew that the question
is difficult and tried to read up on it as much as I could manage.
I do not know, whether it does look like answering questions on time-nuts
is easy. At least for me it isn't. I came here 10 or 11 years ago.
For over a year I didn't write anything, but just read. Then I ventured
my opinion on things I thought I knew and started asking small questions
here and there (if you want to have some fun, go back and read what I
wrote 8-9 years ago... I was sooo naive...). In the meantime I continued
reading up on different things as time allowed. It really took me full
10 years to reach the level I am at now, but I still do not know anything.
My knowledge is full of holes and things I think I understood but didn't
(the construction of the E1938 is a nice recent example of that). There
are whole areas I have no clue about at all (e.g. how to build low noise
oscillators, or how ADEV, MDEV & co actually work) and I know it will take
me years to gain a sufficient understanding of those. Answering, even simple
questions, can take me easily half an hour. I often have to go back to my
documents and paper collection to check things, as I am unable to remember
everything in detail. Then writing a (hopefully) intelligeble answer is
also something that shouldn't be underestimated.
Hmm.. this ended being up longer than I intended it to be. Sorry about that.
But I hope I made my point clear. If not:
TL;DR: Some questions are just difficult and need someone to sit down
and think hard before they can be answered.
Attila Kinali
--
It is upon moral qualities that a society is ultimately founded. All
the prosperity and technological sophistication in the world is of no
use without that foundation.
-- Miss Matheson, The Diamond Age, Neil Stephenson
Hi
On Jun 11, 2017, at 2:21 PM, Chris Albertson albertson.chris@gmail.com wrote:
On Sun, Jun 11, 2017 at 9:28 AM, Attila Kinali attila@kinali.ch wrote:
Hi,
You are asking a lot of question regarding control systems.
But, there are no easy answers there. Especially if you want
to build it cheap. The cheaper you want to be the more you
need to know and understand the problem.
This has been my opinion for a LONG time. It is easy to come up with good
solutions if to just throw money at the problem. So you see here people
proposing just going top of the line all across but an engineer earns his
money
by comping up with cost effective solutions that meet all the stated
requirements.
This is my interest in mechanics too. Can a $200 3D printed plastic robot
arm
with poor absolute repeatability place an M6 screw into an M6 nut?
Certainly
not if it runs open loop. But what if you add visual feedback?
Yes everything requires more expertise if you reduce the budget
So you understand my questions are all like this: "If you back down from
top of the line solution how does that effect real world performance?"
No one answers.
Would it help if each and every time we answered “that depends”. This is always
the real answer to any real world engineering problem. Quantifying and qualifying
all the dependencies is what people get paid to do for a living. There is always
both theoretical and experimental work involved. There is never a simple one line
answer. If you want the more detailed answer, start digging into it. Try this and that.
Measure what you see. Report your results and we’ll help you analyze them.
Often this spirals instead into a game of liars poker. I can do it for $100, he can do
it for $10, somebody else can do it for $1, the next guy is at $0.10 and we are at
$0.01 in no time. There is no data, not qualification of anything, just a bunch of random
cost numbers. That’s not how things work on any real design I’ve ever seen. Raw cost per unit,
time / cost to implement, margin requirements, volume of production, and performance
are all tightly related to each other. Until you nail all that down, talking about a price
per unit does not make any sense.
As an example, we are talking here about OCXO’s. Can you build a ten cent OCXO? Sure
you can. It only takes a well stocked junk box of “free” parts. Can you spend a few years
tweaking the one uint for performance, indeed yes again. Is it still a ten cent OCXO after you
spend a year of your time tweaking it? Would you sell someone a year of your time for ten cents?
Would you build, test, and sell somebody a thousand of them for ten cents each?
Bob
I suggest you reading an introductory text into control systems
like e.g. "Feedback Control of Dynamic Systems", by Franklin, Powell,
Emami-Naeini.
--
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.