![]() | ![]() | ![]() |
| | |||||||
| General Electronics Chat This forum is for general chat about electronics, eg: Dont know what a part does? Dont know how to read a circuit? Want to get an opinion? |
| | LinkBack | Thread Tools | Display Modes |
| | (permalink) |
| Hi, I just signed up on here.. I hope this place will be a interesting place to get me going in the world of electronics. I've always messed around with electronics kits from radioshack as a kid but now I'm finding myself wanting to do stuff that requires more. Basically I am trying to build a simple light using 3.3v LED's that you when you press a button, it turns it on, you press it again, it turns it off. The button has to be a tactile switch because of the small form factor of the device's shell that I'm modding. It's a mod of an iPod accessory because you know those dock connectors aren't exactly available at Radio Shack The device in question already has a tact switch on board, and it may even have a T flipflop too, the thing is I dunno what it looks like and i can't find any pics of t flipflops.. All I know is it's a skinny long chip with only 4 pins, which seems to match every diagram of a t flip-flop i've seen on the net. I have a diagram of what I currently have that works here: http://www.aarlabs.com/cdiag.gif. ...using a 10ohm resistor and the LED. I've been told the best way to achieve what I want is to use a T flip-flop and a pull-high resistor to get it working but I have NO idea how to wire a t flip-flop.. I'm just confused at every tutorial I see online because of there being two outputs and two inputs. I have a picture of the actual device's board with the pic of what I am suspecting might be a T flip flop here: http://www.flickr.com/photos/hillie/1460896673/ That's the device. I have 3 of these things too so it's no problem removing components to see where things go. I already ripped a chip off the back of that one Any help would be greatly appreciated.. and I apologize for the crude schematic. | |
| |
| | (permalink) |
| Is the tactile switch SPST or SPDT? If it is the latter, it is very simple to connect it to a flip flop. If the former, you will need bounce suppression. I suggest you do a search of this forum using key words such as:- "flip flop", "bounce suppressor", "momentary switch" since there have been many threads on this subject in the past. However, the simplest solution (if you can get one small enough) is to use a toggle switch.
__________________ Len | |
| |
| | (permalink) |
| how can you tell which one it is? I could look on the box of the one I bought from the electronics store but the one in question is a part of this device already. i dunno if you mean what i think by bounce suppression? i was kinda wondering about how to avoid a situation where since when you hold the switch in it's constantly sending current, what happens with the flip flop, does it just keep toggling for as fast as the current can go through it? and then how do you toggle it just once. i am really new to especially digital stuff. | |
| |
| | (permalink) | ||
| Bounce suppression is commonly known as de-bouncing too, there are many circuits out there that do the job well, but personally, I prefer using a 555 timer as a debouncer. Check google for circuits. There are also some simpler resistor-capacitor setups that may not work as well, but could be suitable for your application. Quote:
Quote:
__________________ -michael11298 | |||
| |
| | (permalink) |
| hi, >>> Basically I am trying to build a simple light using 3.3v LED's that you when you press a button, it turns it on, you press it again, it turns it off. The button has to be a tactile switch because of the small form factor of the device's shell that I'm modding. If thats all you want do, ie: push ON, push OFF, buy a simple push button toggle switch, the type that used on the base of a table lamp.
__________________ Eric "Good enough is Perfect" PIC tutorials: Gramo's: www.digital-diy.net/ Bill's: www.blueroomelectronics.com/ | |
| |
| | (permalink) |
| That long black thing with the four wires coming out is a crystal, not an electronic IC. The ICs are only on the other side of the board, and the two I see are large with many leads meaning they are complicated and you can't use them. You will have to add your own flip flop. Most people make a T flip flop using either a D type or a JK type flip flop. Often this same circuit is referred to as a divide-by-two counter as this has the same function. If using a D type, you feed the logic level from your debounce circuit to the clock input of the D flip flop. You wire the D input to the /Q output (/Q means the "Q NOT", which is the one with little dash over top of the Q on most schematics). The output is taken from the Q output. If using a JK flip flop, you wire the input from the debounce circuit to the clock input. You connect both the J and K input to Vcc, and you take your output from the Q out. With all these configurations, the flip flop is triggered by an edge, not by a steady level. So you have to add a debounce circuit that ensures that any press of your switch gives you only one edge, despite the tendency of most switches to bounce on and off quickly when you push them. That is the purpose of the debounce circuit. If you are using a NO button, I would suggest that the simplest debounce circuit is a resistor and a capacitor. Starting at Vcc, you connect the resistor in series with the switch and the other side of the switch is to ground. So, when the switch is open (not pressed) the junction between the resistor and the switch is at Vcc. When you push the switch, the junction voltage falls to ground. Now, if you add a capacitor across the resistor, the voltage can fall to ground very quickly when you press the button, but it can't jump up to Vcc quickly at all because the capacitor can only charge up through the resistor, which takes time. This filters out the switch bounce. The resistor can be a high value, like 27K ohms or so, and the capacitor should be chosen so that R x C is more than 0.01. I started to sketch a schematic for you then realized that it was more work than I was willing to do, so instead, why don't you try and draw the schematic, then post it and we'll tell you if anything is wrong with it? Ron
__________________ RadioRon Last edited by RadioRon; 2nd October 2007 at 07:22 PM. | |
| |
| | (permalink) |
| Why not buy a T flip flop directly? Ok so that makes since to wire both inputs to Vcc, that was for me the biggest confusion on schematics and tutorials i saw online, why it has 2 inputs. Would it be something like this? Vcc--->debounce--->both ends of JK ff, q out--->gnd ? and you're telling me the debounce is a resister connected to a capacitor in that order? The JK flip flop method looks simpler. what kind of resistor/capacitor do I need in this case? by 'kind' as far as resistor goes i mean how many ohms? As far as push button switch goes, if I can find one small enough to solder in place of the tactile and still have the normal "iTalk" button work, then that will do, although a digital solution would be a lot more attractive, and a better learning experience for me. Thanks for all the replies | |
| |
| | (permalink) | |
| Quote:
As to your proposal, it is appropriate to communicate a circuit configuration using a schematic diagram. Anything else is too ambiguous and difficult to understand. Please post a schematic diagram of the way you think it should go. thanks
__________________ RadioRon | ||
| |
| | (permalink) |
| QUICK! IGNORE ALL THESE SILLY NANNIES!!! Use this circuit: Works every time without fail. I have pressed the button over 500 times and It never skipped a beat You just have to get the parts CLOSE, they actually dont really matter. I used a 0.1 uf instead of the 47nf cap. I used a 74HC04 instead of the 4000 series counterpart, the 4069. the 4069 has a VDD range of 4.5 to around 12V, but a low output. All you gotta do is add a MOSFET or a good transistor to the output of the circuit, and you can figure out the rest Last edited by Krumlink; 4th October 2007 at 11:56 PM. | |
| |
| | (permalink) | |
| Quote:
regards Mary Poppins .
__________________ RadioRon | ||
| |
| | (permalink) |
| Im sorry, I did not mean to hurt your feelings mary | |
| |
| | (permalink) |
| I will draw up a schematic of it soon.. How was my schematic that I posted in the first post? btw: I'm glad i'm not the only one to not understand something like the above thing I posted. I received something like that in instructions given to me when I first asked how to wire a T flipflop (this was in irc) Last edited by hillie; 5th October 2007 at 03:03 PM. | |
| |
| | (permalink) | |
| Quote:
| ||
| |
| | (permalink) |
| Loaded ok for me just now. And it looks reasonably schematickey, but for future reference, it's usual practice to show the positive supply higher than Ground. But it doesn't strictly matter, especially in such a simple diagram. Also, the proper LED symbol is a circled diode with arrows coming off it; you have to wire them the right way round, but presumably you know that Last edited by Tomble; 9th October 2007 at 09:08 AM. | |
| |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
| |
| | ||||
| Title | Starter | Forum | Replies | Latest |
| Button Debounce Coding help | Suraj143 | Micro Controllers | 25 | 4th August 2007 10:49 AM |
| Making a J-K flip flop from a D-Type Flip Flop | Terabyte | General Electronics Chat | 3 | 26th April 2007 09:02 PM |
| PIC Switch Management Techniques | Mike, K8LH | Micro Controllers | 2 | 28th September 2006 01:33 PM |
| schematci for a flip flop switch | Raheem | Electronic Projects Design/Ideas/Reviews | 7 | 27th July 2003 10:27 PM |
| How to configure this On/Off Switch with Bicolor LED?HELP ME | Stimulation | Electronic Projects Design/Ideas/Reviews | 10 | 23rd April 2003 05:55 AM |