Need a flip-flop circuit

G

Gus

Guest
Hi all. This is my first post to this group.

Here's my problem : I need to be able to turn some lights on from
several different locations. I want to use a momentary contact switch
at each of the locations to toggle between the on / off state. That
way, I only need 2 conductors to each of the buttons. This is
important because the wires are already in place underground and I
can't add more.

The lights are high voltage so I want to use a 12V relay to do the
high voltage switching. So I really need a relay driver.

I tried a circuit using a 4013 D-type flip-flop, and outputting this
to a BC547 transistor which then drves the relay. I got the circuit at
http://www.saburchill.com/tech/electronics/elect027.html

I used a 1N914 diode across the relay coil to deal with back EMF
current. And I cleaned up the power source with a 47uF electrolytic
decoupling capacitor across the -ve and +12V.

BUT the circuit is totally unstable. It seems to switch itself on and
off at random and touching the input causes the relay to open and
close very rapidly. I have built the circuit a few times on a
breadboard using fresh components each time but it always responds the
same way.

I suspect this is a fairly simple circuit to design but it's beyond my
ability. Can anybody point me to a good, stable, working circuit? Or
is there an error in the circuit I'm using. I have absolutely no doubt
I've assembled it as described - several times and with fresh, new
components.

Thanks in advance.

Gus
 
There's several things wrong here. First you need to run the SET and RESET
pins from the other half of the IC to ground. There are 2 flip flops in
this package. The other 2 pins are 8 and 10 which should be tied to pin 7.

Most of the problem is using a mechanical switch to supply the clock pulse
on pin 3. All mechanical switches must be DEBOUNCED electronically to
prevent each 'bounce' from being counted. GOOGLE for 'switch debouncing'.
A further problem is the distance of the wiring run to pin 3 of the IC.
This can serve as an antenna and pickup all sorts of spurious signals
causing random triggering. You see this by the fact that you get relay
chatter when touching the pin. If I have time later today I'll draw you a
circuit that works.
Frank


Gus wrote:

Hi all. This is my first post to this group.

Here's my problem : I need to be able to turn some lights on from
several different locations. I want to use a momentary contact switch
at each of the locations to toggle between the on / off state. That
way, I only need 2 conductors to each of the buttons. This is
important because the wires are already in place underground and I
can't add more.

The lights are high voltage so I want to use a 12V relay to do the
high voltage switching. So I really need a relay driver.

I tried a circuit using a 4013 D-type flip-flop, and outputting this
to a BC547 transistor which then drves the relay. I got the circuit at
http://www.saburchill.com/tech/electronics/elect027.html

I used a 1N914 diode across the relay coil to deal with back EMF
current. And I cleaned up the power source with a 47uF electrolytic
decoupling capacitor across the -ve and +12V.

BUT the circuit is totally unstable. It seems to switch itself on and
off at random and touching the input causes the relay to open and
close very rapidly. I have built the circuit a few times on a
breadboard using fresh components each time but it always responds the
same way.

I suspect this is a fairly simple circuit to design but it's beyond my
ability. Can anybody point me to a good, stable, working circuit? Or
is there an error in the circuit I'm using. I have absolutely no doubt
I've assembled it as described - several times and with fresh, new
components.

Thanks in advance.

Gus
 
O.K. Gus try this: Tie pin 3 to pin 7 through a resistor (3K to 15k). Then tie
a capacitor from pin 3 to pin 14 (something around 47 - 470 mf). The capacitor
now serves as a shock absorber to absorb the contact bounce. Put your switch
across the capacitor. If it were me I would use a schmidt trigger to insure
debouncing but what I said MIGHT be O.K. Give it a try.
Frank


Gus wrote:

Ahhhh - one step closer to the solution. Thanks for your advice.

I tried tying pins 8 and 10 to earth and it sort-of worked......
The circuit flipped the first time I sent 12V to pin , but the current
flow via pin 3 must have been huge. A spark appeared and I had the
good sense not to set the board on fire by holding pin 3 at 12V. I
assume I should use a resistor to reduce the current flow and voltage
presented to pin 3 and I will experiment with that.

Your comments about debouncing have been noted and I'm looking into
that also. It would appear that a resistor/capacitor combination might
fit the bill.

Again, thanks for your help and I'd be most grateful if you can come
up with a working circuit.

