Author Topic: Transistor Schmitt Trigger  (Read 7796 times)

0 Members and 1 Guest are viewing this topic.

Offline pmbrunelleTopic starter

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Transistor Schmitt Trigger
« on: November 10, 2015, 05:56:35 am »
So I'm looking to be inspired (semi-copy) a transistor Schmitt trigger circuit, and I came across this one I liked:

http://www.solarbotics.net/bftgu/tutorials_schmitt.html

In red, I have circled a resistor whose function I'm not sure of. This is the base-emitter resistor on the PNP transistor. What is it for? This is not some negative feedback circuit which needs minimal delay to avoid turning the circuit into an oscillator.

Actually, in general, I'm not sure if this question applies to base-emitter resistors in general.

Edit: On a second look, if anything, I'm thinking it would be better to put the resistor in series between the PNP B-E junction and the NPN collector,  so as to limit the current going through the NPN emitter resistor, thus jacking up the switching thresholds...

Edit 2: That NPN emitter biasing scheme looks funky, there would need to be two diode drops in series (rather than just one) to get the NPN emitter to Vcc/2 - Vbe.
« Last Edit: November 10, 2015, 06:29:35 am by pmbrunelle »
 

Online Gyro

  • Super Contributor
  • ***
  • Posts: 9469
  • Country: gb
Re: Transistor Schmitt Trigger
« Reply #1 on: November 10, 2015, 09:43:14 am »
It's fairly common to include a B-E resistor to ensure that a transistor can fully turn off in the presence of leakage currents - in this case, leakage current through the first NPN transistor. It's normally just good practice.

P.S. The lower 47K resistor on the right-hand NPN fulfills the same purpose.
« Last Edit: November 10, 2015, 09:48:00 am by Gyro »
Best Regards, Chris
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Transistor Schmitt Trigger
« Reply #2 on: November 10, 2015, 01:28:38 pm »
Note that this circuit will be very slow (>10us?) because of the very large resistor values.
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline pmbrunelleTopic starter

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Transistor Schmitt Trigger
« Reply #3 on: November 10, 2015, 01:44:36 pm »
The leakage thing makes sense, I suppose I can check the max collector leakage current, then pick a base-emitter resistor that won't allow more than half a volt to be dropped across the base-emitter.

In terms of speed, I guess the feedback network is the killer? Or everything in general?

Actually, speed isn't an issue here; I will be using this to debounce the output of a low-pass filtered switch. Since the nature of the filter will be most likely an RC with probably a 100 ms time constant, I need fairly high input resistance to avoid silly capacitor values.

On a second thought, the output of this will be going to a microcontroller (AVR), so maybe transition speed of the output could be an issue if it spends too much time in the no-man's land of logic levels...

As for why I'm doing this (as opposed to software debounce), it's due to noob-level status in the programming, followed by a desire to learn electronics, and since it's a one-off, the economics of the extra components are irrelevant.

I will follow up with a schematic of a circuit more tuned to my application...
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Transistor Schmitt Trigger
« Reply #4 on: November 10, 2015, 02:23:48 pm »
Not leakage, you don't want that.  Anyway, base current will dominate at 0.5V (it's not really necessary to have a B-E resistor at all, if it's just for leakage).

Base resistors should be dimensioned so that, when forward biased, Ib is about 1/10 to 1/20 of maximum Ic, and B-E resistor current is about 1/2 to 1/10 of Ib.

The B-E junction acts like a very small battery, holding ~pAh of charge, with a nominal 'charged' voltage of 0.7V, holding up for a moment (in the 0.7 to 0.5V range, say), then dropping to 0 (or reverse) when the charge is gone.  This charge is called stored charge, and is responsible for the storage time during saturated switching.  The junction also has fairly rapid self-discharge, so that it dissipates on its own on the order of 10-20us.

So the B-E resistor actually draws current out of the base, and the magnitude of that current should be maybe 1/10th to 1x the forward base current.

While base voltage remains up (due to storage), collector current remains up.  Which gives all the more proof that BJTs are voltage dependent: drive them with a pure current, and they take forever to turn off; drive with a voltage source (of modest series resistance), and they turn off nicely.

The B-E resistor is simply to reduce the Thevenin resistance at turn-off, speeding things up.

Another way to think of the resistor values: make a voltage divider, such that the open-circuit voltage is 1.4 to 5V or so, and so that the current into a load of 0.7V is whatever Ib is required for the switch.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19479
  • Country: gb
  • 0999
Re: Transistor Schmitt Trigger
« Reply #5 on: November 10, 2015, 06:29:12 pm »
Why not put the protection diodes after the input resistor?
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Transistor Schmitt Trigger
« Reply #6 on: November 10, 2015, 08:53:49 pm »
Well, the negative diode isn't doing anything in that exact position.

The 1M will easily arc over from ESD, but if another method is provided to shunt the spark first (a spark gap would be too unreliable, but a GDT or any kind of TVS device would do), that's fine.

Bipolar transistors are relatively robust, so nothing fancy is needed.

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline pmbrunelleTopic starter

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Transistor Schmitt Trigger
« Reply #7 on: November 11, 2015, 12:53:14 am »
I only previously thought of MOSFETS as having a gate charge concept. Actually, I thought that if you cut the lead to the base, that would stop a bipolar transistor in its tracks  :palm: It's good to become educated...

So I have attached a schematic of my more "overall system", showing how there's a switch to be debounced. Previously, I was using a CMOS 555 as a Schmitt trigger there as a "black box"; it's time to graduate to something requiring more thinking on my part.

Part values are not necessarily fine tuned, but lets say reasonably close enough to show the idea.

Actually, I'm not really sure where clamping diodes come into play. There's no point in peppering them everywhere; I guess it's more for where my widget will interface with the unknown outside world? Such as a switch where a charged human finger could touch it? In this case, the Schmitt trigger is kind of internal to my appliance.
 

Online T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21651
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Transistor Schmitt Trigger
« Reply #8 on: November 11, 2015, 12:46:54 pm »
Seems reasonable enough.  But 100nF, not 100uF...

I wouldn't recommend a time constant >20ms for debounce that interacts with humans.  Typical bounce time is in the 1-10ms range so that's also a worst case.

Internal switches don't need protection diodes, no.  That said, make sure ESD can't strike them -- if you have the kind of project where only plastic reaches the front panel, then any high voltage fingers approaching it will have nothing to strike, and you're fine.  So you want adequate distance from the metal frame or pins of the pushbuttons.

Tim
« Last Edit: November 11, 2015, 12:48:34 pm by T3sl4co1l »
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19479
  • Country: gb
  • 0999
Re: Transistor Schmitt Trigger
« Reply #9 on: November 11, 2015, 01:54:32 pm »
Well, the negative diode isn't doing anything in that exact position.
It will protect the transistor by preventing the base-emitter junction from being reverse biased if the input voltage is too low below the negative rail.
 

Offline pmbrunelleTopic starter

  • Regular Contributor
  • *
  • Posts: 183
  • Country: ca
  • lost mech. guy
Re: Transistor Schmitt Trigger
« Reply #10 on: November 11, 2015, 06:04:27 pm »
This switch is actually measuring the open/closed status of a door, so I don't expect user (myself and friends) frustration issues with the RC time constant.

Actually, ESD-wise, probably the gigantic cap will be able to absorb a human-body discharge with hardly any change in voltage.

I guess it's time to prototype and measure this sub-circuit.

Actually, for more entertainment value on the forum, I'm going to make a project thread  :-+ Otherwise, a bunch of threads asking for advice on sub-systems is relatively boring to read in comparison.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf