Transistor Switches For Newbs

Hello everybody! I'm posting this because I'm new to electronics in general. I've read tutorials on 'sparkfun.com' that have introduced me to the concept of using a transistor as a switch, but I'd like to ask a few questions(most likely noobly ones) about how I can really use one in the future.

What I'd like to know is how I can determine which specific transistor I can use, where the base receives a HIGH signal from an I/O pin my arduino mega2560, to allow voltage to travel from the collector to the emitter.

Does the voltage that I'd like to pass through the collector and emitter need to be specific or can there be a range(possible between 5VDC and 24VDC)?

I have an unknown voltage/current (finding out very soon after I measure the current/voltage in the next couple days while I'm at work) from two different pins that need to connect to ground to turn on specific features on a mass flow controller. IF it's a 5V pin that I want to switch on or off using a transitor, would the BC337 or BC338 NPN transister work for this? I've looked at the data sheets and I THINK this is what I could use but like I said, I am very new to this field and do not have enough experience to rely on my own knowledge.. for now..

If anybody has a moment to assist me in my learning process, it would be much appreciated! Thank you!

I'm sure Google has a moment...

Transistor switch

and Adafruit isn't busy either,,,

Transistors 101

Long story short:

  1. FIRST READ THE DAMN DATASHEET !

  2. Specify the LOAD current !

LOAD: MOTOR (12V/ 1A)

  1. Specify the transistor DRIVE VOLTAGE !

DRIVE VOLTAGE= Arduino GPIO digital output = 5V (ON)/ 0.3V (OFF)

  1. LOOK UP THE TRANSISTOR "Small Signal Current Gain" (hfe !

_[u]Small−Signal Current Gain ( [u]hfe[/u])[/u] _ [u]Min[/u] [u]Max[/u]

(IC = 1.0 mAdc, VCE = 10 Vdc, f = 1.0 kHz) 50 300

(IC = 10 mAdc, VCE = 10 Vdc, f = 1.0 kHz) 75 375

  1. SPECIFY THE LOAD CURRENT ! LOAD = MOTOR MOTOR OPERATING CURRENT = 1A

  2. Calculate BASE RESISTOR !

VDRIVE = 5V COLLECTOR CURRENT (IC) = 1A hfe 350 IBASE = IC/hfe IBASE = 1A/350 IBASE = 0.00285A (2.85mA)

Base−Emitter Saturation Voltage = 0.6V

VRESISTOR = VDRIVE - Base−Emitter Saturation Voltage = 5V-0.6V = 4.4V

Rbase = VRESISTOR/ IBASE = 4.4V/0.00285A = 1543.8 (ROUND DOWN TO 1000 Ohms (1k) for better saturation

RBASE = [u]1k ohm[/u]

  1. CALCULATE COLLECTOR CURRENT WITH CHOSEN BASE RESISTOR !

IB = VDRIVE - Base−Emitter Saturation Voltage/1000 ohms = 4.4V/1000 = 0.0044A

IC = IB * hfe

IC = 0.0044A * 350 = 1.54 A

IC > ILOAD

Base resistor is adequate. (Long story not so short..)

...Allow voltage to travel from the collector to the emitter.

Does the voltage that I'd like to pass through the collector and emitter need to be specific or can there be a range(possible between 5VDC and 24VDC)?

This is a common mistake for people new to electronics. Voltage does not travel 'through' anything. Voltage is a difference between 2 points on your circuit. The thing that goes 'through' is current. The thing that tries to stop it going through is called resistance.

If you've not done so already you need to learn basic circuit theory, which means learning Ohm's Law and Kirchoff's laws , and probably anything else linked to from those pages.

And one of the first things is to learn to read and draw schematic diagrams, so you can communicate with other electronics minded people effectively, it's much easier to read a good schematic than understand a verbal description like " the short pin is hooked to a resistor and the blue wire goes to ground through the longer pin". :) There are millions of examples on the WWW.

"One can only hope..."

I would suggest you prop your feet up and read a few basic electronics books. Also learn how to read a data sheet. This data sheet thing can be a long drawn out process. A few years back I purchased a bunch of N Channel logic level Avalanche rated MOSFETs in the 15 amp range, I love them and do not use many transistors anymore. They will withstand 60 Volts, I do not need diodes for inductive loads and I normally do low side switching so I connect the source to ground, Drain to 1 side of the load the other side of the load to + and the gate to the arduino pin sometime using a 27 ohm resistor. They will do a few amps without a heat sink so it makes life easy. Transistors typically have a 0.7 volt or 1,4 Volt with the darlington having the larger voltage drop. very seldom is there a single best solution. Most important thing connect the grounds then check if the grounds are connected. Good Luck & Have Fun! Gil

raschemmel: 6. Calculate BASE RESISTOR !

VDRIVE = 5V COLLECTOR CURRENT (IC) = 1A hfe 350 IBASE = IC/hfe♦ IBASE = 1A/350 IBASE = 0.00285A (2.85mA)

Base−Emitter Saturation Voltage = 0.6V

VRESISTOR = VDRIVE - Base−Emitter Saturation Voltage = 5V-0.6V = 4.4V

Rbase = VRESISTOR/ IBASE = 4.4V/0.00285A = 1543.8 (ROUND DOWN TO 1000 Ohms (1k) for better saturation

RBASE = [u]1k ohm[/u]

Don't. Hfe does not apply for switching (when collector-emitter voltage must be as low as possible). Collector can (should) dip below base voltage in this mode.

Just use the Ib:Ic ratio that you usually can find inside the switching mode graph of the datasheet. 1:10 is common, 1:20 is still ok for smaller transistors.

1Amp collector current should get 50mA base current (1:20, or 5% ratio). Something an Arduino pin can't provide. Therefore you should use a logic level mosfet for load currents above ~400mA.

Darlingtons (TIP120) can have an Ib:Ic switching ratio of 1:250 (see datasheet). But for some applications their CE dropout voltage can be a problem. Leo..