On Wed, 27 Aug 2003 13:56:41 GMT, Frank Pickens
frankpickens@verizon.net> wrote:

There's several things wrong here. First you need to run the SET and RESET
pins from the other half of the IC to ground. There are 2 flip flops in
this package. The other 2 pins are 8 and 10 which should be tied to pin 7.

Most of the problem is using a mechanical switch to supply the clock pulse
on pin 3. All mechanical switches must be DEBOUNCED electronically to
prevent each 'bounce' from being counted. GOOGLE for 'switch debouncing'.
A further problem is the distance of the wiring run to pin 3 of the IC.
This can serve as an antenna and pickup all sorts of spurious signals
causing random triggering. You see this by the fact that you get relay
chatter when touching the pin. If I have time later today I'll draw you a
circuit that works.
Frank


Gus wrote:

Hi all. This is my first post to this group.

Here's my problem : I need to be able to turn some lights on from
several different locations. I want to use a momentary contact switch
at each of the locations to toggle between the on / off state. That
way, I only need 2 conductors to each of the buttons. This is
important because the wires are already in place underground and I
can't add more.

The lights are high voltage so I want to use a 12V relay to do the
high voltage switching. So I really need a relay driver.

I tried a circuit using a 4013 D-type flip-flop, and outputting this
to a BC547 transistor which then drves the relay. I got the circuit at
http://www.saburchill.com/tech/electronics/elect027.html

I used a 1N914 diode across the relay coil to deal with back EMF
current. And I cleaned up the power source with a 47uF electrolytic
decoupling capacitor across the -ve and +12V.

BUT the circuit is totally unstable. It seems to switch itself on and
off at random and touching the input causes the relay to open and
close very rapidly. I have built the circuit a few times on a
breadboard using fresh components each time but it always responds the
same way.

I suspect this is a fairly simple circuit to design but it's beyond my
ability. Can anybody point me to a good, stable, working circuit? Or
is there an error in the circuit I'm using. I have absolutely no doubt
I've assembled it as described - several times and with fresh, new
components.

Thanks in advance.

Gus
 
Almost there. I put 4.4K resistor between pins 3 and 7 (earth) but at
this time I don't have a capacitor.

The circuit now flips and flops as it should but clearly it
switch-bounces. Each time you send 12V to pin 3 you can see the output
flicker high and low and it's almost random which state it's in when
12V is removed. But still I can see it's doing basically the right
thing.

I presume the capacitor will stop it from responding so fast. Will try
it out when I get the proper capacitor.

Gus






On Wed, 27 Aug 2003 14:52:10 GMT, Frank Pickens
<frankpickens@verizon.net> wrote:

O.K. Gus try this: Tie pin 3 to pin 7 through a resistor (3K to 15k). Then tie
a capacitor from pin 3 to pin 14 (something around 47 - 470 mf). The capacitor
now serves as a shock absorber to absorb the contact bounce. Put your switch
across the capacitor. If it were me I would use a schmidt trigger to insure
debouncing but what I said MIGHT be O.K. Give it a try.
Frank


Gus wrote:

Ahhhh - one step closer to the solution. Thanks for your advice.

I tried tying pins 8 and 10 to earth and it sort-of worked......
The circuit flipped the first time I sent 12V to pin , but the current
flow via pin 3 must have been huge. A spark appeared and I had the
good sense not to set the board on fire by holding pin 3 at 12V. I
assume I should use a resistor to reduce the current flow and voltage
presented to pin 3 and I will experiment with that.

Your comments about debouncing have been noted and I'm looking into
that also. It would appear that a resistor/capacitor combination might
fit the bill.

Again, thanks for your help and I'd be most grateful if you can come
up with a working circuit.

On Wed, 27 Aug 2003 13:56:41 GMT, Frank Pickens
frankpickens@verizon.net> wrote:

There's several things wrong here. First you need to run the SET and RESET
pins from the other half of the IC to ground. There are 2 flip flops in
this package. The other 2 pins are 8 and 10 which should be tied to pin 7.

Most of the problem is using a mechanical switch to supply the clock pulse
on pin 3. All mechanical switches must be DEBOUNCED electronically to
prevent each 'bounce' from being counted. GOOGLE for 'switch debouncing'.
A further problem is the distance of the wiring run to pin 3 of the IC.
This can serve as an antenna and pickup all sorts of spurious signals
causing random triggering. You see this by the fact that you get relay
chatter when touching the pin. If I have time later today I'll draw you a
circuit that works.
Frank


