Author Topic: Analog mux that allows inputs > Vdd?  (Read 6436 times)

0 Members and 1 Guest are viewing this topic.

Offline mwilsonTopic starter

  • Contributor
  • Posts: 42
  • Country: us
Analog mux that allows inputs > Vdd?
« on: July 30, 2013, 09:14:39 pm »
Hello,

I need to build a circuit to monitor a voltage, and it needs to have an auto-ranging feature like multimeters have. I'm feeding a DC 0-30V sense voltage into an ADC with a 2.048V reference, and want good resolution when I'm measuring lower voltages. The circuit itself is powered with 3.3V.

My initial thought was to use a digital pot1, but I've looked at several datasheets and none of them allow the input to be higher than Vdd (which in my case up to 30V is clearly higher than 3.3V). So then I thought I can just string together some resistors in series [or more likely use an off-the-shelf resistor network], have taps between each resistor, and use an analog mux to select which tap I want to pass to the ADC. But no, looking at a few different analog mux datasheets, they also appear to have the restriction that the inputs are constrained to Vdd.

So... how do multimeters do it? I get that they use a resistor ladder with multiple taps, but what are they using to select the tap that goes to the ADC? Am I reading the datasheets too strictly? Do you just need to make sure the selected input that you're asking it to pass through is less than the supply voltage, but can allow higher voltages on the unselected inputs?

Or is there a completely different approach I should be using?

Thanks!

1 I'm just building a couple of these things so a couple bucks each for the digital pot isn't a problem even thought it gives many more taps than I need, and I like that it doesn't take any more pins on my micro since I'm already using an I2C bus.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Analog mux that allows inputs > Vdd?
« Reply #1 on: July 30, 2013, 09:56:58 pm »
It's not possible to exceed the supply voltage rails in either a multiplexer or a digital potentiometer: look at the internal structure.

I don't know how the DVMs do it. My guess is they don't worry about exceeding the supply voltage. The analogue switches could easily be protected against the signal exceeding either supply rail.
 

alm

  • Guest
Re: Analog mux that allows inputs > Vdd?
« Reply #2 on: July 30, 2013, 10:07:33 pm »
Am I reading the datasheets too strictly? Do you just need to make sure the selected input that you're asking it to pass through is less than the supply voltage, but can allow higher voltages on the unselected inputs?
No, there are going to be diodes from the input pins to Vcc. Exceeding Vcc by more than one diode drop (~0.6 V) will forward bias these diodes. The best case is that they start conducting and load the input. The worst case is that they blow up. Assuming there are protection diodes, a large value series resistor will limit the current through this diode to safe levels. Otherwise you need to provide clamping diodes yourself. If one of the analog switches is closed to provide the correct division ratio, than the clamping diodes should not be conducting, since the voltage will be below Vcc.

