Thoughts on voltage reference board? - Page 1
Forum section: electronics / projects

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 12:11:33 am
content: I've been working on building replacements for some of my old, bulky equipment (mostly just for fun), and the current contestant on Who Wants to Be Replaced is my Power Designs 2005 precision power supply. It's specified at 0.1% ± 1mV with five digit precision to 20.000V and 10ppm/°C; I'd like to at least match that, adding computer control, multiple outputs (one high precision and two lower precision, all operating off the same reference, part of my recent efforts related to automated testing) and better constant-current accuracy.Here's what I have for the voltage reference board. Does anybody have any suggestions or corrections before I make it? Some of the parts are pretty expensive (free samples, hell yes - but I've only got one of each), so I don't want to screw it up. I'd especially rather not have to desolder the reference chip once it's been soldered on.The following parts (at least - depending on what I can fit, I haven't done the PCB yet) will be under a small metal can with a heater, which is then surrounded by insulation, for thermal stability. (Gilding the lily a bit, most of this has good specs over a full typical ambient temperature range.) It will be kept at 50°C by an external PIC running a P-I algorithm.- U2 (LM317, powers the reference) and its feedback resistors- TL431 (powers U3 - missing a ref des... oh well)- U1 (ADR4550 voltage reference, 2ppm/°C).- Output voltage divider and trimmer.- U3 (MCP6V06 output chopper amp).- Of course, U4 (LM35 temperature sensor), and Q3 and Q4, the heaters.Keep in mind, I've chosen some of the parts simply because I have them, so I know some of it isn't the most ideal design. Still, if my calculations are correct, I should be able to very easily achieve 1-3ppm/°C and hopefully better than that.Edit: Removed the old schematic to not waste too much of Dave's server space. See below for updated.

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 12:22:55 am
content: I may toss the temperature controller PIC on the board too, outside the can. I didn't want anything digital on it, but with the grounded metal can surrounding the oven area, it's pretty much a separate PCB-within-a-PCB, and that would make testing easier since I can get it up to fully regulated temperature by itself without having the main board attached.

author: GK
author_rank: Super Contributor
timestamp: July 23, 2013, 12:43:50 am
content: I'm pretty sure the TL431 is intollerant of capacitive loads (oscillates with a parallel capacitor).

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 12:54:33 am
content: It's intolerant of capacitive loads between about 10nF and 5uF (depending on voltage and current), but loads much larger than that are OK.Updated to include PIC.Of particular interest to me is the trimmer network for the reference. I borrowed that arrangement from the TI datasheet for LM399. They don't address why it's like that, but as far as I can tell, it's to compensate for the shit tempco of the trim pot. While the total resistance of the pot may drift, the proportion should not, and the dependence here on the total pot resistance is small. (I may decrease it further to 10k to decrease the dependence even more, but I want to keep the output current from the ADR4550 low.) Is this correct?Edit: Removed the old schematic to not waste too much of Dave's server space. See below for updated.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: July 23, 2013, 01:48:03 am
content: Quote from: c4757p on July 23, 2013, 12:54:33 amYes. The op amp sees 5 k from the two 10 k resistors, but more than 68 k from the trim. So the effect is small. If you don't like the full swing of the trim, you can change it for two (possibly different low tempco) resistors and a smaller trim.In general, imo your design cannot be flawed. All you do is hooking up the parts in ways that have been done over and over again. No fancy analog regulating or feedback circuitry. You might have to change/add/remove small bits if you want to optimize the circuit. But that is normal.If the 7.5 V is solely an internal supply I don't see the point in protecting it unless you will plug in modules with possibly charged capacitors. Also the 10 Ohm low pass filter with the small 100 uF looks special imo.

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 01:56:47 am
content: Thanks for looking at this!Quote from: quantumvolt on July 23, 2013, 01:48:03 amDiodes are cheap, and I don't want to try to guarantee that the 12V coming in won't be shorted, since I'm not 100% sure what will be on the main board."Special"?You mean excessive? Probably.

author: blackdog
author_rank: Frequent Contributor
timestamp: July 23, 2013, 08:49:24 am
content: Hi c4757b :-)Some remarks about your schematics.1eKeep the power of the heater circuit/Pic separate from the reference!2eMake R6 as high as posible, just a smal range so yo can Cal. your reference.3eThere is no protection on the output of your Reference, you WILL kill it with static and or power from another circuit4eTo mutch decoupling (this is the first time i ever saying this)Lose these components, R10-C18, C1-L1, R3-C12, make R5 330 Ohm.5eKeep the heater controler (Pic) as far as posible away from the reference circuit.6eGenerate the heat as close as you can to U1.7eMount the LM35 as close as you can to U1 and the heat source.My 2 cents.Kind regarts,Blackdog

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 01:07:14 pm
content: 1. The PIC power is separate - the PIC, the temperature sensor and the LMV358 are the only things on the +5V rail. Do you really think the heater needs to be separate? It's not pulsed, it's run in a steady constant-current mode, so once the controller settles it shouldn't be putting noise on that rail. I'm not sure how separate I can really make it, anyway, the power has to come from somewhere on the main board, after all.2. I changed both R6 and the trimmer to 220k and 10k, giving an adjustment range of about ±50mV.3. Noted.4. Yeah, there's a lot. I've since removed the R-C low pass on the 7.5V output. I think I will remove L1 and merge C1/C3 into a single 22uF. The R3/C12 setup was actually straight from the MCP6V06 datasheet, left over from earlier when I was running it off the main +5V rail and wanted a lot of filtering. I think I will remove them.5. I'm almost done with the PCB, so I'll post it when I have it done. So far, the PIC is fully outside the metal can, electrically separated fairly well too.6. I instinctively put the heaters at opposite corners of the can. After the whole thing has been running for a while, it should all be very close to the same temperature. I figure that if the heaters are farther away, the distance and thermal mass in between might help to absorb a bit of temperature noise.7. U1, U3 and the LM35 are all close together, near the middle of the can.Thank you for your 2 cents!

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 01:43:20 pm
content: Here's what I have so far for the PCB, as well as an updated schematic.(Updated.)

author: Andreas
author_rank: Super Contributor
timestamp: July 23, 2013, 08:14:22 pm
content: Hello,there is 1 thing which I do not understand:If you need 2.5V as output voltage why do you not use a 2.5V reference like ADR4525. With the external 25ppm/K voltage divider you will never reach the long term stability (humidity) like with the 2ppm/K internal voltage divider.And there are other considerations to do.If you want to use a capacitive load I would add a small resistor 10-100 Ohms between C16 and J2. C16 should be increased.Use film capacitors for precision circuits. With ceramic types you will get piezoelectric effects picking up mechanical noise to electrical output voltage.The ADR4550 is in my opinion not a device with good long term stability. My ADR4550 has drifted around 65 ppm within 60 days after a 14 day run in phase. Other (buried zener) devices drift usually below 10-20 ppm per year after some run in phase. Usually these devices have a dedicated trim pin which can be used for a overall system trimming without influencing tempco or long term stability.A good thermal design does not use punctual heaters but heater foils. Any temperature gradient on the pcb will give thermoelectric voltages.With best regardsAndreas

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 08:30:44 pm
content: Quote from: Andreas on July 23, 2013, 08:14:22 pmBecause as a one-off made from AD and TI free samples, I did not know which DAC I would have and what it wanted for a reference. Also, I want to be able to trim the reference; none of them have both the initial accuracy and thermal performance I want without being ridiculously expensive.As for humidity - that is a concern. It varies widely in my house. I will consider potting the circuit in something thermally conductive, hopefully that will help.QuoteI must be misunderstanding you about the resistor - wouldn't that be R29?Noted about the film caps, I will switch.I don't really plan on driving a major capacitive load, I just wanted to make sure there was a bit of filtering so that the transmission line effects on the output and sense lines don't become an issue. I'll try to keep them as short as possible on the main board, but I haven't routed it yet so I can't guarantee anything.QuoteThat seems to match the long-term drift plot in the datasheet, though it is a bit on the high side. I also considered using an LM399; I now think I'd rather use one, but I already have the ADR4550 here, so I am going to continue with it. I'll make sure to leave this running continuously for a very long time and re-trim it periodically until I see the drift start to settle.QuoteWhat do you mean by "punctual heater"? Do you mean heaters run digitally, switching on and off? These are not. They are driven in constant-current mode and the current is varied. With a properly tuned P-I controller, I expect a maximum of 200uA jitter. I'm sure there will be a bit of thermoelectric voltage, but hopefully the temperature will be stable enough for this to be calibrated out.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: July 23, 2013, 09:11:17 pm
content: There are pictures of resistive heater foils in the "732A Teardown" tread. (Without interfering I think what Andreas is saying is that your transistor heaters are point heaters, not surfaces. You can mend this to a certain degree by mounting the transistors on a separate copper clad PCB shield on top of the reference board or directly at the metal can which will contain it.)

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 09:20:41 pm
content: Ah, that makes sense.I'll consider moving them. Heater foils are a bit excessive IMHO - I'm only trying to beat the accuracy of a couple diodes and transistors in a big can with a mains-voltage heater filament and hysteretic control, it can't be that hard...Seems like it would still be very difficult to eliminate temperature gradients. Even if I put the heaters on the can, there will be a radial gradient from the edge of the board inward, starting where the can is soldered to the board. I am hoping that it will be enough to make the gradient repeatable so it can be trimmed out. Outside the metal can, there will be a rather large amount of insulation as well, so hopefully the heaters will not have to dissipate much power once everything is up to temperature.

author: Andreas
author_rank: Super Contributor
timestamp: July 23, 2013, 09:29:31 pm
content: Quote from: c4757p on July 23, 2013, 08:30:44 pmPotting will only slow down the time constant for humidity but not really help since all plastic materials are swelling with rising humidity. I use ceramic packages for the references when having high demands.To R29 you are right - I simply had the old schematics. But 1k might be too high depending on load: usually a DAC has 15-5K input impedance at the reference pin.The datasheet values are under idealized conditions: absolute stable temperature and no humidity drift.And the salesmen (not the development engineers) who write datasheets will not tell you the bad features.Mhm: why do they measure the long term drift at 60 degrees? Other references (ADR435) are usually measured at 25 degrees. Do they want to minimize the ageing drift due to humidity?You have 2 punctual heaters Q3 + Q4.I have a NTC directly at the GND-Pin of my references. I usually measure 2-3 degrees celsius more at the NTC compared to the environment temperature. And this only through the self heating of the 2mA * 10V = 20mW of the reference.with best regardsAndreas

author: C
author_rank: Super Contributor
timestamp: July 23, 2013, 10:15:13 pm
content: First look at C8 & C9.Are they there to keep Vout constant, if so then where you show ground connections to these should be a direct connection to Pin 4 and not to ground noise.If you think that these two are to keep a constant voltage across R1 & R2 then a direct connection to the wire connecting R2, R4 & C13.Now to see what I am saying put some boxes in side boxes. The inside box contains U1, C5 & your thinking above for C8 & C9. The next box out contains the first box and R1, R2 E4, R6, C13. The next box out contains these two boxes and U3.Now anytime you have a wire crossing one of the box walls, think of what is going in or out.For example, Any current change to the wire from U1 gnd to J2 pin 3 causes a voltage change in your reference output. Any change in U3 output also causes a change in the power pins of U3 changing the current ratios on the power pins. Any change to U3's output also causes a change in U3's + Input. Any power or ground connections also couples in the noise on these power connections.Keeping R1 close to R2 means that a temp change should effect both more equal. Matched resistors are more important here then the actual value.Even with a static design, the more you can make a possible change have a equal but opposite effect also the more stable the output will be.With single ended design this is harder but can still be done some what. Add three or four matched resistors across U1 Vout to U1 ground. One resistor away from U1 gnd pin on this new divider is a signal that changes more with a ground side change then Vout - GND change. If you use this signal as part of the inputs to U3, you will be countering any changes that happens on the ground side.C

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 10:25:15 pm
content: C8 and C9 would be for Vout, not the divider; they're required for stability. I should have made this more clear in the schematic.Good point about the "boxes", and really, I should have known to do that.Since this is a component of a system, I've neglected in my design mentality to recognize that it also has subcomponents and should be designed accordingly.Okay, "boxes", as well as moving the heaters. (Not just a simple move - I want to solder the heaters to the can, which should be grounded, so I've got to rewire it to use PNP so the collector is grounded.) I'll come back in a while with a somewhat redesigned circuit.

author: c4757p
author_rank: Super Contributor
timestamp: July 23, 2013, 11:38:23 pm
content: What a surprise. It's ten times easier to lay out the board when you do it right.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 12:12:49 am
content: OK, try again.The heater transistors are the same, they've just been moved.Re-uploaded after adding some finishing touches.(Removed again, see below)

author: senso
author_rank: Frequent Contributor
timestamp: July 24, 2013, 03:05:32 am
content: I dont understand a lot of precision things, but isn't this a ground loop(marked in red)?

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 03:10:14 am
content: Possibly, in the same way that the same "loop" would still exist in the copper if I just went and filled the whole thing with a copper pour. I don't think it will be a problem because of the paths the current should take.Does anybody see a decent way to remove that loop, though? I don't want power supply currents flowing up the signal ground. I considered having the output amplifier sense the reference voltage differentially, but then I would be subject to the matching of yet another set of resistors.

author: kt315
author_rank: Regular Contributor
timestamp: July 24, 2013, 03:16:26 am
content: Hey, sorry for the offtopic, but I am quite curious about the specs you are going after and some high level design overview.With all the PSU discussions going around lately I can't help but think about building one as well. For me it is primarily a learning exercise, so sorry if the questions are rather ... dumb.Can you shed some light on the following:What power are you going after for each output?Tracking or independent?How do you plan to power each stage? I would expect you will need some additional split supply for each power phase to provide some juice to opampsDo you plan to use switching pre-regulator?How do you plan to provide voltage reference to the power stage?What about MCU control?My plan was to "borrow" voltage reference optocoupling from HP PSU schematics (use linear optocouplers with the feedback), and implement a switching pre-regulator. What scared me quite a bit in this plan was the amount of independent supply voltages that would have to provided for the power stage, opapms, mcu, etc.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 03:27:40 am
content: I've dragged so many threads off topic, I deserve it...My PD supply that I'm replacing only does 500mA. I'm either going to go for 500mA, or double it to 1A - not sure yet.Independent. The main output will be the only "power" output, actually, the two others are just signals (probably up to 100mA), really just to take advantage of the voltage reference. I've been playing around a bit with automated testing lately, and I'd like to have a few computer-controlled signal outputs.The main supply section will most likely have +25V, -5V for a few negative biases here and there, and either 5V or 3.3V, most likely generated from an 18-20VAC transformer and a couple switching regulators. This will be isolated from a small USB-connected, ground referenced section powered either by a separate mains transformer, or an inverter running off the main section.No preregulator, the output power just isn't high enough to bother.The voltage reference will feed into a DAC1220 (20-bit) to get the set point (I'll probably use the extra bits beyond the five-digit precision I need for a bit of software calibration wiggle room), and the output of that into a fairly standard power supply output section (but designed to higher precision). I can't remember which DAC chip I've got here for the lower precision auxiliary outputs off the top of my head, but it's a four-channel one from AD that will also handle the current limits.FullMCU control. The PD 2005 uses some sort of precision voltage divider to set the output level, which is a bit silly in 2013. The MCU will be able to set all levels, including the current limit for the main supply and the shared current limit for the aux outputs, as well as read off the output current with at least four-digit precision.Quote from: kt315 on July 24, 2013, 03:16:26 amTry to find different parts with power requirements that overlap somewhat! You'd be surprised how much you can fit under a 5V rail with modern parts.

author: C
author_rank: Super Contributor
timestamp: July 24, 2013, 03:30:50 am
content: First note that you dropped the connection from U3 + to junction of R1 & R2I may not got across what I was trying to say good.In the box with U1, you have two grounds and a +7.5 to outside that box. These three connections all add some noise in to this box. C5 will have a better chance of removing this noise with a point connection from U1 pin 2 to +7.5. Like wise a point connection from U1 pin 4 to ground would work better on that side. What I was trying to suggest is moving +7.5 and ground outside this box on the drawing and connect them with point connections to U1.With the current circuit I think you still want a point connection from J2 pin 1 to U1 pin 4. This would keep any current induced voltage changes on existing line from effecting J2 pin 1 as much.A point connection for the power leads of U3 should allow C17 to remove more noise. Granted this may be small, but a lot of small things add.Not sure of your reasons for J2 pin 3. I see this as a way to mess up everything with out a way to tell how bad it is getting messed up.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 03:36:47 am
content: Nah, that connection is on the back side.Edit: You're right, I see it. It got blown right out of the schematic.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?I do see what you're saying about J2 pin 1 and I agree. I'll change that.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.

author: kt315
author_rank: Regular Contributor
timestamp: July 24, 2013, 03:57:15 am
content: Thanks for the reply. Good luck with your build. Looking forward for the future posts on your progress.

author: C
author_rank: Super Contributor
timestamp: July 24, 2013, 09:46:48 am
content: Quote from: c4757p on July 24, 2013, 03:36:47 amYou 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.Quote from: c4757p on July 24, 2013, 03:36:47 amOk, 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 boxesIf 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

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 02:23:13 pm
content: How's this?

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 03:28:11 pm
content: Quote from: C on July 24, 2013, 09:46:48 amThere 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.

author: C
author_rank: Super Contributor
timestamp: July 24, 2013, 04:52:07 pm
content: I looked at Pc BoardA 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 hereAnyway it looks nice!C

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 05:03:52 pm
content: 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!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.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 06:15:03 pm
content: And for the sake of completion, the heater.

author: quantumvolt
author_rank: Frequent Contributor
timestamp: July 24, 2013, 06:51:37 pm
content: 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.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 06:57:39 pm
content: 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.

author: c4757p
author_rank: Super Contributor
timestamp: July 24, 2013, 07:10:46 pm
content: Quote from: quantumvolt on July 24, 2013, 06:51:37 pmAll I can think of:

author: Andreas
author_rank: Super Contributor
timestamp: July 25, 2013, 05:48:38 am
content: 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

author: c4757p
author_rank: Super Contributor
timestamp: July 25, 2013, 01:38:42 pm
content: 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.

author: C
author_rank: Super Contributor
timestamp: July 25, 2013, 05:14:33 pm
content: c4757plook 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

author: c4757p
author_rank: Super Contributor
timestamp: July 25, 2013, 05:45:30 pm
content: Quote from: C on July 25, 2013, 05:14:33 pmI 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.

author: justinjja
author_rank: Regular Contributor
timestamp: July 25, 2013, 06:24:47 pm
content: 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.

author: c4757p
author_rank: Super Contributor
timestamp: July 25, 2013, 06:29:29 pm
content: 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.

author: C
author_rank: Super Contributor
timestamp: July 25, 2013, 08:21:54 pm
content: we may be saying the same thing different waysYou want 55csmall range around this to ADC = better readingssmall range around this for DAC = better controlForget 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 % errorUse 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

author: c4757p
author_rank: Super Contributor
timestamp: July 25, 2013, 08:27:59 pm
content: 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 ofbeingthe 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*Arduinowith 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.

author: C
author_rank: Super Contributor
timestamp: July 25, 2013, 10:14:52 pm
content: 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 #2The 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 helpYou 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?editYes I did Had #2 above wrongC

author: c4757p
author_rank: Super Contributor
timestamp: July 25, 2013, 10:55:39 pm
content: Ah....MCU pin. I was imagining a reference designator...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!Quote from: C on July 25, 2013, 10:14:52 pmSo, 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)

author: C
author_rank: Super Contributor
timestamp: July 26, 2013, 12:28:56 am
content: Old heater used a PWM dac to control voltage to heater very fast. so that PWM count = ___ voltage = __ heatyou might say Full range fixed outputIf 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 capOne 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

author: c4757p
author_rank: Super Contributor
timestamp: July 26, 2013, 12:41:07 am
content: Quote from: C on July 26, 2013, 12:28:56 amSo basically increase the filter time constant?QuoteThat 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.

author: C
author_rank: Super Contributor
timestamp: July 26, 2013, 01:30:56 am
content: QuoteYes , what you might think of as supper extremeQuoteQuoteThe 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 55cUse 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 onC

author: c4757p
author_rank: Super Contributor
timestamp: July 26, 2013, 01:32:22 am
content: I'm sure it can work, I just don't really see the point of it.

author: C
author_rank: Super Contributor
timestamp: July 26, 2013, 01:51:42 am
content: 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 microC

author: c4757p
author_rank: Super Contributor
timestamp: July 30, 2013, 11:07:33 pm
content: The heater control works brilliantly!It takes forever and a half to heat up (OK, 12 minutes), 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?