Still not understanding transistor (BJT) fundamentals :-(

Am trying to make a very simple two-wheeled “robot” that will get a pair of LDRs for the robot to try and “follow the bright light” - that part of the circuit (and algorithm) i am coping with quite okay - but i am not sure what stats i should be looking at in the datasheets for the BJTs.

For the testing i had been using a pair of BC337s and the setup worked as expected.

I then switched to 2N3904s (that were cheap and i bought them for stock and to use for this “project” which is to be given away as a sort of gift).

The issue is the motors didn’t run on the new BJTs and i’m trying to understand which differences between the BC337 and 2N3904 are causing this problem.

The circuit below is what was used;

Note:SORRY - the testing is being done on a 5V ProMini (not 3v3 as per schematic).

Originally i had used BC337s and 2K Ohm base resistors - the robot ran fine.
But then i switched Q1 & Q2 to 2N3904s and the motors just hummed.
My guess was not enough current, so i reduced the base resistor to “boost the current” - and used 490 Ohms instead - the motors then worked.

The question is; what stat should i be looking at to explain this difference ?

From what i understand; the VBE(sat) to switch the BJT on, is how you choose the current-lmiting resistor - 1.2V(max) for the BC337 ie. 1K9 Ohm and 0.95V(max) for the 2N3904 which means it should be dropping more than 4V (?) on a 5V logic circuit.

Would appreciate someone pointing out where i am going wrong or what i am misunderstanding.

Thanks.

Connecting four Ni-MH - 4.8 V - to RAW is probably not a good idea.

As you asked, it is all a matter of the gain in the transistors. But it occurs to me to wonder whether you wired the 2N3904s backwards!

Paul__B:
Connecting four Ni-MH - 4.8 V - to RAW is probably not a good idea.

yeah, sorry - that was the intention for the 3v3 ProMini but presently i am using a 5V ProMini and the ckt runs okay (via Vcc) - i am thinking of adding a Boost converter later to top it up to 5V.
EDIT

Paul__B:
As you asked, it is all a matter of the gain in the transistors. But it occurs to me to wonder whether you wired the 2N3904s backwards!

heh-heh, i won't be insulted by that question :stuck_out_tongue:
the BC337 is indeed "CBE" while the 2N3904 is "EBC" but i have connected it correctly, because the motors do turn, but with a lower base resistor - why is that (specs-wise) ?

Paul__B:

As you asked, it is all a matter of the gain in the transistors.

OK, i have sourced the specs on this;

DC Current Gain at V[sub]CE[/sub] = 1V, I[sub]C[/sub] = 100mA

The BC337 has an hFE1 of 100(min) while the 2N3904 has only 30 in the same scenario.

So, that explains the difference as far as the motor turning or not - but my concern is now the “hard on” switching, to avoid unnecessary over-heating.

Which spec should i be looking at to determine current that will not overheat the BJT ?

Look at the Vbe sat parameters. That is the voltage from the collector to emitter when the transistor is in saturation. Multiple that voltage by the current through that to get the power dissipated by the transistor.

Then look up the thermal resistance from junction to ambient to see how hot the junction of the transistor will get. Note this is not how hot the case will get. You can normally run the junction at 100 C without damage.

Or do it properly and go find some logic-level FETs.

Grumpy_Mike:
Look at the Vbe sat parameters. That is the voltage from the collector to emitter when the transistor is in saturation. Multiple that voltage by the current through that to get the power dissipated by the transistor.

not sure i fully get this.
from the stats for the 2N3904;
VCE(sat) @IC=50mA IB = 5.0mA is 0.3 V
VBE(sat) also @IC=50mA IB = 5.0mA is 0.95 V

should both junctions be calclulated for power dissipation ?

there was a very good post by ReverseEMF quite a while ago but at the time i don’t think i fully comprehended it in detail - the main gist of what i got was that, you want a high enough current (at the Base) to turn the BJT fully on (saturated) but not too high that it causes overheating.

Paul__B:
Or do it properly and go find some logic-level FETs.

yes, i realize that the “puny” 2N3904 isn’t meant to be used to drive motors, but i was given such a low budget that the wheel/gearbox/motor (pair of them) and the ProMini covers 90% of the expense already !

as it is, i won’t even put it on a PCB but just “spider-solder”(?) the components and then hot glue it to a cardboard box chassis ! (with some steel wire to make the frame holding the wheels in place !)

should both junctions be calclulated for power dissipation ?

Well you could but the base power dissipation is so small in comparison to the collector power no one ever bothers to do it.

VBE(sat) also @IC=50mA IB = 5.0mA is 0.95 V = 4.75 mW - hardly here nor there. The reason why you don't want too much base current is because of the miller effect where the base capacitance keeps the transistor turned on after the base voltage has been turned off. This means that there is both a delay in turning off and the turn off time, the collector's voltage rise, is slower than it could be. This in turn can limit the frequency that you can turn the transistor on and off.

Grumpy_Mike:
Well you could but the base power dissipation is so small in comparison to the collector power no one ever bothers to do it.

i see - because the(any) 'BETA' is likely to make it an order of magnitude smaller and hence insignificant.

Grumpy_Mike:
...
The reason why you don't want too much base current is because of the miller effect where the base capacitance keeps the transistor turned on after the base voltage has been turned off. This means that there is both a delay in turning off and the turn off time, the collector's voltage rise, is slower than it could be. This in turn can limit the frequency that you can turn the transistor on and off.

ohh, very good tip !
Thanks!
i think i might have noticed that while fiddling with the resistor values, there was one instance where i wondered why the motor kept running after the initial startup run-thru test - might have been some other sloppy breadboard connection but good to know such a thing as the Miller effect exists.

have also just noticed the maximum collector current is only 200mA - calling the 2N3904 'puny' was an understatement - will have to greatly hobble the motor speed to keep the current draw low.
(at least the BC337 was a more respectable 800 mA)

have also just noticed the maximum collector current is only 200mA - calling the 2N3904 'puny' was an understatement

No that is standard for a signal transistor, you can even get transistors with a 100mA maximum current. Most of the time this is all you need. What you want is called a power transistor. In fact these days anything over 500mA and you are better off using an FET.

Grumpy_Mike:
The reason why you don't want too much base current is because of the miller effect where the base capacitance keeps the transistor turned on after the base voltage has been turned off. This means that there is both a delay in turning off and the turn off time, the collector's voltage rise, is slower than it could be. This in turn can limit the frequency that you can turn the transistor on and off.

While "nearly true" the Miller effect has nothing to do with charge storage in transistor's base.

Charge storage slows down turning off (from saturation to active region) time. The harder saturation (=more base current) the longer it takes. Negligible role for Miller here.

When the transistor gets into the active region the Miller effect plays role. But magnitude of the previous base drive current is already unimportant.

@OP:
Those are important if you are interested in fast switching - such as logical circuits. In such applications you may want to avoid driving the transistor into saturation.
When driving a motor you WANT to drive the transistor into saturation because you don't care about a few microseconds long turn off time. You limit the base current because the driving strength is limited (i.e. when driving the base from Arduino's pin) and because of efficiency reasons. In your scenario where both the motor and Arduino are powered from 5V when saturation base current is 1/10 of collector current it means ~10% of power is already wasted in the base current. If you increase the base current you waste more. Of course it is important!

