Voltage to resistance converter - Page 1
Forum section: electronics / projects

author: sebmadgwick
author_rank: Regular Contributor
timestamp: May 19, 2014, 12:21:56 pm
content: This seems like a simple request but I've never been able to find a solution. How can I make a 'voltage to resistance converter'? For example, adigital potthat uses a 0-VDD signal instead of I2C/SPI.Edit: Maybe some hobby electronics company is sellingthis little circuitalready?

author: perfect_disturbance
author_rank: Regular Contributor
timestamp: May 19, 2014, 12:40:54 pm
content: You could probably do that with an opamp and a MOSFET look at some if the electronic load circuits like the re-load or one of Dave's early videos where he builds an electronic load that circuit may do what you describe with some tweaking.

author: LvW
author_rank: Frequent Contributor
timestamp: May 19, 2014, 12:52:47 pm
content: It seems you are looking for a voltage-controlled resistance, correct?Within some limitations, you can use a FET (linear, ohmic region).As another option an OTA with 100% feedback also can be used as a controlled resistance.However, in both cases the controlled resistance is grounded.

author: ludzinc
author_rank: Unknown
timestamp: May 19, 2014, 12:54:16 pm
content: A FET (not in saturation) can act in this way - but only over a narrow range, and is not very practical.You don't seem to find 'voltage to resistance' converters as they are hard, if not impossible, to make practically.The better (?) question might be to ask what you are trying to achieve. Is the variable voltage to alter the gain in an opamp circuit? You might be better off with fixed gain and voltage controlled attenuation in that instance.Trying to alter the response of an RC circuit? Voltage controlled current source is the bet there.Can you elaborate on your end goal?

author: sebmadgwick
author_rank: Regular Contributor
timestamp: May 19, 2014, 01:12:10 pm
content: Quote from: ludzinc on May 19, 2014, 12:54:16 pmI do not have a specific application in mind. The general context is hacking of existing electronics products/designs; e.g. electric guitar effects pedals, analogue synths.

author: han
author_rank: Frequent Contributor
timestamp: May 19, 2014, 01:42:02 pm
content: voltage to resistance?- for what application?- how big is the load?- freq respond needed?another solution:-you can make from potentiometer coupled to servo + controller for convert voltage to pwm

author: Jeroen3
author_rank: Super Contributor
timestamp: May 19, 2014, 01:56:04 pm
content: There are digital potentiometers.http://www.analog.com/static/imported-files/data_sheets/AD5165.pdfBut creating one is difficult since R=U/I. You need to measure both U and I to control a FET to mimic R.Not a true resistor, since it is limited to the frequency of your control loop.

author: w2aew
author_rank: Super Contributor
timestamp: May 19, 2014, 02:08:31 pm
content: Over a limited resistance range, and for AC signals only, a PIN diode may be used. Typically for RF applications though.

author: ejeffrey
author_rank: Super Contributor
timestamp: May 19, 2014, 03:33:17 pm
content: It is hard to make and it isn't a standard component. One way is to use an analog multiplier in a feedback loop. Set up MOSFET current load, but instead of just using the current sense for feedback, tap of the input voltage as well and use an analog multiplier to calculate V/I (i.e., resistance0. Use that to control the opamp. This should work but it can be a bit finicky. The feedback gain changes dramatically based on input voltage, so you will have to make sure that the loop is stable in the range you care about.A motorized potentiometer or an ADC followed by a digital potentiometer are two obvious alternatives.

author: c4757p
author_rank: Super Contributor
timestamp: May 19, 2014, 03:49:48 pm
content: I'd try to avoid directly making a voltage-controlled resistor, as it's tricky to do and often unnecessary. Most applications for a VCR can be done with some variant on the analog multiplier (withoutsimulating a VCR).One possibility I haven't seen mentioned yet is voltage-controlled bias on an LED,optically coupled to a photoresistor. Not the most linear though, as thegoodphotoresistors are a bit hard to find these days, and they're technically semiconductors and do behave like it.

author: Richard Crowley
author_rank: Super Contributor
timestamp: May 19, 2014, 04:00:16 pm
content: Quote from: sebmadgwick on May 19, 2014, 01:12:10 pmFor that kind of audio applications, it is rather common to find the FET used to accomplish that effect. As others have observed, there is no universal, black-box component to do this. The FET is incorporated into the circuit during the design phase.

author: LvW
author_rank: Frequent Contributor
timestamp: May 19, 2014, 04:15:39 pm
content: Quote from: Richard Crowley on May 19, 2014, 04:00:16 pmAs already mentioned in my contribution above - an "Operational Transconductance Amplifier (OTA)" (avalable as IC) can be used as a voltage or current controlled grounded resistor (external pin available).In this case the device has 100% negative feedback and the resistance is between the inverting input and ground.This method finds application - for example - in integrated active filters.

author: SArepairman
author_rank: Frequent Contributor
timestamp: May 19, 2014, 06:37:20 pm
content: You can make a switched capacitor resistor using a voltage to frequency converter and use the frequency control resistance. this is likely the best wayUse lt1043 datasheet for a dope v to f converter

author: sebmadgwick
author_rank: Regular Contributor
timestamp: May 19, 2014, 07:32:42 pm
content: Thanks for all the suggestions, everyone. I've made motorised pots and LED/LDR combos in the past, they are fun but I'm looking for something a little more robust and deterministic. It sounds like any FET based solution is only going to offer a very limited range.I'm wondering if an ADC-to-digital pot (link in OP) is actually the best solution after all. I assume that the different digital pots could be dropped in to the design to achieve a desired resistance range for a given application.

author: Paul Price
author_rank: Super Contributor
timestamp: May 19, 2014, 09:43:32 pm
content: Microchip also offers several Digital Potentiometers 1k, 10k,100k each has full 8-bit selectable resistance and operate over the 0-5V analog range. Dual pot models also.

author: dannyf
author_rank: Super Contributor
timestamp: May 19, 2014, 09:44:05 pm
content: :This seems like a simple request but I've never been able to find a solution-whenever that's the case, there are usually valid reasons. It is a sign that you should rethink your approach.having said that, one way to do it is via photo resistors driven by a light source.

author: Richard Crowley
author_rank: Super Contributor
timestamp: May 19, 2014, 11:01:27 pm
content: Quote from: sebmadgwick on May 19, 2014, 07:32:42 pmThat depends entirely on your circuit design. It is not an accurate assumption as a generic summary.Digital pots have their place, but you won't find them used in dynamic level or filter control (i.e. wah-wah, limiter/compressor, flanging filtering, etc. etc.) where continuous operation is necessary.Digital pots are, by nature, STEPPED and for years we had to deal with "zipper noise". Then modern versions were designed that sampled the signal waveform and executed the level changes only during the zero-crossing.

author: Kevin.D
author_rank: Frequent Contributor
timestamp: May 19, 2014, 11:58:18 pm
content: Hello Seb ,you could use fets as voltage controlled resistors at very low Vds levels (google "fets as resistors"),both jfets and mosfets can be used but jfets are best since you can get better linearity at higher Vds values (upto .5V Vds with drain to gate feedback).At these low Vds values this itself might not be usefull to you ,but you can use it to form a low power voltage divider then use the output of that to drive a constant resistance circuit .The simulated resistor is dc only of course , something like this .This constant resistance circuit creates the relationship :-R1/Rjfet=Rmfet/Rsense .R1 will need to be large enough so that at the max input voltage and at the max value of resistance of the jfet that the jfets Vds stays in the low linear region .By choice of Rsense you can create any resistance range you want for a given Vctrl range.

author: dannyf
author_rank: Super Contributor
timestamp: May 20, 2014, 12:11:53 am
content: A jfet is a bad choice for a variety of issues, like a lack of consistency from one jfet to another, limited operating range, polarity of signals, non-linearity, etc.

