Saturating a bjt with Boss flip flop

Started by Max9999, July 28, 2023, 05:55:24 PM

Previous topic - Next topic

Max9999

Dear Stompboxers,

I had the idea to hook up the Boss flip flop in a pedal to my amp to simultaneously change the amp channel. The amp has a bjt that switches relays ( Q3). The relays draw about 160 mA. I heard rule of thumb in saturating the bjt is 1/10 base current of collector current.
So I am needing about 16mA base current?

As I see it when I hook it up like shown the 56K becomes the base resistor. 16 mA would mean I change that to 500r. Before I start to experiment, has this any chance on working?




Rob Strand

#1
You need to add a resistor between flip-flop output and the base so that the *high level* flip-flop output isn't loaded down, otherwise the flip-flop won't work.   Look at the Boss LED circuits which use a transistor they only use 1MEG.  There's other circuit which drives the LED but off hand they connect the LED to the + rail, which doesn't load the "high level" output.

The easiest way out for high current is to use a MOSFET - no loading on the Flip-flop.    Otherwise you will need to buffer the flip-flop output or use a Darlington.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

antonis

You see, a fully saturated Q3 draws about 166mA, resulting into Q3 input impedance (Q1 load) of about 15R (0.026/0.166 x100)..!!
This indeed is a severe R1 domination so proceed as suggested by Rob.. :icon_wink:
(discrete or integrated Darlingtons of hFE greater than 5000 are difficult to obtain so a MosFet is one-way solution..)
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Max9999

Thank you very much

How could I buffer the flip flop output?
Since Q3 is in the amp I would like to keep it an npn.

I tried to a 1M resistor in line with an dc coupled npn as seen below, but the voltages get really low.




antonis

Quote from: Max9999 on July 29, 2023, 04:49:14 PM
How could I buffer the flip flop output?

By implementing a 560k (or so) input impedance stage.. :icon_wink:

P.S.
Don't copy - paste Emitter follower resistor values if you aren't sure what are you doing..
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..

Rob Strand

#5
QuoteI tried to a 1M resistor in line with an dc coupled npn as seen below, but the voltages get really low.

If you use a buffer you don't need any base resistance.  What you will have to do is add a resistor between the emitter of the first transistor (buffer) and the base of second transistor (output).

Alternatively, wire the two transistors as a Darlington.  Then you need to keep the resistor to base of the first transistor.  You will probably need about 150k to 220k - as balancing act between amount of base current overdrive and not loading the flip-flop.  The flip-flip will keep working with some level of loading.  I don't know what load that is.

[Edit: A quick check showed 180k fails and 220k is OK.  56k minimum resistance load for original ckt. This is a fussy circuit so I can't say it will be like this under all conditions unless I spend a lot more time analyzing it.  It's possible to mod the circuit to get more drive but since it is a fussy circuit I'm reluctant to give off the cuff suggestions
.]


FWIW, the common transistors for the flip-flop were 2SC945-P, hFE = 200 to 400, typical about 300.

In spice you can make a simple model in the schematic with a different gain:

- Press .op, enter the text,
  .model MYNPN NPN(IS=12f BF=200 BR=4 VAF=100 VAR=70)
  Enter BF to be whatever gain (hFE) you want.
  Use whatever name you want for MYNPN
- When you use the transistor in the schematic change the name next to the transistor symbol to MYNPN (no longer use NPN).
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

PRR

> The relays draw about 160 mA. I heard rule of thumb in saturating the bjt

Why do you need 2 Watt relays to switch an amp channel?

How did you jump to "BJT"? I would too but I am old and forgetful. Today any MOSFET bolts right in. The hi/lo voltage is right, no resistor needed, you can't buy a MOSFET too small for this job.
  • SUPPORTER

Rob Strand

#7
EDIT:
Unfortunately there was a typo in the simulation two BF parameters where one the BF=4 should be BR=4, which completely screws up the conclusions.
See later post below for fix.


For a 160mA output, if both transistors have lowish gain of 100 then the minimum base current is 16uA.
Whereas if the transistors have a higher gain of say 300 then the minimum base-current is 1.8uA.

If we go for a base overdrive factor of 10 then the flip-flop must drive 160uA for the low gain case.

The maximum output current of the original ckt is about 6/220k = 27uA.
So we can use a base overdrive factor of 10, we can only use less than 1.7.   Not much.

Without deviating too far from the existing circuit I got this working:


FYI: I changed the ratio of the base-collector vs base-emitter resistors as it allows a lower load resistance.   The output swing is a little lower so I don't know if I actually gained any more output current.

Iout is 70uA max.   If we operated at 50uA with a safety margin.

So for low hFE transistors that's a base over drive factor of 50/16 = 3.0.   Which is quite workable for the low hFE case.
For higher gain transistors the base overdrive factor is considerably more.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

The comments about using a MOSFET are right - no issues with base drive or loading on the flip flop, which is touchy in that implementation.

A little more systems view might help, though. Your schematic shows the amp transistor right next to the flip flop, which it won't be in actual use. There will be a wire, perhaps a long one, between the pedal and the amp. That can cause some issues, especially if you replace the BJT Q3 in the amp with a MOSFET, or parallel Q3 with a MOSFET as another way to do it.

Another way to do this is to use a PNP transistor attached to the flip flop on the "down" side. A PNP with its emitter connected to the +9V in the pedal through a resistor and its base tied to the low side of the flip flop lets current through its collector when the BJT collector is pulled down. This current can run through even a long wire to turn on the remote transistor in the amp. The current in the wire is limited by the PNP and the emitter resistor; the PNP collector acts as a current source. The PNP is running non-saturated, so if you use something like a 2N3906, the current gain at 10ma is a minimum of 100, typically 300, so even though its base is being pulled down by the flip flop, the base is pulling only a fraction of a milliampere.

The systems-view presents something else that may or may not be a problem. The 16 ma (or whatever it actually is in practice) is running out of the pedal power supply or battery, through the driver transistors, out to the amp, and back from the amp on some ground line to return to the pedal power supply. That 16ma through the wire resistance is an offset of the pedal signal ground to the amp ground and might be an audible tick on switching. Maybe not, but maybe.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Max9999

Thank you selfless contributers!

RG's point of this plan maybe upsetting ground currents in the amp made me think about switching the amps control voltage inside the pedal( the amps footswitch simply connects control voltage to bjt base).

In A, picture below, the flipflops output is buffered by a darlington followed by a bjt switch. No idea if the darlington emitter resistor is ok.
B, also depicted,  is the mosfet arrangement from Geofex.

I am getting both to work. B might be better because of lower parts count. Other reasons?

Antonis, yes I am aware of my limited knowledge. If you could suggest me a good book about electronics I would have some bedtime stories for a month ;) Thank you for your other advice.

Rob you really went out of your way man! Beautiful. I hope to be able to give back to the community as well as you do someday. I appreciate it.

PRR the amp has 4 relays switching at the same time, so yes 160mA. The bjt plan was carefully copied from Merlin B.

RG thank you for the systems-view and the mosfet plan on Geofex. The amp needed so much work to get all the ground related hums out that I dont want to play with that anymore if I can avoid it. Although these would be clicks or thumps.





Rob Strand

#10
Quote from: Max9999 on July 30, 2023, 04:50:46 PM
Rob you really went out of your way man! Beautiful. I hope to be able to give back to the community as well as you do someday. I appreciate it.

Unfortunately I had a typo in my simulation which gave the completely wrong conclusion and sent me on  more complicate path. The BJT model had two BF parameters the BF=4 should be BR=4.

I've simulated this circuit about 50 times and I was really puzzled why it was oscillating.  I was going to have a look at it.

Your transistor version was quite a bit more complicated than I envisaged.


To cut a long story short.  I went to draw up a simpler transistor version then I saw the typo.   That also explained the oscillation so it saved me some time working out what was going on there.

As it turns out there is plenty of scope to increase the output drive of the Boss flip-flip by simply reducing the collector resistors on the two transistors.

Here's the new results and the transistor circuit I envisaged.



My apologies for the mistake.  Unfortunately once that type of mistake gets in it propagates.

As with all Darlingtons the saturation voltage is about 1V.   So you only get 8V output, which should be fine for relays.  MOSFETs don't have that problem.  You can do a Non-Darlington transistor booster with a lower saturation but you end-up needing more base current on both transistors, similar to what RG was saying for the PNP version.

QuoteAnother way to do this is to use a PNP transistor attached to the flip flop on the "down" side. A PNP with its emitter connected to the +9V in the pedal through a resistor and its base tied to the low side of the flip flop lets current through its collector when the BJT collector is pulled down. This current can run through even a long wire to turn on the remote transistor in the amp. The current in the wire is limited by the PNP and the emitter resistor; the PNP collector acts as a current source. The PNP is running non-saturated, so if you use something like a 2N3906, the current gain at 10ma is a minimum of 100, typically 300, so even though its base is being pulled down by the flip flop, the base is pulling only a fraction of a milliampere.
The PNP circuit needs a bit of work to turn off since the flip-flip output doesn't swing to the +V rail, it sits at 6V or so.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

R.G.

Quote from: Rob Strand on July 30, 2023, 08:35:20 PM
The PNP circuit needs a bit of work to turn off since the flip-flip output doesn't swing to the +V rail, it sits at 6V or so.
Good point. I think this could be done with an extra resistor from PNP emitter to ground to hold the emitter inactive unless the base is pulled down, but to be sure I ought to do some more looking at cases instead of shooting from the hip. I'll go take a look.
R.G.

In response to the questions in the forum - PCB Layout for Musical Effects is available from The Book Patch. Search "PCB Layout" and it ought to appear.

Rob Strand

QuoteGood point. I think this could be done with an extra resistor from PNP emitter to ground to hold the emitter inactive unless the base is pulled down, but to be sure I ought to do some more looking at cases instead of shooting from the hip. I'll go take a look.
Yes, adding a carefully chosen base-emitter resistor; maybe around (1/8) times the input resistor (input to the PNP base).  Another old-school trick was to add a zener in series with input resistor, but you often need a b-e resistor as well.

The MOSFET is by far the easiest solution and perhaps the "modern engineer's" solution.
Send:     . .- .-. - .... / - --- / --. --- .-. -
According to the water analogy of electricity, transistor leakage is caused by holes.

antonis

#13
Quote from: Max9999 on July 30, 2023, 04:50:46 PM
If you could suggest me a good book about electronics I would have some bedtime stories for a month ;)

https://www.scribd.com/document/338286993/Horowitz-Hill-The-Art-of-Electronics-BookZZ-org-pdf#

I might confused you with impedances and loading so let's take it another way:
In your initial circuit, Q3 needs about 160mA Collector current so its Base needs 1.6mA, at least..!!
(actually, Base current should be 5 to 10 times higher..)
This current should flow from V1 through 56k resistor and Q2 Collector resulting into about 90V drop..!!
But Q2 Collector can't go lower than about 600 - 700 mV (Q3 VBE) resuting into a current less than 150μA..
Clearly, Q3 can't activate the relay.. :icon_wink:
"I'm getting older while being taught all the time" Solon the Athenian..
"I don't mind  being taught all the time but I do mind a lot getting old" Antonis the Thessalonian..