Author Topic: Transistor H bridge base resistor values  (Read 5279 times)

0 Members and 1 Guest are viewing this topic.

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Transistor H bridge base resistor values
« on: July 05, 2018, 10:31:40 am »
Howdy folks,

I'm designing a transistor H bridge to drive two-lead bi-colour LEDs, and was wondering if I could get clarification as to base resistor values?

The initial value I've got is 330r, but that was worked out for a single 20hfe transistor, with 60mA load current and 20mA max IC current. Does that value change when there's two resistors arranged in the H bridge configuration? Or have I got the resistor value wrong in the first place?

Thanks!!!

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #1 on: July 05, 2018, 11:12:14 am »
What transistor and voltage are you using? That looks quite low numbers for small transistors...

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #2 on: July 05, 2018, 11:15:26 am »
What transistor and voltage are you using? That looks quite low numbers for small transistors...

JS
Hi JS,

I'm using MMBT4401/4403s from ON, on a 5V supply. It's only to drive 3 LEDs, but by changing the resistor values in assembly time I can add more power - have I got that right?

Cheers

Sent from my ONEPLUS A3003 using Tapatalk
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #3 on: July 05, 2018, 11:34:27 am »
I see a minimum hfe of 40 and more than twice at your desired range on the 4401 datasheet. And even higher for the 4403. I will take 50 to be safe but I could take 100.

You want 20mA Ic, so at the base you need 0.4mA. .4mA at 4V (allowing some for the base emmiter and some from the logic output to the 5V rail] that's like 10kΩ base resistor.

Use 1k if you want to be sure you are into saturation, but 330Ω seema quite low and not every micro or logic output can drive 12mA, 4mA is more likely and even a tad high for a general circuit.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #4 on: July 05, 2018, 11:43:12 am »
I see a minimum hfe of 40 and more than twice at your desired range on the 4401 datasheet. And even higher for the 4403. I will take 50 to be safe but I could take 100.

You want 20mA Ic, so at the base you need 0.4mA. .4mA at 4V (allowing some for the base emmiter and some from the logic output to the 5V rail] that's like 10kΩ base resistor.

Use 1k if you want to be sure you are into saturation, but 330Ω seema quite low and not every micro or logic output can drive 12mA, 4mA is more likely and even a tad high for a general circuit.

JS
I'm using PICAXE micros, and per datasheet they can drive 20mA per output, with a total of 60mA across all outputs.

The hfe definitely seems odd... The RS Components part I'm looking at has a minimum DV current gain of 20... That's part no. 545-0371 & 545-0387 on the RS website...

Cheers

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #5 on: July 05, 2018, 12:00:45 pm »
If you start conaidering that 20mA you will hit the 60mA barrier pretty quick...

Minimum HFE is most likely at maximum current, to drive the 20mA is likely much higher.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #6 on: July 05, 2018, 12:05:57 pm »
If you start conaidering that 20mA you will hit the 60mA barrier pretty quick...

Minimum HFE is most likely at maximum current, to drive the 20mA is likely much higher.

JS
True... Never really considered that 60mA barrier too much....

But I'm afraid you've lost me in terms of the hfe... I'm really a newbie to transistors; most I've ever done is use them as a very basic switch :-)

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #7 on: July 05, 2018, 12:24:49 pm »
HFE depends on the bias conditions, it isn't constant for all Ic or Vce. Also there is a DC hFE and a signal hfe, caps or not makes all the difference here.
Look at this datasheet, you have DC hFE numbers for different points and then the small signal h parameters including hfe
https://www.google.com.ar/url?sa=t&source=web&rct=j&url=https://www.diodes.com/assets/Datasheets/ds30058.pdf&ved=2ahUKEwiv_62k7YfcAhXJHZAKHVeeBpgQFjAAegQIABAB&usg=AOvVaw0TFFGDD7blhKbdV6A3r9wQ

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #8 on: July 05, 2018, 12:26:16 pm »
HFE depends on the bias conditions, it isn't constant for all Ic or Vce. Also there is a DC hFE and a signal hfe, caps or not makes all the difference here.
Look at this datasheet, you have DC hFE numbers for different points and then the small signal h parameters including hfe
https://www.google.com.ar/url?sa=t&source=web&rct=j&url=https://www.diodes.com/assets/Datasheets/ds30058.pdf&ved=2ahUKEwiv_62k7YfcAhXJHZAKHVeeBpgQFjAAegQIABAB&usg=AOvVaw0TFFGDD7blhKbdV6A3r9wQ

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #9 on: July 05, 2018, 01:06:11 pm »
Ah, gotcha - so you'd recommend something between 1k - 10k? Would be handy as I've got some 2k7s lying around which are the correct type :-)

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19649
  • Country: gb
  • 0999
Re: Transistor H bridge base resistor values
« Reply #10 on: July 05, 2018, 01:55:57 pm »
Do the LEDs have to run at full current, for the desired brightness? Quite often 5mA is more than enough, so no h-bridge required.

What's the maximum forward voltage of the LEDs? What's the supply voltage? If there's enough headroom, just use emitter followers, then no base resistor is required, as the base current will set itself to the correct value.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #11 on: July 05, 2018, 01:58:22 pm »
Do the LEDs have to run at full current, for the desired brightness? Quite often 5mA is more than enough, so no h-bridge required.

What's the maximum forward voltage of the LEDs? What's the supply voltage? If there's enough headroom, just use emitter followers, then no base resistor is required, as the base current will set itself to the correct value.
Hi Hero999,

I'm afraid I don't know the specs of the LEDs... I struggled to find red/white LEDs, so ended up buying off eBay. They had no documentation or part numbers, so I've been playing it safe and wiring them in parallel and assuming 20mA, no voltage drop (obviously not true, but safest).

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19649
  • Country: gb
  • 0999
Re: Transistor H bridge base resistor values
« Reply #12 on: July 05, 2018, 02:01:05 pm »
Do the LEDs have to run at full current, for the desired brightness? Quite often 5mA is more than enough, so no h-bridge required.

What's the maximum forward voltage of the LEDs? What's the supply voltage? If there's enough headroom, just use emitter followers, then no base resistor is required, as the base current will set itself to the correct value.
Hi Hero999,

I'm afraid I don't know the specs of the LEDs... I struggled to find red/white LEDs, so ended up buying off eBay. They had no documentation or part numbers, so I've been playing it safe and wiring them in parallel and assuming 20mA, no voltage drop (obviously not true, but safest).

Sent from my ONEPLUS A3003 using Tapatalk
Playing it safe would be using as lower forward current, as possible to give enough light and not wiring them in parallel, using a separate series resistor for each LED.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #13 on: July 05, 2018, 02:03:38 pm »
Do the LEDs have to run at full current, for the desired brightness? Quite often 5mA is more than enough, so no h-bridge required.

What's the maximum forward voltage of the LEDs? What's the supply voltage? If there's enough headroom, just use emitter followers, then no base resistor is required, as the base current will set itself to the correct value.
Hi Hero999,

I'm afraid I don't know the specs of the LEDs... I struggled to find red/white LEDs, so ended up buying off eBay. They had no documentation or part numbers, so I've been playing it safe and wiring them in parallel and assuming 20mA, no voltage drop (obviously not true, but safest).

Sent from my ONEPLUS A3003 using Tapatalk
Playing it safe would be using as lower forward current, as possible to give enough light and not wiring them in parallel, using a separate series resistor for each LED.
Unfortunately due to space constraints that's often impossible... The board being designed is to fit inside a model railway locomotive / coach / multiple unit, and some of my collection don't have enough space for each LED to have its own wire to the board, even when using really thin wire specifically bought for the low current LEDs. In these cases it's proven necessary for me to solder the LEDs directly together by the leads, well before the wires can even be run to the circuit board in the body :-(

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5970
  • Country: de
Re: Transistor H bridge base resistor values
« Reply #14 on: July 05, 2018, 03:31:20 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #15 on: July 05, 2018, 03:53:34 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 5970
  • Country: de
Re: Transistor H bridge base resistor values
« Reply #16 on: July 05, 2018, 05:50:36 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

That IS an H-bridge. Just sayin'  ;)
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #17 on: July 05, 2018, 07:51:39 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

That IS an H-bridge. Just sayin'  ;)
Yeah, but without transistors [emoji23][emoji23]

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19649
  • Country: gb
  • 0999
Re: Transistor H bridge base resistor values
« Reply #18 on: July 06, 2018, 12:18:48 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

Sent from my ONEPLUS A3003 using Tapatalk
20mA is probably more than enough, shared between three LEDs. Another issue is the current probably won't divide between the LEDs equally, which is another reason to use a lower current. I'd recommend aiming for 5mA per LED, which should be bright enough.

Don't forget that microcontrollers are normally specified by the total current going into the Vcc pin and out of the GND pin, so connecting a 20mA load between two I/O pins, will only result in 20mA of additional current through the power pins.

What are the other I/O ports connected to? Is it driving anything else.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #19 on: July 06, 2018, 12:37:50 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

Sent from my ONEPLUS A3003 using Tapatalk
20mA is probably more than enough, shared between three LEDs. Another issue is the current probably won't divide between the LEDs equally, which is another reason to use a lower current. I'd recommend aiming for 5mA per LED, which should be bright enough.

Don't forget that microcontrollers are normally specified by the total current going into the Vcc pin and out of the GND pin, so connecting a 20mA load between two I/O pins, will only result in 20mA of additional current through the power pins.