author: David Hess
author_rank: Super Contributor
timestamp: May 20, 2014, 05:23:23 am
content: A pair of photocells can be used to do this. One is used as a feedback element to set the illumination level for a given resistance while the other is uncommitted and may be used as a pretty good resistor. Unfortunately CdS photocells are pretty much unlawful now but an alternative is to use FET based linear optocouplers:http://www.edn.com/design/analog/4368893/Use-a-photoelectric-FET-optocoupler-as-a-linear-voltage-controlled-potentiometerJFETs and MOSFETs can be used as well but the circuits are non-trivial and matched devices are usually needed. It is easier to use some form of voltage controlled amplifier instead.

author: T3sl4co1l
author_rank: Super Contributor
timestamp: May 20, 2014, 06:27:14 am
content: JFETs and MOSFETs are bad for dynamic range. You get maybe a 2:1 resistance range, for signal voltages under maybe 0.2V peak. Sure, you can make a bridge with regular resistors and take the difference, so that 2:1 range goes 0:1, or -0.5 to +0.5. You can put in a big trimmer to account for manufacturing variation, but you still need to figure out the tempco.The traditional way to do this is with any of the arithmetical approaches BJTs offer. You can use BJTs (or just regular diodes) with op-amps to build log-exp functions, and do addition/subtraction on the log term to accomplish multiplication. The diodes/BJTs obviously have to be matched by manufacture and temperature; a few monolithic arrays are still available for purposes such as these. You're still left with either a linear tempco (proportional to absolute temperature, due to k_B*T/q) or some power law (due to I_S). A linear tempco at least isn't too bad; you can get pretty close with an RTD, a silicon type probably being ideal, for apparent reasons.You can also do it kind of all-at-once with a BJT diffamp, which has a tanh(Vin) response, where the "width" of the transfer function is proportional to temperature (k_B*T/q again), and "height" proportional to bias current. The middle of this function, for small inputs (under 30mV or so), is approximately linear, so can be used as a two quadrant multiplier. Traditionally, the collector currents are shuffled around with current mirrors so that they can be subtracted from each other, giving a net bidirectional output current, proportional to input voltage and bias current. Feeding this into a resistor gives voltage again. This circuit is known as an operational transconductance amplifier (OTA), the LM13700 being a good example. The LM13700 is little different than any discrete (or obsolete IC) OTA, the main differences from earlier types being a dual device package, and having linearizing input diodes and optional voltage followers available on chip (just darlington followers, nothing fancy, mind).You can, of course, build one yourself, but the monolithic chip will have an input offset voltage of a couple milivolts (as good as any op-amp), whereas discrete, you'll be lucky to within 50mV without having to match each and every transistor. It is entertaining to touch your finger to a transistor and watch the output drift by whole volts though.Aside: I once built a sampled-autozero OTA circuit, so that for a few microseconds every few miliseconds, the amp was switched away from the signal, the input grounded, and the output fed back to a holding capacitor until it read 0V. The resulting error was applied to the OTA's opposite input, so that the offset voltage is taken up by the hold circuit. Amazingly, torturing any transistor with direct soldering heat resulted only in gain drift, but not offset, even up to insane offsets like 0.5V! I also tried germanium transistors, which worked exactly as well (this shouldn't be a surprise: the gain is dependent on absolute temperature, not semiconductor bandgap), though of course when heated above 100C or so, there simply wasn't anything left, as anything germanium looks like a low-ohm resistor by that temperature.Anyway, this general method can be refined substantially, and you get an analog multiplier chip like the AD633, a four quadrant multiplier good for general purpose analog computing applications. They require a lot of laser trimming (at least, that's my guess), so they aren't very cheap, besides being a fairly low quantity part.Other less fundamental approaches include PWM of a variable voltage (requires slow filtering, leaves residual ripple), or just giving up and doing it digitally (if the bandwidth is low, a uC could do it for under a buck; if the bandwidth is extreme, a high speed ADC, DAC and FPGA could do it for a couple bucks more). Notice, this includes crude approximations, like using a very simple converter (an 8 or 10 level "flash" converter -- like the LM3914 display driver, which is a 10 bit unary ADC; or the 8-level conversions often used internally in PFC controller chips, being an application of such a method), which though semantically unsatisfying (throwing a wad of comparators and junk at it and hoping a solution falls out..), is often sufficient for the purpose.If you can reconsider your application, it would be wise to do so. If you can mathematically prove that you necessarily must have some sort of active, two variable multiplication (or division), you'll have to suck it up and use one of these approaches and deal with the side effects (calibration, stability, drift, accuracy, distortion, cost...).Tim

author: Fank1
author_rank: Regular Contributor
timestamp: May 20, 2014, 11:49:33 am
content: I use an H11F1 optocoupler.

author: N2IXK
author_rank: Frequent Contributor
timestamp: May 20, 2014, 12:43:10 pm
content: At one time, devices called "Vactrols" were available. They consisted of a small incandescent lamp or LED and a CdS photocell in a sealed package. The harder you drove the lamp, the lower the output resistance.http://en.wikipedia.org/wiki/Resistive_opto-isolatorThey were mainly used in audio applications, either as gain controls or as part of compressor/limiter circuits.

author: David Hess
author_rank: Super Contributor
timestamp: May 20, 2014, 12:47:57 pm
content: Quote from: T3sl4co1l on May 20, 2014, 06:27:14 amI have gotten a lot more dynamic range of resistance than 2:1. The last time I did this was with a variable gain amplifier using a MOSFET (2N7000) in the feedback loop of an inverting amplifier so that it was operating against the virtual ground and the dynamic range was at least 10^6:1 with an output voltage range of 0 to 5 volts or so. The control signal needed feedback from the output to correct for modulation of the channel resistance which is a common feature of low distortion wien bridge oscillators that use an FET as a gain control element. I only used one MOSFET because I did not need temperature compensation and control signal linearity was unimportant.For an example of using a pair of matched JFETs as a variable resistor in a differential (not floating) application, take a look at schematic 7 of the Tektronix 7D20.

author: dannyf
author_rank: Super Contributor
timestamp: May 20, 2014, 12:49:47 pm
content: QuoteVery difficult to find. Realistically you have to use lots of source resistance to degenerate the pair to the point where they are much closer to a fixed resistor than a voltage-controlled resistor.

author: David Hess
author_rank: Super Contributor
timestamp: May 20, 2014, 01:57:32 pm
content: Quote from: dannyf on May 20, 2014, 12:49:47 pmThere are two options here. Dual JFETs made by Linear Integrated Systems are not that difficult to procure:http://www.trendsetter.com/SearchResults.asp?Search=23000+23103+23503&Search.x=1&Search.y=1&sort=11Alternatively grading your own and thermally mating them will yield pretty good results but of course they will not work as well as the monolithic devices at the above link. A Vos of 50 millivolts and 100 microvolts per degree C is feasible in this way which is about 2 to 10 times worse than a monolithic pair.

author: atferrari
author_rank: Frequent Contributor
timestamp: June 06, 2014, 01:02:12 pm
content: Quote from: LvW on May 19, 2014, 12:52:47 pmHola Lutz,There is an application of the 13700 IIRC, that mimics a resistor not referred to ground. Not sure if it could be of use here.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: April 10, 2017, 10:21:58 pm
content: If you can decipher the text marked in red, this might be a solution to build Voltage-Controlled-Resistor (VCR) for high signal levels with two enhancement mode MOSFETs ( ...or JFETs if a negative control voltage is acceptable to you )."ENGINEER'S NEWSLETTERWhen a single field-effect transistor is used as a voltage-controlled resistor or a current-controlled resistor, its resistance characteristic unfortunately becomes highly nonlinear at high signal levels, notes D. S. Gibbs, an application engineer at Ferranti Ltd. Oldham, England. But, by using two FETs - either p-type or n-type devices, one inverted and the other noninverted -you can cancel out the nonlinearity of each FET and obtain an extremely linear resistance characteristic.It's done with a potentiometer. The input control signal is applied to the wiper of the potentiometer whose resistance element is connected between the source of one FET and the drain of the other. The gate of the first is then grounded, as is the source of the second. Then the drain of the first and the gate of the second are tied together, with the output takenbetween these two terminals. The potentiometer can now be used to balance the two FETs so that signal distortion can be minimized."If anyone has any other schematics related to a Voltage-Controlled-Resistor for high signal levels, please post them in this thread.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: April 11, 2017, 04:54:28 pm
content: Does Gibb's article describe complementary P-ch and N-ch FETs or non-complementary e.g. N-ch & N-ch FETs ?

author: Rerouter
author_rank: Super Contributor
timestamp: April 13, 2017, 02:29:04 am
content: if you where not opposed to the microcontroller approach, you can use a R2R dac and an op amp to make a constant resistance load,You divide the load input voltage down to cover you maximum voltage range, feed this voltage into a buffered Vref pin, and use the output of the dac as your op amp set point, as the load voltage reduces so does the op amp set point, maintaining a constant resistance.leaving the micro to read in your set point and update the dac to the new resistance, with no fancy math in the middle.

author: BrianHG
author_rank: Super Contributor
timestamp: April 13, 2017, 04:56:08 am
content: If you want to modulate sound, why not use a VCA, (voltage controlled amplifier) or much more precise and better analog 4 quadrant multiplying mixing amplifier. 1 input has your audio signal. The second input comes from a DAC. With input #1 with a +/-1v AC audio signal, input 2 at 0v, output = 0v. Input #2 at 0.5v, output = input +/-1v X input +0.5v = output +/-0.5v. Or in input 2 = 2v, output will = +/-2vac.http://www.analog.com/en/products/linear-products/analog-multipliers-dividers/ad633.html#product-overviewYou can also invert the output by feeding a negative voltage into input #2.It's a little pricey, but, you can make fantastically accurate audio modulators, volume limiters/mixers. I would only use this in really high quality apps like analog studio audio mixers. I'm sure cheaper equivalents exist from third party manufactures.

author: danmcb
author_rank: Regular Contributor
timestamp: April 13, 2017, 10:30:34 am
content: +1 for VCAs.Back in the day the LM13700 TCA was the standard thing in guitar pedals and so on, but it is pretty noisy and generally sounds like crap.Another neat approach worth investigating is a lamp (these days white LED) packaged with an LDR. Not very linear but absolutely a current-controlled resistor. I have used this with some success in compressor designs, with a 3D printed LED/LDR mount.Otherwise, there are very good VCA chips available which can do volume controls (v/dB law, very linear and also low noise) and be used in digital filters. They typically have to work at the virtual earth point of an inverting opamp stage. the classic one was the dBx2150, which is now made by THAT corp. Analogue Devices also had some great chips - SSM2020 - with dual VCA and log rectifiers which are excellent for all kinds of audio building blocks. The data sheets and app notes are worth a read even if you don't use that chip.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: April 13, 2017, 05:05:31 pm
content: Quote from: Rerouter on April 13, 2017, 02:29:04 amNot only such solution is expensive, unwieldy, slow and limited by DAC quantization but complex as well, e.g. for 10-bit DAC it uses 1000x more transistors than an analog solution.The 2 FET analog solution from Gibbs is better in all respects.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: April 13, 2017, 05:52:33 pm
content: Quote from: BrianHG on April 13, 2017, 04:56:08 amBecause this is a solution only when the VCA is used in a volume control like inFig.1. It is also kind of funny because VCAs are implemented with VCRs internallyHowever if the VCR is not a part of a a variable attenuator (or amplifier), then it is a not a good candidate to be substituted by a VCA.The CdS + LED/bulb combo is a nice try but it is bulky and not functional for >1MHz signals. Also it ages pretty quickly.

author: danmcb
author_rank: Regular Contributor
timestamp: April 13, 2017, 07:14:49 pm
content: how can a Voltage Controlled Amplifier not be part of an amplifier?and are you sure that a (modern) LDR is not functional at HF? and that it ages? the old ones were cadmium, but the ones you buy now are not. How do you know they have ageing issues?

author: exoticelectron
author_rank: Regular Contributor
timestamp: April 13, 2017, 08:42:25 pm
content: Ahh the infamous electrically controlled variable resistor..the object of many a young bachelors fantasy. And yet...basically useless. Operating transistors in their linear range is almost never the best solution, especially with something in SOT23 or TO92. If you absolutely need an electrically controlled load, then prepare to make a very good control loop or you will end up in oscillation land. Otherwise, to see where electrically variable resistors are typically used, look to linear regulators. Thats about it.

author: Rerouter
author_rank: Super Contributor
timestamp: April 13, 2017, 10:01:55 pm
content: Quote from: GonzoTheGreat on April 13, 2017, 05:05:31 pmI think you mis-understood me, its an analog control loop, just controlled by a digital set point, it has a loop bandwidth of 100Khz through the DAC, though it would need better compensation to work at such a bandwidth on the op amp side.

author: BrianHG
author_rank: Super Contributor
timestamp: April 14, 2017, 01:55:55 am
content: Quote from: GonzoTheGreat on April 13, 2017, 05:52:33 pm3 terminal CdS + LED, with the LED driven by an op-amp whose - input is sensing one of the 3 pins on the CdS has perfect linearization and perfect age compensation and even temperature compensation. IE you put in a specified voltage, and you will always get the exact same resistance out. I used to use them on my audio pre-amps.Sadly, since many misunderstood the purpose of the 3 pins on these dual element CdS and how to use them, they vanished and I don't believe they are manufactured anymore.If the OP want a perfect, repeatable, true voltage to resistance control to a GND, these would do the trick with an additional op-amp to drive the LED input, however, the ones which may be still available will cost more than the 4 quadrant analog multiplier I linked to above, and with that chip, you can do a lot more, like simulate the distortion of a vacuum tube pre-amplifier almost perfectly, or create log, square root, sine phase shifting, frequency multipliers, and many more all at much higher frequency. All these analog functions are illustrated in the data sheet and the IC is just under 7$.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: June 13, 2017, 02:23:05 pm
content: Quote from: danmcb on April 13, 2017, 07:14:49 pm...as in a treble/bass controls.Indeed, this was badly phrased.Quote from: danmcb on April 13, 2017, 07:14:49 pmYes, I found them to be quite inductive.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: June 13, 2017, 02:30:22 pm
content: Quote from: BrianHG on April 14, 2017, 01:55:55 amFunny that you should mention these Vactrols.That is exactly what I am trying to replace in a large audio mixer (most of them failed ~4 years ago).

author: macona
author_rank: Regular Contributor
timestamp: June 14, 2017, 05:35:26 am
content: Its done all the time in audio control boards, its called a motor driven slide pot!Just set up a servo loop with voltage control and you have a nice voltage controlled resistor.

author: GonzoTheGreat
author_rank: Regular Contributor
timestamp: June 14, 2017, 07:00:38 am
content: Quote from: macona on June 14, 2017, 05:35:26 amYou must be joking ! - I might as well build a new mixer...and a bigger one at that.@GuysWhy can't we get theGibbs' circuitworking?

author: stj
author_rank: Super Contributor
timestamp: June 14, 2017, 07:29:35 am
content: lolask a room full of wanabee scientists and you get a complex answer.just stick a small lamp bulb and a photo-sensitive resistor like an "orp12" into a small section of black tubing!

author: mikerj
author_rank: Super Contributor
timestamp: June 14, 2017, 07:41:30 am
content: Quote from: stj on June 14, 2017, 07:29:35 amYou could read the thread and see this has already been suggested by your so called "wanabe scientists" and rejected by the OP...

author: T3sl4co1l
author_rank: Super Contributor
timestamp: June 15, 2017, 03:52:02 am
content: Quote from: GonzoTheGreat on June 14, 2017, 07:00:38 amIf you want aworkingcircuit, that'll cost extra...Just sayin'....Tim

author: Bernhard
author_rank: Newbie
timestamp: August 21, 2018, 02:39:56 pm
content: Quote from: GonzoTheGreat on June 14, 2017, 07:00:38 amThe part in red is indeed puzzling. Do you have the complete article ?Thanks!