Hi all,
I wanted to understand what are the rules that I need to keep on the table when I am using a transistor as a switch.
So I have this schematic, where I want to switch a couple of transistor on the basis of the signal I am getting from my MCU. There are 2 different voltage rails on the system i.e. 5vdc and 24vdc. I have an optocoupler chip (LTV-847) to provide the required isolation. Below is the one channel of this setup with 1/4th of the optocoupler and 1 transistor (BC847) to work as switch.

The output end of my optocoupler is supposed to work on the 24vdc power-supply, so technically speaking, I will be passing in 24v to the base of my transistors. Pin 1 and 2 of the optocoupler will be connected to my Shift-Register that will inturn be connected to the MCU passing in control values.
Looking at various other posts on this forum, I found that Resistance for the base of the transistor is =(V-Vbe)/Ib.
For a BC847, the max current it can handle is 100mA, so as people suggested, I need to take 1/10th of this, that becomes 10mA. Following this formula, gave me a resistance of ~ 2.3K. Not sure if my calculation is even right, since looking at the datasheet, I think passing in 24v to base directly seems like an invitation to the "Magic-Smoke".
The reason I am trying to pass 24v directly to my transistor, is because I want to keep 5v rail isolated as it is powering up my MCU. And if I can keep out a few components that I would be added to step down this 24v again to 5v, it'll be great. Please let me know if this seems practical.
I wanted to understand what are the rules that I need to keep on the table when I am using a transistor as a switch.
So I have this schematic, where I want to switch a couple of transistor on the basis of the signal I am getting from my MCU. There are 2 different voltage rails on the system i.e. 5vdc and 24vdc. I have an optocoupler chip (LTV-847) to provide the required isolation. Below is the one channel of this setup with 1/4th of the optocoupler and 1 transistor (BC847) to work as switch.

The output end of my optocoupler is supposed to work on the 24vdc power-supply, so technically speaking, I will be passing in 24v to the base of my transistors. Pin 1 and 2 of the optocoupler will be connected to my Shift-Register that will inturn be connected to the MCU passing in control values.
Looking at various other posts on this forum, I found that Resistance for the base of the transistor is =(V-Vbe)/Ib.
For a BC847, the max current it can handle is 100mA, so as people suggested, I need to take 1/10th of this, that becomes 10mA. Following this formula, gave me a resistance of ~ 2.3K. Not sure if my calculation is even right, since looking at the datasheet, I think passing in 24v to base directly seems like an invitation to the "Magic-Smoke".
The reason I am trying to pass 24v directly to my transistor, is because I want to keep 5v rail isolated as it is powering up my MCU. And if I can keep out a few components that I would be added to step down this 24v again to 5v, it'll be great. Please let me know if this seems practical.