What are the other I/O ports connected to? Is it driving anything else.
The microcontroller will be powering 3 LEDs at one end of the model train, another 3 at the other end, plus interior lighting which could consist of up to 10 LEDs per coach, hence my plan to use transistors. I can always alter the specs of the transistors and resistors in assembly time to cater for different quantities of LEDs, but without transistors I limit myself.

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline Zero999

  • Super Contributor
  • ***
  • Posts: 19649
  • Country: gb
  • 0999
Re: Transistor H bridge base resistor values
« Reply #20 on: July 06, 2018, 03:05:58 pm »
Hero, I think you've missed that it's 2-pin, 2-color LEDs. Current must be able to be reversed to get both color, so an H-bridge is not a bad idea.
It's possible without an H-bridge - by connecting the LEDs across two outputs, the low side output pin would sink the current, it's capable of 20mA. But that would be me getting back into the realms of the current source capacity of the micro.

Sent from my ONEPLUS A3003 using Tapatalk
20mA is probably more than enough, shared between three LEDs. Another issue is the current probably won't divide between the LEDs equally, which is another reason to use a lower current. I'd recommend aiming for 5mA per LED, which should be bright enough.

Don't forget that microcontrollers are normally specified by the total current going into the Vcc pin and out of the GND pin, so connecting a 20mA load between two I/O pins, will only result in 20mA of additional current through the power pins.

What are the other I/O ports connected to? Is it driving anything else.
The microcontroller will be powering 3 LEDs at one end of the model train, another 3 at the other end, plus interior lighting which could consist of up to 10 LEDs per coach, hence my plan to use transistors. I can always alter the specs of the transistors and resistors in assembly time to cater for different quantities of LEDs, but without transistors I limit myself.

Sent from my ONEPLUS A3003 using Tapatalk
Are they all bi-colour LEDs?

The single LEDs could be powered using transistors and just power the bi-colour ones straight from the MCU.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #21 on: July 06, 2018, 03:15:16 pm »
The groups of 3 will all be bi-colour, with up to 5 lit at any one time.

Sent from my ONEPLUS A3003 using Tapatalk

 

Offline german77

  • Regular Contributor
  • *
  • Posts: 72
  • Country: mx
Re: Transistor H bridge base resistor values
« Reply #22 on: July 06, 2018, 10:51:23 pm »
Having a small half voltage supply, using a mosfet driver ic. You could drive your LEDs with one digital pin, in both directions and turn off the led if you set the pin as a input. With SMD components you could fit your 6 LEDs in a very small PCB. To control the current you just change a resistor that is in series with the LED.

The only issue I could see it's not having enough voltage to drive the LED with should be around 1.8V.  To avoid this you could have a 10v supply and use the 5v of the uC although depending on the driver you may can't turn both LEDs off.
 

Offline JS

  • Frequent Contributor
  • **
  • Posts: 947
  • Country: ar
Re: Transistor H bridge base resistor values
« Reply #23 on: July 07, 2018, 03:15:33 am »
Having a small half voltage supply, using a mosfet driver ic. You could drive your LEDs with one digital pin, in both directions and turn off the led if you set the pin as a input. With SMD components you could fit your 6 LEDs in a very small PCB. To control the current you just change a resistor that is in series with the LED.

The only issue I could see it's not having enough voltage to drive the LED with should be around 1.8V.  To avoid this you could have a 10v supply and use the 5v of the uC although depending on the driver you may can't turn both LEDs off.
I don't know the actual micro but leaving GPIO pins as input with unknown voltage somewhere half the way across the rails isn't that great of an idea. Internal logic might/will be active and switch up and down with noise consuming considerable power.

It is fine if pins are configured as analog inputs, as they do expect any voltage between the rails. Some micros (stm32 for sure) allow you to configure a pin as analog even if it can't go to an adc, stm cube code generator has an option to configure all unused pins to analog to minimize power consumption.

JS

If I don't know how it works, I prefer not to turn it on.
 

Offline danners430Topic starter

  • Regular Contributor
  • *
  • Posts: 137
  • Country: gb
  • Good at overcomplication
Re: Transistor H bridge base resistor values
« Reply #24 on: July 11, 2018, 09:47:21 am »
Hey guys, sorry for the absence - been in bed with the lurgy :-(

I'm going to look through the replies this evening, but just now I've found I need to use an H-Bridge for another use at work, namely to drive a motor in either direction - I'm guessing this would work the same way - by activating one side of the bridge the motor would turn one way, by activating the other side it would turn the other way?

For this use, would it be useful to use an inverter on the gate so that both sides are defaulted to ground (gate default logic +)?

Cheers

Daniel

Sent from my ONEPLUS A3003 using Tapatalk

 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf