Electronics-Related.com
Forums

1/x function with op amps or multiplier or something else...

Started by Fibo April 15, 2016
On 16 Apr 2016 14:45:25 -0700, Winfield Hill
<hill@rowland.harvard.edu> wrote:

>Jim Thompson wrote... >> Jim Thompson wrote: >>> On 14 Apr 2016, Fibo wrote: >>>> >>>> I'm trying to figure out the best way to go about >>>> making a -1/x function in hardware. >>> >>> See... >>><http://www.analog-innovations.com/SED/OneOverV_2016-04-16_11-10-50.png> >>> I leave it as an exercise for the student to convert the output >>> current from C4 to the appropriate voltage needs of your system ;-) >> >> Even better, force the left-side diode... >> <http://www.analog-innovations.com/SED/OneOverV_2016-04-16_11-51-22.png> > > The MAT04, of course, is long gone. When it was > still available, it cost more than a multiplier IC. > Looking at AoE-III Table 8.1b, page 502, we see the > only matched quad NPN is the THAT 300, about $10. > > The Analog Devices AD633 "low-cost" multiplier IC > is $9.15. My favorite AD734 costs $28. But oops, > besides $$$, neither part can run on +/-5 volts. > > We're again forced to regret that Barrie Gilbert > and Analog Devices haven't chosen to update their > accurate, medium-speed analog multiplier designs.
Wonder how well matched the devices are in an MPQ2222? But, as multipliers go, this application doesn't need an exotic multiplier. Wonder what the golden oldies MC1594-95-96 go for now-a-days? ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
Here, see if this fits, I linked it where I can post attachments...

http://www.eevblog.com/forum/projects/alegbraic-inversion-for-other-forum/

Steve 
On Thu, 14 Apr 2016 20:18:25 -0700 (PDT), Fibo <panfilero@gmail.com>
wrote:

>Hello, > >I'm trying to figure out the best way to go about making a -1/x function in hardware. From googling around I see 2 methods, > >1. Inverting log -> Anti-log >2. OpAmp with multiplier in the feedback loop > >I have +/-5V rails available, and my input is from 0.4V to 2V (which should give me an output of (-2.5 to -0.5). All DC values. > >Can anyone point me in the right direction here, I'm trying to do this with as few parts (no microcontroller) and as painlessly as possible, it doesn't have to be very accurate (2-5% error it ok). > >Much Thanks!
My posting of... <http://www.analog-innovations.com/SED/OneOverV_2016-04-16_11-51-22.png> is a bit obscure, given the scrambled pin-out of the MAT-04. So I have drawn up an easier to follow schematic along with an explanation of how it works. This explanation is on the S.E.D/Schematics Page of my website as "OneOverV_Explained.pdf" ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
On Sat, 16 Apr 2016 18:07:13 -0700 (PDT), sroberts6328@gmail.com
wrote:

>Here, see if this fits, I linked it where I can post attachments... > >http://www.eevblog.com/forum/projects/alegbraic-inversion-for-other-forum/ > >Steve
Thanks, Steve! I had forgotten all the CA parts from the past. The CA3086 should work just fine in my circuit. And there's also the CA3046. I have Spice models for those devices. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
On Thu, 14 Apr 2016 20:18:25 -0700 (PDT), Fibo <panfilero@gmail.com>
wrote:

>Hello, > >I'm trying to figure out the best way to go about making a -1/x function in hardware. From googling around I see 2 methods, > >1. Inverting log -> Anti-log >2. OpAmp with multiplier in the feedback loop > >I have +/-5V rails available, and my input is from 0.4V to 2V (which should give me an output of (-2.5 to -0.5). All DC values. > >Can anyone point me in the right direction here, I'm trying to do this with as few parts (no microcontroller) and as painlessly as possible, it doesn't have to be very accurate (2-5% error it ok). > >Much Thanks!
"OneOverV_Explained.pdf", on the S.E.D/Schematics Page of my website, has been updated, showing it working with CA3046 NPN's. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
On Thu, 14 Apr 2016 20:18:25 -0700 (PDT), Fibo <panfilero@gmail.com>
wrote:

>Hello, > >I'm trying to figure out the best way to go about making a -1/x function in hardware. From googling around I see 2 methods, > >1. Inverting log -> Anti-log >2. OpAmp with multiplier in the feedback loop > >I have +/-5V rails available, and my input is from 0.4V to 2V (which should give me an output of (-2.5 to -0.5). All DC values. > >Can anyone point me in the right direction here, I'm trying to do this with as few parts (no microcontroller) and as painlessly as possible, it doesn't have to be very accurate (2-5% error it ok). > >Much Thanks!
"OneOverV_Explained.pdf", on the S.E.D/Schematics Page of my website, has been further updated, showing it working with CA3046 NPN's, AND with voltage-input/voltage-output... with an added benefit, the voltage at the collector of Q4 is now held at zero volts... improving the matching. ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
Thanks for all the responses, a lot of good info, it's going to take me a while to wrap my head around some of it! Dang smart people in this forum! Much thanks for the OneOverV pdf! 
On Sun, 17 Apr 2016 12:02:12 -0700 (PDT), Fibo <panfilero@gmail.com>
wrote:

>Thanks for all the responses, a lot of good info, it's going to take me a while to wrap my head around some of it! Dang smart people in this forum! Much thanks for the OneOverV pdf!
Fibo, You are quite welcome! (It was fun for me ;-) ...Jim Thompson -- | James E.Thompson | mens | | Analog Innovations | et | | Analog/Mixed-Signal ASIC's and Discrete Systems | manus | | San Tan Valley, AZ 85142 Skype: Contacts Only | | | Voice:(480)460-2350 Fax: Available upon request | Brass Rat | | E-mail Icon at http://www.analog-innovations.com | 1962 | The touchstone of liberalism is intolerance
On 15/04/2016 08:47, whit3rd wrote:
> On Thursday, April 14, 2016 at 8:18:30 PM UTC-7, Fibo wrote: >> Hello, >> >> I'm trying to figure out the best way to go about making a -1/x function in hardware. From googling around I see 2 methods, >> >> 1. Inverting log -> Anti-log >> 2. OpAmp with multiplier in the feedback loop >> >> I have +/-5V rails available, and my input is from 0.4V to 2V > > For a multiplier, one possibility is a variable duty cycle chopper. > Start with a '555 with current source pullup (just a grounded-base PNP transisor > with emitter resistor to +5) to make a sawtooth ('555 powered from GND and -5V, this > makes a 1.67 Vpp triangle). Attenuate the input signal, 'X', to the {0, 1V} range and feed > to a comparator, and use the comparator's open-collector output to chop (shunt > to ground) your other signal, 'Y'. > > After a bit of low-pass filtering, the chopped signal has a value of X * Y /1.67... > > I'd level-translate the triangle with a blocking capacitor and ground-clamp > diode, but there's other options. > > This all assumes that your 'X' input, and your 'Y' output signals can be much > slower than a manageable sawtooth generator. Under 1 kHz would work fine; over > 1 MHz, means you'd be better off with something else. >
Yes, I think the OP said the signals were dc or slow varying so a PWM based multiplier could be a very practical method and avoids all the tempco and matching problems of Vbe based log/exp. piglet
On 18/04/2016 08:06, piglet wrote:
> On 15/04/2016 08:47, whit3rd wrote: >> On Thursday, April 14, 2016 at 8:18:30 PM UTC-7, Fibo wrote: >>> Hello, >>> >>> I'm trying to figure out the best way to go about making a -1/x >>> function in hardware. From googling around I see 2 methods, >>> >>> 1. Inverting log -> Anti-log >>> 2. OpAmp with multiplier in the feedback loop >>> >>> I have +/-5V rails available, and my input is from 0.4V to 2V >> >> For a multiplier, one possibility is a variable duty cycle chopper. >> Start with a '555 with current source pullup (just a grounded-base PNP >> transisor >> with emitter resistor to +5) to make a sawtooth ('555 powered from GND >> and -5V, this >> makes a 1.67 Vpp triangle). Attenuate the input signal, 'X', to the >> {0, 1V} range and feed >> to a comparator, and use the comparator's open-collector output to >> chop (shunt >> to ground) your other signal, 'Y'. >> >> After a bit of low-pass filtering, the chopped signal has a value of X >> * Y /1.67... >> >> I'd level-translate the triangle with a blocking capacitor and >> ground-clamp >> diode, but there's other options. >> >> This all assumes that your 'X' input, and your 'Y' output signals can >> be much >> slower than a manageable sawtooth generator. Under 1 kHz would work >> fine; over >> 1 MHz, means you'd be better off with something else. >> > > Yes, I think the OP said the signals were dc or slow varying so a PWM > based multiplier could be a very practical method and avoids all the > tempco and matching problems of Vbe based log/exp. > > piglet > >
Here is a sketch of the concept I had in mind: <https://www.dropbox.com/s/jnu9c2x3redhnv3/ReciprocatorPWM.pdf> If a 2.5V or similar reference is available then the comparator PWM maker levels can be referenced to that and a wider duty cycle range obtained and less gain needed in the output servo - should improve the accuracy. piglet