BabyGeezer:
i think i might have noticed that while fiddling with the resistor values, there was one instance where i wondered why the motor kept running after the initial startup run-thru test - might have been some other sloppy breadboard connection but good to know such a thing as the Miller effect exists.

The turn off time of the transistor is so short you cannot notice it.

EDIT: and get some MOSFETs. Unless you live in a desert transistors are very cheap - maybe cheaper than the solder and hot glue you will use to connect them.

BabyGeezer:
Am trying to make a very simple two-wheeled “robot” that will get a pair of LDRs for the robot to try and “follow the bright light” - that part of the circuit (and algorithm) i am coping with quite okay - but i am not sure what stats i should be looking at in the datasheets for the BJTs.

For the testing i had been using a pair of BC337s and the setup worked as expected.

I then switched to 2N3904s (that were cheap and i bought them for stock and to use for this “project” which is to be given away as a sort of gift).

The issue is the motors didn’t run on the new BJTs and i’m trying to understand which differences between the BC337 and 2N3904 are causing this problem.

BC337 “amplifier transistor” rated for 0.8A continuous, 2N3904 “small signal transistor” rated for 0.2A absolute maximum…

The turn off time of the transistor is so short you cannot notice it.

Bollocks.

Grumpy_Mike:
Bollocks.

Wow! You claim that the turn off time of a transistor is so long that the delay is observable by human senses when the transistor is driving a motor? Interesting!