So... how do multimeters do it? I get that they use a resistor ladder with multiple taps, but what are they using to select the tap that goes to the ADC?
One technique is to have a high value resistor (eg. 9 Mohm) on connected to the positive input terminal (assuming it shares ground with the measurement circuit), connect this to one side of all analog switches, and then connect the other side to various resistors. The 9Mohm resistor would limit currents to safe values at all reasonable input voltages. The resistor at the other end of the analog switch would be chosen to get the correct division ratio (eg. 1 Mohm for 1/10x, 9 Mohm for 1 x, 90 Mohm for 10x). You can look at for example the Fluke 87 service manual to get an idea of what they did. You might be able to do the same with a digital pot (I've never bothered with these) plus clamping diodes.

Note that you could go much lower than 9Mohm if input impedance is not an issue, especially for 30 V inputs. Just make sure the current through the (internal or external) clamping diodes does not exceed the maximum current of those devices.

Or is there a completely different approach I should be using?
If costs and size is no object, there's always relays. That's what many bench meters use for at least some of the ranges, since they provide excellent isolation and can easily switch voltages much higher than the voltage across the coil. Another technique is dividing the input down so even the highest range is below Vcc, and amplifying the signal between mux and ADC.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Analog mux that allows inputs > Vdd?
« Reply #3 on: July 30, 2013, 10:10:10 pm »
Buffer them with different gains in a way that guarantees the buffered voltages are always within the supply rails, then select one. See attached. There's no need to go about it like a DMM here, 30V is nothing.

Switching in divider resistors with analog switches will be hard to get right. You need to use high resistances to make sure the error caused by the highly variable internal resistance of the switch is not significant. In that case, you're going to have to watch out for leakage getting in the way of making good measurements - the off-state leakage of the switch must be very low. I wouldn't really bother.
« Last Edit: July 30, 2013, 10:13:36 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline mwilsonTopic starter

  • Contributor
  • Posts: 42
  • Country: us
Re: Analog mux that allows inputs > Vdd?
« Reply #4 on: July 30, 2013, 10:30:17 pm »
Buffer them with different gains in a way that guarantees the buffered voltages are always within the supply rails, then select one.

Ah. That makes sense... I hadn't considered that op amps may allow input voltages higher than their supply voltages. The clipping behavior of their output definitely gives me what I need in terms of protecting the ADC inputs. Looking at the LM324 data sheet it looks like absolute max rating for the voltage inputs is 32V regardless of the supply voltage. Perfect! Thank you.

Alm, thanks for your suggestions as well. I did start toying with the idea of clamping diodes for the different taps; your explanation helps me see how that would work overall.
 

Offline David_AVD

  • Super Contributor
  • ***
  • Posts: 2806
  • Country: au
Re: Analog mux that allows inputs > Vdd?
« Reply #5 on: July 30, 2013, 10:32:33 pm »
It's not possible to exceed the supply voltage rails in either a multiplexer or a digital potentiometer: look at the internal structure.

Normally true, but look at this part from Maxim.  Was in a newsletter from them just the other day.  Looks interesting.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Analog mux that allows inputs > Vdd?
« Reply #6 on: July 30, 2013, 10:49:05 pm »
Ah. That makes sense... I hadn't considered that op amps may allow input voltages higher than their supply voltages.

They don't.... usually. LM324 actually does, up to 32V. But this circuit doesn't depend on that - notice that neither op amp will ever see a voltage above 5.6V, the diodes make sure of that. This divides the signal down, then amplifies it back up, and the extra voltage is lost in the division.

(Considering that LM324 is perfectly happy with inputs up to 32V no matter what the supply is, if you can absolutely guarantee that the "0-30V" signal will not exceed 30V, you can eliminate the diodes.)

I had actually meant to use LMV324, which is quite a different part (no idea why they insisted on using that part number), but my SPICE model simulated so slowly that it took a minute to do that stepped operating point analysis!! I just wanted a quick plot for a screengrab, so I threw in LM324, which should also work. LMV324 has a wider output range, so if you were to up your voltage reference to 4.096V, the circuit would still work and you could scale the signal up by changing the resistors.
« Last Edit: July 30, 2013, 11:08:01 pm by c4757p »
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline mwilsonTopic starter

  • Contributor
  • Posts: 42
  • Country: us
Re: Analog mux that allows inputs > Vdd?
« Reply #7 on: July 31, 2013, 05:47:01 am »
notice that neither op amp will ever see a voltage above 5.6V, the diodes make sure of that

Okay, I think I see everything that's going on now. And yeah, LM324 wouldn't work because it can't go down to the negative (ground) supply rail, but the LMV324 makes sense as a rail-to-rail part.

I've got this drawn up in LTspice now (you're right--the actual LMV324 model takes forever to simulate!) so I can make sure I really understand what's happening under a lot of different conditions, but it definitely looks like the approach I'm looking for. Thanks again!
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Analog mux that allows inputs > Vdd?
« Reply #8 on: July 31, 2013, 05:54:33 am »
LM324 does go quite near ground as long as you don't draw much current. It can't reach its positive rail, but a 2.048V signal should fit nicely under a 5V rail. Though I do rather like the LMV324/LMV358 for 5V applications.

Be careful about the whole "rail to rail" thing, no op amp can be truly rail-to-rail unless it contains a battery to help out the transistors.... Even if it has fully saturating MOSFETs in the output section, you're still subject to RDS(on). The datasheets should have output swing data, but they don't always bother to plot it over the full operating voltage range. LMV324's datasheet says the output swing under a 5V power supply will typically range from 0.06V to 4.99V.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline mwilsonTopic starter

  • Contributor
  • Posts: 42
  • Country: us
Re: Analog mux that allows inputs > Vdd?
« Reply #9 on: July 31, 2013, 06:18:57 am »
LM324 does go quite near ground as long as you don't draw much current. It can't reach its positive rail, but a 2.048V signal should fit nicely under a 5V rail. Though I do rather like the LMV324/LMV358 for 5V applications.

Be careful about the whole "rail to rail" thing, no op amp can be truly rail-to-rail unless it contains a battery to help out the transistors.... Even if it has fully saturating MOSFETs in the output section, you're still subject to RDS(on). The datasheets should have output swing data, but they don't always bother to plot it over the full operating voltage range. LMV324's datasheet says the output swing under a 5V power supply will typically range from 0.06V to 4.99V.

