I am trying for the first time to build something on my own. I am pretty n00b when it comes to electronic so, please, bear with me.
I'm trying to build a "simple" schematic that goes like this: there are two buttons (SW1 and SW2) normally open, and 2 LEDs (D2 and D3) associated to each button. When a button is closed, the relative LED turns on, but when button is released, the relative LED shall continue to stay on.
One button shall not influence the other LED.
In addition, there is a third button Reset button which is used to turn off both the LEDs: while it's pressed, the Reset button will turn off the LEDs.
To do this (apparently) simple circuit, I am using some gates:
- a NOT gate which inverts the reset button: when button is not pressed, the gate shall be high and enter two AND gates.
- two AND gates which take the reset as one input. When reset is pressed (+Vcc), the NOT gate should go low, making the AND gates to go low in output. The other input of the AND gates is the output of two OR gates (one-to-one).
- the OR gates (OR1, OR2) use a feedback mechanism to keep high the signal once it goes high. Each OR has SW1 (SW2) and the output of the AND gates (AND1, AND2) as input. When reset is pressed and no button is pressed, the OR goes low, but if one button is pressed and no reset is pressed, then the output is high, which goes in the AND port, which shall output high and thus keeping the OR gates high.
I realized on a breadboard the circuit below
Sorry, in the image some resistors are wrong: R5 = R3 = R1 = 5.6k Ohm R6 = R7 = 10k Ohm
I used 74LS04 for the NOT gate, 74LS08 B1 for the AND gates and 74LS32 for the OR gates.
Being LS, I connected all the unused input to ground, while every other input shall be connected, because I tried to use pull-down resistors on the inputs.
Now, this is the first time I try something this complex: I know this is conceptually simple, but I just don't have the tools and knowledge to deal with the hardware fabrication.
In fact, this circuit is not working as I was expecting: even if the reset button is not pressed (or even if it is pressed), the NOT gate will always produce an output voltage of 0.75, which is (I think) low. In fact, the SW1 and SW2 buttons will just turn on the LEDs when they are closed.
If I remove the link that goes from the NOT gate to the AND gates, leaving only the D1 LED as output, the NOT gate works as expected.
As additional input: the chips are connected properly to Vcc and GND (+5V and 0), and I am using, as a power source, a stabilized power supply (that is actually a recycled computer PSU).
Well, that's all for now... Can someone give me an advice? I can't really understand what's happening (and why).