View Single Post
  #8   Report Post  
petrus bitbyter
 
Posts: n/a
Default


"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