0
\$\begingroup\$

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

\$\endgroup\$
4
  • 5
    \$\begingroup\$ 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? \$\endgroup\$
    – dim
    Oct 26, 2016 at 12:21
  • \$\begingroup\$ 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. \$\endgroup\$ Oct 26, 2016 at 12:25
  • \$\begingroup\$ and is there a way to make the voltage of output of logical gate higher? \$\endgroup\$ Oct 26, 2016 at 12:26
  • \$\begingroup\$ Strictly speaking, you don't need the relay at all. The logic gate can drive the LED (through a resistor) itself. \$\endgroup\$
    – JRE
    Oct 26, 2016 at 14:16

4 Answers 4

1
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ so adding only a transistor between the relay and gate, do I have to add other components to the circuit? \$\endgroup\$ Oct 26, 2016 at 12:35
  • \$\begingroup\$ 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. \$\endgroup\$
    – Anonymous
    Oct 26, 2016 at 12:38
4
\$\begingroup\$

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

enter image description here

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.

\$\endgroup\$
1
  • \$\begingroup\$ 7 years on and OP long gone - sadly. Anwers like this are very welcome. \$\endgroup\$
    – Russell McMahon
    Dec 6 at 9:22
1
\$\begingroup\$

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.

\$\endgroup\$
1
\$\begingroup\$

Uhm , does this circuit:

schematic

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.

\$\endgroup\$
3
  • \$\begingroup\$ 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. \$\endgroup\$ Oct 26, 2016 at 13:50
  • \$\begingroup\$ 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. \$\endgroup\$ Oct 26, 2016 at 13:56
  • \$\begingroup\$ 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? \$\endgroup\$ Oct 30, 2016 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.