strange relay behaviour

GroupDIY Audio Forum

Help Support GroupDIY Audio Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

rob_gould

Well-known member
Joined
Jul 8, 2007
Messages
1,383
Location
Netherlands
Hi all,

I'm trying to use this discrete flip flop circuit with a momentary switch to switch a relay for true bypass of a guitar delay effect :

win_hill_sch.gif


The only things not on the schematic are my 12V relay and a 1n4148 diode across the coil.

The weird thing is that when I close the switch, the relay closes momentarily and then opens again. Every time I press the button, it's a always this click on and off very quickly. I don't think this is an issue of debouncing because the relay always clicks twice only and this circuit is meant to provide de bouncing anyway...

Any suggestions about what could be causing this strange but consistent behaviour? Dodgy MOSFET perhaps?

Cheers

Rob

Ah - one final thing : a link to the source of the schematic :

http://www.pcsilencioso.com/cpemma/flipflop.html
 
Just for chuckles does the circuit work without the relay..? Latch on and latch off?

If yes perhaps inductive spike from relay is fipping the flop.

If not get it working that way first.

JR

 
When you press the button C1 discharges through R3, turning Q1 on. This turns Q2 off.

When the button is open the base of Q1 should continue to receive current through R4 to latch. It needs about 1mA to stay full on and certainly can not get it through R4. So the only time the Q2 is turned off is at a brief time when Q1 is on which is when you press the button.

So R4 should be about 10-12K.

But most importantly the Q2 is directly controlled by Q1 and even if you turned Q1 on full how do you turn it off?

 
sahib said:
Most importantly the Q2 is directly controlled by Q1 and even if you turned Q1 on full how do you turn it off?

Hi Cemal, here's the description from the website :

With Q1 off, capacitor C1 charges up to 12V through R1 & R2, so when the button is pressed again, it applies its voltage to Q1 base through R3 turning Q1 back on and so turning Q2 and the load off.

Make sense to you? I'm struggling to get my head round this one a little bit, but I forgot to mention that I built this once before and it worked...

And to answer John's question, with the relay disconnected the behaviour is the same...
 
The charge time for C1 is about 1.25 secs, so if the button is pressed for longer than that, Q1 base is in danger of rising back up to a point at which it will conduct again and switch off Q2.
Silly question time, have you checked that C1 is definitely 220nF?
 
Walrus,

The problem is that the Q1 is not latching and the problem is R4 as it does not provide sufficient current to keep it on. The other problem is that when Q1 is latched to turn it off we have to steal current from its base and R3 is too high for that.

Rob,

Sorry I was in a hurry yesterday. I looked at it better now.

Short R3 and make R4 10K.

If Q1 turns on first then its collector is at ground potential. Therefore Q2 is off. The left hand side of the switch is also kept at ground potential through R2.

On pressing the button the base of Q1 is pulled to ground. It turns off. Its collector rises to 12V and Q2 turn on.

This time the left hand side of the switch is at 12V potential. On pressing the button Q1 turns on and Q2 turns off. When the button is released base of Q1 continues to receive current  through R4 keeping it latched.

 
Sahib, as I understood from Robs description is that Q1 *is* latched at start up, as he says that pushing the switch, the relay momentarily switches, but then switches off again. This means that Q1 is switching off then back on again.  It is Q2 that is not latching after the button is pressed.
 
Sorry Kevin,

I should have paid more attention to Rob's post but I still think the problem is  at Q1's operation.  It is not turning full on because R4 is too large. Rob also does not mention which turns on first on power up. However it should be Q1 for the Q2 to be off.

Assume that Q1 comes on first. If it is not turned hard on its collector will have some positive potential. This will start to turn on Q2 slowly. This time the drain potential of Q2 wil start to rise and steal current from the base of Q1 whic will start to turn off. When Q1 is fully off Q2 remains on.

On pressing the button Q1 turns on as now the left hand side of the button is at rail potential. Assume that it received sufficient current through R4 and stayed latched. This time the left hand side of the switch is at ground again. When you press the button this time C1 should start to charge and steal current form Q1's base but it does not. So the Q1 stays on. 

However, assume that Q1 is turned on hard.  Then the left hand side of the switch is at ground. When you press the button again C1 should start to charge and steal current brom the base of Q1 but obvioulsy it does not. So Q1 is still on.

If Q2 comes on first then Q1 is kept off. So the left hand side of the switch is at the rail potential and C1 is charged. On pressing the button Q1 turns on. Assume that it received sufficient current through R4 and stayed latched. This time the left hand side of the switch is at ground again. When you pressed the button C1 should steal current from the base of Q1 but again obvioulsy it does not.



 
But surely R3 is so much smaller than R4, that when the button is pressed (with C1 discharged) it would rob all the base current from Q1 hence turning it off.
My (dodgy) maths says Q1 base current is about 34uA, the BC547B has a minimum gain of 200 which would give a collector current of about 7mA, would that not be enough to turn it on sufficiently?
 
rob_gould said:
And to answer John's question, with the relay disconnected the behaviour is the same...
OK, the relay is not resetting the FF with a spike.

If you have a scope look at the drain of Q2. We know from the relay clicking, that the (momentary) switch closure briefly starves the base of Q1 so it turns off and Q2 turns on.  When Q2 is turned on the drain voltage "should" be well below the voltage required to turn Q1 on and turn Q2 off again. 

If you don't have a scope this will be hard to confirm since from your symptoms it appears to be trying but only for a moment.

I would suggest temporarily shorting the low side of the 10k base resistor to ground and measure what the DC voltages are around the circuit. The drain of Q2 should be close to 0V, collector of Q1 at 12V. if not figure out why.

JR

 
Walrus said:
But surely R3 is so much smaller than R4, that when the button is pressed (with C1 discharged) it would rob all the base current from Q1 hence turning it off.

Hi Kevin,

It is indeed how it should be but I just went through the motion to see all the possibilities. Without intending to offend these are all in the assumption that there is no mistake in wiring.


John,

If the circuit is not working without the relay either  I would discount any spike related cause.


Rob,

Can you check if the relay clicks on power up?




 
sahib said:
John,

If the circuit is not working without the relay either  I would discount any spike related cause.

Yup... he already answered that question.

I am ASSuming he doesn't have a scope to look at how it act's transiently, but does have a VOM.  Shorting the bottom of r3, right side of SW1 will force it into relay-on state, so he can see why it isn't latching on. Not latching on suggests base voltage of Q1 is not below .5V, or gate of Q2 is not high enough (8-10V) to hold on Q2... the report that it was clicking suggests Q2 was turning on or trying to turn on. Without relay it should be easier to turn on.

JR

This is a pretty simple circuit but being bi-state and not working makes it a little hard to easily debug.
 
Thanks for the input all.

I'm disappointed to tell you I couldn't get this licked and because I was on a deadline for this project I was using this in, I had to go with an alternative solution rather than continue to pursue the troubleshooting. 

Cheers

Rob
 
Rob,

Although this seems like a very simple circuit it is really an egg or a hen situation. Both transistors should turn hard on and full off. If one does not then it won't work.
 
The bistable is a very basic nuts and bolts circuit of discrete digital logic, I am a little disappointed that we didn't get to the bottom of this. Even if rarely used, we need to accumulate libraries of simple circuit blocks like this that we can build upon for future design efforts.

FWIW discrete bistables are archaic, but good training.

JR
 
Back
Top