Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[AVR] Using PNP S8550 Transistor with Atmega8

Status
Not open for further replies.

asking

Full Member level 5
Joined
Sep 21, 2010
Messages
279
Helped
6
Reputation
12
Reaction score
6
Trophy points
1,298
Activity points
3,377
Hi,

I want to use PNP Transistor being driver from pc817(NPN) Optocoupler which is driven by Atmega8. Can anyone give me stable circuit to drive the relay 155ohm 12V 30A?
 

Hi,

Show us your circuit.

Klaus
 
  • Like
Reactions: asking

    asking

    Points: 2
    Helpful Answer Positive Rating
2i6c5ew.jpg


mistake: Transistor is upside down. (Ignore)

ACtually with this design it works. but transistor blows. As base voltage is more than -5V as per datasheet.

Thanks.
 

You need to size R1 so that VBE is less than the absolute maximum. Probably 100-200 ohms.
 

I don't understand why datasheet says maximum voltage is -5V to the base ? How do i calculate that from resistor positions ?
 

Hi,

relay coil is 155 Ohms. Voltage is 12V,
Current = 12V/155 Ohms = 77mA (at collecotr)

For switching purpose let base current about 1/10 (in datasheet they use 1/20) of colletctor current. Lets say about 7mA

V_BE = about 0.6V (to be excat -0.6V)

VCE sat of optocoupler below 0.5V (guessing)
So R2 = (5V - 0.6V- 0.5V ) / 7mA = 557 Ohms.

So use something between 470 and 750 Ohms.

****************

This is about what you did. So why is transistor overheating?
Maybe you don´t drive the optocoupler strong enough. It´s not clear if it is 10k or 220Ohms.
10k is too much. Use 220 Ohms to 470 Ohms here.

To check on this: Switch your port pin high and measure V-CE of optocoupler. It must be below 0.5V

*******

Datasheet.
My datasheet (ONSemiconductor) says V_EB0 = -5V (Note: in some datasheets they use V_BE0, wich is the negative voltage of -5V = 5V)
This means the voltage form emitter to base must not be more than -5V. With your circuit it is between 0V (while OFF) and 0.6V (while ON). This is all OK.

Klaus
 

Finally i've got something easy

2igyliw.jpg


Thanks for your suggestion..
 

Hi,

Use an NPN combined with 470 ohms instead of PNP. Emitter to GND.

With your circuit you get folowing disadvantages
* the uC port is (Current limited with about 0.1mA) pulled up in 12V direction.
* switching OFF of relay is not guaranteed, because relay OFF current is about 35mA
* transistor power is about 200mW in OFF state
* transistor power is about 70mW in ON state
**********
With the NPN solution you
* get 0 relay current while OFF
* no transistor power during OFF state
* about 20mW during ON state
* full relay voltage during ON state

There are so many schematics on how to switch a relay.
Why trying to reinvent the wheel, but not calculating the circuit?

Klaus
 

I have no direct connection from Microcontroller. Microcontroller DRIVES optocouple in turn opto PC817 drives Gnd path. Do you have any scheme that drives PC817 (NPN Transistor) another NPN transistor's base ? then please show us Schematic.
 

Hi,

this is not clear in your schematic, that the optocoupler drives the PNP.
Why do you use a optocoupler? It is not necessary as long as you don´t need isolation.
******
Solution for optocoupler and PNP:
Use schematic of post#3
* correct PNP connection (upside down)
* Use 470R as R1
* use 470R as "220R"
finsihed.

*********
Simple and working solution without optocoupler:
Needed: Relay, free wheeling diode, NPN, 470R, uC
* NPN E to GND
* NPN B to 470R
* 470R to uC port pin
* Relay + to 12V
* free wheeling parallel to relay
* NPN C to Relay- (and diode anode)
finished.

Klaus
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top