Go Down

Topic: Transistor Switches For Newbs (Read 181 times) previous topic - next topic

AsaBrown

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!

raschemmel

#1
Nov 21, 2019, 04:59 pm Last Edit: Nov 21, 2019, 04:59 pm by raschemmel
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)

3. Specify the transistor DRIVE VOLTAGE !

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

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

Quote
Small−Signal Current Gain ( hfe)                                           Min                             Max              

(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

5. SPECIFY THE LOAD CURRENT !
   LOAD = MOTOR
   MOTOR OPERATING CURRENT = 1A
   
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 = 1k ohm

7. 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..)
Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

PerryBebbington


Quote
...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.

JCA34F

#3
Nov 21, 2019, 11:23 pm Last Edit: Nov 21, 2019, 11:27 pm by JCA34F
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.

raschemmel

Arduino UNOs, Pro-Minis, ATMega328, ATtiny85, LCDs, MCP4162, keypads,<br />DS18B20s,74c922,nRF24L01, RS232, SD card, RC fixed wing, quadcopter

gilshultz

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

Wawa

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 = 1k ohm
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..

Go Up