Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > sci.electronics.design > #481771 > unrolled thread
| Started by | Clive Arthur <cliveta@nowaytoday.co.uk> |
|---|---|
| First post | 2017-10-17 17:25 +0100 |
| Last post | 2017-10-23 10:17 -0700 |
| Articles | 20 on this page of 42 — 15 participants |
Back to article view | Back to sci.electronics.design
opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-17 17:25 +0100
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-17 13:45 -0400
Re: opamp switchable gain George Herold <gherold@teachspin.com> - 2017-10-17 10:57 -0700
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-17 15:02 -0400
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-17 15:08 -0400
Re: opamp switchable gain Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-10-18 14:13 -0700
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-18 18:13 -0400
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-18 16:51 -0700
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-18 20:41 -0400
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-19 01:01 -0700
Re: opamp switchable gain tabbypurr@gmail.com - 2017-10-19 04:47 -0700
Re: opamp switchable gain Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-10-19 13:32 +0100
Re: opamp switchable gain tabbypurr@gmail.com - 2017-10-19 06:05 -0700
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-19 22:26 -0700
Re: opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-17 20:07 +0100
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-17 15:10 -0400
Re: opamp switchable gain piglet <erichpwagner@hotmail.com> - 2017-10-17 20:35 +0100
Re: opamp switchable gain Martin Riddle <martin_ridd@verizon.net> - 2017-10-17 20:21 -0400
Re: opamp switchable gain Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-10-18 09:03 +0100
Re: opamp switchable gain Martin Brown <'''newspam'''@nezumi.demon.co.uk> - 2017-10-18 12:20 +0100
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-17 17:30 -0400
Re: opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-17 18:54 +0100
Re: opamp switchable gain Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-10-17 11:42 -0700
Re: opamp switchable gain TTman <kraken.sankey@gmail.com> - 2017-10-17 19:39 +0100
Re: opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-17 20:10 +0100
Re: opamp switchable gain Jasen Betts <jasen@xnet.co.nz> - 2017-10-25 04:58 +0000
Re: opamp switchable gain oldschool@tubes.com - 2017-10-25 00:29 -0500
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-17 21:20 -0700
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-17 21:28 -0700
opamp switchable gain pcdhobbs@gmail.com - 2017-10-18 03:55 -0700
Re: opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-18 15:46 +0100
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-18 13:33 -0700
Re: opamp switchable gain Clive Arthur <cliveta@nowaytoday.co.uk> - 2017-10-19 00:08 +0100
Re: opamp switchable gain Wanderer <wanderer@dialup4less.com> - 2017-10-19 05:38 -0700
Re: opamp switchable gain Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-10-19 08:44 -0700
Re: opamp switchable gain whit3rd <whit3rd@gmail.com> - 2017-10-19 22:10 -0700
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-20 09:40 -0400
Re: opamp switchable gain "Tim Williams" <tmoranwms@gmail.com> - 2017-10-20 14:18 -0500
Re: opamp switchable gain bitrex <bitrex@de.lete.earthlink.net> - 2017-10-20 17:02 -0400
Re: opamp switchable gain Wanderer <wanderer@dialup4less.com> - 2017-10-20 16:55 -0700
Re: opamp switchable gain Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-10-20 15:08 -0700
Re: opamp switchable gain Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> - 2017-10-23 10:17 -0700
Page 1 of 3 [1] 2 3 Next page →
| From | Clive Arthur <cliveta@nowaytoday.co.uk> |
|---|---|
| Date | 2017-10-17 17:25 +0100 |
| Subject | opamp switchable gain |
| Message-ID | <os5ath$c0g$1@dont-email.me> |
I have a standard inverting op-amp with a 1k input resistor. The feedback comprises one fixed resistor with three more parallel resistors which can be connected or disconnected by analog switches, giving 8 possible gain settings. I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's inverting) Clearly, the fixed resistor should be 20k to give a gain of 20 with all three switches open. Likewise all four in parallel (all three switches closed) should equal 1k. I'd like to space the gain settings evenly, so the eight gain settings would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. What's the best way to work out resistor values to get as close as I can to this ideal? The circuit exists and can't be changed. Cheers -- Clive
[toc] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-17 13:45 -0400 |
| Message-ID | <UkrFB.13415$_63.4529@fx12.iad> |
| In reply to | #481771 |
On 10/17/2017 12:25 PM, Clive Arthur wrote: > I have a standard inverting op-amp with a 1k input resistor. > > The feedback comprises one fixed resistor with three more parallel > resistors which can be connected or disconnected by analog switches, > giving 8 possible gain settings. > > I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's > inverting) > > Clearly, the fixed resistor should be 20k to give a gain of 20 with all > three switches open. Likewise all four in parallel (all three switches > closed) should equal 1k. > > I'd like to space the gain settings evenly, so the eight gain settings > would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. > > What's the best way to work out resistor values to get as close as I can > to this ideal? > > The circuit exists and can't be changed. > > Cheers If you can write a little code it's a small enough state space to simply brute force search on all combinations of 1% resistor values.
[toc] | [prev] | [next] | [standalone]
| From | George Herold <gherold@teachspin.com> |
|---|---|
| Date | 2017-10-17 10:57 -0700 |
| Message-ID | <7f9c2374-59b8-48d5-93f2-46c9f3757160@googlegroups.com> |
| In reply to | #481778 |
On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: > On 10/17/2017 12:25 PM, Clive Arthur wrote: > > I have a standard inverting op-amp with a 1k input resistor. > > > > The feedback comprises one fixed resistor with three more parallel > > resistors which can be connected or disconnected by analog switches, > > giving 8 possible gain settings. > > > > I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's > > inverting) > > > > Clearly, the fixed resistor should be 20k to give a gain of 20 with all > > three switches open. Likewise all four in parallel (all three switches > > closed) should equal 1k. > > > > I'd like to space the gain settings evenly, so the eight gain settings > > would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. > > > > What's the best way to work out resistor values to get as close as I can > > to this ideal? > > > > The circuit exists and can't be changed. > > > > Cheers > > If you can write a little code it's a small enough state space to simply > brute force search on all combinations of 1% resistor values. I'd do a hunt and peck type thing too. Stepping back a moment, he's got a geometric progression. (1.53)^n. The R ratio's will be linear.. I think, so I'm not sure it can be done. Then again I'm often wrong. :^) George H.
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-17 15:02 -0400 |
| Message-ID | <VssFB.120142$J83.62335@fx06.iad> |
| In reply to | #481781 |
On 10/17/2017 01:57 PM, George Herold wrote: >> If you can write a little code it's a small enough state space to simply >> brute force search on all combinations of 1% resistor values. > > I'd do a hunt and peck type thing too. > Stepping back a moment, he's got a geometric progression. > (1.53)^n. The R ratio's will be linear.. I think, so I'm not > sure it can be done. Then again I'm often wrong. :^) > > George H. > It's possible to write down a system of equations to define the problem and solve it, maybe with some handsome closed form, which is fine if one had resistors of arbitrary precision available, AFAIK OP is constrained to the values they picked for 5% or 1% or whatever the standard he's using, which aren't themselves linearly spaced through the domain of the set. So probably unless one wants to rewrite the equations to take the exponential spacing of the standard values into account you'll likely have to do some hunting and pecking anyway to check the standard values above and below the infinite-precision target to see which is best. Meanwhile probably 10 lines of scripting language code not including some kind of appropriately formatted list of standard values could brute force the best in a millisecond
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-17 15:08 -0400 |
| Message-ID | <azsFB.3326$5e.3270@fx03.iad> |
| In reply to | #481790 |
On 10/17/2017 03:02 PM, bitrex wrote: > On 10/17/2017 01:57 PM, George Herold wrote: > >>> If you can write a little code it's a small enough state space to simply >>> brute force search on all combinations of 1% resistor values. >> >> I'd do a hunt and peck type thing too. >> Stepping back a moment, he's got a geometric progression. >> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >> sure it can be done. Then again I'm often wrong. :^) >> >> George H. >> > > It's possible to write down a system of equations to define the problem > and solve it, maybe with some handsome closed form, which is fine if one > had resistors of arbitrary precision available, AFAIK OP is constrained > to the values they picked for 5% or 1% or whatever the standard he's > using, which aren't themselves linearly spaced through the domain of the > set. > > So probably unless one wants to rewrite the equations to take the > exponential spacing of the standard values into account you'll likely > have to do some hunting and pecking anyway to check the standard values > above and below the infinite-precision target to see which is best. > > Meanwhile probably 10 lines of scripting language code not including > some kind of appropriately formatted list of standard values could brute > force the best in a millisecond Treat each "gain point" on the desired line as a point in N dimensional space, same with the trials, minimize N-dimensional Euclidean distance between the two as a possible "fitness function"
[toc] | [prev] | [next] | [standalone]
| From | Jim Thompson <To-Email-Use-The-Envelope-Icon@On-My-Web-Site.com> |
|---|---|
| Date | 2017-10-18 14:13 -0700 |
| Message-ID | <jtgfucdtgdfkuvc75688dlungn4i2r4lot@4ax.com> |
| In reply to | #481793 |
On Tue, 17 Oct 2017 15:08:53 -0400, bitrex
<bitrex@de.lete.earthlink.net> wrote:
[snip]
>
>Treat each "gain point" on the desired line as a point in N dimensional
>space, same with the trials, minimize N-dimensional Euclidean distance
>between the two as a possible "fitness function"
There you go... the "solution" >:-}
Bwahahahahaha! ROTFLMAO
...Jim Thompson
--
| James E.Thompson | mens |
| Analog Innovations | et |
| Analog/Mixed-Signal ASIC's and Discrete Systems | manus |
| STV, Queen Creek, AZ 85142 Skype: skypeanalog | |
| Voice:(480)460-2350 Fax: Available upon request | Brass Rat |
| E-mail Icon at http://www.analog-innovations.com | 1962 |
Spice is like a sports car...
Performance only as good as the person behind the wheel.
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-18 18:13 -0400 |
| Message-ID | <QlQFB.18486$og2.17210@fx37.iad> |
| In reply to | #482004 |
On 10/18/2017 05:13 PM, Jim Thompson wrote: > On Tue, 17 Oct 2017 15:08:53 -0400, bitrex > <bitrex@de.lete.earthlink.net> wrote: > > [snip] >> >> Treat each "gain point" on the desired line as a point in N dimensional >> space, same with the trials, minimize N-dimensional Euclidean distance >> between the two as a possible "fitness function" > > There you go... the "solution" >:-} > > Bwahahahahaha! ROTFLMAO > > ...Jim Thompson > It's 10 lines of code and will give you the no-doubt-about-it best answer to the exact problem using real components. Or as close as you can get given three switches. Brute force would probably work out to several more switches too if it should become an option. Do you not like exact answers for specific problems?
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2017-10-18 16:51 -0700 |
| Message-ID | <9b638264-a444-45cd-9552-22bd8b80a802@googlegroups.com> |
| In reply to | #481790 |
On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: > On 10/17/2017 01:57 PM, George Herold wrote: > > >> If you can write a little code it's a small enough state space to simply > >> brute force search on all combinations of 1% resistor values. > It's possible to write down a system of equations to define the problem > and solve it, maybe with some handsome closed form,... > Meanwhile probably 10 lines of scripting language code not including > some kind of appropriately formatted list of standard values could brute > force the best in a millisecond Or not. The only constraint, is that we have a 'resistor network' with two inputs (ground, and op amp Vout), and one output (inverting connection to the op amp), which is then modified by three shunts (analog switches) between nodes of that network. The old solutions (R/2R ladder, series connection with switches that short across resistors, parallel connected resistors with switches in series that open) aren't the only ways to connect those switches into a network. So, make a cartesian 3-d array of a lot of resistors, like resistor-per-edge cube (12 resistors in all). That's complex enough to make R/2R ladder for three bits. Twelve resistor values, each to vary independently. Pick one (of eight) node for the summing junction, that leaves seven possible Vout. Each shunt goes to two distinct points in the array, call it (8*7) = 56 possibilities. Roughly, you have 20 'standard' resistor values to consider, 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. It's gonna take a LONG millisecond.
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-18 20:41 -0400 |
| Message-ID | <mxSFB.7479$4X4.977@fx01.iad> |
| In reply to | #482040 |
On 10/18/2017 07:51 PM, whit3rd wrote: > On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: >> On 10/17/2017 01:57 PM, George Herold wrote: >> >>>> If you can write a little code it's a small enough state space to simply >>>> brute force search on all combinations of 1% resistor values. > >> It's possible to write down a system of equations to define the problem >> and solve it, maybe with some handsome closed form,... > >> Meanwhile probably 10 lines of scripting language code not including >> some kind of appropriately formatted list of standard values could brute >> force the best in a millisecond > > Or not. The only constraint, is that we have a 'resistor network' with two > inputs (ground, and op amp Vout), and one output (inverting connection to > the op amp), which is then modified by three shunts (analog switches) > between nodes of that network. The old solutions (R/2R ladder, series connection > with switches that short across resistors, parallel connected resistors with > switches in series that open) aren't the only ways to connect those > switches into a network. So, make a cartesian 3-d array of a lot of resistors, > like resistor-per-edge cube (12 resistors in all). > > That's complex enough to make R/2R ladder for three bits. > > Twelve resistor values, each to vary independently. Pick one (of eight) node for the > summing junction, that leaves seven possible Vout. Each shunt goes > to two distinct points in the array, call it (8*7) = 56 possibilities. > > Roughly, you have 20 'standard' resistor values to consider, > > 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. > > It's gonna take a LONG millisecond. > OP gave the impression that the (already fixed by the implementation that already exists before optimal values are determined for some reason) topology wasn't as free-form as that; at least from my interpretation of his post the yet-to-be determined resistors were parallel-connected across the feedback resistor with analog switches in series and that was non-negotiable. If that's not at all the case then that does leave more room to maneuver and should be clarified...
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2017-10-19 01:01 -0700 |
| Message-ID | <1821901d-5371-492f-925b-dc0e30ea5151@googlegroups.com> |
| In reply to | #482056 |
On Wednesday, October 18, 2017 at 5:41:58 PM UTC-7, bitrex wrote: > On 10/18/2017 07:51 PM, whit3rd wrote: > > On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: > >> On 10/17/2017 01:57 PM, George Herold wrote: > >> > >>>> If you can write a little code it's a small enough state space > > Or not. The only constraint, is that we have a 'resistor network' with two > > inputs (ground, and op amp Vout), and one output (inverting connection to > > the op amp), which is then modified by three shunts... > > 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. > OP gave the impression that the [circuit topology was fixed] ... Oh, yeah, just parallel links. With all shunts open, the unswitched resistance sets the gain-of-20, and with all three closed (lowest resistance) you get gain-of-1, so there's only two free resistor values, and some RMS deviation measure can be made. It'll take 400-ish cases, and a simple "R2 greater than or equal to R3" free decision takes it down to 200. That, you can do by brute force search (though the ordering of the results isn't certain, you might have to sort the achieved gains before comparing them to the targets). But, that just seems so dull. So, I made a ...more interesting problem. My bad.
[toc] | [prev] | [next] | [standalone]
| From | tabbypurr@gmail.com |
|---|---|
| Date | 2017-10-19 04:47 -0700 |
| Message-ID | <b1096c7d-1c81-4259-a0dd-2f8c09fb52d0@googlegroups.com> |
| In reply to | #482096 |
On Thursday, 19 October 2017 09:01:17 UTC+1, whit3rd wrote: > On Wednesday, October 18, 2017 at 5:41:58 PM UTC-7, bitrex wrote: > > On 10/18/2017 07:51 PM, whit3rd wrote: > > > On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: > > >> On 10/17/2017 01:57 PM, George Herold wrote: > > >> > > >>>> If you can write a little code it's a small enough state space > > > > Or not. The only constraint, is that we have a 'resistor network' with two > > > inputs (ground, and op amp Vout), and one output (inverting connection to > > > the op amp), which is then modified by three shunts... > > > 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. > > > OP gave the impression that the [circuit topology was fixed] > > ... Oh, yeah, just parallel links. With all shunts open, the unswitched resistance > sets the gain-of-20, and with all three closed (lowest resistance) you > get gain-of-1, so there's only two free resistor values, and some > RMS deviation measure can be made. It'll take 400-ish cases, > and a simple "R2 greater than or equal to R3" free decision > takes it down to 200. That, you can do by brute force search > (though the ordering of the results isn't certain, you might have > to sort the achieved gains before comparing them to the targets). > > But, that just seems so dull. So, I made a ...more interesting problem. > My bad. Maybe I'm being thick here.... 1 x n^3 = 20 thus you can get the multiplier n = 2.71. Thus the wanted values are 1k, 2.71k, 7.34k, 20k. Am I totally missing something? NT
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <'''newspam'''@nezumi.demon.co.uk> |
|---|---|
| Date | 2017-10-19 13:32 +0100 |
| Message-ID | <osa61k$cuk$1@gioia.aioe.org> |
| In reply to | #482104 |
On 19/10/2017 12:47, tabbypurr@gmail.com wrote: > On Thursday, 19 October 2017 09:01:17 UTC+1, whit3rd wrote: >> On Wednesday, October 18, 2017 at 5:41:58 PM UTC-7, bitrex wrote: >>> On 10/18/2017 07:51 PM, whit3rd wrote: >>>> On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: >>>>> On 10/17/2017 01:57 PM, George Herold wrote: >>>>> >>>>>>> If you can write a little code it's a small enough state space >> >>>> Or not. The only constraint, is that we have a 'resistor network' with two >>>> inputs (ground, and op amp Vout), and one output (inverting connection to >>>> the op amp), which is then modified by three shunts... >>>> 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. >> >>> OP gave the impression that the [circuit topology was fixed] >> >> ... Oh, yeah, just parallel links. With all shunts open, the unswitched resistance >> sets the gain-of-20, and with all three closed (lowest resistance) you >> get gain-of-1, so there's only two free resistor values, and some >> RMS deviation measure can be made. It'll take 400-ish cases, >> and a simple "R2 greater than or equal to R3" free decision >> takes it down to 200. That, you can do by brute force search >> (though the ordering of the results isn't certain, you might have >> to sort the achieved gains before comparing them to the targets). >> >> But, that just seems so dull. So, I made a ...more interesting problem. >> My bad. > > > Maybe I'm being thick here.... > 1 x n^3 = 20 > thus you can get the multiplier n = 2.71. Thus the wanted values are 1k, 2.71k, 7.34k, 20k. > Am I totally missing something? Those are the required resistance of the feedback network with certain switches closed (or with the 3 switches R || 20k = your values). -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | tabbypurr@gmail.com |
|---|---|
| Date | 2017-10-19 06:05 -0700 |
| Message-ID | <699d980b-838a-4ade-bdbf-c72bbf516ff5@googlegroups.com> |
| In reply to | #482107 |
On Thursday, 19 October 2017 13:32:59 UTC+1, Martin Brown wrote: > On 19/10/2017 12:47, tabbypurr wrote: > > On Thursday, 19 October 2017 09:01:17 UTC+1, whit3rd wrote: > >> On Wednesday, October 18, 2017 at 5:41:58 PM UTC-7, bitrex wrote: > >>> On 10/18/2017 07:51 PM, whit3rd wrote: > >>>> On Tuesday, October 17, 2017 at 12:02:20 PM UTC-7, bitrex wrote: > >>>>> On 10/17/2017 01:57 PM, George Herold wrote: > >>>>> > >>>>>>> If you can write a little code it's a small enough state space > >> > >>>> Or not. The only constraint, is that we have a 'resistor network' with two > >>>> inputs (ground, and op amp Vout), and one output (inverting connection to > >>>> the op amp), which is then modified by three shunts... > >>>> 7 * 56**3 * 20**12 = 5.1E21 cases to calculate. > >> > >>> OP gave the impression that the [circuit topology was fixed] > >> > >> ... Oh, yeah, just parallel links. With all shunts open, the unswitched resistance > >> sets the gain-of-20, and with all three closed (lowest resistance) you > >> get gain-of-1, so there's only two free resistor values, and some > >> RMS deviation measure can be made. It'll take 400-ish cases, > >> and a simple "R2 greater than or equal to R3" free decision > >> takes it down to 200. That, you can do by brute force search > >> (though the ordering of the results isn't certain, you might have > >> to sort the achieved gains before comparing them to the targets). > >> > >> But, that just seems so dull. So, I made a ...more interesting problem. > >> My bad. > > > > > > Maybe I'm being thick here.... > > 1 x n^3 = 20 > > thus you can get the multiplier n = 2.71. Thus the wanted values are 1k, 2.71k, 7.34k, 20k. > > Am I totally missing something? > > Those are the required resistance of the feedback network with certain > switches closed (or with the 3 switches R || 20k = your values). yes, my oops. R1=1k R1|R2|R3|R4 = 20k and R4/R1 = n^3 NT
[toc] | [prev] | [next] | [standalone]
| From | whit3rd <whit3rd@gmail.com> |
|---|---|
| Date | 2017-10-19 22:26 -0700 |
| Message-ID | <12da0751-b4c0-419c-9195-aee0b2aad18f@googlegroups.com> |
| In reply to | #482104 |
On Thursday, October 19, 2017 at 4:47:18 AM UTC-7, tabb...@gmail.com wrote: > Maybe I'm being thick here.... > 1 x n^3 = 20 > thus you can get the multiplier n = 2.71. Thus the wanted values are 1k, 2.71k, 7.34k, 20k. > Am I totally missing something? The three switches determine eight possible gain settings. Eight distinct combinations, eight gains, not four, was the hope. Me, I'd do it with eight resistors, and n^7=20 sets the stepping...
[toc] | [prev] | [next] | [standalone]
| From | Clive Arthur <cliveta@nowaytoday.co.uk> |
|---|---|
| Date | 2017-10-17 20:07 +0100 |
| Message-ID | <os5kec$r33$1@dont-email.me> |
| In reply to | #481781 |
On 17/10/2017 18:57, George Herold wrote: > On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: >> On 10/17/2017 12:25 PM, Clive Arthur wrote: >>> I have a standard inverting op-amp with a 1k input resistor. >>> >>> The feedback comprises one fixed resistor with three more parallel >>> resistors which can be connected or disconnected by analog switches, >>> giving 8 possible gain settings. >>> >>> I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's >>> inverting) >>> >>> Clearly, the fixed resistor should be 20k to give a gain of 20 with all >>> three switches open. Likewise all four in parallel (all three switches >>> closed) should equal 1k. >>> >>> I'd like to space the gain settings evenly, so the eight gain settings >>> would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. >>> >>> What's the best way to work out resistor values to get as close as I can >>> to this ideal? >>> >>> The circuit exists and can't be changed. >>> >>> Cheers >> >> If you can write a little code it's a small enough state space to simply >> brute force search on all combinations of 1% resistor values. > > I'd do a hunt and peck type thing too. > Stepping back a moment, he's got a geometric progression. > (1.53)^n. The R ratio's will be linear.. I think, so I'm not > sure it can be done. Then again I'm often wrong. :^) > > George H. I think it can't be done to any useful accuracy, so I'm prepared to sacrifice the number of gain steps as long as it's still roughly geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a push. I'm not proud. Cheers -- Clive
[toc] | [prev] | [next] | [standalone]
| From | bitrex <bitrex@de.lete.earthlink.net> |
|---|---|
| Date | 2017-10-17 15:10 -0400 |
| Message-ID | <3BsFB.3327$5e.1044@fx03.iad> |
| In reply to | #481791 |
On 10/17/2017 03:07 PM, Clive Arthur wrote: > On 17/10/2017 18:57, George Herold wrote: >> On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: >>> On 10/17/2017 12:25 PM, Clive Arthur wrote: >>>> I have a standard inverting op-amp with a 1k input resistor. >>>> >>>> The feedback comprises one fixed resistor with three more parallel >>>> resistors which can be connected or disconnected by analog switches, >>>> giving 8 possible gain settings. >>>> >>>> I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's >>>> inverting) >>>> >>>> Clearly, the fixed resistor should be 20k to give a gain of 20 with all >>>> three switches open. Likewise all four in parallel (all three switches >>>> closed) should equal 1k. >>>> >>>> I'd like to space the gain settings evenly, so the eight gain settings >>>> would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. >>>> >>>> What's the best way to work out resistor values to get as close as I >>>> can >>>> to this ideal? >>>> >>>> The circuit exists and can't be changed. >>>> >>>> Cheers >>> >>> If you can write a little code it's a small enough state space to simply >>> brute force search on all combinations of 1% resistor values. >> >> I'd do a hunt and peck type thing too. >> Stepping back a moment, he's got a geometric progression. >> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >> sure it can be done. Then again I'm often wrong. :^) >> >> George H. > > I think it can't be done to any useful accuracy, so I'm prepared to > sacrifice the number of gain steps as long as it's still roughly > geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a > push. I'm not proud. > > Cheers When I get a chance this week I'll try whipping up a Python script to brute-force the original problem with real resistor values and see if it comes up with anything useful
[toc] | [prev] | [next] | [standalone]
| From | piglet <erichpwagner@hotmail.com> |
|---|---|
| Date | 2017-10-17 20:35 +0100 |
| Message-ID | <os5m1n$8n5$1@dont-email.me> |
| In reply to | #481791 |
On 17/10/2017 20:07, Clive Arthur wrote: > On 17/10/2017 18:57, George Herold wrote: >> On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: >>> On 10/17/2017 12:25 PM, Clive Arthur wrote: >>>> I have a standard inverting op-amp with a 1k input resistor. >>>> >>>> The feedback comprises one fixed resistor with three more parallel >>>> resistors which can be connected or disconnected by analog switches, >>>> giving 8 possible gain settings. >>>> >>>> I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's >>>> inverting) >>>> >>>> Clearly, the fixed resistor should be 20k to give a gain of 20 with all >>>> three switches open. Likewise all four in parallel (all three switches >>>> closed) should equal 1k. >>>> >>>> I'd like to space the gain settings evenly, so the eight gain settings >>>> would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. >>>> >>>> What's the best way to work out resistor values to get as close as I >>>> can >>>> to this ideal? >>>> >>>> The circuit exists and can't be changed. >>>> >>>> Cheers >>> >>> If you can write a little code it's a small enough state space to simply >>> brute force search on all combinations of 1% resistor values. >> >> I'd do a hunt and peck type thing too. >> Stepping back a moment, he's got a geometric progression. >> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >> sure it can be done. Then again I'm often wrong. :^) >> >> George H. > > I think it can't be done to any useful accuracy, so I'm prepared to > sacrifice the number of gain steps as long as it's still roughly > geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a > push. I'm not proud. > > Cheers 39kohm, 13kohm, 1200ohm get very roughly gain steps 20, 13, 8, 6 but quickly tails off too quickly towards 1. Doubt you can get the kind of curve you hope just with shunt switching alone. piglet
[toc] | [prev] | [next] | [standalone]
| From | Martin Riddle <martin_ridd@verizon.net> |
|---|---|
| Date | 2017-10-17 20:21 -0400 |
| Message-ID | <qh7ducd7paj7gr2v1fl0jrrbltc32fpk1b@4ax.com> |
| In reply to | #481798 |
On Tue, 17 Oct 2017 20:35:17 +0100, piglet <erichpwagner@hotmail.com> wrote: >On 17/10/2017 20:07, Clive Arthur wrote: >> On 17/10/2017 18:57, George Herold wrote: >>> On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: >>>> On 10/17/2017 12:25 PM, Clive Arthur wrote: >>>>> I have a standard inverting op-amp with a 1k input resistor. >>>>> >>>>> The feedback comprises one fixed resistor with three more parallel >>>>> resistors which can be connected or disconnected by analog switches, >>>>> giving 8 possible gain settings. >>>>> >>>>> I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's >>>>> inverting) >>>>> >>>>> Clearly, the fixed resistor should be 20k to give a gain of 20 with all >>>>> three switches open. Likewise all four in parallel (all three switches >>>>> closed) should equal 1k. >>>>> >>>>> I'd like to space the gain settings evenly, so the eight gain settings >>>>> would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. >>>>> >>>>> What's the best way to work out resistor values to get as close as I >>>>> can >>>>> to this ideal? >>>>> >>>>> The circuit exists and can't be changed. >>>>> >>>>> Cheers >>>> >>>> If you can write a little code it's a small enough state space to simply >>>> brute force search on all combinations of 1% resistor values. >>> >>> I'd do a hunt and peck type thing too. >>> Stepping back a moment, he's got a geometric progression. >>> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >>> sure it can be done. Then again I'm often wrong. :^) >>> >>> George H. >> >> I think it can't be done to any useful accuracy, so I'm prepared to >> sacrifice the number of gain steps as long as it's still roughly >> geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a >> push. I'm not proud. >> >> Cheers > >39kohm, 13kohm, 1200ohm get very roughly gain steps 20, 13, 8, 6 but >quickly tails off too quickly towards 1. Doubt you can get the kind of >curve you hope just with shunt switching alone. > >piglet Agreed, Plugging it intoo a spreadsheet gives similar results. If he had 1 more resistor and a minimum gain of > 1 Cheers
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <'''newspam'''@nezumi.demon.co.uk> |
|---|---|
| Date | 2017-10-18 09:03 +0100 |
| Message-ID | <os71sm$1f12$1@gioia.aioe.org> |
| In reply to | #481791 |
On 17/10/2017 20:07, Clive Arthur wrote: > On 17/10/2017 18:57, George Herold wrote: >> On Tuesday, October 17, 2017 at 1:45:29 PM UTC-4, bitrex wrote: >>> On 10/17/2017 12:25 PM, Clive Arthur wrote: >>>> I have a standard inverting op-amp with a 1k input resistor. >>>> >>>> The feedback comprises one fixed resistor with three more parallel >>>> resistors which can be connected or disconnected by analog switches, >>>> giving 8 possible gain settings. >>>> >>>> I want a minimum gain of 1 and a maximum of 20. (ok, -1 and -20, it's >>>> inverting) >>>> >>>> Clearly, the fixed resistor should be 20k to give a gain of 20 with all >>>> three switches open. Likewise all four in parallel (all three switches >>>> closed) should equal 1k. >>>> >>>> I'd like to space the gain settings evenly, so the eight gain settings >>>> would ideally be 1, 1.53, 2.35, 3.61, 5.54, 8.5, 13.0, 20. >>>> >>>> What's the best way to work out resistor values to get as close as I >>>> can >>>> to this ideal? >>>> >>>> The circuit exists and can't be changed. >>>> >>>> Cheers >>> >>> If you can write a little code it's a small enough state space to simply >>> brute force search on all combinations of 1% resistor values. >> >> I'd do a hunt and peck type thing too. >> Stepping back a moment, he's got a geometric progression. >> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >> sure it can be done. Then again I'm often wrong. :^) >> >> George H. > > I think it can't be done to any useful accuracy, so I'm prepared to > sacrifice the number of gain steps as long as it's still roughly > geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a > push. I'm not proud. Assuming the 20k and the other end point 1k are hard constraints then you can do it in a spreadsheet using least squares or least 1-norm fitting to choose your resistors. Your problem is that to hit both 1 and 20 simultaneously means there will be far too many gain steps near 1. If we make the simplifying assumption that all resistors are in parallel and that 20k is in parallel with all the switched ones then it is a two parameter problem in a and b. since 1 = 1/(1/a+1/b+1/c+1/20) You know that all switches open gives 20k and all closed gives 1k. You can hit two more gain steps accurately and one inaccurately you can choose which ones matter to you the most. Something like (20k) 18k, 5.8k and 1.4k gives gain steps of 1 1.059027217 1.210077728 1.297595832 3.579815438 4.472135813 9.457409024 20 You can't get the 2.11 without compromising a lot on the others. -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
| From | Martin Brown <'''newspam'''@nezumi.demon.co.uk> |
|---|---|
| Date | 2017-10-18 12:20 +0100 |
| Message-ID | <os7dd5$3jk$1@gioia.aioe.org> |
| In reply to | #481791 |
On 17/10/2017 20:07, Clive Arthur wrote: > On 17/10/2017 18:57, George Herold wrote: >> Stepping back a moment, he's got a geometric progression. >> (1.53)^n. The R ratio's will be linear.. I think, so I'm not >> sure it can be done. Then again I'm often wrong. :^) >> >> George H. > > I think it can't be done to any useful accuracy, so I'm prepared to > sacrifice the number of gain steps as long as it's still roughly > geometric. Even 1, 2.11, 4.47, 9.45, 20 each +/-20% would work at a > push. I'm not proud. Best I can think of is use a divider chain in the feedback loop and also one in the input impedance path so that you can generate : 1, x^2, x^4 where x^4 = 20 (2 switches) and in the other leg 1 x (1 switch) Combined you get 1 x x^2 x^3 x^4 x^5 with good ratios. Or 3 switches in feedback and more or less exact 20, 11.66, 3.14, 1.83 giving gains of 20, 7.36, 2.71, 1 -- Regards, Martin Brown
[toc] | [prev] | [next] | [standalone]
Page 1 of 3 [1] 2 3 Next page →
Back to top | Article view | sci.electronics.design
csiph-web