Author Topic: Thoughts on voltage reference board?  (Read 21478 times)

0 Members and 1 Guest are viewing this topic.

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #25 on: July 24, 2013, 09:46:48 am »
I'm still not sure exactly what you're describing about a "point connection from U1 pin 2 to +7.5". Maybe I'm just being dense - is there any way you'd take the time to sketch it over the picture?

 You are using a point connection for U1 pin 4 to J2 pin 1, you are keeping other currents from effecting this trace.   Same reason C8 & C9 to U1 pin 4. Just because it's a positive supply does not change this effect, A trace from U1 pin 2 to the junction of U2 pin 2 & C15 keeps other current changes out of this trace. As a trace has some resistance & can act like an antenna, C5 can do a better job removing the lesser noise on a trace direct from a source.

Think more of box inside box inside box. A heat box inside a heat box should be more stable. Use the same idea for your electronics.     

J2 pin 3 is the sense line return to the op amp, to allow it to compensate for losses caused by any current drawn from the output.
Ok, I under stand your use, but you have no rock solid accurate output you can read or use. Any new connection to the resistor box or U1 box changes things in the boxes
If you want to keep this I would add a UN-changing output that was buffered so output changes can not effect things back in to your good reference.

C
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #26 on: July 24, 2013, 02:23:13 pm »
How's this?
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #27 on: July 24, 2013, 03:28:11 pm »
Ok, I under stand your use, but you have no rock solid accurate output you can read or use. Any new connection to the resistor box or U1 box changes things in the boxes

There isn't going to be a new connection anywhere, though. Do you mean for calibration? That will be done based on the final output after the buffer - the output on J2. When operational, the whole thing will be sealed under the oven can and nothing will be connected anywhere but on the intended output connector.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #28 on: July 24, 2013, 04:52:07 pm »

I looked at Pc Board  :-+

A lot of thought in that board  that does not show as well on the drawing.

Very nice.

Depending on use,
A. I do not care what the voltage is just that it does not change.
B. I want to exactly __ voltage with the min change.

look at the two extremes on J2.
1. Pin 2 to Pin 3 shorted.
2. Pin 2 to Pin 3 no connection.

#1 I am thinking is all most a buffer. with a Hi-Z meter should be very close to + of U3.
#2 not sure what U3 will do.

You may not care, but you have said auto test & cal was an interest. Being able to switch between between the #1 & #2  could allow a auto cal.

While looking at your PC board I got to wondering if you could add a simple resistor so that #2 above becomes something better then My Unknown.

Could this be as simple as a Hi-Z resistor from the junction of R1 & R2 to - U3?
I am probably missing something here
 
Anyway it looks nice!

C
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #29 on: July 24, 2013, 05:03:52 pm »
The two pins should never be disconnected. I'm OK with the board only being properly usable when it's installed onto the main board, where the two should be joined together right at the ADC input. A large resistor between them would probably work, so I might add it in - it certainly wouldn't hurt - but it's not really necessary. You're right about a lot of things potentially (ha...) having an effect on the reference voltage, so I'd rather calibrate the full system as a whole and be able to adjust for that.

