H e l p me please :S Relay 16f84a

Status
Not open for further replies.

tred13

New Member
Hi all! I need some help with this design. I want to drive a relay with a transistor. I want to know the correct value of the Rb, and Rc(equivalent) to work on the equations.

I sticked with a 2N2222A to start with, and on datasheet says several hfe values so i dont know which to take ; i know, they are under certain conditions but i want to know if that ic under those conditions is Vcc/Rc or hfe*ib.

All is because the value of Vceo is negative.. :S so i dont know if this is good or im missing something. The only way i think is to increase the value of Rb like 100k-150k.

Vbb is 5v from a PIC16F84A, like 12 ma out of each pin of PortB (100ma out of all pins).
Vcc say is 20v DC for a relay rated for 24V , 2888 ohm coil res, 8ma max.

I've seen other circuits and RB ranges from 1k to 240k (1k, 4.7k, 10k, 100k..)
Ill attach the part of the circuit.

Thanks!!!!
 

Attachments

  • circuit11.jpg
    44.6 KB · Views: 192
The circuit shows the base resistor as 1K - stick to that, it's a good choice!.

You don't want to do anything clever, you just want to bang enough current in the base to turn the transistor hard on.
 
Although the below example will work for all hard switching transistor configurations, its not imperative for small Ic (collector current) designs. Trial and error with higher value base resistors will do fine in most cases

Rule of thumb for hard switching, use a Hfe of 10 (some call it forced gain). eg; 250mA collector current required, then drive Ib (base current) at 25mA. With a 5V supply, and remembering that R = V / I then;

R = 4.4 / 0.025
R = 176 ohms

Why 4.4V? Well that's because the transistor Vbe (Base to Emitter voltage) is 0.6V, so 5V - 0.6 = 4.4. Clearly a 176ohm resistor does not exist by default, so grab the closest you can for the job. (This is just an example - its not the actual values for your relay).

Why is all that important as you drive higher loads? Because you want as smaller Vce (collector to emitter) voltage drop as possible, or the transistor will heat up quick, and you could really shorten its life span
 
Thanks Nigel for the advice. About what gramo says, when you say a smaller Vce voltage drop, that is a value as closer to zero, or to be a negative value (...)?

Sorry guys, but im still not so sure bout all..

The pic16f84a gives 5v 100ma as output to PortB. one pin of it will give around 12.5ma -100ma/8 pins-.

(5v - 0.6v)/12.5ma = Rb = 352ohm, according to gramo.


What i did before was this:

I took for example Ic = 10ma; Vce = 10v for a hfe = 75 from the datasheet

Vce = Vcc - Ic*Rc ; Ic = hfe*Ib ; Rb = (Vbb - 0.6)/Ib

at the end i found that Rc = 1k, Ib= 0.13ma and Rb = 33kohm.

Here i face 2 issues:
1) Im not sure if i must count the current out of the pin (..12.5ma) in the equation.
[Ref **broken link removed**

2) Rc as i see it = (2888ohm coil *1000ohm led )/(2888+1000) = 742.8ohm
correct me if im wrong, i took the 1n4004 as open and LED as short,
where input Vcc = 20v , around 75% of max rated voltage for the coil 24vdc - thus the LED resistor is 1kohm for a 20ma current drive (max is 30ma for LED)

[Ref **broken link removed** look for "Relay + LED monitor" ]

I just want to be sure about the procedure, i have to defend this project in a week and explain all posible details.

Hope you ppl can enlighten me up and thanks again

By the way, i want to apply that green coatin on a pcb. Do you know any brands of that material so i can buy it, and/or the procedures involved in the aplication of it. Ive read its called solder mask, but the procedures are blur to me , just a couple: removable solder mask and some vitrea paint curing
Pebeo Vitrea 160
**broken link removed**
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…