# How do I use a Zener diode (LM4040) shunt voltage reference?

I would like to place a voltage reference for my MCU ADC. This is my first time using voltage references. I have chosen is the LM4040. It is relatively cheap and pretty good. I am getting the 3V 0.2% tolerance 100PPM variant.

Which supply should I power this from? The power tree for my circuit looks kind of like this:

5V -> 3.3V -> MCU

I have a 5V source or a 3.3V source to choose from.

I have always thought that voltage references are like LDOs with very low noise and stable output. Although I kind of understand that a very precise shunt diode will work too, I am unfamiliar with the resistor. According to the datasheet the formula is:

If I use the 5V as input with a 3V output, I would need a 2k resistor. Am I correct? Do I need to place a capacitor in parallel with this Vref?

• Your math is right. A capacitor on an ADC input is pretty much always a good thing. Doesn't have to be huge, maybe 0.1uF. A key here for low noise is to make sure the 3 "ground" points are all the same node--- i.e. don't reference the LM4040 and that cap to any old GND pin on your micro - Make sure it's the same GND pin the ADC references (probably called "AGND" or something similar). Any decently written datasheet will tell you which pin. FUrther, make sure that ground node has NO CURRENT FROM ANY OTHER SOURCE passing through it. Jun 30, 2021 at 17:15
• I would go "GND PLN -> ADC AGND -> CAP ->VREF" That ensures no current, except that which is involved with this subcircuit, will flow in that node. Jun 30, 2021 at 17:31
• The LM4040 doesn't care where the current comes from... It only cares that it has 1mA flowing through it. I would probably be inclined to use the 5V rail because the 3.3 rail is a "digital" voltage and "probably" has a lot of digital hash (noise) on it. Is there an analog voltage input pin on the ADC, such as "AVCC" (akin to AGND). If so, I would use that same node for sure, and wire it same as described above. Novice's think there's something magical about GND --- But in reality, the same things that apply to GND also apply to power rails. They both matter equally. Jun 30, 2021 at 17:39
• What you do in that case is connect AVDD and DVDD at the output of the LDO and nowhere else. Similar with AGND/DGND. If you use this 'star' type of power scheme, you control where all currents flow. The idea is to make the 'analog' currents not share any traces with 'digital' currents. An additional 10-100uF capacitor from AGND-AVDD is a good idea also, somewhere near the CPU. Jun 30, 2021 at 17:57
• @KyleB Thank you very much i really understood quickly when you explained the concepts. I will be applying everything you said. Jun 30, 2021 at 18:37

First question, which supply should I get this from?

Get it from the least noisy supply, but also realize that the 5V supply will dissipate more power through the resistor, but 1mA isn't going to be a lot of power to deal with for most designs.

I get these values for the resistor (5V-3V)/1mA = 2kΩ and (3.3V-3V)/1mA = 300Ω

Also check the reference pin for the ADC and make sure it doesn't require a lot of current (I would say less than 10uA) and don't put loads on the reference that are in the mA range or it will drag the voltage down.

You also don't need a capacitor on the Vref unless the ADC has varying input current (this might be hard to find in the datasheet). If the load on the reference varies, then you may want a cap to help with filtering. It may be beneficial to also have a cap at the input of the current limiting resistor if you have an especially noisy supply (vcc) voltage.