Author Topic: Switchable Voltage Divider  (Read 15394 times)

0 Members and 1 Guest are viewing this topic.

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Switchable Voltage Divider
« on: February 08, 2015, 06:14:13 pm »
For my next project, I want to measure voltages up to ~60V with a 12bit ADC, but to get reasonable resolution also for lower voltage values, I'd like to implement some kind of switchable voltage divider.
The µC I'm gonna use has built in voltage comparators with hysteresis and all, so the main challenge is to actually find a proper way to switch the divider.
The following two ways seem to be most promising:
1) Use separate ADC-channels in parallel, each with a specific voltage divider and switch on/off the patch from the divider to the ADC input.
2) Use multiple resistors in parallel in the lower side of the voltage divider and use switches to ground to activate one or more resistors.

Now for the 2nd approach I did some simulations with N-FET transistors (IRLML2502PBF) as lowside switches, but this doesn't seem feasible, as the leakage current of a few microampere influences the voltage divider too much for high resistance values.
And obviously I want to use resistors in the MOhm range to not influence the measurement too much.
I would suppose I could use analog switches, but I figure their resistance is temperature dependent.
The only other alternative that comes to mind would be (reed) relais, but they are rather expensive and slow. More or less the same is true for miniature solid state relays.

For the 1st approach, a P-FET could be used per range/channel. Problem is that at least for the low voltage ranges, even behind the voltage divider, the typical VDS of -20V for most small P-FETs is exceeded. There are -60V types, yet with higher RDSon. E.g. BSS83P: -60V, 2Ohm. With a divider in the MOhm range, I guess the 2Ohm should be ok.
Drawback is the use of multiple ADC inputs, but this is most probably not a problem.

[EDIT]
After some thinking about it, I found the p-FET approach isn't working out either. For low input voltages, VGS is too low to switch through, for high voltages it gets too high even for the 60V types...

This should be a common problem, but I didn't find really much information on standard solutions. I found only references to reed relays or analog switches, but without really talking about the drawbacks or naming an certain part. So any hint?
« Last Edit: February 08, 2015, 11:23:01 pm by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #1 on: February 09, 2015, 07:46:21 pm »
To continue my monologue, it seems that analog switches are still my best choice. Until I find something better, I tried a simulation with a 74HC4066.
Looks kinda promising...
Trying is the first step towards failure - Homer J. Simpson
 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Switchable Voltage Divider
« Reply #2 on: February 09, 2015, 08:00:40 pm »
It look like you are building some kind of auto ranging. Why not have a look in some DMM's on how they tackle this problem?
 

Offline bugs

  • Contributor
  • Posts: 31
  • Country: 00
Re: Switchable Voltage Divider
« Reply #3 on: February 09, 2015, 08:18:19 pm »
You could try to use a programmable gain amplifier like the PGA112/PGA113. They are not that expensive, but maybe it does not have the precision you want.
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #4 on: February 09, 2015, 08:43:54 pm »
Well, letting aside that the 74HC4066 is not really 3.3V compatible, I guess the above circuit should work, shouldn't it?
I guess I can find a switch better suited for low voltage operation, e.g. TS3A4751 or MAX4751
Trying is the first step towards failure - Homer J. Simpson
 

Offline cosmicray

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Switchable Voltage Divider
« Reply #5 on: February 09, 2015, 08:56:16 pm »
An I2C controlled potentiometer is effectively a remote controlled resistor ladder. You could use it to get a stepped voltage, albeit with only a small available current draw. Various devices offer steps of 64, 100, 128 and 256.

