Anyone Familiar With This Circuit Logic in Analog Way? - Page 1
Forum section: electronics / beginners

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 07, 2016, 05:54:59 pm
content: i can do it with mcu, but it seems to be overkill and unstable (PWM output need taming to make it a stable voltage, (DAC)), and probably slower. so i'm seeking analog way of doing this, not sure the correct term for this kind of circuit to google.basically the circuit will output the lowest voltage between its input voltages. i'm thinking of some transistors arrangement, but i cant think of a proper way.spec:- both input impedance should be high somewhere greater than 100Kohm (1Mohm preferably) because Vi1 and Vi2 come from high resistive voltage divider impedance of around 10Kohm.- BW: dont care, as long as it can produce stable voltage. somewhere above 10KHz will be acceptable- output capacity is to be used as Vref for other circuit, so output impedance doesnt necesarily to be significantly low since it wont drive any significant load.- a slight voltage drop (diode) is acceptable since it can be compensated on the inputs.

author: Signal32
author_rank: Frequent Contributor
timestamp: July 07, 2016, 06:22:29 pm
content: How about comparator which drives two MOSFET's, one MOSFET is on when comparator output is high and other MOSFET is on when comparator output is low.MOSFET source connected together, here is where you will find your voltage.Something like attached ( appropriate transistor resistors not included + you may also have to swap which voltage goes to which MOSFET drain)

author: bson
author_rank: Unknown
timestamp: July 07, 2016, 06:52:49 pm
content: A comparator and an analog 2:1 mux. Buffer the inputs.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 07, 2016, 07:04:58 pm
content: thanks Signal32. can i change the n-mosfets with npn bjts? which one better? i heard mosfet is less stable compared to bjt in linear mode, no?bson, i dont have 2 channel analog multiplexer. i'm trying the discrete solution.

author: Signal32
author_rank: Frequent Contributor
timestamp: July 07, 2016, 07:17:48 pm
content: BJT's will not work here at all because of multiple reasons. You're trying to forward a high-impedance voltage. There will be a voltage drop across the junction of the BJT. Also you'll be controlling the base with a different voltage which will mess up forwarding the original voltage.

author: dmills
author_rank: Super Contributor
timestamp: July 07, 2016, 08:11:44 pm
content: 100K resistor from a supply more positive then your maximum input to the base of a NPN transistor, 22K emitter resistor.A diode from the base to each of your inputs, output is the emitter, job done?The base will be ~0.6 volts more positive then the lower one of your inputs (Due to the diode), so the emitter will be at a voltage equal to your lower input.If you want to buffer, replace the diodes with two PNP transistors, and lower all the resistors by a factor of 10 (but do respect the reverse Vbe limit of the PNP parts).Regards, Dan.

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 07, 2016, 08:49:03 pm
content: Quote from: dmills on July 07, 2016, 08:11:44 pmif you meant this, i think the base voltage will follow the larger input...

author: rfeecs
author_rank: Frequent Contributor
timestamp: July 07, 2016, 08:54:00 pm
content: Maybe something like this?

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 07, 2016, 09:06:35 pm
content: Quote from: rfeecs on July 07, 2016, 08:54:00 pmit seems to do the job in simulation. but requiring 2 opamps. thanks.

author: dmills
author_rank: Super Contributor
timestamp: July 07, 2016, 09:23:02 pm
content: Quote from: Mechatrommer on July 07, 2016, 08:49:03 pmDiodes the other way around, output from the other end of the 22K, bottom of the 22K to negative rail.Or replace diodes with PNP transistors, emitter to the base of the NPN, collector to negative rail input to base of PNP.Pretty sure either will get it done.Regards, Dan.

author: StillTrying
author_rank: Super Contributor
timestamp: July 07, 2016, 09:30:50 pm
content: Yes, 2 op amps and 2 diodes seem to be quite good, output will only go down to 0.8V though.Posted in full in case any LT'er wants to continue with it.

author: rfeecs
author_rank: Frequent Contributor
timestamp: July 07, 2016, 10:06:26 pm
content: Quote from: StillTrying on July 07, 2016, 09:30:50 pmThose little glitches at the transitions might start to be a problem up at 10kHz.Here's another possible version of Dan's circuit:

author: StillTrying
author_rank: Super Contributor
timestamp: July 07, 2016, 11:42:23 pm
content: rfeecs/Dan's 2 transistor version.Emitter resistors 1K, diodes pull-up resistor 10K, freq 10 KHz. Input Z probably varies 150K-400K, output Z8 to 5K ?

author: Mechatrommer
author_rank: Super Contributor
timestamp: July 07, 2016, 11:58:31 pm
content: Quote from: dmills on July 07, 2016, 09:23:02 pmunderstood and it worked in sim, thanks.

author: dmills
author_rank: Super Contributor
timestamp: July 08, 2016, 12:26:54 am
content: The three transistor variant has much higher input Z if that matters to you.Regards, Dan.