Voltage Reference, precise, but cheap... - Page 1
Forum section: electronics / projects

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 27, 2024, 05:56:07 pm
content: I'm looking for ideas for a voltage reference, that is both accurate, affordable and readily available. These factors bite each other, so how do you get them in the same room?My current thought is to use the good old TL431 (KA431, TLV431 etc) and then ovenize it. To keep BOM cost low, the oven will be just a BJT + power resistor, and the rest is done by the microcontroller, temperate sensor is going to be the BE junction of the transistor.Is this a reasonably good approach, or are there better alternatives for a 50ct BOM cost for the reference?Some of the xx431 variants claim some 200uV of stability in the 50 to 70 degree Celcius temperature range, and I'm aiming for about 100uV overall stability for the reference. (Not accuracy, that's another topic).I don't know much about long term drift. (But there is a topic for this in the Metrology section I believe).Some more background:I've already got some power supplies, but affordable power supplies don't have accurate meters, which is quite a shame. Buying a power supply is no fun either, designing & building one yourself is much more fun. There are some very cheap power supplies (I.e. the EUR5 Hiland kit 30V 2mA-3A) and there are a few open sourced SMU like power supplies (but those are quite complex and have a high BOM cost).One of my long term goals is to design and build a programmable power supply, I want to put a high emphasis on low BOM cost, and therefore integrate as much as feasible in a single microcontroller. It would be fabulous If I could sell these in kit form. It's doubtful that would ever happen, but a man neads a dream, and keeping BOM cost low is a prerequisite for a kit. I'm aiming for a total BOM cost (PCB and all parts on it, but exclusive the raw power supply) for around EUR10.The heart will be an STM32 (I need a project to get started with those) with filtered PWM as output to the power section, and it's own ADC for voltage and current read back (Datasheet of STM32G030 claims 16 bit resolution with hardware oversampling, which I find hard to believe, but I'm curious enough to write the software).For the power, I'm aiming at 0 to 20V and a maximum of somewhere between 200mA to 500mA output current. In a later stadium I may be aiming for a higher powered version, possibly with a SMPS pre-regulator.This thread isNOTfor the whole project. I've already seen, collected and studied 100+ different power supply designs. This thread is only for how to get the most stable 5V reference for a < 50ct BOM cost.

author: PGPG
author_rank: Frequent Contributor
timestamp: August 27, 2024, 06:55:38 pm
content: Quote from: Doctorandus_P on August 27, 2024, 05:56:07 pmUse microcontroller with buildin ADC and voltage reference.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: August 27, 2024, 08:20:02 pm
content: Quote from: Doctorandus_P on August 27, 2024, 05:56:07 pmYou can't. If this is a kit you are best to target a couple of choices, and give users control of simplicity.Quote from: Doctorandus_P on August 27, 2024, 05:56:07 pmSounds complicated and Hail Mary. The variations between units would be a wild card.If you want 100uV on 2v5 ref, over 20'C you are already down into low digit ppm.

author: iMo
author_rank: Super Contributor
timestamp: August 27, 2024, 08:28:49 pm
content: Quote from: Doctorandus_P on August 27, 2024, 05:56:07 pmThe cheapest 5V Vreg I am aware of which will fit your spec is for example an LT1021-5 (1-4ppm/K, needs at least 9V Vcc) in dil epoxy package purchased off ali/ebay (around 1Euro/pc. some time back). No need to ovenize it for your app.All others are more expensive, afaik.Here is my first findhttps://www.ebay.com/itm/391345708954

author: tszaboo
author_rank: Super Contributor
timestamp: August 27, 2024, 08:33:50 pm
content: I admire the dedication, and please do it so we can learn from it.Or buy an LM4040 for ~30 cents.

author: thm_w
author_rank: Super Contributor
timestamp: August 27, 2024, 10:09:33 pm
content: I don't think you want a 5V reference, for STM32G0 ADC you'd want 2.5 or 3 or 3.3V.If you want cheap, oversample away. If you want 16-bit accuracy, get an external ADC.I would buy whatever gets you off the ground LM4040B suggested is probably a good one, build in the oven circuitry, get the thing up and running, then start working on tweaking BOM cost. And see if you are even able to measure the accuracy requirements.https://www.eevblog.com/forum/metrology/is-tl431-good-for-reference-in-19-999-counts-voltmeter-any-variants/msg1821833/#msg1821833https://www.eevblog.com/forum/projects/low-cost-voltage-reference-experiment/

