A NPN transistor as variable resistor? How to set its output range?

Started by Nicotep, April 23, 2019, 06:22:53 AM

Previous topic - Next topic

Nicotep

First of all, yes i did search on the forum.
I built some nice multi-waveform LFO made with arduino, based on Robert Gallup's code : https://github.com/robertgallup/ArduinoDualLFO and improved it with some Min and Max lfo outputs. I'll be happy to share this if someone's interested.
Until now i was using homemade vactrols to modulate my effects by putting a LED to the pwm output of my arduino LFO. I'd like to avoid using the combo led+ldr, which doesn't work so good once the speed gets high, due to the LED behaviour.. .
After reading http://www.geofex.com/article_folders/lfos/psuedorandom.htm and especially the part "driving effects circuits with the lfo waveforms", I'm wondering how to use properly a NPN transistor as a variable resistor : how to "scale" it so it would replace let's say a 100k pot, and then a 500k pot ? That still remains quite obscure to me...
Thanks

R.G.

Sadly, it is difficult to use a bipolar transistor as a resistor. It can be done, but there are many limitations and special requirements. If it was easy and generally applicable, they would be used as resistors in more circuits.

Bipolar transistors, either NPN or PNP, appear to be variable resistors for a very limited voltage range. If the total voltage across the collector-emitter gets bigger than 50mV (if I remember this correctly - I can look it up if necessary) then the transistor starts distorting because the peaks of the signal get into the constant-current region of the transistor's operation.

Offset voltage is another issue. Having to apply base voltage/current causes an offset of the collector from the emitter, and this shows up in the signal being resisted. This is worst where you're using an NPN as a switch, but it happens in linear mode too.

Oddly, bipolars are better for resistors and switches if you use them backwards, switching collector and emitter. They function as transistors this way, but the emitter-used-as-collector has a low breakdown voltage, maybe 5-7V. The gain is different, as base-emitter junctions are manufactured differnetly from tne base-collector junctions, and this produces not only different gain but also different characteristics of switching and resistance.

By now, you're realizing that all I'm doing is explaining why I can't give you a good answer to the question you're asking.  Within the signal size limitations I mentioned, practically any bipolar transistor can range from a resistance of typically a few ohms up to many megohms.  That means that the problem of scaling a resistance from this depends on setting the base voltage and current to just the right values, and this will unfortunately depend critically on the doping of the junctions, and that is variable even in transistors of the same type number.  That variability means you'd have to measure and tweak every single transistor you use this way to get a specific resistance.

Sorry I can't offer more than helping you understand the problems with this. Variability and repeatability from device to device are constant issues with analog electronics, going all the way back to the first vacuum tubes in the early 1900s.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Mark Hammer

This is why, if you are making an envelope-controlled bandpass filter, like the Doctor Q and similar, it is wise to install a socket for the transistor used in this fashion, and try out different ones until you find a sweep that pleases you.

amptramp

Check out the Univox U-65 amplifier here:



On the bottom left of the picture you will see a phase-shift oscillator used as the tremolo going to a transistor with 100K in parallel used as a variable resistor for adding tremolo at the input.  I have one and it does work.

R.G.

Yes, it does. The 100K resistor means that if the transistor gets too close to completely off (very high resistance) the total seen by the input will get no higher than 100k. If the transistor gets below, say, 1k, it's much the same as anything below that.

The same technique is used in other effects, notably tremolos of one kind or another. The Vox repeat percussion and the Dr. Q filters come to mind.

They're applied in ways that make the lack of easy precision easy to deal with.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

bool

Executive summary: Use a parallel resistor to set the "max" resistance and a series resistor to set the "min" resistance. Let the BJT do the inbetween variations.

R.G.

Yep, that nails the end points.

For the executive's staff who have to get more details for the executive not to have to remember, this leaves only the non-linearity of the NPN resistance between the end points to cope with. Presumably the user of this thing wants it to work mostly in the middle between the end points.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Kipper4

Ma throats as dry as an overcooked kipper.


Smoke me a Kipper. I'll be back for breakfast.

Grey Paper.
http://www.aronnelson.com/DIYFiles/up/

mac

QuoteOddly, bipolars are better for resistors and switches if you use them backwards, switching collector and emitter. They function as transistors this way, but the emitter-used-as-collector has a low breakdown voltage, maybe 5-7V. The gain is different, as base-emitter junctions are manufactured differnetly from tne base-collector junctions, and this produces not only different gain but also different characteristics of switching and resistance.

I have to try this in an envelope filter.
I was using led/ldr for the reasons you noted.

mac
mac@mac-pc:~$ sudo apt-get install ECC83 EL84

PRR

> transistor as a variable resistor

An ideal BJT would have an infinite resistance.

The BJTs we can buy are non-ideal, have "some" resistance, but we can NOT know how much except as a very wide/wild range.

The tremolo works because it has a knob. The user adjusts the base drive until the haw-wah sounds good. Several fixed resistors limit some of the no-good extremes (the 330k in base prevents driving the BJT to near-short, and may mildly extend the "kinda linear" range of resistance). Similar thoughts about the sweep filter.

If you want "XXk ohms", the BJT won't do it for you.

And as R.G. says, the "linear" range is very small, low signal voltages. 30mV-100mV depending how nasty you can allow. The guitar amp adds attenuatation because hot guitars go higher (but this cuts input S/N). The filter app uses the BJT at a very low-swing part of the filter; even so I bet it can be over-driven. FWIW, a broadcast limiter company used a BJT attenuator but it ended up smothered in corrections and trims; as broadcast quality advanced from 1970 they switched to other technology.
  • SUPPORTER

Nicotep

Wauw, thanks for these detailed answers.
When one comes from the digital world (as I do) where everything is, by nature, precise and scalable, entering in the more unpredictable dimension of real components gets sometimes... blurry.
So I understand that using a BJT would do it for rather tolerant circuits like a tremolo. But then, what would be a "systematic", ideal process to control a modulation for a circuit with more precision required ? Like a PT2399 ?