Author Topic: Logic gate output won't go low enough to turn off NPN transistor  (Read 3431 times)

0 Members and 1 Guest are viewing this topic.

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #25 on: June 07, 2023, 11:46:49 pm »
Thank you, for different beta my best options is to work my way through testing with a whole pile of transistors of different models (each model having a different range of beta values) and check the circuit still works in all cases?

Just to better my understanding I'm also going to make a test and see hwo this circuit behaves if the NAND gate is giving a much slower square signal to the base, shuld be able see how long the transistor would take to turn off under such circumstances.
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7811
  • Country: us
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #26 on: June 08, 2023, 12:25:36 am »
Yes, this is on breadboard for now.

-3.12V is the level of the bottom of any spikes as per my o-scope's reading, but by eye on the scope's graph I could judge the flat bottom of the waveform was down in the -2.5V to -3V area.

You probably need to explain why that is happening and you might start by checking the emitter lead measured right at the lead of the transistor itself. 
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline r6502

  • Regular Contributor
  • *
  • Posts: 127
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #27 on: June 08, 2023, 09:27:59 am »
Hello

I'm would expect that the circuit will oscillate, as L1 and C2 form a LC resonator?

Did you simulate the circuit with spice (LT-Spice or TI-Tina)?

Guido
Science can amuse and fascinate us all, but it is engineering that changes the world - - Isaac Asimov
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #28 on: June 08, 2023, 10:58:29 pm »
The LC resonator is very deliberate, the idea is to generate resonance there and thereby have a reasonably effective way of having a large dI/dt in the L coil, this is necessary for inducing voltages in a nearby sensor, the whole point of this circuit. The NAND gate is part of a system generating an input waveform at roughly the resonant frequency to keep this driven.

bdunham7, thanks for the advice. I'll try it tomorrow and post some notes on what I see at the emitter lead (in theory it is grounded, few cm of wire to the setup's main ground rail, but maybe at short timescales it isn't staying so due to breadboard effects). I'll give a description then of how things appear with a much slower input square wave signal too.

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #29 on: June 08, 2023, 11:11:04 pm »
Have you considered using a Baker clamp or a Schottky clamp on the transistor? It's very effective.
https://en.wikipedia.org/wiki/Baker_clamp
I'd suggest either the simple Schottky clamp, or for best performance the three-diode Baker clamp using Schottky diodes.

« Last Edit: June 08, 2023, 11:18:17 pm by Benta »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16600
  • Country: us
  • DavidH
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #30 on: June 08, 2023, 11:12:07 pm »
I wonder if resonance is pulling the collector below the base when the transistor is suppose to be turning off.  The collector could be clamped to ground with a schottky diode to prevent this.

This might also explain why the baker clamp did not work better.
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #31 on: June 09, 2023, 12:38:26 am »
Measurements I made earlier on the collector show it never goes below ground, not sure if it would therefore be possible for that to make the base do weird things?
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #32 on: June 09, 2023, 07:41:49 pm »
I did a Spice sim of the circuit you show in reply #18 with just a resistive load (170 ohms, but it makes no big difference whether it's 100 or 300 or 1k ohms).
R1 1 kohm, R2 220 ohm.

I get the same trace for base voltage that your 'scope snap shows.
Apparently, the CB and BE capacitance is very high on the BC337 and the actual problem is the turn-on time (which surprised me). Turn-off time is like turn-on, adding a Baker/Schottky clamp makes it much faster, which is as expected.

Traces:
Green: idealized output from 74HC00
Red: BC337 collector current
Blue: BC337 VBE

bc3371.png: without clamp
bc3372.png: with clamp BAT41

I tried reducing R1 to 470 ohms, which improved turn-on time, but not a lot.

My conclusion: the BC337 is not really suited for this job. Or you'll need to rethink the dircuit to let it run in linear mode.

« Last Edit: June 10, 2023, 12:22:45 am by Benta »
 

Offline InfravioletTopic starter

  • Super Contributor
  • ***
  • Posts: 1014
  • Country: gb
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #33 on: June 09, 2023, 07:58:32 pm »
I've done some further tests:
1) Whatever I do the emitter is pretty near ground (10s of mV away at a maximum, it never goes more than 60mV below ground at most negative "peak" value in any circuit setup (pulldown, cap in parallel...).
2) A close look at the base shows that the smaller the pulldown resistor the less delay between the falling edge of the signal from the NAND gate at the time when the base gets to ground, anything in the range of 180 ohms to 270ohms (40 to 120ns ) is very suitable to bring the base down fast enough for it to stay down a while before the NAND gate signal rises again.Tthere is no significant delay betwen the rise of the NAND gatevsignal and the rise of the base.
3) At a lower driving frequency the problem remains the same, without a pulldown the base never gets to ground, with it the delay between the NAND signalfalling and the base falling is the same for a given resistance as when driving at 3MHz.
4) I tried increasing and lowering the value of the 1K resistor, in all cases removing the pulldown stopped the base ever getting to ground, and with the pulldown the waveforms were fairly similar to with a 1K resistor between the NAND gate and the transistor's base.

I'm not keen on the capacitor in parallel to the 1K resistor because that causes some further ripples on the base signal which translate to extra ripples in the output, and a clean signal is quite important for my application. So as it seems to still work for a reasonably wide range of pulldown strengths, a range of series resistance values between the NAND' output and the transistor's base, and it still works if the transistor type is swapped... Is there anything wrong with the pulldown solution? Is it more vulnerable to suddenly not working in some circumstances than the capacitor solution would be, given it still worked with alteration of the values I would assume not?

P.S. baker clamp, that I tried earlier without success, although I haven't any Schottky's to hand right now (only normal small signal diodes), s had to use normal diodes. I'll remember to get some Schottky's for future uses when I next order any other components.


Thanks

EDIT: Just saw your latest reply. Using a 2N3904 instead of a BC337 gives similar results including a similar delaying the turning of of the base. I'll check through the datasheets of those transistors I have to hand right now and see which claim low capacitance.
« Last Edit: June 09, 2023, 08:19:40 pm by Infraviolet »
 

Online Kleinstein

  • Super Contributor
  • ***
  • Posts: 14159
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #34 on: June 09, 2023, 08:29:55 pm »
The baker clamp does not really work with a "normal" diode. To make it work it needs a diode with lower forward voltage than the transistors - at least in the simpler version. One can get around it would an additional divider at the base, kind of combining it with the pull down resistor and an extra base resistor.

The pull down resistor reduces the base current and increases the load to the logic gate. This may be an issue with higher current.
The capacitor parallel to R1 can speed up also the turn on part and can be more effective than the pull down resistor.

With the current circuit the collector voltage is expected to initially go up, possibly quite a bit and via the collector - base capacitance slow down the turn off, especially with the slightly larger BC337.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #35 on: June 09, 2023, 09:31:48 pm »
Apologies: forgot to mention that the Schottky/Baker clamp diode is a BAT41. Corrected in my reply.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #36 on: June 09, 2023, 10:12:52 pm »
Try this instead. Let's call it "active turnoff". You really need to get hold of some small-signal Schottky diodes.
Turn on is now ballpark, a 2N2222A which is specified for switching is appr. 2x faster.

Trace colours the same as in previous post.
« Last Edit: June 09, 2023, 10:20:53 pm by Benta »
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #37 on: June 09, 2023, 10:59:02 pm »
Without the Baker clamp (D1 removed):
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7811
  • Country: us
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #38 on: June 10, 2023, 12:07:12 am »
The baker clamp does not really work with a "normal" diode.

The two-diode one works to keep the collector from going below the base with any sort of diodes as long as they both have the same Vf.  The three-diode version which goes beyond the 'clamp' action adds a diode to drain the charge from the base back through the input signal, bypassing all or part of the input resistor.  The input signal has to actually go low (not open) and be able to sink this current.  Using a Schottky for this third diode probably makes sense, but here's an interesting example using regular 1N4148 diodes. 

https://hackaday.io/project/18138-bullet-movies/log/49133-faillog-first-flash-driver-prototype

A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5867
  • Country: de
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #39 on: June 10, 2023, 12:14:21 am »
but here's an interesting example using regular 1N4148 diodes. 

https://hackaday.io/project/18138-bullet-movies/log/49133-faillog-first-flash-driver-prototype
Sorry, but whacking a transistor base through 100 ohms is easy for anyone. Especially at only 500 kHz. Not impressed.
But OK, that's hackaday I guess. I don't go there.
« Last Edit: June 10, 2023, 12:17:33 am by Benta »
 

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16600
  • Country: us
  • DavidH
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #40 on: June 10, 2023, 12:50:34 am »
I'm not keen on the capacitor in parallel to the 1K resistor because that causes some further ripples on the base signal which translate to extra ripples in the output, and a clean signal is quite important for my application.

If a clean signal is important, then emitter switching is the way to go.  This means driving the emitter with the output of the gate instead of the base and driving the base with a low impedance fixed voltage, usually ground but it could be something else.

Reference level pulse generators work this way to produce very clean output pulses.
 

Offline bdunham7

  • Super Contributor
  • ***
  • Posts: 7811
  • Country: us
Re: Logic gate output won't go low enough to turn off NPN transistor
« Reply #41 on: June 10, 2023, 01:12:25 am »
Sorry, but whacking a transistor base through 100 ohms is easy for anyone. Especially at only 500 kHz. Not impressed.

I didn't post it because I thought it was a Nobel-worthy accomplisment, but rather because it clearly documented the differences in performance (for that case) in the three clamp configurations and had nice pictures to boot.  He clearly had the same sort of issues as the OP even with only a 100R (total) base resistor.
« Last Edit: June 10, 2023, 01:16:33 am by bdunham7 »
A 3.5 digit 4.5 digit 5 digit 5.5 digit 6.5 digit 7.5 digit DMM is good enough for most people.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf