I was wondering how I could make a momentary switch turn something on and off (like a set of LED's). I made a diagram with a flip-flop and a relay, but in the end the LED ends up getting power from nothing. Does anybody have any schematics? Thanks in advance.
Realistically the best way is something like what you said: This circuit is meant as theory, if your not using pre-debounced switches, you'll nead to debounce them.
The funny thing is, that looks exactly what I did, only it had a relay, but I thought it wouldn't work. Hahaha. *points at self laughing* And no it isn't debounced unfortunetly, oh well.
Well i'm pretty sure that will work, i must have built hundreds of the little fellas by now... ...god i'm so sad
Actually, no that wouldn't work no that I look at it. When D is zero and CP ( > on your diagram) is one, then Q is 1 and Q' is 0. So Q' would feed zero back into D, always making it 0,1 input and 1,0 output. No matter how many times you press it. For the first diagram anyway, haven't looked at the second yet.
It works, i'm basically using the inverted /Q and feedign it into the data input producing Q as the opposite. What your forgetting is thatSW1 is momentary, it only remains 1 for a millisecond then returns to zero, this then changes /Q, which in turn changes D, eventually changing Q, which remains the opposite of /Q. Simply: S = 0 R = 0 D === /Q /Q =/= Q D =/= Q
According to CircuitMaker it doesn't work. I wish I had the components on hand so I could try it out. BTW, the first one wouldn't work. No where to get power from. If I press the button, then the LED should get power for a few milliseconds, after that it goes unpowered. Oh yeah, and if you haven't noticed, I don't know much about electronics, just enough to ask questions.
This is what I came up with: Forgive the crappy picture, I don't have Photoshop installed as I just reformatted and I had to use MS Paint . I haven't debounced this yet either, so it's a little... Uhhh... Bouncy .
All (Correct) IC diagrams have the power supply hidden, it puts the power through this and into the LED. I have tested those circuit in Livewire and in real life.