# Compare three voltages by using comparator

I am working on a circuit which compares three voltages V(a), V(b) and V(c) by using only op-amps. To result

• If V(a)>V(b)>V(c) , V(output) should be 15v
• If V(a)>V(c)>V(b) , V(output) should be 15v

• If V(b)>V(a)>V(c) , V(output) should be 10v
• If V(b)>V(c)>V(a) , V(output) should be 10v

• If V(c)>V(a)>V(b) , V(output) should be 5v
• If V(c)>V(b)>V(a) , V(output) should be 5v

This can be done by using transistor and op amps to get lower or higher voltage together but is there solution for that by using just op amps? edited

With this I can compare three voltages and get the higher or lower voltage.

• yes, there is. Why shouldn't there be? What's your transistor-based circuit? Notice that an Opamp in open loop configuration is just a comparator. – Marcus Müller Dec 13 '17 at 23:39
• Show the circuit with transistors which you think works. – WhatRoughBeast Dec 13 '17 at 23:45
• this question smells like school work. is it? – jsotola Dec 13 '17 at 23:47
• Sounds like the same point a solar panel in one of three directions based on input from three LDRs I have been seeing for the past week or so. – Trevor_G Dec 14 '17 at 0:41
• FWIW yes tinyurl.com/y8hezu6m with 1 quad Op Amp and no pots – Sunnyskyguy EE75 Aug 2 '18 at 5:19 