I'm not really sure what you're getting at with the autocal, but since the last time I exposed you to my staggering density I've injured myself and I'm now loopy on medication, so I'm even denser! :-+ :-DD I can't really think of much that can be automatically calibrated here, it would need to be compared against another reference. My plan for calibration is to do it with the whole system working: the power supply is set directly to its midpoint (10.000V - the DAC1220 doubles the reference voltage, so I think midpoint should minimize the error from the DAC itself - CMIIW, DACs aren't my strong point) and the trimmer is adjusted from there. Then I can go up to 20.000V and measure any offset to further cal out any DAC gain error.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #30 on: July 24, 2013, 06:15:03 pm »
And for the sake of completion, the heater.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline quantumvolt

  • Frequent Contributor
  • **
  • Posts: 395
  • Country: th
Re: Thoughts on voltage reference board?
« Reply #31 on: July 24, 2013, 06:51:37 pm »
Congratulations so far. I wouldn't say too much in the beginning, but I knew it would come to this. By now almost every single copper atom on your circuit have been judged. And the circuit as such has not changed much. Since your design is modular and does not have a lot of special feedback or other interconnections (except from the normal sequence: power, ref., ampl. etc) it is quite universal. This thread will be valuable for others too ... Well done.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #32 on: July 24, 2013, 06:57:39 pm »
I'm just waiting on the next Mouser package, which has a few parts I need for this (the PIC, the LM35 and the divider resistors, in particular), then I'll post pictures when I get it assembled. Probably the code for the PIC as well.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #33 on: July 24, 2013, 07:10:46 pm »
I knew it would come to this.

All I can think of:

No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Andreas

  • Super Contributor
  • ***
  • Posts: 3578
  • Country: de
Re: Thoughts on voltage reference board?
« Reply #34 on: July 25, 2013, 05:48:38 am »
Mhm,
now you have brougt your reference board to less than 1ppm/K but the 20->5V voltage divider (unknown spec but heated by the output voltage) and the DAC with (typical) 2ppm/K do still have no thermal stabilsation.

I have overlooked that its not only a reference board but part of a whole system. That what you really might want is that the output of your supply is stable, so there should be a whole system approach including correcting the voltage drop by the current draw by the load.

With best regards.

Andreas
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #35 on: July 25, 2013, 01:38:42 pm »
I may duplicate the oven design onto the DAC/control board. I'd rather design them separately, though, just because it is easier to design the whole system when I can build and troubleshoot each module by itself.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #36 on: July 25, 2013, 05:14:33 pm »

c4757p
look close at your temp control loop. You went to some work to make it linear, but it is not linear.

The temp loop is still digital steps with the step size of the adc in the pic. To make it worse the adc is reading full temp range not a small error value range.

You don't really care so much about the actual temp as that it does not change. With no pic. you would do a long term average of the temp using an integrator and then feed that to the heater control. We should really call the input temp noise. At power up you would want high gain to get up to temp. The longer you run the less gain & more integrator time. When looking at the extreme, the big thing to make this loop change is the outside temp.
So to restate it,
The gain of the oven temp loop should be based on outside temp change and time, this around The gain of the oven temp loop based on inside temp change and time. And to get better results the inputs to the ADC's should not be constant. Any DAC outputs should be a modification of the best analog control signal.

You are probably thinking all kinds of big nasty changes that will cost a ton. Big nasty also adds more errors in the process and just goes down hill fast.
Connect a resistor to U4 pin 1 the temp out & to a cap. add a second resistor of hi-Z to a DAC output. With the DAC set to center you still have actual temp. By changeing the Dac output you can make the voltage on the cap change just like a dual slope ADC does. Now when you read the voltage with the PIC's adc you can get a better reading that does not always return the same value from the ADC by using time and rate of change.
You now have more unknowns, The ADC & DAC reference voltage. If these are short term stable, you can work around this with a known good voltage. Add a buffer to your reference so you do not effect it and connect it the same as above a resistor,cap ho-z resistor to dac ouput and measure the cap with the ADC.
The same DAC output can be used for both resistors, this actually makes it better.
Add a second temp sensor to read outside oven temp and you can make the oven temp control better.
Again remember that you do not really care what the outside temp is, just how it is changing.

So U4 via a analog path controls U5A to make the heaters hold the temp to what you want with with no assist from the PIC's DAC. You then use the Pic's Dac to speed up the startup with a large modification value. When at temp the small modifications are to counter the outside temp change.   

To keep from adding more errors the pic should always report the actual readings from the ADC.

C


 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #37 on: July 25, 2013, 05:45:30 pm »
The temp loop is still digital steps with the step size of the adc in the pic. To make it worse the adc is reading full temp range not a small error value range.

I think I'm going to be stubborn and keep the basic design the way it is - I've already done some testing of the heater circuit and it's really pretty decent. A lot of the reference circuit would not perform too bad even if left at ambient, I don't need something with cal lab precision (remember, the PD 2005 uses a mains-powered heater and simple thermostat!). But you raise a good point about the temperature range - I don't need to be able to read temperatures from 25 to 80C (or whatever the range was, I don't remember off the top of my head), that's just retarded. I'm only trying to maintain it at 55C, so I think I will definitely adjust the gain of U5B to put 52-58C on the DAC. I can of course just use a separate "preheat" mode until the DAC reading starts to move so that it doesn't take forever to warm up.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline justinjja

  • Regular Contributor
  • *
  • Posts: 51
Re: Thoughts on voltage reference board?
« Reply #38 on: July 25, 2013, 06:24:47 pm »
Did you consider the TI REF5025-EP?
It looks like the 4550 is rated at 30-80 ppm/mA so pulling .6mA through your voltage divider is worth considering.

The TI REF chips have a built in trim connection.
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #39 on: July 25, 2013, 06:29:29 pm »
I did consider the REF50xx series. My choice came down to the fact that I was ordering samples and could only order a certain number from each company...

The current through the voltage divider should be perfectly constant, so I'm not really worried about that. Just another thing that can be trimmed out.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #40 on: July 25, 2013, 08:21:54 pm »
we may be saying the same thing different ways

You want 55c
small range around this to ADC = better readings
small range around this for DAC = better control