Smajdalf:
...
@OP:
Those are important if you are interested in fast switching - such as logical circuits. In such applications you may want to avoid driving the transistor into saturation.
When driving a motor you WANT to drive the transistor into saturation because you don't care about a few microseconds long turn off time. You limit the base current because the driving strength is limited (i.e. when driving the base from Arduino's pin) and because of efficiency reasons.

okay - that's something new to consider - the speed of switching. (i guess PWM for motors doesn't come under 'fast switching')
i was previously only aware of "active region use" (ie. for amplifying, and i guess the fast switching also falls in this category ?) and "saturation region use" which is where one switches the BJT (hard)on OR off - because 'in between' will involve more power wastage due to heat.

Smajdalf:
In your scenario where both the motor and Arduino are powered from 5V when saturation base current is 1/10 of collector current it means ~10% of power is already wasted in the base current. If you increase the base current you waste more.

i see - i guess i really picked the wrong device (even just among BJTs ) for this application then.

Smajdalf:
EDIT: and get some MOSFETs. Unless you live in a desert transistors are very cheap - maybe cheaper than the solder and hot glue you will use to connect them.

yes, MOSFETs are (in the big picture) cheap - but i have to nitpick the price comparison with the solder and glue though, it's not like using a MOSFET would save the cost of those items (i'd still have to solder and glue the MOSFETs) - anyway, i have ordered some cheap MOSFETs from China (IRLZ44N) and they are still 10 times the prices of the 2N3904s !

i could probably create a mirror circuit with the MOSFETs and see what the improvement in "performance" would be. (although for this project, i really don't need the motors to run fast at all.)

Anyway, Thanks for your input.

Smajdalf:
Wow! You claim that the turn off time of a transistor is so long that the delay is observable by human senses when the transistor is driving a motor? Interesting!

Also bollocks I never said that at all and well you know it. You specialise in deliberately misunderstanding things, you are just a troll after a fight.

BabyGeezer:
yes, MOSFETs are (in the big picture) cheap - but i have to nitpick the price comparison with the solder and glue though, it’s not like using a MOSFET would save the cost of those items (i’d still have to solder and glue the MOSFETs) - anyway, i have ordered some cheap MOSFETs from China (IRLZ44N) and they are still 10 times the prices of the 2N3904s !

The IRLZ44N is power MOSFET in bulky THT package able to dissipate huge amount of heat. It is no surprise it is “expensive”. MOSFETs are “modern” devices and THT is an “ancient” technology - most MOSFETs are only available in SMD packages and some are really cheap. I think working with SOT23 packages is not so hard. If your device works well with the puny transistors you use it may be OK. But the motors must be really tiny to work with <200mA and <5V. And maybe the components (likely both the transistors and Arduino) are stressed close to their limits.

Anyway if you want to reduce the cost considerably exchange Arduino for a standalone chip for the final design and forget step up converter.

Grumpy_Mike:
Also bollocks I never said that at all and well you know it.

Yes, the only thing you said in the post #12 was “Bollocks.” I tried to translate it to a human language. Can you please explain what it should mean? Or you yourself don’t know it and simply started insulting as always when you run out of your (quite limited) electronics knowledge?

Smajdalf:
Yes, the only thing you said in the post #12 was "Bollocks." I tried to translate it to a human language. Can you please explain what it should mean?

Bollocks