author: The Soulman
author_rank: Super Contributor
timestamp: August 27, 2024, 10:13:26 pm
content: The STM32G030 requires a 3V V-ref not 5V.I'd use the best V-ref that would fit the bom, I think within the budget you can only have reasonable stability and each finished product would need individual adjustment. (User calibration)

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 27, 2024, 10:42:07 pm
content: Quote from: PCB.Wiz on August 27, 2024, 08:20:02 pmYes, exactly, that is the problem!Because of that the built in reference of the uC as PGPG suggests is not good enough.But it's not hopeless. 1ppm of 5V is 5uV, so 100uV is 20ppm, and if that is combined with a reference that is stable in a decent temperature range and stabilized temperature, then it's achievable. A lot of datasheets I've looked at have tempco's that are relatively flat in a decent temperature range.Quote from: PCB.Wiz on August 27, 2024, 08:20:02 pmFor my budget, compromises have to be made. One time calibration (after burn in) has already been accepted as unavoidable. User calibration is also not a problem for a kit. I recently bought a BM869s, and that is very likely the most accurate DMM I'll ever buy. My goal is to get near the specs of this DMM. People who build the kit can then calibrate it to their own DMM or best reference they have.Quote from: iMo on August 27, 2024, 08:28:49 pmAli / Ebay is fun for DIY tinkering, but not for kits. Digikey prices are between USD5 and USD17 that's above budget.Quote from: tszaboo on August 27, 2024, 08:33:50 pmYes, you probably are right. I had already been looking at the LM4040, it's one of the most common voltage references. Tempco varies wildly depending on brand and sub model. If you search digikey for LM4040 with 5V output, you still have 134 different chips to choose between. But looking at specs, most seem to benefit from an oven. Some have an almost flat section in the tempco between 50 celcius and 80 celcius, and that is a pretty ideal temperature for an oven. Some variants of the xx431 have a similar flat section in that temperature range, and that's what made me look closer at the xx431 in the first place.Quote from: thm_w on August 27, 2024, 10:09:33 pmYes I do want 5V. Goal is to use use the PWM of the uC, and buffer it first with HCT TTL. (which is powered from the reference). This needs 50% less amplification after the averaging. 3V3 for the uC is also not clean enough. Also thanx for the links. Those are the ones I had vague memories off. I've archived them and read them again soon.And there we get to another big problem. Opamps with both high input impedance and low offset also get expensive quickly.A few years ago I've been looking at the "Scullcom" series. Sort of metrology equipment, but an expensive BOM list and minimal effort arduino software. My goal is to turn it around. Low BOM cost and attempting software (+ hardware) compensation in a sensible mix.Also, don't hold your breath. I'd be happy if this project is in a working condition two or three years from now.

author: magic
author_rank: Super Contributor
timestamp: August 28, 2024, 05:39:35 am
content: Quote from: PGPG on August 27, 2024, 06:55:38 pm... and ovenize it

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 28, 2024, 08:19:54 am
content: Quote from: magic on August 28, 2024, 05:39:35 amYes, that has also crossed my mind.Before I finish this project, I also have a side project in between for a temperature controlling gadget. I'm thinking of using a BJT in TO220. Both as a heater element and as a temperature sensor. Controlled by a uC of course. Goal is to slap it onto some other object to be able to heat it to a specified temperature. Once I have this, I'm a step closer to automated temperature cycling and testing.

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 28, 2024, 08:38:58 am
content: If you just build for yourself and not for series development, then you easily can record and calculate a temperature compensation table for the microcontroller.

author: tszaboo
author_rank: Super Contributor
timestamp: August 28, 2024, 08:53:09 am
content: Quote from: Doctorandus_P on August 27, 2024, 10:42:07 pmAs I said, do it, and please document it.I think you will have a of of 1/f noise which is caused by the oven cycling or PWM noise. But maybe not.IMHO not everything needs software, and I actually prefer doing projects that need as little or zero software. But I also get the appeal of it.

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 28, 2024, 11:59:39 am
content: Quote from: Doctorandus_P on August 27, 2024, 10:42:07 pmI'm not sure what your target here is but if you're willing to do manual calibration then most low cost [MOS]FET opamps are still usable here. Their drift is still in low uV/C range even if they have tens of mV offset.

author: youngda9
author_rank: Regular Contributor
timestamp: August 28, 2024, 01:13:17 pm
content: Quote from: tszaboo on August 27, 2024, 08:33:50 pm/thread