Forget all about temp, what you realty want is a specific reading on the ADC. You do not need to convert ADC to temp each time. Convert the 55c to a ADC reading once.
If you take the ADC reading - (55c in adc value) you have % error
Use the % error to change current output ratio on RA2.

You are currently using RA2 to create a fixed voltage ratio based on time. Change your thinking to this is how much I want to change based on time.
Remove R27, the charge on C26 & C27 will now float up | down based on the ratio of RA2. Your control loop still works the same basic way just not in absolutes.

C
 



 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #41 on: July 25, 2013, 08:27:59 pm »
If I'm understanding you correctly, this is pretty much exactly what the proportion-integral control algorithm should accomplish.

And... I think I'm looking in the right place, but RA2? There's no RA2.

I see your point about having the MCU pull on an analog control loop instead of being the control loop, effectively increasing resolution by putting the full DAC resolution around a small error region, but really, 10 bits should be more than enough I'd think. That gives 7.8mW resolution up to 8W. I could probably get away with even more resolution by alternating between two duty cycles and making the low-pass filter a bit stronger, but I doubt I'll need to do that. I've thrown together a quick prototype with a similar control loop (on a *shudder* Arduino :-DD with a cheap thermistor for a sensor and the actual heater board, which I've assembled, and all the insulating materials, and after 15 minutes or so, the thermistor output is very stable.
« Last Edit: July 25, 2013, 08:39:12 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #42 on: July 25, 2013, 10:14:52 pm »
I was wondering if you were using something like proportion-integral control I should have known you would, SORRY.
Even better and easy.

You may have changed it,
I was talking of the MPU pin RA2 that gets filtered to control the heater. the drawing I was looking at has the mpu pin RA2 to a voltage divider connected to a cap. remove the ground side resistor of the divider.
You then have the resistor between the cap and the mpu that is controlling the ratio on this pin.
You know that the cap will charge up to proper value with time, so what would be ideal would be a 50% ratio = to normal discharge of cap at temp. This is not critical as your PI will auto adjust for difference.

Have your control loop output a large number of bits.
1. Use the bits starting at the MSB side as the input to the mpu output ratio to heater.
2. The MSB of #1 tells you if you need to add or sub 1 from #1 to get a second ratio.
3. Use the remaining bits as the time ratio to use for output between the result of #1 and #2 

The thing is, some times you do not know what you are missing until you can see it. You know that temp effects the reference some, so the more you can remove of this change the better it should be. here you are really talking minor software change that could give you a lot but will not hurt things if it does not help

You could use the reverse of the above to create a large bit input to your temp control loop there by gaining even better control.
#1 above = temp ADC.
The remaining bits are from  a simple up down counter where based on the sign of the % error value from the adc you add or remove a count.

Did I goof this time?
edit
Yes I did Had #2 above wrong


C

« Last Edit: July 25, 2013, 10:49:25 pm by C »
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #43 on: July 25, 2013, 10:55:39 pm »
Ah.... MCU pin. I was imagining a reference designator... :palm:

If I remove R27, the behavior shouldn't change unless I play around tristating the pin... All R27 is doing is functioning as a voltage divider so that the PWM comes out at the right level to match the current sense output from the heater. 10k to 5Vpp PWM and 1k to ground should be the same as 910 ohms to 455mVpp PWM, unless I'm missing something!

Have your control loop output a large number of bits.
1. Use the bits starting at the MSB side as the input to the mpu output ratio to heater.
2. The MSB of #1 tells you if you need to add or sub 1 from #1 to get a second ratio.
3. Use the remaining bits as the time ratio to use for output between the result of #1 and #2 

So, a sort of meta-PWM of PWM(n) and PWM(n+1) or (n-1)? That's about what I was planning to do if I needed extra resolution.


Don't get too specific about components and such, especially around the heater control, I've made a few changes and haven't yet uploaded the new PCB and schematic.

OK, here they are. Note that C8, C16, C17 are indeed SMD film capacitors, not ceramic. I'm also currently changing a few more capacitors - C1 and C9 to tantalum, and possibly some of the power supply caps to either tantalum or SMD electrolytic. (Edit: Updated PCB)
« Last Edit: July 26, 2013, 12:14:00 am by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #44 on: July 26, 2013, 12:28:56 am »

Old heater used a PWM dac to control voltage to heater very fast. so that PWM count = ___ voltage = __ heat
you might say Full range fixed output

If you take a standard digital pin that can source or sink current and connect a very hi-z resistor then to a cap, you can charge or discharge the cap based on output level. Very Hi-z makes it take all day to charge to 1 level from 0 and all day to go from 1 level to 0 level out of the logic. By controlling the ratio you can control the voltage on cap.
Above Just saying what you know.
My drawing shows you using a 10k resistor to cap. While I am thinking more like 1M from mpu to cap
One time cycle of PWM makes very little change to cap voltage.
By switching between two PWM values in a ratio you gain even more control of cap voltage.
While not necessary, adding trystate can make it better.