The only restriction there is that the top of the resistor ladder has a maximum voltage close to Vdd.
it's only funny until someone gets hurt, then it's hilarious - R. Rabbit
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #6 on: February 09, 2015, 09:33:33 pm »
Interesting devices for sure, but I don't think I can use them for this purpose. Firstly, they seem to come only in the 10k to 100k range. I'd prefer the MOhm range to not change the current too much.
Secondly, the idea is to protect the ADC from too high voltages for too long. With comparators I can switch the voltage divider fast enough to protect the ADC. With any ADC/software based approach, the time for switching ranges would dramatically increase which is not what I aim for.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Switchable Voltage Divider
« Reply #7 on: February 09, 2015, 09:40:54 pm »
This is what I did on my Homebrew DC Load.
Ranges are 2vdc, 20vdc, 200vdc (My load isn't rated to 200vdc, it was just a convenient range)

I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #8 on: February 09, 2015, 10:45:17 pm »
As I said, I experimented with N-FETs as lowside switches as well, but found that the drain leakage current made it necessary to use relatively low values for the voltage dividers.
While the off state drain current of your FET seems to be lower than the one of mine, it seems you also chose 100k instead of 10M for the upper resistor to work around this.
The problem with this is that a relatively high current is flowing into the voltage divider which kinda influences the measurement more than I would like.
Besides, your approach seems to be SW controlled, so you need a low pass filter to not damage the ADC in case of voltage jumps. This is also something I try to avoid.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Switchable Voltage Divider
« Reply #9 on: February 09, 2015, 10:52:03 pm »
...it seems you also chose 100k instead of 10M for the upper resistor to work around this...
Yes, basically.
And in my particular case I am not too concerned about the ~1mA @ 100vdc.
I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #10 on: February 09, 2015, 11:07:56 pm »
As a side note: when I look at the datasheet, it doesn't really look like the Si2366DS fully switches through at 3.3V. Indeed the lowest Vgs value with a specified RDSon seems to be 4.5V.
The 30mOhm seem somewhat optimistic as this is the typical value specified for 10V Vgs. Not that it would matter much, as RDSon is most probably still below 0.5Ohm, but to me this doesn't really look like an N-FET meant for 3.3V levels.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Switchable Voltage Divider
« Reply #11 on: February 09, 2015, 11:42:11 pm »
I hope I don't have a fundamental design fault there...
Still laying up the PCB.

My datasheet says Gate-Source Threshold Voltage - 1.2 to 2.5
Am I misreading the datasheet?
(But you are right about the RDSon)
Datasheet attached.
« Last Edit: February 09, 2015, 11:44:06 pm by Mr.B »
I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline Psi

  • Super Contributor
  • ***
  • Posts: 9889
  • Country: nz
Re: Switchable Voltage Divider
« Reply #12 on: February 10, 2015, 12:13:32 am »
You can also control the ADC vref by feeding it from a DAC.
This allows you to control the ADC full range value in code.
It can be useful to get full resolution at say 5v but also be able to measure 25v at full resolution.  You might use a 5/1 voltage divisor on the input so 5v input is 1v on adc and 25v input is 5v  etc.

First adc sample you do at 5v vref then reduce vref and resample.

A disadvantage is the extra time you have to wait when changing ADC vref for it to stabilize before sampling again.

If you really want to get fancy you can repeatedly scan the adc bit boundary and try to extract a few extra bits from the range. (Ive not actually tried but it might be fun)

Also you could try a pwm DAC for vref control but it would need some pretty heavy filtering to be usable

Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #13 on: February 10, 2015, 12:14:30 am »
@Mr.B
Well, the threshold voltage is not the point where the transistor is fully switched on but where it starts to conduct. Below saturation the FET behaves like a voltage controller resistor (linear region).
If I understand the datasheet correctly, ~4-5V is needed to reach a full on state.
So IMHO this is a 5V logic level FET, but not a 3.3V logic level FET.

@Psi
This is for sure an interesting approach, but it also seems a bit over-complicated. Honestly I don't think the trouble is worth it if I can use simple analog switches.
« Last Edit: February 10, 2015, 12:17:16 am by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline Mr.B

  • Supporter
  • ****
  • Posts: 1237
  • Country: nz
Re: Switchable Voltage Divider
« Reply #14 on: February 10, 2015, 12:47:23 am »
Thanks for the heads up 0xdeadbeef.

I am still laying up the PCB so I will try to find a more suitable FET.
I approach the thinking of all of my posts using AI in the first instance. (Awkward Irregularity)
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #15 on: February 10, 2015, 10:09:32 am »
The leakage current will be more of a problem than the on resistance.

Use high resistance values and a low leakage MOSFET which is rated to a much higher voltage than necessary.

For example the BSS131 is rated to 240V and has a maximum leakage current of 10nA at the rated voltage and 25oC, at lower voltages it will be less. The on resistance is 14 Ohms but with high resistor values in the divider it won't be a problem.
http://www.farnell.com/datasheets/1680766.pdf
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #16 on: February 10, 2015, 11:15:02 am »
Problem is that the BSS131 also seems to be a 5V logic level type. So for 3.3V, it's not really fully on. Again, Rds_on is specified for 4.5V.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #17 on: February 10, 2015, 11:44:41 am »
Problem is that the BSS131 also seems to be a 5V logic level type. So for 3.3V, it's not really fully on. Again, Rds_on is specified for 4.5V.
I doubt that would be a problem. Don't forget you're using this to switch just over 2uA so I really doubt the voltage drop would be a problem, even with a gate voltage of 3.3V.

Look at graph #5 on the datasheet. Note how when ID is near zero VDS varies very little between VGS = 2.3V and 10V

Graph #8 shows RON will be around 10Ohms when ID is near zero and VGS is 3.3V.
 

Offline Dago

  • Frequent Contributor
  • **
  • Posts: 659
  • Country: fi
    • Electronics blog about whatever I happen to build!
Re: Switchable Voltage Divider
« Reply #18 on: February 10, 2015, 12:26:54 pm »
Interesting devices for sure, but I don't think I can use them for this purpose. Firstly, they seem to come only in the 10k to 100k range. I'd prefer the MOhm range to not change the current too much.
Secondly, the idea is to protect the ADC from too high voltages for too long. With comparators I can switch the voltage divider fast enough to protect the ADC. With any ADC/software based approach, the time for switching ranges would dramatically increase which is not what I aim for.

Notice that ADCs usually require a fairly low source impedance (usually something like <10kohm) so you can't just feed them from some Mohm divider.
Come and check my projects at http://www.dgkelectronics.com ! I also tweet as https://twitter.com/DGKelectronics
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #19 on: February 10, 2015, 03:57:51 pm »
Notice that ADCs usually require a fairly low source impedance (usually something like <10kohm) so you can't just feed them from some Mohm divider.
Well, worst case I'd need another OP as voltage follower.
Trying is the first step towards failure - Homer J. Simpson
 

Offline cosmicray

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Switchable Voltage Divider
« Reply #20 on: February 10, 2015, 08:17:24 pm »
As a side note: when I look at the datasheet, it doesn't really look like the Si2366DS fully switches through at 3.3V. Indeed the lowest Vgs value with a specified RDSon seems to be 4.5V.
The 30mOhm seem somewhat optimistic as this is the typical value specified for 10V Vgs. Not that it would matter much, as RDSon is most probably still below 0.5Ohm, but to me this doesn't really look like an N-FET meant for 3.3V levels.
Take a look at BSD840N, it runs at the lower levels you seek, but the voltage range may not be sufficient. One implementation of a level shifter uses that part to translate between as low as 1.5V to as high as 18V.
it's only funny until someone gets hurt, then it's hilarious - R. Rabbit
 

Offline cosmicray

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Switchable Voltage Divider
« Reply #21 on: February 10, 2015, 08:20:30 pm »
Interesting devices for sure, but I don't think I can use them for this purpose. Firstly, they seem to come only in the 10k to 100k range. I'd prefer the MOhm range to not change the current too much.
Secondly, the idea is to protect the ADC from too high voltages for too long. With comparators I can switch the voltage divider fast enough to protect the ADC. With any ADC/software based approach, the time for switching ranges would dramatically increase which is not what I aim for.

Notice that ADCs usually require a fairly low source impedance (usually something like <10kohm) so you can't just feed them from some Mohm divider.
The MCP4017/18/19 series are all available in 5K, and some pieces in 2.1k.
it's only funny until someone gets hurt, then it's hilarious - R. Rabbit
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #22 on: February 10, 2015, 10:54:16 pm »
Take a look at BSD840N, it runs at the lower levels you seek, but the voltage range may not be sufficient. One implementation of a level shifter uses that part to translate between as low as 1.5V to as high as 18V.
Hm, worst case 400Ohm @2.5V and a maximum of 100µA leakage current. While this is a 3.3V logic level FET, it's worse in any other possible parameter.

The MCP4017/18/19 series are all available in 5K, and some pieces in 2.1k.
Well, much too low values. I want a voltage divider in the MOhm range. And the comment was about this MOhm divider being a too high resistance for an analog input. Which might be true but (as stated before) can be easily overcome by adding a voltage follower.
Trying is the first step towards failure - Homer J. Simpson
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #23 on: February 16, 2015, 12:41:26 am »
Ok, I found some time to rework my circuit a bit more.
The main change is that I use XOR gates to only switch one of the resistors. So no more odd values due to parallel resistors. Furthermore I replaced the 6V->3.3V conversion with a simple division by two and changed the comparator thresholds instead.
I also added voltage followers to make the divider (more or less) unloaded and to make the input to the ADC and comparators low ohmic.

There are still four ranges:
0-6.6V -> divide by 2
6.6V-13.2V -> divide by 4
13.2V-26.4V -> divide by 8
26.4V-52.8V -> divide by 16

Notes:
74HC4066 as analog switch is as dummy. I will most probably use a TS3A4751 instead.
I plan to use 74VHC86M as XOR gates. Didn't find any working spice model though. The XOR gates used in the circuit are ideal/simplified ones with 5V output.
Because of the fixed 5V output of the simplified XOR gates, I needed to use 5V as supply for the analog switches. In the real circuit, I'll most probably use 3.3V (even though I need 5V for the OPs).
The comparators are also dummies. I plan to use internal comparators of a LPC1549 instead where I can set the threshold from 0/31 to 31/31 of a reference voltage. A 1/10 voltage divider is not the ideal choice, so this is also just for this test circuit.
The XOR gate U10 is used only as inverter, simply because it's a 4 gate XOR and one gate is not used.
Trying is the first step towards failure - Homer J. Simpson
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #24 on: February 16, 2015, 08:56:59 am »
Why are you using 3V? It will make life harder.

Analogue switches don't work if the voltages are outside the supply rails.

HCT logic is compatible with 3V so you could use that to interface with the MCU.

Why are you so bothered about the on resistance?

The potential divider now has a total resistance of 12M at the maximum input voltage of 52.8V so the current is just  4.3583uA.

Even if the switch has a resistance of 400R, the voltage drop will be 1.743mV.

The leakage current is a much more important parameter, 1nA will cause a voltage drop of 3mV across a 3M resistor.

If the ADC is 12-bit, 1 count = 3/2^12 = 3/4096 = 732.421875uV

In order for the switch to drop under 1 count, its on resistance should be < 168R and the leakage current < 244pA.

Of course it may not need to be that good. It should be possible to calibrate the error out to some degree but it puts it into perspective.

EDIT:
I've just tested the old 2N7000 MOSFET. At room temperature the leakage current was difficult to measure, in the order of 500pA at a drain-source voltage of 51V. A higher voltage MOSFET such as the BSS131 will have an even lower leakage current.

What about using a BJT? I tested the BC548 and could only just measure the leakage current (50pA) when the voltage was increased to over 50V: the maximum rating is only 30V, a transistor rated to >50V would be better.

I didn't try to measure the transistor's saturation voltage at 5uA but it should be very low.

I can't be 100% certain of my readings because I don't have an ammeter that sensitive. I measured the current by connecting a Fluke 175 multimeter set to mV in series with the transistor. The meter has an input impedance of roughly 10M so 1mV of voltage drop corresponds to a current of 100pA. The resolution is 0.1mV which is a current of 10pA.

« Last Edit: February 16, 2015, 10:35:31 am by Hero999 »
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #25 on: February 16, 2015, 11:51:15 am »
Why are you using 3V? It will make life harder.
As I said, I will use the comparators of a LPC1549 and this is a 3.3V device. So at least the analog switch has to be 3.3V compatible.

Analogue switches don't work if the voltages are outside the supply rails.
Sure, so I don't do that. Or do I?

HCT logic is compatible with 3V so you could use that to interface with the MCU.
Sure, I wrote that in my initial post I think. Problem is that are so many 74HCT4066 versions with different specs, I'd rather use the TS3A4751 anyway.

Why are you so bothered about the on resistance?
Only if the error is noticeable of course. Besides, I care more about a reliable/predictable resistance over the voltage and temperature range.
I could live with 60Ohm or so on resistance if they were stable. Then again, if I get 0.9Ohm for free, why would I use something higher instead?

The potential divider now has a total resistance of 12M at the maximum input voltage of 52.8V so the current is just  4.3583uA.
Are you referring to the 1st schematic? In the new one, it's like 3.2MOhm in den 52.8V case and 16.5µA for the right divider.

Even if the switch has a resistance of 400R, the voltage drop will be 1.743mV.
Yeah, but again: if I can get a TS3A4751 for about the same price and have an on resistance of 0.9Ohm, why would I use a 74HCT4066?

The leakage current is a much more important parameter, 1nA will cause a voltage drop of 3mV across a 3M resistor.
If the ADC is 12-bit, 1 count = 3/2^12 = 3/4096 = 732.421875uV
In order for the switch to drop under 1 count, its on resistance should be < 168R and the leakage current < 244pA.
Of course it may not need to be that good. It should be possible to calibrate the error out to some degree but it puts it into perspective.
Problem is that most analog switches have typical leakage currents of 0.5nA to 1nA. There is not really that much I can do about it.
Then again, I'm open to suggestions for better switches. I found one from AD, ADG712 as far as I recall, but it's much more expensive and has 0.5nA
leakage current instead of 1nA. However, tests with the spice model from AD were catastrophic.

I've just tested the old 2N7000 MOSFET. At room temperature the leakage current was difficult to measure, in the order of 500pA at a drain-source voltage of 51V.
A higher voltage MOSFET such as the BSS131 will have an even lower leakage current.
I'm too lazy/busy to look it up right now, but all the MOSFETs suggested up to now had somewhat gigantic maximum leakage currents compared to analog switches.

What about using a BJT? I tested the BC548 and could only just measure the leakage current (50pA) when the voltage was increased to over 50V:
the maximum rating is only 30V, a transistor rated to >50V would be better.
Honestly nothing I considered yet. Honestly I find it hard to believe that a plain vanilla BJT will have better parameters than a sophisticated analog switch.
Besides, there are so many BJT types on the market that I imagine it will be hard to find one with specifically low leakage current.
Problem is also that standard types are produced by so many vendors that it will be hard to make sure you really get the device fitting the data sheet
(just like for the 74HCxxx gates).

I can't be 100% certain of my readings because I don't have an ammeter that sensitive. I measured the current by connecting a Fluke 175 multimeter set to mV in series with the transistor. The meter has an input impedance of roughly 10M so 1mV of voltage drop corresponds to a current of 100pA. The resolution is 0.1mV which is a current of 10pA.
Well, measuring in the pA range is tricky. Besides, measuring won't give the worst case values (high temperature and such).
Trying is the first step towards failure - Homer J. Simpson
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #26 on: February 16, 2015, 01:12:03 pm »
Why are you using 3V? It will make life harder.
As I said, I will use the comparators of a LPC1549 and this is a 3.3V device. So at least the analog switch has to be 3.3V compatible.
Why? There are plenty of 5V comparators on the market.

Quote
Analogue switches don't work if the voltages are outside the supply rails.
Sure, so I don't do that. Or do I?
If you switch ranges at the right time then yes.

Quote
The potential divider now has a total resistance of 12M at the maximum input voltage of 52.8V so the current is just  4.3583uA.
Are you referring to the 1st schematic? In the new one, it's like 3.2MOhm in den 52.8V case and 16.5µA for the right divider.
Oh yes I see, you're right 3.3/200k = 16.5µA.


Quote
A higher voltage MOSFET such as the BSS131 will have an even lower leakage current.
I'm too lazy/busy to look it up right now, but all the MOSFETs suggested up to now had somewhat gigantic maximum leakage currents compared to analog switches.
That's because the MOSFETs are specified under the worst case conditions to cover the manufacturer's back.

For example, the BSS131 is a leakage current of 5µA but that's at a whopping 240V and 150oC. Reduce the temperature down to 25oC and if falls to 10nA.  At 50V it'll go down even further, probably under 1nA. The leakage current doesn't scale linearly with voltage. It tends to be exponential, past a certain voltage.
http://www.infineon.com/dgdl/Infineon-BSS131-DS-v02_06-en.pdf?fileId=db3a304330f68606013104bf65993eeb

Choose a MOSFET with as high a voltage rating as possible and as higher RON as you can stand and the leakage current should be low.

Quote
What about using a BJT? I tested the BC548 and could only just measure the leakage current (50pA) when the voltage was increased to over 50V:
the maximum rating is only 30V, a transistor rated to >50V would be better.
Honestly nothing I considered yet. Honestly I find it hard to believe that a plain vanilla BJT will have better parameters than a sophisticated analog switch.
Why not? It makes sense that a BJT should have a lower leakage current than an analogue switch composed of MOSFETs.

MOSFET has a diode in reverse parallel with the source and drain so you get the diode leakage plus that of the MOSFET. Analogue switches are made of MOSFETs which have diodes connected from each pin to either power supply rail.

A BJT is much simpler than an analogue switch. When its operating in its cut-off region it looks like a reverse biased diode with an extremely low leakage current: much lower than any MOSFET.

http://aries.ucsd.edu/NAJMABADI/CLASS/ECE65/06-W/NOTES/BJT1.pdf
http://electronics.stackexchange.com/questions/13286/using-a-transistor-as-a-diode
« Last Edit: February 16, 2015, 04:23:52 pm by Hero999 »
 

Offline cosmicray

  • Frequent Contributor
  • **
  • Posts: 299
  • Country: us
Re: Switchable Voltage Divider
« Reply #27 on: February 16, 2015, 03:02:09 pm »
@0xdeadbeef

Have you even considered using an electromechanical solution instead of solid state ? I'm speaking of small signal latching relays. Typical contact resistance is < 50 mOhm. Leakage current is not quoted because there probably isn't any. There is a brief settling time when the contacts close. If the voltage divider is intended to switch rapidly, then the electromechanical solution would not be appropriate. The units take up more board space, and may add BoM cost.
it's only funny until someone gets hurt, then it's hilarious - R. Rabbit
 

Offline VintageTekFan

  • Regular Contributor
  • *
  • Posts: 82
  • Country: us
Re: Switchable Voltage Divider
« Reply #28 on: February 16, 2015, 03:10:26 pm »
@0xdeadbeef

Have you even considered using an electromechanical solution instead of solid state ? I'm speaking of small signal latching relays. Typical contact resistance is < 50 mOhm. Leakage current is not quoted because there probably isn't any. There is a brief settling time when the contacts close. If the voltage divider is intended to switch rapidly, then the electromechanical solution would not be appropriate. The units take up more board space, and may add BoM cost.

That's (at least) what the Tektronix DM50x meters do.
The three laws of thermodynamics:
1. You can't win.
2. You can't even break even.
3. You can't get out of the game.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #29 on: February 16, 2015, 04:28:14 pm »
You can't beat a mechanical relay for leakage and voltage drop but make sure it's a signal relay, designed for very low currents. Some high power relays won't produce a very good contact at low voltages and currents because a thin film of oxide can develop on the contacts and a reasonable voltage and current are required to break through it

Gold plated contacts are best and they're not expensive because the amount of gold used is tiny.

The minimum current is often called the wetting current on data sheets.
« Last Edit: February 16, 2015, 04:33:38 pm by Hero999 »
 

Offline JohnnyBerg

  • Frequent Contributor
  • **
  • Posts: 474
  • Country: de
Re: Switchable Voltage Divider
« Reply #30 on: February 16, 2015, 04:48:47 pm »
Gold plated contacts are best and they're not expensive because the amount of gold used is tiny.

The minimum current is often called the wetting current on data sheets.

Is there a relay you can recommend or have experience with?
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #31 on: February 16, 2015, 05:52:13 pm »
Why? There are plenty of 5V comparators on the market.
Less parts, better use of existing resources, no need for creating the threshold voltages. To name a few things.

That's because the MOSFETs are specified under the worst case conditions to cover the manufacturer's back.
For example, the BSS131 is a leakage current of 5µA but that's at a whopping 240V and 150oC. Reduce the temperature down to 25oC and if falls to 10nA.  At 50V it'll go down even further, probably under 1nA. The leakage current doesn't scale linearly with voltage. It tends to be exponential, past a certain voltage.
http://www.infineon.com/dgdl/Infineon-BSS131-DS-v02_06-en.pdf?fileId=db3a304330f68606013104bf65993eeb
I see your point, but if a leakage current at e.g. 5V is not specified, there is nothing else to rely on than the defined worst case scenario. I can't afford to to large scale part testing under temperature stress to get statistically significant data. Relying on the measurement with a single part under room temperature conditions doesn't sound like what I'd call proper engineering.

Why not? It makes sense that a BJT should have a lower leakage current than an analogue switch composed of MOSFETs.
I'll have to think about this. The simplicity sounds charming. Even though four discrete SOT-23 parts will probably take more room than a quad switch.
[EDIT] I browsed through a few datasheets of standard BJT types looking for cut off and leakage currents. Nothing exciting up to now. Usually more in the µA range than in the nA range. I'm not sure whether it's worth to follow that road until someone comes up with a ultra low leakage BJT suggestion which is easily available.
« Last Edit: February 16, 2015, 06:43:30 pm by 0xdeadbeef »
Trying is the first step towards failure - Homer J. Simpson
 

Offline jamesd168

  • Contributor
  • Posts: 17
Re: Switchable Voltage Divider
« Reply #32 on: February 16, 2015, 07:05:05 pm »
Ok, I found some time to rework my circuit a bit more.
The main change is that I use XOR gates to only switch one of the resistors. So no more odd values due to parallel resistors. Furthermore I replaced the 6V->3.3V conversion with a simple division by two and changed the comparator thresholds instead.
I also added voltage followers to make the divider (more or less) unloaded and to make the input to the ADC and comparators low ohmic.

There are still four ranges:
0-6.6V -> divide by 2
6.6V-13.2V -> divide by 4
13.2V-26.4V -> divide by 8
26.4V-52.8V -> divide by 16

Notes:
74HC4066 as analog switch is as dummy. I will most probably use a TS3A4751 instead.
I plan to use 74VHC86M as XOR gates. Didn't find any working spice model though. The XOR gates used in the circuit are ideal/simplified ones with 5V output.
Because of the fixed 5V output of the simplified XOR gates, I needed to use 5V as supply for the analog switches. In the real circuit, I'll most probably use 3.3V (even though I need 5V for the OPs).
The comparators are also dummies. I plan to use internal comparators of a LPC1549 instead where I can set the threshold from 0/31 to 31/31 of a reference voltage. A 1/10 voltage divider is not the ideal choice, so this is also just for this test circuit.
The XOR gate U10 is used only as inverter, simply because it's a 4 gate XOR and one gate is not used.

I wonder how much does it cost for the BOM when you are done?
 

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1570
  • Country: de
Re: Switchable Voltage Divider
« Reply #33 on: February 16, 2015, 07:37:59 pm »
I wonder how much does it cost for the BOM when you are done?
MCP6004, TS3A4751 and 74VHC86MX together cost around 2€ if you buy them as single parts. Rest is resistors.
Obviously other parts of the final project will be much more expensive as this is just the voltage measurement.
E.g. the LPC1549 costs ~6€
Trying is the first step towards failure - Homer J. Simpson
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #34 on: February 16, 2015, 08:40:53 pm »
I see your point, but if a leakage current at e.g. 5V is not specified, there is nothing else to rely on than the defined worst case scenario. I can't afford to to large scale part testing under temperature stress to get statistically significant data. Relying on the measurement with a single part under room temperature conditions doesn't sound like what I'd call proper engineering.

I'll have to think about this. The simplicity sounds charming. Even though four discrete SOT-23 parts will probably take more room than a quad switch.
[EDIT] I browsed through a few datasheets of standard BJT types looking for cut off and leakage currents. Nothing exciting up to now. Usually more in the µA range than in the nA range. I'm not sure whether it's worth to follow that road until someone comes up with a ultra low leakage BJT suggestion which is easily available.
Datasheets aren't the be and end all. I suspect most manufacturers even know the true leakage current of their parts because its difficult to measure. They probably just hook it up to a an ammeter with a resolution of  0.1uA and if it reads zero then it passes the rest, otherwise it fails and they have to investigate. Sometimes you just have to use your judgement.

One striking thing is the cut-off current is specified as low as 100nA for the MPSA14 which is a Darlington transistor. This must mean the cut-off current for the small transistor, driving the larger transistor is in the nA range because it will be multiplied by the larger transistor's Hfe.
http://www.onsemi.com/pub_link/Collateral/MPSA13-D.PDF

 

Offline jamesd168

  • Contributor
  • Posts: 17
Re: Switchable Voltage Divider
« Reply #35 on: February 16, 2015, 09:13:52 pm »
I wonder how much does it cost for the BOM when you are done?
MCP6004, TS3A4751 and 74VHC86MX together cost around 2€ if you buy them as single parts. Rest is resistors.
Obviously other parts of the final project will be much more expensive as this is just the voltage measurement.
E.g. the LPC1549 costs ~6€


good to know, thanks for the info.
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19345
  • Country: gb
  • 0999
Re: Switchable Voltage Divider
« Reply #36 on: February 16, 2015, 09:38:10 pm »
Gold plated contacts are best and they're not expensive because the amount of gold used is tiny.

The minimum current is often called the wetting current on data sheets.

Is there a relay you can recommend or have experience with?
Reed relays are your best bet. They don't have a wetting current because the switch is sealed in a protective atmosphere, protecting it from oxidation.
http://digital.ni.com/public.nsf/allkb/FE70EF537A6F2CB28625793700672CA3
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf