# 5v to 24 v switch using transistor

#### Jpnagaraj

Joined Mar 8, 2020
25
Hi i want to get 24v power supply from a terminal when i give 5v from my microcontrolller and 0v when I give 0v from my controller im using MJE5055 AND MJE 2955 but i could not get the output as i desired i have attached my circuit kindly help me out.

#### Attachments

• 1.3 MB Views: 45

Joined Jul 18, 2013
24,238
Have you looked at logic gate Mosfets?
Max.

#### dl324

Joined Mar 30, 2015
13,841

Why are you using a power transistor as an inverter? Is low side switching an option?

#### Dodgydave

Joined Jun 22, 2012
10,139
Use a 2N3904 for the mj3055, and put a 1K across the output.

Joined Feb 20, 2016
3,987
What current are you trying to switch on the 24V output?
If it is just a low signal level current, an opto isolator is an easy way to go.

#### Audioguru again

Joined Oct 21, 2019
4,129
The 100 ohms resistor will have a current of 230mA in it if the first transistor turns on but the 47k resistor feeding the base of the first transistor has a current of only 4.3V/47k= 91uA. Then the first transistor will do nothing.

1) How much current must the MJ2955 provide at almost 24V? Its datasheet shows that its can provide 23V at 4A if the base current is 400mA. Then your 100 ohms resistor must be about 56 ohms.
Then the first transistor needs a base current of 41mA which the microcontroller cannot provide.

2) Then the first transistor must be a Darlington transistor that can have a collector current as high as 410mA, and a base resistor of about 2.2k ohms.

Joined Jan 15, 2015
6,324
If you can use low side switching I would just use something like a FQP30N06L Logic Level MOSFET easily driven by 5 volts with a 10K resistor Gate to Ground. If low side switching is not possible I would just use a similar P channel MOSFET like the MTP50P03HDLG both are common and about a buck ($1.00 USD). Going high side you just need to invert your code as 0 volt Gate is On. Ron #### Audioguru again Joined Oct 21, 2019 4,129 The switched output is from +24V so the high side switch must have its control low voltage limited far above 0V. Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 Have you looked at logic gate Mosfets? Max. No i have not yet tried any mosfet i will explore in that area. Thankyou Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 View attachment 201312 Why are you using a power transistor as an inverter? Is low side switching an option? Im using power because of 24 v switching and i cannot use low side switching .. Thankyou Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 Use a 2N3904 for the mj3055, and put a 1K across the output. Thankyou i will try for sure Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 What current are you trying to switch on the 24V output? If it is just a low signal level current, an opto isolator is an easy way to go. View attachment 201325 The current will be maximum of 500milli amp maximum a 24v relay will be operated or it will be given to the plc as input. Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 What current are you trying to switch on the 24V output? If it is just a low signal level current, an opto isolator is an easy way to go. View attachment 201325 Optocoupler i need to try it Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 The 100 ohms resistor will have a current of 230mA in it if the first transistor turns on but the 47k resistor feeding the base of the first transistor has a current of only 4.3V/47k= 91uA. Then the first transistor will do nothing. 1) How much current must the MJ2955 provide at almost 24V? Its datasheet shows that its can provide 23V at 4A if the base current is 400mA. Then your 100 ohms resistor must be about 56 ohms. Then the first transistor needs a base current of 41mA which the microcontroller cannot provide. 2) Then the first transistor must be a Darlington transistor that can have a collector current as high as 410mA, and a base resistor of about 2.2k ohms. Thankyou i will try the changes and will update soon and the darlington transistor can be a normal bc547 or it needed a power transistor. Thread Starter #### Jpnagaraj Joined Mar 8, 2020 25 If you can use low side switching I would just use something like a FQP30N06L Logic Level MOSFET easily driven by 5 volts with a 10K resistor Gate to Ground. If low side switching is not possible I would just use a similar P channel MOSFET like the MTP50P03HDLG both are common and about a buck ($1.00 USD). Going high side you just need to invert your code as 0 volt Gate is On.

Ron
Thankyou i think that pchannel will suit my high side switching will search for p channel mosfet

#### Wolfgang Klein

Joined Aug 22, 2016
1
Hi i want to get 24v power supply from a terminal when i give 5v from my microcontrolller and 0v when I give 0v from my controller im using MJE5055 AND MJE 2955 but i could not get the output as i desired i have attached my circuit kindly help me out.
I think you should reduce the 47k resistor to 1k.

#### Audioguru again

Joined Oct 21, 2019
4,129
For a load current of 500mA the datasheet of the MJ2955 shows a base current of 50mA. Any little NPN transistor (BC547, 2N3904, 2N2222, etc) can have a collector current of 50mA when its base current is 5mA.

The base voltage of the little transistor is 0.7V when it is turned on, so if the input from the microcontroller is 5V (it might be 4V when loaded with 5mA) then the base resistor is (5V - 0.7V)/5mA= 860, use 820 ohms.

#### DarthVolta

Joined Jan 27, 2015
521
The 100 ohms resistor will have a current of 230mA in it if the first transistor turns on but the 47k resistor feeding the base of the first transistor has a current of only 4.3V/47k= 91uA. Then the first transistor will do nothing.

1) How much current must the MJ2955 provide at almost 24V? Its datasheet shows that its can provide 23V at 4A if the base current is 400mA. Then your 100 ohms resistor must be about 56 ohms.
Then the first transistor needs a base current of 41mA which the microcontroller cannot provide.

2) Then the first transistor must be a Darlington transistor that can have a collector current as high as 410mA, and a base resistor of about 2.2k ohms.
Are you saying a typical power transistor won't turn on much with 100uA ? Doesn't the 3055 have gain around 75 ?

When I 1st looked at the circuit and did BE KVL with beta=75, I said the voltage across the 1k will be enough to destroy the BE of the PNP, but then I thought so the diode nature of BE should take over and conduct as much current as it can and keep Vbe near 0.7V, and not fry itself across 6.86V

I just ordered an old 1965 book on semiconductors and their circuits. I hope it's a really good book, they sure where able do make great analog stuff in the 1960's, true picece's of work and art. So I hope the book is in a form I'll like and is good.

Last edited:

#### dl324

Joined Mar 30, 2015
13,841
Doesn't the 3055 have gain around 75 ?
If you're lucky. Most wouldn't count on getting one with the maximum spec.

At less than 4A, I'd go with 20.

#### Audioguru again

Joined Oct 21, 2019
4,129
The beta (current gain) is used when a transistor is an amplifier with plenty of Vce (4V here) not when it is used as a saturated switch. As a saturated switch almost every datasheet says the base current should be 1/10th the collector current.