How to implement I_in = f(V_in, I_in) with a current mirror (maybe)

Thread Starter

kiroma

Joined Apr 30, 2014
143
Hi

So I saw this Circuit in Falstad, and was wondering how should one design such circuit.
In summary, it's a current mirror that the current can be controlled in one end, and also it's dependent on a input voltage.
As I don't see how can input voltage control the output while also maintaining the current control, I created this thread, thus our more clever and experienced members can delve into this.
It isn't needed for anything, I just want to know if it's possible using analog only, and how complicated that is.
 

panic mode

Joined Oct 10, 2011
5,189
Buffer from Y to X using OpAmp. then connect Rv and 100 Ohm to X. current depends on voltage and Rv position. then add OpAmp(s) to monitor voltage drop across 100 Ohm resistor and create same magnitude of current at Z.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
Buffer from Y to X using OpAmp. then connect Rv and 100 Ohm to X. current depends on voltage and Rv position. then add OpAmp(s) to monitor voltage drop across 100 Ohm resistor and create same magnitude of current at Z.
That's a good approach. I was too tied to the microelectronic way, with current mirrors.
Is there a way with discrete components? I feel that it might have a simple solution.
 

eetech00

Joined Jun 8, 2013
4,725
That's a good approach. I was too tied to the microelectronic way, with current mirrors.
Is there a way with discrete components? I feel that it might have a simple solution.
A current mirror is a current controlled current source. There are different configurations and can be either BJTs or mosfets. Wikipedia has a basic description with some references.

Post 2 is a different configuration called a "voltage to current converter". Its basically a voltage controlled current source.
 

Rf300

Joined Apr 18, 2025
119
This current mirror works only well with matched transistors on a single chip. With 2 discrete transistors the current mirror is not perfect due to variations of the I_C vs. V_BE characteristic. Adding two resistors at the emitters may help.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
This current mirror works only well with matched transistors on a single chip. With 2 discrete transistors the current mirror is not perfect due to variations of the I_C vs. V_BE characteristic. Adding two resistors at the emitters may help.
The interesting part is that everything that needs to be precisely matched can only be done when making it all in a single chip, which is also nice because the noise, temperature, any variation, is always the same throughout the chip. It gives me a sense of marvelous luck that humanity had. We didn't have to contour with something else that is bad and needs optimization. With 70s technology wonders were already being made and few people seem to recognize that.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
You can buy matched transistor pairs in a signal package which should work well in a current-mirror.
I've seen this matched pair in a 80s very low distortion function generator, it's the DS360.
It's all made with differential pairs and relays to commute the gain and frequency. Lot's of ICs and discrete components.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
This current mirror works only well with matched transistors on a single chip. With 2 discrete transistors the current mirror is not perfect due to variations of the I_C vs. V_BE characteristic. Adding two resistors at the emitters may help.
Resistors at the emitter may limit the current you can have, depending on how much feedback you're putting into the emitter with these resistors. It's also needed to put low tolerance resistors. It's a short blanket.
 

WBahn

Joined Mar 31, 2012
33,079
I still have no idea what the actual problem is that you are trying to solve. This is the first mention I've seen of a blanket. What blanket? Used for what?

Please describe what you are trying to accomplish. Not how you are trying to do it, but what the end goal is. We have seen time and time again where someone is going down a rabbit hole trying to force a way to make a poor approach work when the actual problem being solved was trivially accomplished once they finally took a step back and told us what that was.
 

WBahn

Joined Mar 31, 2012
33,079
The interesting part is that everything that needs to be precisely matched can only be done when making it all in a single chip, which is also nice because the noise, temperature, any variation, is always the same throughout the chip. It gives me a sense of marvelous luck that humanity had. We didn't have to contour with something else that is bad and needs optimization. With 70s technology wonders were already being made and few people seem to recognize that.
As someone that designed ICs, I can tell you that they are NOT always the same throughout the chip! We sometimes had to go to rather extreme measures to get the level of matching that was needed.

