Ok, i'm a poor teacher, but i think the following may help.
<hr>
You need to know the Hfe parameter of your BJT(gain). Here at 20mA, the minimum you may have should be 80.
To make sure you saturate it properly, some will divide the Hfe parameter by 2, some by 5, and some others by 10.
Let's use 5, so we have Hfe=16
<hr>
The base current is the Collector current/Hfe = 20/16 = 1.65 mA
Assuming your PIC may give 5V at it's output, the base resistor will be
(5-Vbe)/1.65mA = (5-0.7)/1.65mA = 2.606 K...
anything in this range or lower will work.
HTH
Last edited by mister_e; - 10th November 2008 at 16:45.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks