| Author |
Message |
Chris W
Guest
|
Posted:
Thu Feb 17, 2005 3:19 am Post subject:
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
|
|
| Back to top |
|
 |
Guest
|
Posted:
Thu Feb 17, 2005 3:46 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
Chris W wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
Lord Garth
Guest
|
Posted:
Thu Feb 17, 2005 3:59 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
"Chris W" <1qazse4@cox.net> wrote in message
news:2OOQd.63983$jn.59042@lakeread06...
| Quote: | 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.
|
Don't let a little flip-flop stop you. You should research the T flip-flop
and a debounce circuit for your clock input. That's the button that makes
it do it thing Chris, not a time of day clock!
|
|
| Back to top |
|
 |
Peter Michelson
Guest
|
Posted:
Thu Feb 17, 2005 5:12 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
Si Ballenger
Guest
|
Posted:
Thu Feb 17, 2005 5:29 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
On Wed, 16 Feb 2005 18:12:59 -0500, "Peter Michelson"
<pete77r@hotmail.com> wrote:
| Quote: | 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 |
|
| Back to top |
|
 |
Peter Michelson
Guest
|
Posted:
Thu Feb 17, 2005 5:38 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
| Quote: | 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 |
|
| Back to top |
|
 |
Peter Michelson
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
Thank you for your reply.
"John" <welcomehowcome@hotmail.com> wrote in message
news:tZGdndwvwJ8XaY7fRVn-3A@comcast.com...
| Quote: |
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?
| Quote: | 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 |
|
| Back to top |
|
 |
Peter Michelson
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
"John Fields" <jfields@austininstruments.com> wrote in message
news:72r7119c5t7p6vhmqsu1vopu35v65e45br@4ax.com...
| Quote: | 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. |
| Quote: |
I'll reply, tomorrow or the day after, with a schematic which will
solve your problem.
|
That's very kind. |
|
| Back to top |
|
 |
John
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
"Peter Michelson" <pete77r@hotmail.com> wrote in message
news:bDRQd.9917$Ps.1740@okepread06...
| Quote: | Thank you for your reply.
"John Fields" <jfields@austininstruments.com> wrote in message
news:q7n711p8kv1nthidjc2be6hcko1kn2kulh@4ax.com...
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.
| Quote: | 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.
| Quote: | 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.
| Quote: | 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.
|
|
|
| Back to top |
|
 |
John Fields
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
On Wed, 16 Feb 2005 19:33:08 -0500, "Peter Michelson"
<pete77r@hotmail.com> wrote:
| Quote: | Thank you for your reply.
"John Fields" <jfields@austininstruments.com> wrote in message
news:q7n711p8kv1nthidjc2be6hcko1kn2kulh@4ax.com...
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.
---
| Quote: | 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
--
| Quote: | 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?^)
---
| Quote: | 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.
| Quote: | Thanks again for your reply.
|
You're welcome.
--
John Fields |
|
| Back to top |
|
 |
petrus bitbyter
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
"Chris W" <1qazse4@cox.net> schreef in bericht
news:2OOQd.63983$jn.59042@lakeread06...
| Quote: | 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 |
|
| Back to top |
|
 |
John Fields
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
On Wed, 16 Feb 2005 18:12:59 -0500, "Peter Michelson"
<pete77r@hotmail.com> wrote:
| Quote: | 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.
---
| Quote: | I would be interested to know the minimum complement of components necessary
to support a single flip-flop.
|
---
Just one, the driver.
---
| Quote: | 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.
---
| Quote: | Is there an easier way to generate the same functionality?
|
---
What _functionality_?
---
| Quote: | 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 |
|
| Back to top |
|
 |
Peter Michelson
Guest
|
Posted:
Thu Feb 17, 2005 6:10 am Post subject:
Re: Turning a light on and off with momentary switch |
|
|
Thank you for your reply.
"John Fields" <jfields@austininstruments.com> wrote in message
news:q7n711p8kv1nthidjc2be6hcko1kn2kulh@4ax.com...
| Quote: |
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.
| Quote: | 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.
| Quote: | 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.
| Quote: | 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.
| Quote: |
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?
Thanks again for your reply. |
|
| Back to top |
|
 |
Chris W
Guest
|
Posted:
Thu Feb 17, 2005 12:20 pm Post subject:
Re: Turning a light on and off with momentary switch |
|
|
petrus bitbyter wrote:
| Quote: |
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.
| Quote: | 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?
| Quote: |
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 |
|
| Back to top |
|
 |
John
Guest
|
Posted:
Thu Feb 17, 2005 2:38 pm Post subject:
Re: Turning a light on and off with momentary switch |
|
|
"Peter Michelson" <pete77r@hotmail.com> wrote in message
news:WxVQd.10007$Ps.3033@okepread06...
| Quote: | Thank you for your reply.
"John" <welcomehowcome@hotmail.com> wrote in message
news:tZGdndwvwJ8XaY7fRVn-3A@comcast.com...
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.
| Quote: | 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)
| Quote: | 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.
| Quote: | 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. |
|
| Back to top |
|
 |
|
|
|
|