author: PGPG
author_rank: Frequent Contributor
timestamp: August 28, 2024, 04:32:11 pm
content: Quote from: Doctorandus_P on August 28, 2024, 08:19:54 amIn 1981 being a student I was building a chrono comparator (device to check electronic watch accuracy based on 32768Hz signal radio-detected from it). One man ordered it from me. It was my first serious money earned on electronic. I got for it about two my fathers month salary. I needed precision frequency source. I have ovenized the quartz TTL generator. I wrapped the 1MHz quartz (in old case 2x bigger in each dimension than HC49) with aluminum sheet and used BD136 as a heater and thermistor equipped with a screw as detector. LM741 was driving the heater. I have put it all (together with TTL 7400 generator) in a made of styrofoam box. It was not small but without it I would probably get around 2s/day accuracy and with it I got about 0.1s/day.Microcontroller is probably smaller than my quartz alone.I don't think you need so accuracy when designing power supply. All devices should tolerate at least 10% supply voltage deviations so having supply with 2% accuracy is enough good, I think.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 28, 2024, 04:48:42 pm
content: You could potentially use a PTC thermistor as your heating element, as demonstrated in this poor man's crystal oven:https://youtu.be/KxVJfxiw4ZQ?t=313

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 28, 2024, 11:04:03 pm
content: Quote from: Andy Chee on August 28, 2024, 04:48:42 pmDo you realize that those PTC's with eyelets cost around EUR 5 to EUR7? That eats up more then half the BOM cost for my project. For temperature stability, I'm aiming for a delta of 2 to 4 degrees celcius, and a the same PN junction as the heater transistor is good enough for that.I'm not aiming for the best I can design / build. I'm aiming for the best I can do at a very low BOM cost.Quote from: PGPG on August 28, 2024, 04:32:11 pmFor a generic power supply, sure, but I already have those. I am aiming for a SMU.Quote from: youngda9 on August 28, 2024, 01:13:17 pmYou are probably right. Between the LM4040 and TL431 there is enough room for experimentation. I will probably add some fixed voltage regulators too when doing temperature stability & drift tests.That means the side projects for this now already are:* SCPI interface for my BM869S (I'm not buying that EUR80 PC interface). *1).* Some kind of relay input multiplexer / scanner card.* TO220 sized "hot plate" for bringing test subjects to specific temperatures.After I've added the micro SMU, I can do some semiconductor testing and characterization for bigger projects.It's a bunch of projects, but most are pretty simple, and combined you can do fun things with them.*1).I know there is already a thread forA program that can read data from many multimeters, and I also want to turn that around. BM869s needs some tinkering to interface it with a PC anyway, so making it SCPI compatible makes it easy to integrate it (or any other DMM after conversion) to integrate with standard (logging) software. With a small Linux SBC you can build a compact test instrument for long term drif testing, log in every now and then to see how it's doing. A scripting interface is much more useful for this then complicated logging software with a fancy GUI and graphing functions.

author: Andy Chee
author_rank: Super Contributor
timestamp: August 28, 2024, 11:48:43 pm
content: Quote from: Doctorandus_P on August 28, 2024, 11:04:03 pmThen you're shopping at the wrong electronics parts supplier. Digikey lists them for USD$1.87 in single units.

author: Alex Nikitin
author_rank: Super Contributor
timestamp: August 29, 2024, 12:08:25 am
content: You can have either precise or cheap, not both at the same time. One of the options is a reference with an internal temperature sensor, something like REF50 series from TI, for 2.5V it would be the REF5025. It is over your budget but should be good enough even without temperature compensation, and if you need it, you can monitor the temperature directly from the chip. It also should be stable enough in time, which might be a serious problem with likes of LM4040 and TL431.CheersAlex

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 29, 2024, 12:17:56 am
content: I'm not entirely sure how useful that thermistor (or the proposed BJT) heater arrangement actually will be if you (I think) intent to use the heating element as thermal sensor, and DUT to be exchangeable.It is usable if DUT is fixed since you can calibrate/compensate for DUT thermal resistance and thermal losses, but will be much less useful if DUT is variable since your sensor then will be thermally too far away from the actual DUT

author: PCB.Wiz
author_rank: Super Contributor
timestamp: August 29, 2024, 04:40:36 am
content: Quote from: Doctorandus_P on August 27, 2024, 05:56:07 pmSince you are keen to ovenize this, and external thermal coupling will be a pain, another idea would be to use a Dual LDO - one part of the same die acts as the heater.lcsc show many AnaSemi Dual LDOs in the VRDxxyy series that may be suitable, in either SOT26 or DFN6https://www.lcsc.com/products/Voltage-Regulators-Linear-Low-Drop-Out-LDO-Regulators_387.html?brand=12324These claim 20ppm typical tempco, and flat temperature curves, and the IQ graphs show some temperature slope ~ +5uA for 50'C change. A calibrate would be needed for uA -> 'C set point.An external tiny opamp and load would set the calibrated temperature.

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 29, 2024, 05:04:39 am
content: A more common idea is to use dual zener and use the second zener as temperature sensor.The problem here is to figure out if the zeners are actually monolithic with good thermal coupling, or two die with common bond wire.

author: PCB.Wiz
author_rank: Super Contributor
timestamp: August 29, 2024, 09:39:58 pm
content: Quote from: ArdWar on August 29, 2024, 05:04:39 amZeners is a whole new rabbit hole to go down... more calibration steps and worse initial accuracy.More advanced is to use a series combination of Diode + Zener and adjust the bias current for temperature null.The curves on this part show how that works - tempco nulls at a specific current (which will vary from part to part)https://fscdn.rohm.com/en/products/databook/datasheet/discrete/diode/zener/rsb6.8smfh.pdfOr, you can go for the trifecta, and include heater + sense + compensation in one package.That needs a triple Zener, like BZX84C6V2TS or BZX84C6V2TW (sub 10c). The centre Zener can be the heater and the outside two diodes compensate and sense.A full setup would need a dual opamp and DAC to give Temperature regulate and current operating point set after calibrate.Addit : I see lcsc have REF30xx series parts at 0.2% and typ 20ppm/'C,and with good long term drift and hysteresisfor ~20c/150, so the OP may be better to apply KISS

author: thm_w
author_rank: Super Contributor
timestamp: August 29, 2024, 10:54:22 pm
content: 17c/ea and if you burn them in for 1,000h it drops to 15ppm, nice.https://www.lcsc.com/product-detail/Voltage-Reference_Texas-Instruments-REF3033AIDBZR_C36658.html

author: julian1
author_rank: Frequent Contributor
timestamp: August 29, 2024, 11:11:39 pm
content: Quote from: PCB.Wiz on August 29, 2024, 09:39:58 pmIt's interesting that triples in the same package exist. Have these ever been tested for noise?

author: ArdWar
author_rank: Frequent Contributor
timestamp: August 29, 2024, 11:58:53 pm
content: Quote from: PCB.Wiz on August 29, 2024, 09:39:58 pmYeah, but the main idea here is to use on-die temperature sensing if you want to ovenize, using external temperature sensor (like one implied previously) is mostly counterproductive unless you do heavy insulation so the whole DUT-heater-sensor system is thermally homogenous.To KISS I agree that REF30 or LM4040 should suffice, and maybe get rid of the ovenizing things. Maybe also do burn-in and binning to weed out outliers.Quote from: thm_w on August 29, 2024, 10:54:22 pmI'm not actually sure if I can understand what's going on with those three long term charts.The data almost imply those three are from different set of devices, that there are no actual discernible improvement over time, and drifts are actually pretty much constant if you ignore few outlier devices.

author: iMo
author_rank: Super Contributor
timestamp: August 30, 2024, 08:05:25 am
content: Btw. - when you are chasing the 100uV Vref stability (your goal) you are well aware that ie. 1m long lab copper leads (with TC=4000ppm/K) will drop down your output voltage at the load by up to say 7500uV when changing your output current from 0mA to 500mA (your goal). So unless you will use kelvin sensing (4 wires to the load) your ovenized stable reference will not help you much. Or otherwise, a 10mV voltage resolution with those cheapo PSU kits seems to me OK..

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 30, 2024, 01:45:47 pm
content: Ppm numbers of temperature coefficients do not mean much to me. For a comparison, I made an overview of the graphs of a bunch of voltage references and added some regular voltage regulators too just for comparison.REF3040 seems a good choice for me. Quite stable, nice rounded temperature curve for the oven and an acceptable price, although at the top of my budget. I like it's a series regulator instead of a shunt, but I'm not even sure why. It's maximum input voltage is only 7V, so that needs some other kind of regulation too.Quote from: iMo on August 30, 2024, 08:05:25 amYes, I am aware of that, but do not agree. I am not aiming for both at the same time. When measuring an NPN transistor I could set base current in uA steps, or when setting a MOSfet gate voltage in mV steps there is no DC current at all.Adding sense wires is still a good Idea, although I tempt to be leaning more towards adding a separate device (project) for floating voltage measurement. Something like ADS1118 to get started. Later maybe LTC2400 after I have gained enough experience to be worthy of using that IC. SPI interface is easy to isolate with opto's so you relatively easily build a multi-channel voltage meter with all floating channels.And that other project also reminds me of another option. A nice 16bit ADC (or thereabouts) with a built in reference voltage which is also (buffered) accessible from the outside may also be a good option for me. But for the first product iteration I will stick with the built in ADC of an STM32. This will mean that the setpoint resolution will be higher then I can read back. That is also another incentive to not care much about sense wires, but close the loop with another higher resolution voltage measurement project.

author: thm_w
author_rank: Super Contributor
timestamp: August 31, 2024, 12:24:30 am
content: Quote from: ArdWar on August 29, 2024, 11:58:53 pmGood point, nothing explains why 1000-2000 is somehow drastically better than 0-1000, unless they did something in between the tests that wasn't mentioned.From their samples, there was a ~10% of getting a 50-60ppm unit. So, best would be to have a known reference, burn in a bunch and pick out the good ones, which is not that easy without a lot of high end gear."Long-term stability refers to the change of the output voltage of a reference over a period of months or years. This effect lessens as time progresses as is apparent by the long-term stability curves. The typical drift value for the REF30xx is 24 ppm from 0 hours to 1000 hours, and 15 ppm from 1000 hours to 2000 hours. This parameter is characterized by measuring 30 units at regular intervals for a period of 2000 hours."

author: Phil1977
author_rank: Frequent Contributor
timestamp: August 31, 2024, 06:44:08 am
content: Quote from: thm_w on August 31, 2024, 12:24:30 amI´m quite sure they´ve just re-aligned the reference values in the 1000-2000h diagram so that all the curves that differ by up to 50ppm of the first diagram start at zero again. Then it´s an absolute value so dips in the first diagram can get to peaks in the 1000-2000h diagram.That also complies with the 0-2000h diagram shown on the bottom.Back on topic: If you really want a precise supply for little money, then get an analogue power supply with 0-10V control inputs. Then build up a microcontroller with a precise voltage- and current-meter (hopefully containing a good reference), and a 24 bit DAC for control of the power supply.You will combine two control loops that way: The analogue one of the PS for the fast regulation, and the digital one of you controller for the slow but precise regulation. You can put the "sense" wires of the control circuit directly on your test circuit and have little chance of oscillations. You can also let the control circuit generate a "power good" indicator that lights up as soon as the measured value is in the specified range. This can be used to trigger measurements after a new value was set.

author: iMo
author_rank: Super Contributor
timestamp: August 31, 2024, 08:01:45 am
content: Quote from: Doctorandus_P on August 30, 2024, 01:45:47 pmOK, when the PSU's output current will be less than 3.3mA (with 15milliOhm leads resistance) the 100uV voltage reference stability will be indeed required for having the load voltage read at the PSU's voltmeter meaningful..

author: Conrad Hoffman
author_rank: Super Contributor
timestamp: August 31, 2024, 04:25:09 pm
content: For really cheap, I'd ask two questions. 1) What parts can I buy dirt cheap? 2) How can I make a voltage reference out of them? The quick answer is resistors and generic transistors. I'd try making a discrete bandgap voltage reference, which is pretty simple. Then, if it isn't good enough, work on the thermals by bonding the parts together, putting it in Styrofoam and even wrapping a primitive oven around it.

author: Doctorandus_P
author_rank: Super Contributor
timestamp: August 31, 2024, 10:18:33 pm
content: Quote from: Conrad Hoffman on August 31, 2024, 04:25:09 pmIt's not my goal to make it as cheap as possible. If I only wanted cheap, I'd buy a chinese kit. My goal is to make it the best I can but while keeping a keen eye on a small budget for the BOM.

author: GigaJoe
author_rank: Frequent Contributor
timestamp: August 31, 2024, 10:30:38 pm
content: Diodes Inc have TL431 around 3ct , tempco 15 ppm, and my batch was around 10-14ppm. with output 2.5V, the settle time about 6 month . in this period deviation can be up to 6mV.