Author Topic: Switchable Voltage Divider  (Read 15464 times)

0 Members and 1 Guest are viewing this topic.

Offline 0xdeadbeefTopic starter

  • Super Contributor
  • ***
  • Posts: 1572
  • 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: 19494
  • 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: 306
  • 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: 19494
  • 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: 1572
  • 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: 1572
  • 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: 19494
  • 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: 19494
  • 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