Gus wrote:

Hi all. This is my first post to this group.

Here's my problem : I need to be able to turn some lights on from
several different locations. I want to use a momentary contact switch
at each of the locations to toggle between the on / off state. That
way, I only need 2 conductors to each of the buttons. This is
important because the wires are already in place underground and I
can't add more.

The lights are high voltage so I want to use a 12V relay to do the
high voltage switching. So I really need a relay driver.

I tried a circuit using a 4013 D-type flip-flop, and outputting this
to a BC547 transistor which then drves the relay. I got the circuit at
http://www.saburchill.com/tech/electronics/elect027.html

I used a 1N914 diode across the relay coil to deal with back EMF
current. And I cleaned up the power source with a 47uF electrolytic
decoupling capacitor across the -ve and +12V.

BUT the circuit is totally unstable. It seems to switch itself on and
off at random and touching the input causes the relay to open and
close very rapidly. I have built the circuit a few times on a
breadboard using fresh components each time but it always responds the
same way.

I suspect this is a fairly simple circuit to design but it's beyond my
ability. Can anybody point me to a good, stable, working circuit? Or
is there an error in the circuit I'm using. I have absolutely no doubt
I've assembled it as described - several times and with fresh, new
components.

Thanks in advance.

Gus
 
Touch the input of a high gain amplifier and listen to the hum. Anytime there is
an AC field you have the potential to tap into it inadvertantly.

Electro wrote:

You say the wire acts as an antenna, what kind of voltages will be induced
across it?

Frank Pickens <frankpickens@verizon.net> wrote in message
news:3F4C0F8D.BEA29E87@verizon.net...
There's several things wrong here. First you need to run the SET and RESET
pins from the other half of the IC to ground. There are 2 flip flops in
this package. The other 2 pins are 8 and 10 which should be tied to pin 7.

Most of the problem is using a mechanical switch to supply the clock pulse
on pin 3. All mechanical switches must be DEBOUNCED electronically to
prevent each 'bounce' from being counted. GOOGLE for 'switch debouncing'.
A further problem is the distance of the wiring run to pin 3 of the IC.
This can serve as an antenna and pickup all sorts of spurious signals
causing random triggering. You see this by the fact that you get relay
chatter when touching the pin. If I have time later today I'll draw you a
circuit that works.
Frank


Gus wrote:

Hi all. This is my first post to this group.

Here's my problem : I need to be able to turn some lights on from
several different locations. I want to use a momentary contact switch
at each of the locations to toggle between the on / off state. That
way, I only need 2 conductors to each of the buttons. This is
important because the wires are already in place underground and I
can't add more.

The lights are high voltage so I want to use a 12V relay to do the
high voltage switching. So I really need a relay driver.

I tried a circuit using a 4013 D-type flip-flop, and outputting this
to a BC547 transistor which then drves the relay. I got the circuit at
http://www.saburchill.com/tech/electronics/elect027.html

I used a 1N914 diode across the relay coil to deal with back EMF
current. And I cleaned up the power source with a 47uF electrolytic
decoupling capacitor across the -ve and +12V.

BUT the circuit is totally unstable. It seems to switch itself on and
off at random and touching the input causes the relay to open and
close very rapidly. I have built the circuit a few times on a
breadboard using fresh components each time but it always responds the
same way.

I suspect this is a fairly simple circuit to design but it's beyond my
ability. Can anybody point me to a good, stable, working circuit? Or
is there an error in the circuit I'm using. I have absolutely no doubt
I've assembled it as described - several times and with fresh, new
components.

Thanks in advance.

Gus
 
On Wed, 27 Aug 2003 21:35:27 +1000, Gus <gazman@pobox.com> wrote:

Here's my problem : I need to be able to turn some lights on from
several different locations.
Did you know that you can walk into any electrical shop and purchase
impulse acrivated relays to do exactly what you are asking for?

There are no fewer than 3 different types of relays available, to do
exactly what you need. Some work with one pushbutton, while others
work with 2.
 

Welcome to EDABoard.com

Sponsor

Back
Top