No its is not 17 volts. i am giving five volts this 17 is temperature sensor's value. Yeah i know for bjt we need resistor. but what should be the value of that resistor for bc547?Hi,
17V to supply the PIC? are you sure? A simple resistor is no solution to limit the voltage.
No capacitors (bulk and high speed) at VCC?
Like every switching bjt circuit it needs a limited base current. Usually this is made with a resistor in the base line.
Swtiching applications always need a proper layout / signal routing. Show us a picture of your PCB where we can see the complete current flow of the relay current.
Klaus
I think the '17' may refer to the temperature as it's an LM35!
Reagardless, the transistor MUST have a base resistor or either it, or the PIC output pin will be damaged.
Personally, I would drop R1 considerably, maybe to 10K and I wouldn't drive the LED from AC, even if you did add the required series resistor to it!
Brian.
It depends on how much current is needed to operate the relay but assuming it isn't a huge one, 470 Ohms is probably a good compromise.
The actual calculation is:
Voltage drop across the resistor is the PIC pin high voltage minus the B-E junction drop in the transistor (typically: VCC - 0.65V)
Current through the resistor is the transistor base current, that's the collector current divided by it's Hfe. (typically: relay current/100)
Resistor value = Rv/Ri = 4.35V/(0.1A/100) = 4350 Ohms if we assume the relay needs 100mA.
However, that value will bias the transistor to about half conduction, you want it to 'hard switch' so it behaves more like a mechanical on/off switch so the rule of thumb is to allow 10 times more base current, that drops the value to 435 Ohms. 470 Ohms is near enough!
Brian.
The value of R1 is so high that when the PIC tries to turn on the transistor then the supply voltage to the PIC will drop to about 0.7V and it will shut down. Get rid of R1 and add the correct resistor to the base of the transistor.
Before you had no current limiting resistor... and you were not worried about destroying the bjt. (I wonder)yes you aare right and its works but with 350 ohm resistor like a proper switch. I am worried that 350ohms resistor means 12mA current to transistors base. Dont you think it will destroy transistor?
Hi,
Before you had no current limiting resistor... and you were not worried about destroying the bjt. (I wonder)
Now it is limited to 12 mA (Where do you have the 350R from?), but now you are worried? (I wonder even more)
IF you are worried, why don´t you look into the datasheet and check how much base current the bjt can survive?
Klaus
The diode rating is almost irrelevant, it only conducts at the instant the relay turns off and it will never have more than the relay voltage across it in reverse bias mode or 0.6V in forward mode.
The BC547 is perfectly capable of handling 12mA base current but you probably don't need that much. Using a lower value resistor than I suggested will not improve performance but it will force the PIC to supply more output current than necessary.
Brian.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?