Help Eliminate a 5-cent Jumper

Thread Starter

Wingsy

Joined Dec 18, 2016
86
Atten.png
Don't say I'm all OCD about this - I know I am. It bugs me.

Schematic is an input to an A/D converter. There are 4 possible full scale input ranges: 2v, 4v, 8v and 16v. These ranges are set by the jumpers at J1, J2 and J3, so that for each range the full scale input voltage to the A/D (output of the voltage follower) remains at 0-2v. Since there are only 4 input ranges, it seems that there should be a way to set these ranges with only 2 jumpers, but I'll be darned if I can figure out a way to do it. Any ideas?
 

AnalogKid

Joined Aug 1, 2013
12,055
With your approach, the 00, 01, and 10 cases are easy. But the 11 case attenuation will be 20%, not 12.5%, because the series resistor is not infinitely large.

Solution: Read up on the R-2R (or 2R-R) ladder. Two jumper headers, three pins each.

ak
 
Last edited:

Thread Starter

Wingsy

Joined Dec 18, 2016
86
With your approach, the 00, 01, and 10 cases are easy. But the 11 case attenuation will be 20%, not 12.5%, because the series resistor is not infinitely large.

Solution: Read up on the R-2R (or 2R-R) ladder. Two jumper headers, three pins each.

ak
R-2R was the first thing I looked at. Figured some kind of a reverse DAC circuit would be what I wanted. Couldn't make it fly.
 

AnalogKid

Joined Aug 1, 2013
12,055
The problem with an R-2R ladder is that you never get 100% of the input at the output. But you can do what you want with 4 total resistors and only ***ONE*** jumper.

ak
 

AnalogKid

Joined Aug 1, 2013
12,055
2-resistor attenuator: Vout = Vin x R2 / (R1 + R2)

In a 2-resistor attenuator with an attenuation factor of n, the shunt resistor equals 1/(n-1) times the series resistor. For example, if you want an attenuation of 8:1, then the shunt resistor is 1/7 of the series resistor.

Keep the series resistor (R1), but put the three shunt resistors (R2, R3, R4) in series to GND.
The connection to GND is one jumper position; when it is open, the output is 100%
The three shunt resistors combined equal the series resistor; when the GND connection is made, the output is 50%.
For the next tap up from GND, the first two shunt resistors total to 33% of the series resistor.
For the next tap up from GND, the first shunt resistor equals 14.3% of the series resistor.

R2 = R1 / 7
R2 + R3 = R1 / 3
R2 + R3 + R4 = R1

There is no set of 1% resistor values that will hit all three ratios precisely.
Example: 10.0K, 6.81K, 1.87K, 1.43K

However, combining multiple resistors to hit the percentages does not reduce the precision.

ak
 
Last edited:

Thread Starter

Wingsy

Joined Dec 18, 2016
86
2-resistor attenuator: Vout = Vin x R2 / (R1 + R2)

In a 2-resistor attenuator with an attenuation factor of n, the shunt resistor equals 1/(n-1) times the series resistor. For example, if you want an attenuation of 8:1, then the shunt resistor is 1/7 of the series resistor.

Keep the series resistor (R1), but put the three shunt resistors (R2, R3, R4) in series to GND.
The connection to GND is one jumper position; when it is open, the output is 100%
The three shunt resistors combined equal the series resistor; when the GND connection is made, the output is 50%.
For the next tap up from GND, the first two shunt resistors total to 33% of the series resistor.
For the next tap up from GND, the first shunt resistor equals 14.3% of the series resistor.

R2 = R1 / 7
R2 + R3 = R1 / 3
R2 + R3 + R4 = R1

There is no set of 1% resistor values that will hit all three ratios precisely.
Example: 10.0K, 6.81K, 1.87K, 1.43K

However, combining multiple resistors to hit the percentages does not reduce the precision.

ak
I do like your suggestion, Kiddo. The perfect match is.
R1 = 105k
R2 = 15k
R3 = 20k
R4 = 70k
The only non-standard value is 70k, but a 69.8k and a 200 in series will work. Plus, I like the straightforward way the jumper would be placed for changing scale rather than the awkward way I had it going. And ***one*** jumper! Yeah! Thanks for your suggestion.
 

ErnieM

Joined Apr 24, 2011
8,415
With your scheme you get four states but only three are useful to the problem.

No jumpers: 1:1

One jumper A: 2:1

One jumper B: 4:1

Both jumpers A & B: trouble. Your resistance is now two values in parallel that do not meet the 8:1 divider requirements.
 

Thread Starter

Wingsy

Joined Dec 18, 2016
86
With your scheme you get four states but only three are useful to the problem.

No jumpers: 1:1

One jumper A: 2:1

One jumper B: 4:1

Both jumpers A & B: trouble. Your resistance is now two values in parallel that do not meet the 8:1 divider requirements.
Not sure which scheme you're talking about. In my original post the 4th state is all 3 jumpers installed. In what AnalogKid proposed the 4 states are no jumper, then one of 3 jumper positions bridged.
 

ErnieM

Joined Apr 24, 2011
8,415
Not sure which scheme you're talking about. In my original post the 4th state is all 3 jumpers installed. In what AnalogKid proposed the 4 states are no jumper, then one of 3 jumper positions bridged.
Your scheme, up in post one. If you try to eliminate one of the resistors your bound by the mathematics of two parallel resistors not combining for the required net value.

One way to eliminate two jumpers is to change one of the 34K resistors to 14.57K so you only need one jumper at most for any input range.
 

AnalogKid

Joined Aug 1, 2013
12,055
Ernie's method has the advantage that the three shunt values are independent of one another, as opposed to mine where some of the attenuation percentages are dependent on multiple resistors adding up. But both solutions miss the essential point of eliminating one jumper position. The 2-pin header is the majority of the cost of each position, not the little shunt piece. So while we reduced the number of shunts from two or three to one, there still are six header pins.

ak
 

bertus

Joined Apr 5, 2008
22,887
Hello,

An other option would be a R-2R ladder attenuator:

R-2R_attenuator.png
The only thing is you will need 3 pin jumpers for it.

Bertus
 

Thread Starter

Wingsy

Joined Dec 18, 2016
86
Hello,

An other option would be a R-2R ladder attenuator:

View attachment 119855
The only thing is you will need 3 pin jumpers for it.

Bertus
Well, like AnalogKid pointed out, I could never get the full input voltage delivered to the output, only a maximum of 15/16ths of the input (with all jumpers in, producing what you have in Fig 14.4). Correct?
 

AnalogKid

Joined Aug 1, 2013
12,055
Your description of a 4-bit DAC is correct, but you don't have a 4-bit DAC. Your max output is 16 V, but your min output is 2 V, not 1 V. Don't let that 16 V max fool you.

Also, don't confuse 4 jumper positions that are mutually exclusive with 4 bits that by definition are not. No matter how it is controlled, it is a 3-bit DAC. In post #1 you defined a linear output voltage scale with 8 possible values, 4 of which were of needed. Your maximum attenuation is 2 V / 16 V, or 1/8, so the least significant bit is 1/8th of the total 8/8 value. 8 possible values = 3 bits.

ak
 
Last edited:
Top