cap sensed with Hi-Z input op amp that controls heater voltage.
If you add a very HI-Z  connection from cap to temp sensor, The PWM output shifts more to a modification of temp sensor outputs.
If the temp sensor output increases in voltage with temp, Should be true with LM35.
At cold the max PWM output must with time get enough charge on cap to start the heaters.
As you start heating the increasing voltage out of temp sensor will allow more heat increasing the speed to proper temp.
At proper temp, you need some range to min PWM output that with time will prevent more charge on cap,
If when at proper temp the min PWM value can reduce the cap voltage you are fine.

C





   
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #45 on: July 26, 2013, 12:41:07 am »
If you take a standard digital pin that can source or sink current and connect a very hi-z resistor then to a cap, you can charge or discharge the cap based on output level. Very Hi-z makes it take all day to charge to 1 level from 0 and all day to go from 1 level to 0 level out of the logic. By controlling the ratio you can control the voltage on cap.
Above Just saying what you know.
My drawing shows you using a 10k resistor to cap. While I am thinking more like 1M from mpu to cap
One time cycle of PWM makes very little change to cap voltage.
By switching between two PWM values in a ratio you gain even more control of cap voltage.
While not necessary, adding trystate can make it better.

So basically increase the filter time constant?

Quote
If you add a very HI-Z  connection from cap to temp sensor, The PWM output shifts more to a modification of temp sensor outputs.
If the temp sensor output increases in voltage with temp, Should be true with LM35.
At cold the max PWM output must with time get enough charge on cap to start the heaters.
As you start heating the increasing voltage out of temp sensor will allow more heat increasing the speed to proper temp.

That seems like a recipe for instability, though. It's a positive feedback loop - as the temperature increases, the heater set point increases, increasing the temperature more, and so on. Perhaps I could invert the temperature sensor output first.

Still, this is a one-off. I don't want to have to do multiple prototypes. I'm fine with testing and debugging the software, but I don't really want to play around with things like that in the analog control loop, just because I don't want to have to redo the PCB or cover it in bodge wires if something is wrong with the circuit. The current setup is quite simple.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #46 on: July 26, 2013, 01:30:56 am »
Quote
So basically increase the filter time constant?
Yes , what you might think of as supper extreme 

Quote
That seems like a recipe for instability, though. It's a positive feedback loop - as the temperature increases, the heater set point increases, increasing the temperature more, and so on. Perhaps I could invert the temperature sensor output first.

Quote
At proper temp, you need some range to min PWM output that with time will prevent more charge on cap,
If when at proper temp the min PWM value can reduce the cap voltage you are fine.

The second quote is what prevents the instability. when at proper temp you just need to be a little ways from the ends of your PWM end points.
You want 55c
Use the voltage output of temp sensor at 60C and min output of PWM. If the cap does not charge, that end should be fine.
Use the voltage output of temp sensor at cold start and max output of PWM. If the cap charges, that end should be fine.
Your PWM max and min are really the logic level outputs of the mpu pin.
If you follow it through, you have just a little heat to get you started up in temp, The positive feedback will make the rise in temp faster for a while but you also have the PWM able to decrease from max at any time to slow things down and your PI will to just that.

Nothing new here, have worked on many circuits just like what I describe. This is simple compared to some I have worked on

C



 
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #47 on: July 26, 2013, 01:32:22 am »
I'm sure it can work, I just don't really see the point of it. :-//
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline C

  • Super Contributor
  • ***
  • Posts: 1346
  • Country: us
Re: Thoughts on voltage reference board?
« Reply #48 on: July 26, 2013, 01:51:42 am »
Simple super stable oven temp.
no heat steps.
Just a shift from the normal brute force control I see here on forum to the nudge it the right direction control. Your oven actually will work better with slow changes.
You can easily do this with no micro

C
 

Offline c4757pTopic starter

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Thoughts on voltage reference board?
« Reply #49 on: July 30, 2013, 11:07:33 pm »
The heater control works brilliantly! :-+ It takes forever and a half to heat up (OK, 12 minutes :-DD), but is very stable.

I'm still waiting on the mail before I continue with this.

Opinion question: The original PD 2005 has excellent noise specs. I'm not sure if I want to go to the effort, expense and bulk to meet those - I have certainly never needed it before. Does anybody have any particularly strong arguments against using a well designed and well filtered DC-DC converter to provide the internal power supplies?
No longer active here - try the IRC channel if you just can't be without me :)
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf

 

-->