![]() |
|
Turning a light on and off with momentary switch
I want a circuit that will turn a light on with the press of a momentary
switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. -- Chris W Gift Giving Made Easy Get the gifts you want & give the gifts they want http://thewishzone.com "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 Historical Review of Pennsylvania |
Chris W wrote: I want a circuit that will turn a light on with the press of a momentary switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. -- Chris W Yes, a flip-flop would do it and someone is sure to suggest a PIC, both requiring a fair amount of extra components to actually work. Have you looked for alternate action switches or relays? It would run your lights and not require a degree to get it to work. Glenn Gundlach |
Yes, a flip-flop would do it and someone is sure to suggest a PIC, both
requiring a fair amount of extra components to actually work. Have you looked for alternate action switches or relays? It would run your lights and not require a degree to get it to work. Glenn Gundlach Is that because flip-flops require capacitors to store state information? I would be interested to know the minimum complement of components necessary to support a single flip-flop. Perhaps there is a good link to this kind of information (?) I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? Is there an easier way to generate the same functionality? It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? Thanks a lot! Peter |
On Wed, 16 Feb 2005 18:12:59 -0500, "Peter Michelson"
wrote: Yes, a flip-flop would do it and someone is sure to suggest a PIC, both requiring a fair amount of extra components to actually work. Have you looked for alternate action switches or relays? It would run your lights and not require a degree to get it to work. Glenn Gundlach Is that because flip-flops require capacitors to store state information? I would be interested to know the minimum complement of components necessary to support a single flip-flop. Perhaps there is a good link to this kind of information (?) I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? Is there an easier way to generate the same functionality? It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? Thanks a lot! Peter You can use an led chaser kit to do the sequental leds. You can use just the first two outputs on the chip for flip-flop. I've got a page below showing some tinkering with the 4017 decade counter chip that might be useful. http://www.geocities.com/zoomkat/RSswitcher.htm |
I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? Is there an easier way to generate the same functionality? It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? Thanks a lot! Peter You can use an led chaser kit to do the sequental leds. You can use just the first two outputs on the chip for flip-flop. I've got a page below showing some tinkering with the 4017 decade counter chip that might be useful. http://www.geocities.com/zoomkat/RSswitcher.htm Thanks for the ideas! Also, interesting link. Regards, Peter |
On Wed, 16 Feb 2005 18:12:59 -0500, "Peter Michelson"
wrote: Yes, a flip-flop would do it and someone is sure to suggest a PIC, both requiring a fair amount of extra components to actually work. Have you looked for alternate action switches or relays? It would run your lights and not require a degree to get it to work. Glenn Gundlach Is that because flip-flops require capacitors to store state information? --- No. --- I would be interested to know the minimum complement of components necessary to support a single flip-flop. --- Just one, the driver. --- information (?) I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? --- If you have to ask... Simple for me might be impossible for you, but you haven't yet described what it is you expect the momentary switch to do. --- Is there an easier way to generate the same functionality? --- What _functionality_? --- It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? --- Pretty much any µC... -- John Fields |
Thank you for your reply.
"John Fields" wrote in message ... I would be interested to know the minimum complement of components necessary to support a single flip-flop. --- Just one, the driver. --- Is there a more specific term for "driver"? I am not familiar with a component by that name. I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? --- If you have to ask... Simple for me might be impossible for you, but Good point. Simple for me means that few (e.g., less than 5) components are involved and testing can be done with a multimeter. you haven't yet described what it is you expect the momentary switch to do. --- As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; the first LED is considered to follow the third in a cyclical manner. I imagine that this circuit is functionally similar to one that would drive marquis lights, except that instead of using a timer chip, it is user-driven. Is there an easier way to generate the same functionality? --- What _functionality_? --- I hope the more complete description above is easier to understand than the one in my first posting. It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? --- Pretty much any µC... Is there one in particular that is best-suited to the functionality described above? -- John Fields Thanks again for your reply. |
"Chris W" schreef in bericht news:2OOQd.63983$jn.59042@lakeread06... I want a circuit that will turn a light on with the press of a momentary switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. -- Chris W Gift Giving Made Easy Get the gifts you want & give the gifts they want http://thewishzone.com "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 Historical Review of Pennsylvania Chris, What kind of lights do you want to switch? It makes a lot of difference whether you want to switch a LED (~40mW) or a 100W incandescent bulb. The most simple solution I can imagine is a tablelamp pushbutton switch. Conrad sells them for ?2,20 but I guess you can do cheaper locally. It does exactly what you describe. Push on, push off, push on, push off and so on. A more expensive but still simple solution goes with a relay of the same voltage as the lamp, a make- and a break pushbutton. Conrad sells relay from below ?2,-- upward and pushbuttons from below ?1,00 upward depending on voltages and currents required. Digikey will sell similar components but I have no catalog at hand. LEDs can be controlled easily using electronics and that's where the flip-flop appears. You need a so called T-flipflop but they are not very common. Use an D-type flipflop instead and connect the inverted Q-output (/Q) to the D-input. Every pulse on the clock input will make the flipflop change state. So a pushbutton on that input will theoretically do the job. But a flipflop is a high speed switching device and will see a lot of pulses every time you push and you can not predict the last one. So you need to debounce your pushbutton carefully which requires some extra electronics. Of course you can use a microcontoller as wel. Microchip sells 6 pins ones these days and the only extra components you need is the pushbutton, the LED and maybe two resistors. The problem of course is skills and equipment to program them. petrus bitbyter |
On Wed, 16 Feb 2005 19:33:08 -0500, "Peter Michelson"
wrote: Thank you for your reply. "John Fields" wrote in message .. . I would be interested to know the minimum complement of components necessary to support a single flip-flop. --- Just one, the driver. --- Is there a more specific term for "driver"? I am not familiar with a component by that name. --- The driver would be the device/circuit sending the information to the flip-flop which would cause it to flip or flop. --- I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? --- If you have to ask... Simple for me might be impossible for you, but Good point. Simple for me means that few (e.g., less than 5) components are involved and testing can be done with a multimeter. -- OK -- you haven't yet described what it is you expect the momentary switch to do. --- As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; the first LED is considered to follow the third in a cyclical manner. I imagine that this circuit is functionally similar to one that would drive marquis lights, except that instead of using a timer chip, it is user-driven. --- "Marquee" lights?^) --- Is there an easier way to generate the same functionality? --- What _functionality_? --- I hope the more complete description above is easier to understand than the one in my first posting. --- Yes, it is. I'll reply, tomorrow or the day after, with a schematic which will solve your problem. Thanks again for your reply. You're welcome. -- John Fields |
"Peter Michelson" wrote in message news:bDRQd.9917$Ps.1740@okepread06... Thank you for your reply. "John Fields" wrote in message ... I would be interested to know the minimum complement of components necessary to support a single flip-flop. --- Just one, the driver. --- Is there a more specific term for "driver"? I am not familiar with a component by that name. A flip-flop basically stores a 1 or a 0, ON or OFF, respectively. It can't switch between the two by itself. It needs additional circuitry to drive it, or basically tell it when to switch the flip-flop from 0 to 1, and 1 to 0. I have a similar request as the original poster. I would like to use a momentary switch to cycle among three LEDs. Is the circuit design for this using flip-flops complex? --- If you have to ask... Simple for me might be impossible for you, but Good point. Simple for me means that few (e.g., less than 5) components are involved and testing can be done with a multimeter. A component might be an IC, or a PIC which might be pretty advanced for an electronics hobbyst. you haven't yet described what it is you expect the momentary switch to do. --- As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; the first LED is considered to follow the third in a cyclical manner. I imagine that this circuit is functionally similar to one that would drive marquis lights, except that instead of using a timer chip, it is user-driven. A PIC would suit perfectly for this type of application but it requires some funds for a PIC programmer (hardware) and coding the PIC (software). You'd have to know how to program to use a PIC. Is there an easier way to generate the same functionality? --- What _functionality_? --- I hope the more complete description above is easier to understand than the one in my first posting. It seems that there must be some ICs out there that provide this kind of functionality out of the box. Does anyone know of any? --- Pretty much any µC... Is there one in particular that is best-suited to the functionality described above? -- John Fields Thanks again for your reply. |
"John Fields" wrote in message ... Is there a more specific term for "driver"? I am not familiar with a component by that name. --- The driver would be the device/circuit sending the information to the flip-flop which would cause it to flip or flop. --- manner. I imagine that this circuit is functionally similar to one that would drive marquis lights, except that instead of using a timer chip, it is user-driven. --- "Marquee" lights?^) --- Indeed :)=) One wonders what, exactly, a "marquis light" would be. I'll reply, tomorrow or the day after, with a schematic which will solve your problem. That's very kind. |
Thank you for your reply.
"John" wrote in message ... Is there a more specific term for "driver"? I am not familiar with a component by that name. A flip-flop basically stores a 1 or a 0, ON or OFF, respectively. It can't switch between the two by itself. It needs additional circuitry to drive it, or basically tell it when to switch the flip-flop from 0 to 1, and 1 to 0. what are the characteristics of the signal required to cause the bit to change? A PIC would suit perfectly for this type of application but it requires some funds for a PIC programmer (hardware) and coding the PIC (software). You'd have to know how to program to use a PIC. Does PIC stand for Programmable IC? Is this similar to an EPROM or PROM? How much does PIC programmer hardware cost? What skills are necessary for programming to use a PIC? For example, if one is versed in machine language, is that sufficient? Thanks for the information. It sounds intriguing. Regards, Peter |
petrus bitbyter wrote:
Chris, What kind of lights do you want to switch? It makes a lot of difference whether you want to switch a LED (~40mW) or a 100W incandescent bulb. For the first application I just want to switch 1 or maybe 2 LED's hooked in parallel. They could be of different colors and therefore different voltages so I am guessing even for just one led on each line I probably need some kind of a driver so I can match the voltage and current for each load. Future applications will need to switch around 10W lights, probably in the form of groups of LEDs, on and off. LEDs can be controlled easily using electronics and that's where the flip-flop appears. You need a so called T-flipflop but they are not very common. Use an D-type flipflop instead and connect the inverted Q-output (/Q) to the D-input. Every pulse on the clock input will make the flipflop change state. So a pushbutton on that input will theoretically do the job. But a flipflop is a high speed switching device and will see a lot of pulses every time you push and you can not predict the last one. So you need to debounce your pushbutton carefully which requires some extra electronics. After some more reading on flip flops I figured this out on my own. If you read my post in 2-14-2005, you can read more about my application. What I would really like to find is an IC with as many as 16 D flip flops that are already wired up like you described. I don't suppose finding that is likely? Of course you can use a microcontoller as wel. Microchip sells 6 pins ones these days and the only extra components you need is the pushbutton, the LED and maybe two resistors. The problem of course is skills and equipment to program them. I'm thinking about getting one of the RABBIT modules, that way I don't think I need a separate programmer do I? -- Chris W Gift Giving Made Easy Get the gifts you want & give the gifts they want http://thewishzone.com "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 Historical Review of Pennsylvania |
"Peter Michelson" wrote in message news:WxVQd.10007$Ps.3033@okepread06... Thank you for your reply. "John" wrote in message ... Is there a more specific term for "driver"? I am not familiar with a component by that name. A flip-flop basically stores a 1 or a 0, ON or OFF, respectively. It can't switch between the two by itself. It needs additional circuitry to drive it, or basically tell it when to switch the flip-flop from 0 to 1, and 1 to 0. what are the characteristics of the signal required to cause the bit to change? A flip-flop STORES a signal. So basically it stores whatever signal you feed it. For your project, you don't need a flip-flop if you use a PIC. A PIC would suit perfectly for this type of application but it requires some funds for a PIC programmer (hardware) and coding the PIC (software). You'd have to know how to program to use a PIC. Does PIC stand for Programmable IC? Is this similar to an EPROM or PROM? How much does PIC programmer hardware cost? Yes. EPROM. You can get one for around $150US (http://xtronics.com/memory/EPROM.htm) What skills are necessary for programming to use a PIC? For example, if one is versed in machine language, is that sufficient? Some are assembler, some are C/C+, some you can use BASIC. Thanks for the information. It sounds intriguing. Regards, Peter Microcontrollers are the easiest ways to create your own electronics devices given you know how to program. |
Chris W wrote:
I want a circuit that will turn a light on with the press of a momentary switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. Here are three practical circuits you can experiment with: http://www.terrypin.dial.pipex.com/I...-Momentary.gif -- Terry Pinnell Hobbyist, West Sussex, UK |
On Wed, 16 Feb 2005 23:55:04 -0500, "Peter Michelson"
wrote: "John Fields" wrote in message .. . Is there a more specific term for "driver"? I am not familiar with a component by that name. --- The driver would be the device/circuit sending the information to the flip-flop which would cause it to flip or flop. --- manner. I imagine that this circuit is functionally similar to one that would drive marquis lights, except that instead of using a timer chip, it is user-driven. --- "Marquee" lights?^) --- Indeed :)=) One wonders what, exactly, a "marquis light" would be. I'll reply, tomorrow or the day after, with a schematic which will solve your problem. That's very kind. --- +-------------+ | 4017 | | +-------+ | VCC--[100K]--O-- | +--|MR Q3|--+ | | | O-----+--------|CP0 Q2|--[R3]--[LED3]--+ | | | | | | | | Q1|--[R2]--[LED2]--+ [0.1] [1M] | | | | | +-O|CP1 Q0|--[R1]--[LED1]--+ | | | +-------+ | GND---------------+-----+-----+----------------------------+ Vcc - 2V R1 = R2 = R3 = ----------- 0.002A All LEDs = HLMP4700 -- John Fields |
"Chris W" schreef in bericht news:vJWQd.64020$jn.59932@lakeread06... petrus bitbyter wrote: Chris, What kind of lights do you want to switch? It makes a lot of difference whether you want to switch a LED (~40mW) or a 100W incandescent bulb. For the first application I just want to switch 1 or maybe 2 LED's hooked in parallel. They could be of different colors and therefore different voltages so I am guessing even for just one led on each line I probably need some kind of a driver so I can match the voltage and current for each load. Future applications will need to switch around 10W lights, probably in the form of groups of LEDs, on and off. One or two LEDs in series can be driven by some logic devices. For more LEDs or lamps you will need a transistor driver or a relay. LEDs can be controlled easily using electronics and that's where the flip-flop appears. You need a so called T-flipflop but they are not very common. Use an D-type flipflop instead and connect the inverted Q-output (/Q) to the D-input. Every pulse on the clock input will make the flipflop change state. So a pushbutton on that input will theoretically do the job. But a flipflop is a high speed switching device and will see a lot of pulses every time you push and you can not predict the last one. So you need to debounce your pushbutton carefully which requires some extra electronics. After some more reading on flip flops I figured this out on my own. If you read my post in 2-14-2005, you can read more about my application. What I would really like to find is an IC with as many as 16 D flip flops that are already wired up like you described. I don't suppose finding that is likely? Missed your post of 2-14-2005. Can't even find it in the Google groups. AFAIK such a device does not exist and its very unlikely you'll ever find one. You can design one for yourself using PLDs but that requires quite some skills and programming equipment. Especially if you want to incorporate debouncing. Even then you wil need power drivers to control loads over some hundreds of mW. Of course you can use a microcontoller as wel. Microchip sells 6 pins ones these days and the only extra components you need is the pushbutton, the LED and maybe two resistors. The problem of course is skills and equipment to program them. I'm thinking about getting one of the RABBIT modules, that way I don't think I need a separate programmer do I? FAIK RABBIT devices also requires programming which can be done using C. You will also need a pretty expensive development system and the modules themselves does look like to be cheap either. Did you realise a module like you want, needs at least 34 pins? I think a 40 pins micro comes most close to that. A PIC16F877 is one of the cheaper $10,-- examples. Software is free from Microchip and programming tools can be bought or home made. You can find a lot of information on http://www.voti.nl/swp/n_index.html but it's for sure not the only one a the on the net. -- Chris W Gift Giving Made Easy Get the gifts you want & give the gifts they want http://thewishzone.com "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 Historical Review of Pennsylvania petrus bitbyter |
Peter Michelson wrote:
As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; There is a "10 stage LED sequencer" at the below address. You will need to change the 555 oscillator into a 555 "one shot" circuit so you can use a pushbutton. The 4017 can be used for just 3 LEDs by connecting the reset line (pin 15) to the 4th output, (pin 7). http://ourworld.compuserve.com/homep...htm#4017-2.gif -Bill |
Peter Michelson wrote:
As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; There is a "10 stage LED sequencer" at the below address. You will need to change the 555 oscillator into a 555 "one shot" circuit so you can use a pushbutton. The 4017 can be used for just 3 LEDs by connecting the reset line (pin 15) to the 4th output, (pin 7). http://ourworld.compuserve.com/homep...htm#4017-2.gif -Bill |
"John Fields" wrote in message ... I'll reply, tomorrow or the day after, with a schematic which will solve your problem. That's very kind. --- +-------------+ | 4017 | | +-------+ | VCC--[100K]--O-- | +--|MR Q3|--+ | | | O-----+--------|CP0 Q2|--[R3]--[LED3]--+ | | | | | | | | Q1|--[R2]--[LED2]--+ [0.1] [1M] | | | | | +-O|CP1 Q0|--[R1]--[LED1]--+ | | | +-------+ | GND---------------+-----+-----+----------------------------+ Vcc - 2V R1 = R2 = R3 = ----------- 0.002A All LEDs = HLMP4700 -- John Fields That's great - thank you sincerely. It appears fairly simple and I look forward to trying to implement it. This is my first time reading a schematic in ascii, and it mostly makes sense to me. My only question is what does "O" represent? For example, there is an "O" next to CP1. Thanks for your patience. Regards, Peter |
"Bill Bowden" wrote in message oups.com... There is a "10 stage LED sequencer" at the below address. You will need to change the 555 oscillator into a 555 "one shot" circuit so you can use a pushbutton. Thanks for the tip. I have used a 555 timer before, but I don't think I ever used it as a one shot circuit, so I'd have to look that up. The 4017 can be used for just 3 LEDs by connecting the reset line (pin 15) to the 4th output, (pin 7). Thanks - I think that's exactly the approach that John Fields took in his schematic (see other posting in this thread). |
Thanks - I think that's exactly the approach that John Fields
took in his schematic (see other posting in this thread). Yes, except for the extra transistors which will allow much more current for brighter LEDs. If you hook the LEDs directly to the 4017 with a resistor, you only get 2 or 3 milliamps. The extra transistor will get you 20 mA or more. -Bill |
On Thu, 17 Feb 2005 23:11:51 -0500, "Peter Michelson"
wrote: "John Fields" wrote in message .. . I'll reply, tomorrow or the day after, with a schematic which will solve your problem. That's very kind. --- +-------------+ | 4017 | | +-------+ | VCC--[100K]--O-- | +--|MR Q3|--+ | | | O-----+--------|CP0 Q2|--[R3]--[LED3]--+ | | | | | | | | Q1|--[R2]--[LED2]--+ [0.1] [1M] | | | | | +-O|CP1 Q0|--[R1]--[LED1]--+ | | | +-------+ | GND---------------+-----+-----+----------------------------+ Vcc - 2V R1 = R2 = R3 = ----------- 0.002A All LEDs = HLMP4700 -- John Fields That's great - thank you sincerely. It appears fairly simple and I look forward to trying to implement it. This is my first time reading a schematic in ascii, and it mostly makes sense to me. My only question is what does "O" represent? For example, there is an "O" next to CP1. Thanks for your patience. --- The 'O' is used to represent what's called a 'low true' input. That is, a desired result occurs as a result of that input being at a logical '0'. In this case, that's zero volts or 'ground' The other "O"s (at the switch) are just a convention used to denote a switch (or relay) terminal. -- John Fields |
On Thu, 17 Feb 2005 23:15:16 -0500, "Peter Michelson"
wrote: "Bill Bowden" wrote in message roups.com... There is a "10 stage LED sequencer" at the below address. You will need to change the 555 oscillator into a 555 "one shot" circuit so you can use a pushbutton. Thanks for the tip. I have used a 555 timer before, but I don't think I ever used it as a one shot circuit, so I'd have to look that up. The 4017 can be used for just 3 LEDs by connecting the reset line (pin 15) to the 4th output, (pin 7). Thanks - I think that's exactly the approach that John Fields took in his schematic (see other posting in this thread). --- Well, in all fairness, Bill's is better than mine in that he has a single current limiting resistor as opposed to my three. Since only one LED will be lit at any given time, there's only a need for one and it can be connected from the common cathodes of the LEDs to ground. He's suggested using a 555 to debounce the switch, but my simple RC may work just as well. Depends on the switch's bounce characteristics. -- John Fields |
On Wed, 16 Feb 2005 15:19:19 -0600, Chris W wrote:
I want a circuit that will turn a light on with the press of a momentary switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. What's your goal here? To learn about flip-flops, or to turn a light on and off? If the latter, just get a push-on-push-off switch. PCs used to have them - it's a mechanical action, a la a clicker ballpoint pen. Cheers! Rich |
Hi Chris:
The circuit that you want to build consists of three sections. (1) The momentary switch must be connected to a debounce circuit. This will create only one edge when the switch is closed or opened. This is accomplished by using a resistor and a cap to create a lowpass filter and a buffer logic device like a 'AND' gate. The secret is to use an additional feed back resistor that creates hysteresis. The second section is the flip-flop that is wired to toggle. U can use a 74HC74 D type flip-flop or even a JK flip flop. The 3rd section is the decode logic. If you want to just toggle an LED then there is no decode logic. Just connect the output of the flip-flop to an LED or thru an additional buffer chip. If you want to have 3 LEDS to sequence, just add another flip-flop and use a couple NAND gates to decode the two outputs of the two flip flops to generate 3 outputs. Use 74HCXXXX chips because the crossover threshold voltage is 5volts/2 or 2.5 volts. Harold "Chris W" wrote in message news:2OOQd.63983$jn.59042@lakeread06... I want a circuit that will turn a light on with the press of a momentary switch and then turn it back off when the momentary switch is hit again. I had heard that a flip flop might be the way to go. After some reading, I have found that a flip flop is a much more complex device than I was lead to believe. I think a flip flop would some how do the job, but it is going to take some more reading before I figure out how. If you have been reading some of my other posts, you know that I want to turn on and off more than one light, so I need several of these circuits, preferably using the minimum number of components. Another option I would like to explore is to turn the light on and off using 2 inputs. Say we have in put A and B. If input B is high, when input A goes high, turn the light on, or leave it on. If input B is low, when input A goes hight, turn the light off, or leave it off. -- Chris W Gift Giving Made Easy Get the gifts you want & give the gifts they want http://thewishzone.com "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- Benjamin Franklin, 1759 Historical Review of Pennsylvania |
Great explanation! Thank you for providing an architectural synopsis of
what's involved. Peter "Harold Ryan" wrote in message ... Hi Chris: The circuit that you want to build consists of three sections. (1) The momentary switch must be connected to a debounce circuit. This will create only one edge when the switch is closed or opened. This is accomplished by using a resistor and a cap to create a lowpass filter and a buffer logic device like a 'AND' gate. The secret is to use an additional feed back resistor that creates hysteresis. The second section is the flip-flop that is wired to toggle. U can use a 74HC74 D type flip-flop or even a JK flip flop. The 3rd section is the decode logic. If you want to just toggle an LED then there is no decode logic. Just connect the output of the flip-flop to an LED or thru an additional buffer chip. If you want to have 3 LEDS to sequence, just add another flip-flop and use a couple NAND gates to decode the two outputs of the two flip flops to generate 3 outputs. Use 74HCXXXX chips because the crossover threshold voltage is 5volts/2 or 2.5 volts. Harold |
Yes, except for the extra transistors which will allow
much more current for brighter LEDs. If you hook the LEDs directly to the 4017 with a resistor, you only get 2 or 3 milliamps. The extra transistor will get you 20 mA or more. -Bill That's helpful, since I do not yet know the operating characteristics of the LEDs that I will want to use. Thanks, Peter |
---
Well, in all fairness, Bill's is better than mine in that he has a single current limiting resistor as opposed to my three. Since only one LED will be lit at any given time, there's only a need for one and it can be connected from the common cathodes of the LEDs to ground. He's suggested using a 555 to debounce the switch, but my simple RC may work just as well. Depends on the switch's bounce characteristics. -- John Fields For me, there is educational value in seeing multiple approaches to the same problem, particularly when someone explains the difference between the various approaches, as you just did. So thank you. Would you (or any other reader without commercial bias) please recommend an inexpensive and reliable vendor for electronics parts for projects such as this one? If such recommendations are not allowed on the newsgroup, please feel free to email them to me. Thank you, Peter |
For another possibility, try this link:
http://home.comcast.net/~rcmonsen/flipper.GIF I built a circuit nearly identical to this one, which I control with a small 40MHz radio control. The main problem I have is that the radio control (which I swiped from a toy car) gets occasional hits, which trigger the device without warning. I have it hooked up to a large, lighted, mechanical pink flamingo that my wife decided she needed (and which was on sale for 1/2 price!). Thus, it goes on occasionally by itself, which is actually kinda fun. The circuit itself is really just an inverter flipflop, like this: R1 ___ .---------------|___|---------------------------. | | | U1A U1B | | R1 | | |\ ___ |\ | '--------| O---|___|----------o----| O----o---' |/ | |/ | \ o | S1 \ | \. | o | | R2 | | ___ | o----|___|---' | --- C1 --- | GND (created by AACircuit v1.28 beta 10/06/04 www.tech-chat.de) except the inverters are NPN common emitter amplifiers instead of inverters. IF you close the switch for a moment, the inverter U1B changes state, thus changing the state of the other inverter. If R2 R1, then even when the button is pressed, it won't oscillate. The cap C1 must be large enough to allow the input of U1B to reach it's switching threshold for long enough to switch, despite the action of R1. -- Regards, Robert Monsen "Your Highness, I have no need of this hypothesis." - Pierre Laplace (1749-1827), to Napoleon, on why his works on celestial mechanics make no mention of God. |
Thanks for the list of resources, annotations, and candor regarding your
bias :-) Peter "Robert Monsen" wrote in message ... Peter Michelson wrote: Would you (or any other reader without commercial bias) please recommend an inexpensive and reliable vendor for electronics parts for projects such as this one? If such recommendations are not allowed on the newsgroup, please feel free to email them to me. Here are my links to electronics distributors (US bias) http://www.acroname.com/ http://www.allcorp.com/ http://www.alliedelec.com/ http://www.aade.com/index.html http://www.sciplus.com/?emailid=25 http://www.bgmicro.com/ http://store.yahoo.com/webtronics/index.html http://www.componentkits.com/ http://www.elexp.com/ http://www.findchips.com/ http://www.futurlec.com/ http://www.jameco.com/ http://www.thelaserguy.com/index.html http://www.mcminone.com/ http://www.meci.com/ http://www.mouser.com/ http://www.moyerelectronics.com/ http://www.mpja.com/ http://www.probemaster.com/ http://www.quickar.com/about.htm http://www.quickar.com/index.php?session= http://www.goldmine-elec.com/ http://www.commlinx.com.au/timing.htm http://www.electronicsurplus.com/ http://alltronics.com/wire_and_cable.htm http://home.att.net/~wzmicro/index.htm http://www.alltronics.com/ http://www.lsdiodes.com/5mm/ http://www.hosfelt.com/ I usually use goldmine or futurlec for hobby parts. They don't mind small orders, and don't charge me sales tax (I'm in california) You can also get samples of parts from distributors like microchip, analog, linear, national, fairchild, etc. -- Regards, Robert Monsen "Your Highness, I have no need of this hypothesis." - Pierre Laplace (1749-1827), to Napoleon, on why his works on celestial mechanics make no mention of God. |
On Sat, 19 Feb 2005 16:20:20 -0500, "Peter Michelson"
wrote: --- Well, in all fairness, Bill's is better than mine in that he has a single current limiting resistor as opposed to my three. Since only one LED will be lit at any given time, there's only a need for one and it can be connected from the common cathodes of the LEDs to ground. He's suggested using a 555 to debounce the switch, but my simple RC may work just as well. Depends on the switch's bounce characteristics. -- John Fields For me, there is educational value in seeing multiple approaches to the same problem, particularly when someone explains the difference between the various approaches, as you just did. So thank you. Would you (or any other reader without commercial bias) please recommend an inexpensive and reliable vendor for electronics parts for projects such as this one? If such recommendations are not allowed on the newsgroup, please feel free to email them to me. The below LED chaser kit for $6.50 would give you most of what you want. A momentary push button, a 10k resistor and a 1uf capacitor in parallel to ground for debounce should be sufficient for manual operation instead of from the 555 timer. http://www.allelectronics.com/cgi-bi...AEC&type=store http://www.allelectronics.com/spec/AEC.pdf |
Would you (or any other reader without commercial bias) please
recommend an inexpensive and reliable vendor for electronics parts for projects such as this one Well, you could try Radio Shack, but they seem to have less and less parts available nowadays. For mail order, I can think of three, but they may require a minimum order. www.digikey.com www.jameco.com www.mouser.com Also, I have a few items for sale on my website which may be of some use. http://ourworld.compuserve.com/homep...owden/sale.htm |
That looks like a handy circuit that could be adapted to my application. I
might fiddle around with it and compare to the others. Thanks. Do they sell any kits for this that include the mechanical pink flamingo? :-) Peter "Robert Monsen" wrote in message ... For another possibility, try this link: http://home.comcast.net/~rcmonsen/flipper.GIF I built a circuit nearly identical to this one, which I control with a small 40MHz radio control. The main problem I have is that the radio control (which I swiped from a toy car) gets occasional hits, which trigger the device without warning. I have it hooked up to a large, lighted, mechanical pink flamingo that my wife decided she needed (and which was on sale for 1/2 price!). Thus, it goes on occasionally by itself, which is actually kinda fun. The circuit itself is really just an inverter flipflop, like this: R1 ___ .---------------|___|---------------------------. | | | U1A U1B | | R1 | | |\ ___ |\ | '--------| O---|___|----------o----| O----o---' |/ | |/ | \ o | S1 \ | \. | o | | R2 | | ___ | o----|___|---' | --- C1 --- | GND (created by AACircuit v1.28 beta 10/06/04 www.tech-chat.de) except the inverters are NPN common emitter amplifiers instead of inverters. IF you close the switch for a moment, the inverter U1B changes state, thus changing the state of the other inverter. If R2 R1, then even when the button is pressed, it won't oscillate. The cap C1 must be large enough to allow the input of U1B to reach it's switching threshold for long enough to switch, despite the action of R1. -- Regards, Robert Monsen "Your Highness, I have no need of this hypothesis." - Pierre Laplace (1749-1827), to Napoleon, on why his works on celestial mechanics make no mention of God. |
Peter Michelson wrote:
That looks like a handy circuit that could be adapted to my application. I might fiddle around with it and compare to the others. Thanks. Do they sell any kits for this that include the mechanical pink flamingo? :-) Sadly no. The R/C pink flamingo is destined to remain one of a kind. -- Regards, Robert Monsen "Your Highness, I have no need of this hypothesis." - Pierre Laplace (1749-1827), to Napoleon, on why his works on celestial mechanics make no mention of God. |
On Wed, 23 Feb 2005 10:54:03 -0800, Robert Monsen wrote:
Peter Michelson wrote: That looks like a handy circuit that could be adapted to my application. I might fiddle around with it and compare to the others. Thanks. Do they sell any kits for this that include the mechanical pink flamingo? :-) Sadly no. The R/C pink flamingo is destined to remain one of a kind. Here Ya Go! ;-) http://www.animalmakers.com/Secure/R...er/Birds2.html Cheers! Rich |
Rich Grise wrote:
On Wed, 23 Feb 2005 10:54:03 -0800, Robert Monsen wrote: Peter Michelson wrote: That looks like a handy circuit that could be adapted to my application. I might fiddle around with it and compare to the others. Thanks. Do they sell any kits for this that include the mechanical pink flamingo? :-) Sadly no. The R/C pink flamingo is destined to remain one of a kind. Here Ya Go! ;-) http://www.animalmakers.com/Secure/R...er/Birds2.html Cheers! Rich That is totally high class. The one I got was built out of pink mesh screen. Only the neck and body move. However, it has several strings of LEDs in it that flash on and off. It's eyes also flash, if I remember correctly. -- Regards, Robert Monsen "Your Highness, I have no need of this hypothesis." - Pierre Laplace (1749-1827), to Napoleon, on why his works on celestial mechanics make no mention of God. |
"Rich Grise" wrote in message
... Do they sell any kits for this that include the mechanical pink flamingo? :-) Sadly no. The R/C pink flamingo is destined to remain one of a kind. Here Ya Go! ;-) http://www.animalmakers.com/Secure/R...er/Birds2.html Cheers! Rich I can think of no better way to spend $7,750 ;-) Peter |
"Bill Bowden" wrote in message
oups.com... Peter Michelson wrote: As I said, I would like to cycle among three LEDs. To elaborate: one LED is turned on at any given time; each time I depress the momentary switch, I would like the LED that is on to turn off, and the next LED in sequence to turn on; There is a "10 stage LED sequencer" at the below address. You will need to change the 555 oscillator into a 555 "one shot" circuit so you can use a pushbutton. The 4017 can be used for just 3 LEDs by connecting the reset line (pin 15) to the 4th output, (pin 7). http://ourworld.compuserve.com/homep...htm#4017-2.gif -Bill First question: can I use more than one stage of the LED sequencer to prolong the duration of an LED being on? For example, if I want the first LED to stay on twice as long as the 2nd and 3rd LEDs, is it sufficient to connect the first two outputs to the first LED, and then only one output to each of the other two? In other words, is it a problem to connect two outputs together without using diodes? Second question: I have decided to use the approach you recommended (using the 4017 with transistors to boost the outputs, as depicted in the link above). In order to drive the process, I would like to use a combination of the simple toggle provided he http://www.terrypin.dial.pipex.com/I...-Momentary.gif and the 555 for automatic operation. In other words, I would like to be able to switch back and forth between using a momentary switch to control the LEDs and using the 555 to automatically cycle through them. Could someone please explain the circuit design necessary for switching back and forth between the two? Third question: Alternatively, since the 555 can be used as a debouncer by itself, is it possible to configure the circuit so the 555 could actually be used both as a debouncer for manual operation and as a timer (which would obviate the need for the simple toggle above)? Fourth question (I think I've well exceeded my quota here): is there any good freeware or open source software for designing circuits and printing out those designs? Thanks a bunch, Peter |
All times are GMT +1. The time now is 02:47 AM. |
|
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004 - 2014 DIYbanter