# How to make the the voltage higher after a logic gate

In my circuit a have a 2 switches that connects to a logical gate and the output of gate will go to a relay but after the logic gate the voltage got lower to mili voltage and not enough voltage for the relay to work, they say that I must use capacitor but it only last for a second and I want my relay to work in indefinitely by the result of the two switches of the logic gate. Anyone have an idea or hint to solve my problem?

here's a picture of my circuit design

• Is that really your circuit? It's lacking pull-downs at the gate inputs, there are no current-limiting resistor for the LED, there should be a flyback diode to protect the logic gate from the relay coil switching spikes, relay is anyway unnecessary to light a simple LED from a logic gate output, ... What do you want to do, actually?
– dim
Oct 26, 2016 at 12:21
• sorry to provide less information, the picture is just the vague idea of my circuit and I'm a beginner for circuit designing, so my problem is the input of the logical gate is 9V and the output is just 818.18mV and not enough for the relay to switch or tick to the other rail. Oct 26, 2016 at 12:25
• and is there a way to make the voltage of output of logical gate higher? Oct 26, 2016 at 12:26
• Strictly speaking, you don't need the relay at all. The logic gate can drive the LED (through a resistor) itself.
– JRE
Oct 26, 2016 at 14:16

4081 logic gate, according to its datasheet, can maximally supply 10 mA current at its output. If you connect relay with low active resistance, voltage will significantly sink and current will increase up to chip burnout if applied for prolonged period of time.

I propose you to change circuit adding transistor able supplying required current between logic gate and relay.

• so adding only a transistor between the relay and gate, do I have to add other components to the circuit? Oct 26, 2016 at 12:35
• Of course you should add some other components to ensure transistor works properly and can tolerate conditions. @dim gave you a set of excellent suggestions in comment to your question, you probably will need to redesign whole circuit to make it simple, properly functioning in all conditions and cost effective. Oct 26, 2016 at 12:38

Here's a few ways of doing the same thing.

Circuit 1 - is a simple AND gate made from two switches in series. The LED is driven directly with R1 to limit the LED current.

Circuit 2 - replace the LED/resistor with a relay coil. Note the reverse diode across the coil which prevents the back emf spike from damaging the switches when you turn OFF. The switch contacts of the relay now control the LED.

Circuit 3 - Now we've added the 2 input AND gate. Note R1 and R4 (47k) are PULL DOWN resistors to ensure the inputs stay at 0V when the switches are open. This resistor value is not critical and could vary from 1k0 to 1M0. The output of the gate is capable of supplying enough current to light an LED. Again the 1k0 resistor is there to limit the maximum LED current.

Circuit 4 - If we need more current output we can add a transistor, in this case a BJT but we could use an N channel MOSFET (not shown) if we needed to switch a much higher current e.g. a motor or a solenoid. The transistor is just used to switch the LED.

Circuit 5 - The transistor is being used to switch the relay coil. Note we keep the reverse connected diode. In this case it protects the transistor. R3 value has been lowered to allow for more current through the transistor taken by a relay coil.

• 7 years on and OP long gone - sadly. Anwers like this are very welcome. 2 days ago

The 4081 is an AND gate so, just wire both switches in series (to get AND) with the LED and a current limiting resistor to get the functionality you require.

Uhm , does this circuit:

simulate this circuit – Schematic created using CircuitLab

not achieve the same thing as what you intended to achieve ?

So you don't need the AND gate

You don't need the relay.

You do want to add a 470 ohm resistor so you will not destroy your LED by applying 9V to it (LEDs generally do not like that).

If this is not what you wanted then specify more clearly what you wanted in the first place.

• well it's just a vague idea for my circuit, I use and gate to my circuit because I have to different inputs and I just represent it using the switches. Oct 26, 2016 at 13:50
• And I have a sticky-note here with two wheels drawn on it, it represents the next car I'm going to buy. Now tell me what car I will buy. See, vague representations do not help much in guiding others to the direction you want them to go to. Oct 26, 2016 at 13:56
• you see in my question above is how to make the output voltage of a logic gate higher, let say that I'm asking what is the best car to buy and I want to replace my broken old car and someone say that it's better to repair my old car because it will cost you less? Oct 30, 2016 at 15:01