Compared to discrete designs, it is a generally valid approximation. But IC designs have their own Achilles heels. It's easy to get a discrete resistor with a tolerance of a fraction of a percent. Getting that on an IC is extremely difficult. Both realms have their strengths and weaknesses and you have to learn how to design for each in a way that leverages the strengths and mitigates the weaknesses. The result is that you can't just take a high-performing discrete circuit and implement in on an IC and expect similar or better performance. There's a very real chance it won't work at all. The same is true going the other way. Discrete and integrated topologies that accomplish the same thing are often radically different. This was something that many of our customers, who had often spent months or even years getting a discrete prototype to work beautifully, often had difficulty grasping until we explained it to them and pointed out features in their design that were not going to translate into a reliable integrated solution. At that point they started grasping that we were going to have to design a new circuit from scratch that met their performance requirements, not one that replicated the solution they already had so much invested in.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
As someone that designed ICs, I can tell you that they are NOT always the same throughout the chip! We sometimes had to go to rather extreme measures to get the level of matching that was needed.

Compared to discrete designs, it is a generally valid approximation. But IC designs have their own Achilles heels. It's easy to get a discrete resistor with a tolerance of a fraction of a percent. Getting that on an IC is extremely difficult. Both realms have their strengths and weaknesses and you have to learn how to design for each in a way that leverages the strengths and mitigates the weaknesses. The result is that you can't just take a high-performing discrete circuit and implement in on an IC and expect similar or better performance. There's a very real chance it won't work at all. The same is true going the other way. Discrete and integrated topologies that accomplish the same thing are often radically different. This was something that many of our customers, who had often spent months or even years getting a discrete prototype to work beautifully, often had difficulty grasping until we explained it to them and pointed out features in their design that were not going to translate into a reliable integrated solution. At that point they started grasping that we were going to have to design a new circuit from scratch that met their performance requirements, not one that replicated the solution they already had so much invested in.
Thank you for that info, it's very important to me. I had this misconception, it seems.
 

Thread Starter

kiroma

Joined Apr 30, 2014
143
I still have no idea what the actual problem is that you are trying to solve. This is the first mention I've seen of a blanket. What blanket? Used for what?

Please describe what you are trying to accomplish. Not how you are trying to do it, but what the end goal is. We have seen time and time again where someone is going down a rabbit hole trying to force a way to make a poor approach work when the actual problem being solved was trivially accomplished once they finally took a step back and told us what that was.
Sorry if sometimes I don't type all the thought carefully.
The "problem" was in the first post, it's to replicate that Falstad example with analog, preferably with current mirror(s).
@panic mode did it wonderfully, I think. And when I saw that simulation and the circuit, I saw that I was thinking in a wrong way about solving this problem with current mirror(s). I was thinking it should be a lot more complicated.

About the short blanket, it's an expression often used in engineering. It's used when you have a trade-off between specs. It's short because you can't cover your feet while covering your head, so you must choose just one.
I thinking this expression caught in Portuguese because we don't really have a word that expresses what "trade-off" means. It's different from "trade", which we do have. Hope this clears the confusion.
 

WBahn

Joined Mar 31, 2012
33,079
Sorry if sometimes I don't type all the thought carefully.
The "problem" was in the first post, it's to replicate that Falstad example with analog, preferably with current mirror(s).
@panic mode did it wonderfully, I think. And when I saw that simulation and the circuit, I saw that I was thinking in a wrong way about solving this problem with current mirror(s). I was thinking it should be a lot more complicated.
This is all I see when I follow that link. I don't see any way to see what is in the XYZ box or have any idea what the relationships between the inputs and the output is or even, truth be told, which pins are positively inputs and which are outputs, though I'm assuming that X and Y are inputs and Z is the output. I can't see how to apply the title to it, either, since " I_in = f(V_in, I_in) " leaves me scratching my head. What does it mean for I_in to be a function of both I_in and V_in? And what about the third pin?

I don't use the Falstad example (I hate the thing), so it's probably just me not knowing how to delve into it.

1787837046594.png

About the short blanket, it's an expression often used in engineering. It's used when you have a trade-off between specs. It's short because you can't cover your feet while covering your head, so you must choose just one.
I thinking this expression caught in Portuguese because we don't really have a word that expresses what "trade-off" means. It's different from "trade", which we do have. Hope this clears the confusion.
Ah, thanks for the explanation. It's an expression I've never heard in an engineering context, though the notion of the issues associated with having to sleep with a blanket that's too short is in the broader cultural awareness, but I think I've really only come across it as a visual joke in old movie clips, never used as a metaphor for not being able to get everything you want. As you say, we have words like "trade-offs" and "compromises" to fill those needs. That's one of the nice things about the English language, what we don't have, we will gladly steal from any other language without shame or apology.
 
Top