View Full Version : need flip-flop and led help
i was wondering how i would wire a flip-flop with a momentary switch...
i need to find a bout 20 blue leds and a jk flip flop
DaveW
10-11-2006, 07:06 PM
To what purpose? It might be difficult to get all 20 LED's from the flip flop. It's only supposed to handle binary normally.
-Dave
all i want to do is make a momentery switch and get it to act as a push on/push off
DaveW
10-13-2006, 10:30 AM
I still see this as problematic-mainly because the speed at which the flip-flop will change will be about 200 times while the button is pressed, making the actual finishing state terribly hard to determine.
This can be done with...i know...PICs. I'll send you a button debounce routine - in fact, the whole damn code if you like-because it's not a difficult program.
Flip-flops are useful, but they work too fast for this particular purpose.
If you're still determined, send me an e-mail (warndave<at>googlemail.com) and i can send you some simulations, etc.
PIC's are pretty cheap: probably the same price as getting a flip-flop ic. But a programmer's not cheap. I have one but i haven't finished building it.
-Dave
crazybillybob
10-13-2006, 12:37 PM
I've done this before with a flip-flop, You just setup a debounce circuit before the flip-flop. a long time ago (in high school). You can also do it with a couple of transistors....I'd have to look up the Diagram for both now. To Drive 20 blue LEDs your going to need to use some sort of Driver transistor. because blue LEDs run 3V @ 20-30mA so in pure parrell your looking at needing 600mA @ 3Vdc in pure series you'll need 30mA @ 60Vdc (it will not work this way!!!) The flip flop switches 5Vdc and most will on source or sink 500mA max (don't run them @ max they don't last very long best to run them at no more then 75% or 375mA) so you might be able to drive 13 LEDs like this.
If you can give us some more Info I think between Dave and I we can hook you up with something...
Needed info:
LED specs ---> voltage and Amps as well as size
Suppy Voltage---> what are you going to power this with
Space ---> how big or small does this need to be
Where the LEDS are going to be ---> are they going to be on the same board as te switch and flip-flop, if not are they going to be on there own board or each separate? If so how far away from the flip-flop (control board) (longer leads cut down voltage and current)
Cost----> what do you want to spend (just to help us pick the right type of parts)
do you have a flip-flop in mind (like you bought one already) to use? if so what's the part number (like 74XXX, or 40XXX, etc)
CrazyBillyBob
nzcubey
10-14-2006, 10:27 PM
excuse my uber nooby ness, but what is a flipflop? *hides*
DaveW
10-15-2006, 04:03 AM
excuse my uber nooby ness, but what is a flipflop? *hides*
heh...noob.
Just kidding. A flip-flop is a strange little device that basically changes it's state from 1 to 0 or vice versa when sent a binary pulse. There's a variety of different types but the primciple remains the same. It's sometimes called an electronic latch. See more here. (http://en.wikipedia.org/wiki/Flip-flop_(electronics))
-Dave
nzcubey
10-15-2006, 05:12 AM
all i want to do is make a momentery switch and get it to act as a push on/push off
ok, dont mind me if im wrong, but couldnt you just you a normal toggle switch (spst, and yes i do know what that means :P) instead of a momentary one? im still not entirely sure what the purpose of having the "flipflop" in the circuit.
DaveW
10-15-2006, 09:05 AM
Yes you could-but somtimes a momentary switch is the only thing that suits the specific mod.
-Dave
nzcubey
10-15-2006, 02:10 PM
oh right, lol kinda obvious, sorry :dead:
Is it because momentarys ususlly look way better? I have seen a few ones, like those vandle ones, that are toggle, pres down for on, press down for off.
EDIT: is there anytthing other than a flipflop you can do this with? seems kinda extreme to use something that seems complicated for this purpose. (this is interesting me, as i have some vandle proof style switches, and having them for leds seems to excite me)
ps dave, im totally addicted to this site, since i first found it, i use this site more than my school work, hehe :D
DaveW
10-15-2006, 05:15 PM
ps dave, im totally addicted to this site, since i first found it, i use this site more than my school work, hehe
lol...i know, it can take over your life.
Flip-flops are complicated, but not extreme. They come in little ICs and are cheap as hell. They're no more extreme than any other electrical component, excluding the more exotic things like peltiers.
PIC's are more of the extreme end of the spectrum. It's hard to believe that something so useful could be so damn cheap (like $2 each or so).
-Dave
i have one bulgin switch and have bought 25 blue leds, i am wiring them:
(12v) --------(bulgin switch)-------y------Q--Q----y---- (-)
L____Q__Q____|
L___Q__Q_____|
crazybillybob
10-16-2006, 05:41 PM
EPYK,
Can you read schematics? It will take me a bit but I think I can work a curcuit out for you to do this. You'll also need +5Vdc, and a small relay can you handle that?
The flip flop run on +5Vdc, and can't deliver the kind of current you'll need to drive 25 LEDs. I can drive them with Transistors but it's more parts and more cost then one realy.
Let me know.
CrazyBillyBob
i have thought about using relays but i thought they need a constant trigger to stay on ....
crazybillybob
10-16-2006, 09:10 PM
That's what the flip flop is for it should provide the constant input for the relay.
Push the button once for on again for off.
CrazyBillyBob
but as dave said the flip flops timer is so fast that it would reset 200 times over before i even move my finger
crazybillybob
10-16-2006, 10:54 PM
That is why you put a debounce curcuit in between the switch and the latch. This is just a Capacitor resistor combo, the R/C combo smoothes the ripples from the switch "chatter" out so you get one big pulse.
Let me do some looking, I've got a curcuit that uses 4 Transistors. I'll see what else I can dig up for you. If all else fails one of my buddies just made something like this not to long ago I'll drop him a line and adjust the curcuit to do what you need. No worries!!!
CrazyBillyBob
DaveW
10-17-2006, 06:36 AM
CrazyBillyBob is da man!
-Dave
crazybillybob
10-24-2006, 09:54 AM
Ok, I've been swamped at work and....I've got a BF2142 addiction. So I've got a little info for you I just haven't compiled it into one drawing....but I'm going to post the links.
This is one that is built from Transistors. For your load you may need to tie a relay to the output.
Article on How it works (http://www.edn.com/article/CA472837.html)
The Diagram (PDF File) (http://www.edn.com/contents/images/472837f1.pdf)
Here is two Cuircuts One is a "one Shot" which is one square wave pulse when the button is pressed. The other is a Latch, output toggles when button is pressed. These use a D type Flipflop.
D-flipflop Latch (http://discovercircuits.com/DJ-Circuits/4013oneshots.htm)
I've not tested these completely I started working on software sim of the flip-flop ones but have not completed it.
the bonus is that I think I'm going to also be useing some of these type buttons in my project so I'll definatly be working all this out. If you need it in a hurry you may just want to look at the links I posted, as I can't garentee how fast I'll get it all worked out. (I've got about 6-10 half stalled parts going for my Project right now.)
I'll post more as I find it or as I work out the details.
CrazyBillyBob
crazybillybob
10-25-2006, 01:41 PM
Ok, I don't have my own design or anything for you...But I've got a link to a step by step how to. This guide shows you how to make both the flipflop based latch and the transistor based one. If you follow this guide it will work.
They do a much better job with this then I could have! So with out further ado
http://www.cpemma.co.uk/flipflop.html
Happy Building!!
CrazyBillyBob
Powered by vBulletin® Version 4.2.1 Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.