diyAudio

diyAudio (http://www.diyaudio.com/forums/)
-   Solid State (http://www.diyaudio.com/forums/solid-state/)
-   -   Little transistor questions.... (http://www.diyaudio.com/forums/solid-state/100742-little-transistor-questions.html)

Nordic 26th April 2007 10:21 AM

Little transistor questions....
 
Hi guys, I'm busy with a small project useing a PIC to operate some relays....

I need a bit of help with the practical side of things now, I'm quite happy with my pcb layout, schematic etc... sadly not the code, but my problem right now is learning about switching transistors....

What I think I learned so far... (the tranistors will be NPN)
you need at least about 0.7V between the base and the emiter.

I read that "Ic = hFE IB"

So lets say my relays need about 20mA, to switch on...
And I have a measured transistor with hFE of 100

Would IB needed then be 0.020 / 100 i.e. 0.0002mA (is this uA?)

I know I can copy popular component values etc. from existing circuits, but that won't be teaching me these basics...

You can keep the explanation pretty low level, as my knowledge of transistors is still in the cocoon stage.... :D

peranders 26th April 2007 11:12 AM

If you don't want any scientific explantion, a 10 kohms resistor to base from the MCU. Relay coil to the collector. Don't forget to add a diode 1N4148, 1N4001 or whatever across the relay coil. Cathode of the diode faced towards supply voltage. Without this diode you will kill the transistor.

Nordic 26th April 2007 11:24 AM

Thanks man, lol was looking for slightly more scientific approach.... Should have said explain like you would to a smart kid....

found this on the big ol' interweb in the meantime... does it look about right?

http://members.home.nl/b.vandam/lonely/trswinpn.gif

Quote:

The procedure below explains how to choose a suitable switching transistor.
NPN transistor switch
(load is on when chip output is high)


Using units in calculations
Remember to use V, A and or
V, mA and k.


The transistor's maximum collector current Ic(max) must be greater than the load current Ic.
load current Ic = supply voltage Vs / load resistance RL

The transistor's minimum current gain hFE(min) must be at least five times the load current Ic divided by the maximum output current from the chip.
hFE(min) > 5 ( load current Ic / max. chip current )

Choose a transistor which meets these requirements and make a note of its properties: Ic(max) and hFE(min).
There is a table showing technical data for some popular transistors on bottom of this page.


Calculate an approximate value for the base resistor:
RB = Vc hFE where Vc = chip supply voltage

For a simple circuit where the chip and the load share the same power supply (Vc = Vs) you may prefer to use: RB = 0.2 RL hFE
Then choose the nearest standard value for the base resistor.

Finally, remember that if the load is a motor or relay coil a protection diode is required.
P.S. I do have the diodes at the relay board....

Nordic 26th April 2007 12:40 PM

OK so lets see what we have so far

VS: 9V supply (relay needs little over 8V to switch)
Chip supply 5V
Relay coil 270R
Max chip current I want to draw from each PIC's pins should be about 5mA, may go lower if I see it is possible...

load current Ic = supply voltage Vs / load resistance RL
Ic = 9V/270R = 0.033.mA

hFE(min) > 5 ( load current Ic / max. chip current )
hFE(min) > 5 x (0.033/0.005)
hFE(min) > 33

RB = Vc hFE where Vc = chip supply voltage
= 5 x 100hFE assuming you use 100hFE transistor
RB= 5000R

right so far??

Does this mean the higher the hFE the lower current you need to base to switch on the transistor?


All times are GMT. The time now is 11:49 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio


Content Relevant URLs by vBSEO 3.3.2