Nora
Advanced Member level 4
- Joined
- Mar 31, 2006
- Messages
- 115
- Helped
- 1
- Reputation
- 2
- Reaction score
- 0
- Trophy points
- 1,296
- Location
- My garage, USA
- Activity points
- 2,292
Hello-
I am using a PIC microcontroller, 18F452, 5V.
The maximum current source/sunk from any IO pin is 25mA.
The maximum current source/sunk by PORTC & PORTD combined is 200mA.
The maximum current source/sunk by PORTA & PORTB & PORTE combined is 200mA.
I am using all of PORTC (8 pins) to switch 100mA of light wire per each pin. I am not using PORTD at all.
The power to each of these outputs is switched on/off by a 3V regulator supply and controlled by the pins on PORTC. The 3V supply is on PORTB and is capable of 1.5A.
I am using all of PORTE (3 pins) to switch LEDs from the microprocessor. Each LED string needs 240mA and runs on a 12V supply.
My question is about the calculations for the transistor circuit, R1 or Rbase.
I have been using transistor TIP31, which says in electrical characteristics HFE is 10-25, depending on current draw. In the graphs HFE is shown to be as much as 110.
I have found that my calculations do not get good results. For example, I changed the Rbase on the 3V supply from 34ohms to 326k before it switched properly.
The LEDs switch fine without PORTC being connected, but as soon as the 3V supply is connected, they jump between saturation and cutoff (blinking).
I will fix this by increasing Rb significantly, but I don't understand what is going on.
Is this true that larger Rbase = smaller current on base = smaller ability to switch current on collector.
Maybe I am using the wrong formulas?
Ibmin = Iload (Ic)/HFEmin Ibmax = Ibmin*1.3
Rbase = Vswitch/Ibmax
Thanks in advance!
Nora
I am using a PIC microcontroller, 18F452, 5V.
The maximum current source/sunk from any IO pin is 25mA.
The maximum current source/sunk by PORTC & PORTD combined is 200mA.
The maximum current source/sunk by PORTA & PORTB & PORTE combined is 200mA.
I am using all of PORTC (8 pins) to switch 100mA of light wire per each pin. I am not using PORTD at all.
The power to each of these outputs is switched on/off by a 3V regulator supply and controlled by the pins on PORTC. The 3V supply is on PORTB and is capable of 1.5A.
I am using all of PORTE (3 pins) to switch LEDs from the microprocessor. Each LED string needs 240mA and runs on a 12V supply.
My question is about the calculations for the transistor circuit, R1 or Rbase.
I have been using transistor TIP31, which says in electrical characteristics HFE is 10-25, depending on current draw. In the graphs HFE is shown to be as much as 110.
I have found that my calculations do not get good results. For example, I changed the Rbase on the 3V supply from 34ohms to 326k before it switched properly.
The LEDs switch fine without PORTC being connected, but as soon as the 3V supply is connected, they jump between saturation and cutoff (blinking).
I will fix this by increasing Rb significantly, but I don't understand what is going on.
Is this true that larger Rbase = smaller current on base = smaller ability to switch current on collector.
Maybe I am using the wrong formulas?
Ibmin = Iload (Ic)/HFEmin Ibmax = Ibmin*1.3
Rbase = Vswitch/Ibmax
Thanks in advance!
Nora