I'm second year Electrical-Electronical Engineering student (It's Electrical Engineering basically but naming issues I guess) and my knowledge about circuits is limited to capacitors, inductors, resistors, basic diodes element-wise and simple circuit analysis using KVL-KCL and Terminal Relations. TL;DR: I have been getting circuit lessons for the past 2 months, so I am not that knowledgeable about circuits (not considering high school experince). Anyways, let me describe my problem. Here's my desing so far: Notes: U6 detects higher of V2 or V3 and outputs a voltage to change the position of SPDT relay which in return activates Q1 or Q2 to by completing the connection between bases of Q1 or Q2. U5 detects if V1 is the highest or not. If not, SPST relay turns on. If V1 is the highest then SPST relay should disconnect the circuit rendering transistors as off. But the problem is if V1=Vhighest, comparator will behave unpreditibly. So for the time being I'm stuck here. I'll be analyzing the circuit as if U5 will work as I wanted then check if this schematic will do what I want. But I'm uploading revised desing before analysis to get feedback. Thanks for your help. Let explain my design: 1- Sensing Unit Positive DC voltage applied stationary LDR's used a light sensing units. Changing resistance values will create different voltage drops across LDR's thus voltage values will be used as inputs. LDRs are near a point. They're angled wrt surface like this: \|/ 2-Control Unit a)Decision Subunit This unit compares input voltages and gives highest input as output. This unit is incomplete and I'll be explaining what I want to and my question in a second. b)Function Subunit This unit generates a PWM wave that drives a PWM Servo Motor. As you can see this unit is also incomplete and I'll be asking about this too. Now, my need: I need to obtain 3 different Square waves each input. For this purpose I tried using transistor as swicthes. When base voltage meets a criteria it'll turn on, thus changing the duty cycle. (So I want 3 states: Q1-2: off, Q1: on Q2: off, Q1: off Q2: on) But I don't know how I can turn my Vhighest information to a controlling information for transistors' on/off states? I thought that if I can compare this Vhighest value with V1, V2 and V3 and find out which one it equals to, then find my way from there but I don't know how I can do it, if this method even sounds plausible. So I need advice about how to complete the incomplete parts of my desing, basically. Notes: If you need further information about project, I can give you this: 3 different PWMs are required for obtaining 3 different states from a motor. If V1 is the highest I need a specific PWM which indicates that light intensity at LDR1 is the highest and changes the angle of motor to a specific value. If V2 is highest then I need another specific PWM and the same for V3. Also this circuit should completely be analog. Please feel free to inform me if my problem is not clear. Another Note: The elements that can be used are limited with LDRs,LEDs, resistor, diodes, capacitor, inductors,op-amps, transistors and servo motor without encoders(don't know what that is)(BTW, I want to recommend this electronic blog which contains of many knowledges about electronic components: http://www.apogeeweb.net/ It is useful!)