Gotcha. That should work, after I talked about rail-to-rail being important I realized that for my application it's unlikely that my Vsense will actually go all the way to ground, but it's nice to have the option of going pretty low. And yeah, if I run at 5V my 2.048V maximum signal fits nicely.

It's probably already obvious, but I'm a total newbie to the analog side of things... I understand the basics of how op amps are supposed to work (i.e. the ideal op amp) but haven't really gotten into the nuance (or built up experience with) of how different particular ones really do perform.
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 8517
  • Country: us
    • SiliconValleyGarage
Re: Analog mux that allows inputs > Vdd?
« Reply #10 on: July 31, 2013, 06:25:27 am »
Ahh. That is why multimeters use jfets for switching. Look at schematics of older multimeters like the keithleys 19x series and you will see a bunch of jfets coming from the divider taps.
Now, you can't do that in regular ic processes! As you have a parasitic diode between the well and the substrate. They use processes on depleted silicon or on isolator. So its either discrete jfets ( so they have no parasite, nor a link between them in the form of the common substrate ) or special ic processes.

The special ic process is used in , for example, the 34401. There is an hp made asic that only holds the jfets and the divider pathway. Nothing else.
Fluke does the same.

In a multimeter there is typically a high impedant resistor as first entry point. If a multimeter has 10 meg input impedance they use a 9 meg resistor. The remaining divider is 1 ladder with a total of 1 meg. The point to ground has its own jfet... So they can float the entire ladder for the lowest range (giving no division at all , simply a 9 meg series resistance).  The jfets have no protection diode at the ladder side. The protection sits after the jfet. So, even if you are on most sensitive range and you inject 1000 volt ... You still have less than a 0,1 milliampere if the ladder were shorted. Open the ladder at the bottom and there is still no harm done. The jfet does need to be able to hold a high voltage when in off state !

That maxim IC is cheating.. It uses an internal boostpump to create a very high positive and negative voltage internally (switchcap booster) . So essentially, as long as you signals fall within the range of the booster it is ok. Same thing they do with a max232 :create the missing voltsges.

That is not how the multimeters do it.
« Last Edit: July 31, 2013, 06:44:23 am by free_electron »
Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline poorchava

  • Super Contributor
  • ***
  • Posts: 1672
  • Country: pl
  • Troll Cave Electronics!
Re: Analog mux that allows inputs > Vdd?
« Reply #11 on: July 31, 2013, 07:30:23 am »
Maybe not the best way, but you could use optocouplers (SSR for example)
I love the smell of FR4 in the morning!
 

Offline ElectroIrradiator

  • Frequent Contributor
  • **
  • Posts: 614
  • Country: dk
  • More analog than digital.
Re: Analog mux that allows inputs > Vdd?
« Reply #12 on: July 31, 2013, 08:17:12 am »
Isn't the LM[V]324 notorious for its potentially very low input impedance, only guaranteed to be above 30K or so? I couldn't immediately find it in the datasheet, but I believe this is the case.

If this is so, then it might be worth using a more modern JFET input R2R opamp, like a TLC272 or better, in c4757p's schematic. Otherwise you might have to calibrate the voltage divider for each widget.

There also appear to be a kink in the HIGH_SENSITIVITY curve in the simulation, at about 2.1V output, though that may not mean anything.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19520
  • Country: gb
  • 0999
Re: Analog mux that allows inputs > Vdd?
« Reply #13 on: July 31, 2013, 01:24:49 pm »
It's not possible to exceed the supply voltage rails in either a multiplexer or a digital potentiometer: look at the internal structure.

Normally true, but look at this part from Maxim.  Was in a newsletter from them just the other day.  Looks interesting.
Interesting. It uses a charge pump to create a higher bias voltage in order to allow the transistors to control higher voltages.
 

Offline c4757p

  • Super Contributor
  • ***
  • Posts: 7799
  • Country: us
  • adieu
Re: Analog mux that allows inputs > Vdd?
« Reply #14 on: July 31, 2013, 01:45:05 pm »
TI lists 15nA typical, 250nA max bias current. So sure as hell not a.FET-input amp, but still much better than 30k! ON Semi actually claims sub-nA, so highly manufacturer dependent.

I saw that kink as well, but 1) it looks like a plot rounding error, it goes away if you zoom in, and 2) it's above the ADC input range anyway.
No longer active here - try the IRC channel if you just can't be without me :)
 

Offline Jon Chandler

  • Frequent Contributor
  • **
  • Posts: 539
    • Throw Away PIC
Re: Analog mux that allows inputs > Vdd?
« Reply #15 on: July 31, 2013, 02:31:47 pm »
Look at the TI TMP512.  It's a power monitor chip.  It measures to a max of 26 volts as I recall, but I believe Microcchip makes a similar part that goes higher.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf