transistor not working as a switch

From circuitbending to homebrew stompboxes & synths, keep the DIY spirit alive!

Moderators: Kent, Joe., luketeaford, lisa

Post Reply
honeyb
Common Wiggler
Posts: 144
Joined: Sun Jul 29, 2018 1:37 am
Location: Luxembourg

transistor not working as a switch

Post by honeyb » Thu Nov 07, 2019 3:39 pm

ok, a total :bang: problem which is probably very simple if you know what you are doing....

I want to use a transistor as a switch, preferable a 2n3904 because I have a bunch. Standard NPN transistor.

Yes, I've read the Nuts and Volts article https://www.nutsvolts.com/magazine/arti ... 015_Secura
as well as a few other sources, so I know it has some nuances.

But before I even start calculating saturation level base current, here is what my Fluke says, measuring resistance collector/emitter.

3904 in breadboard, nothing connected. "infinite" ohms
Connect base to ground using 1K resistor, resistance of circa 450K
Connect base to positive rail (+12V) through a 1K resistor, resistance near 200K
Connect base to negative rail, again 200K resistance.

How do I get it to "infinite" resistance? Because even the slightest ground current seems to set it off. And yes, even when I boost the connecting resistor to 100K, I still get 550k resistance collector/emitter. I need closer to 10M ohm resistance, it needs to be OFF. And because of the op amp, the ground current is not going to be perfectly zero.

I'm out of room for a digital switch chip, was hoping to use a transistor as a switch...

User avatar
cygmu
Super Deluxe Wiggler
Posts: 1593
Joined: Mon Feb 15, 2016 3:33 pm
Location: UK

Post by cygmu » Thu Nov 07, 2019 4:06 pm

What are you connecting the collector and emitter to? If they're not connected to anything but the Fluke then I don't think your readings will be very meaningful.

You could try this:

Connect the collector to the positive rail via a resistor of your choice e.g. 10k.
Connect the emitter to ground.

Connect base to ground with a 1k resistor and measure the voltage at the collector. From that you can deduce the collector current which is likely zero.

Connect base to the positive rail via a 1k resistor and make the same measurement.

Alternatively, what's the circuit that you want to use this in? Maybe knowing that would help figure out how to deploy the transistor.

User avatar
guest
Super Deluxe Wiggler
Posts: 4857
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Thu Nov 07, 2019 4:08 pm

do you have your probes going the right way on the meter? current can only flow one way through the transistor. i just did some tests on a 3906 here, and i get 4ohms when on, infinite when off, and a few megohms when floating (which is odd).
openmusiclabs.com

User avatar
mskala
Super Deluxe Wiggler
Posts: 2714
Joined: Thu Mar 27, 2014 7:33 am
Location: Toronto
Contact:

Re: transistor not working as a switch

Post by mskala » Thu Nov 07, 2019 8:34 pm

honeyb wrote:Connect base to negative rail, again 200K resistance.
When you did this, you probably destroyed the transistor. The 2N3904's base-emitter junction is only rated for 6V of reverse voltage, so negative 12V applied through a 1k resistor is going to push it way beyond its absolute maximum limits. Throw that one out and do future tests on a fresh one.
North Coast Synthesis Ltd.
Latest Web log posting: Vexations

honeyb
Common Wiggler
Posts: 144
Joined: Sun Jul 29, 2018 1:37 am
Location: Luxembourg

Post by honeyb » Fri Nov 08, 2019 3:13 am

cygmu wrote:What are you connecting the collector and emitter to? If they're not connected to anything but the Fluke then I don't think your readings will be very meaningful.
You are right, they were left hanging.
cygmu wrote: You could try this:
Connect the collector to the positive rail via a resistor of your choice e.g. 10k.
Connect the emitter to ground.

Connect base to ground with a 1k resistor and measure the voltage at the collector. From that you can deduce the collector current which is likely zero.

Connect base to the positive rail via a 1k resistor and make the same measurement.
In other words, I had the wrong mental model of how a transistor works. Looking at actual voltages is a more correct viewpoint.
cygmu wrote: Alternatively, what's the circuit that you want to use this in? Maybe knowing that would help figure out how to deploy the transistor.
I want to send a temporary pulse to a CMOS gate. The circuit is built around a cd40106 schmitt inverter, with one of the inverters used to hold state (input pin has 100K to ground and 100K to VCC, also a small cap to ground. Hitting the input with a short pos or neg pulse toggles state). The comparator sends a short pulse to change state.

I can also set/reset using diodes, that's probably simpler than the transistor and probably what I will go with in the end. But the transistor was my first thought, and it bugs me that I don't know how to make it work.

Thanks for helping me clarify my mental model, this goes a long way.

honeyb
Common Wiggler
Posts: 144
Joined: Sun Jul 29, 2018 1:37 am
Location: Luxembourg

Post by honeyb » Fri Nov 08, 2019 3:16 am

guest wrote:do you have your probes going the right way on the meter? current can only flow one way through the transistor. i just did some tests on a 3906 here, and i get 4ohms when on, infinite when off, and a few megohms when floating (which is odd).
Another thing I didn't think of... Thanks!

And yes, the Fluke does give ...odd... numbers when I measure resistance across a diode or a capacitor, i.e. components which are not resistors.

honeyb
Common Wiggler
Posts: 144
Joined: Sun Jul 29, 2018 1:37 am
Location: Luxembourg

Re: transistor not working as a switch

Post by honeyb » Fri Nov 08, 2019 3:17 am

mskala wrote:
honeyb wrote:Connect base to negative rail, again 200K resistance.
When you did this, you probably destroyed the transistor. The 2N3904's base-emitter junction is only rated for 6V of reverse voltage, so negative 12V applied through a 1k resistor is going to push it way beyond its absolute maximum limits. Throw that one out and do future tests on a fresh one.
Hmm, might explain all the white noise coming from my trash can...... too many experiments on transistors!

Yes, you are right, this baby is probably :deadbanana:

User avatar
guest
Super Deluxe Wiggler
Posts: 4857
Joined: Mon Aug 19, 2013 11:49 am

Post by guest » Fri Nov 08, 2019 2:03 pm

one more thing, if you were touching the meter probes at all while measuring, then you were measuring the resistance of your skin and not the transistor.
openmusiclabs.com

Post Reply

Return to “Music Tech DIY”