Pages: [1]   Go Down
Author Topic: Help calculate Rb for controlling laser using transistor  (Read 742 times)
0 Members and 1 Guest are viewing this topic.
Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hello,
I am trying to use a BC547B NPN transistor as a switch to control a 5mW red laser, but I can't get it to work.

I believe it is because I have the wrong resistor to control the current on the base.

Does anyone here know how I can calculate R1 in the sketch below?
Please ignore the laser component name (QED123), it is just a side effect of picking a random LED component to symbolize my laser.




I am unfortunately stuck. Have tried random values for R1, but no luck.

Anders
Logged

Offline Offline
Faraday Member
**
Karma: 65
Posts: 2529
Now, More Than Ever
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Is that a 5V-ready laser module?

What's the 5V for the circuit, the Arduino "5V"?

BC547, looking at its datasheet, pinout is "unusual" - looking at the face with the leads pointing down it's C-B-E (not E-B-C).  Could that be the problem?

I suppose RB = 220Ω to 1K ought to do it.
Logged

"Hello, I must be going..."
"You gotta fight -- for your right -- to party!"
Don't react - Read.
"Who is like unto the beast? who is able to make war with him?"

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


Hi,
yes, the laser module is 5V compatible (says 4.5V typical) and it lights up when connected directly over the 5V source.
It is one of these: http://www.seeedstudio.com/depot/5mw-laser-module-emitter-red-point-p-72.html?cPath=156_161

The 5V comes from a breadboard power supply.
http://www.seeedstudio.com/depot/5v33v-breadboard-power-supply-p-566.html?cPath=155

It is very strange, I too noticed the pinout and I am pretty sure I have it right.
I also guesstimated the same range as you, but I have had no luck. Tried the following values for R1
39 Ohm
175 Ohm
1K Ohm
10K Ohm

Maybe I managed to blow the transistor... need to switch to another one to double check.

Can't figure out why it's not working. Must be something silly.

Anders



Logged

Offline Offline
Edison Member
*
Karma: 116
Posts: 2205
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

First, figure out how much Ic you will need.

That figure divided by 10 gives you Ib. From there, you calculate Rb.
Logged

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok,
so the datasheet for the laser module says
Working current: Min 10mA, Typical 20mA, Max 25mA

This gives me:
  • Ic = 20mA = 0.020A
  • Ib = Ic/10 = 0.002A
  • Rb = Vs/Ib = 5/0.002 = 2500 Ohm

Tried with a 2.7k Ohm and nothing happened.

Then I put in a fresh transistor, figuring I might have blown the old one after all the experimentation and it WORKS!

Where did you the magic number 10?
The datasheet for the transistor says hFE DC current gain 200 (minimum).

Many thanks!

Anders
Logged

Sweden
Offline Offline
Jr. Member
**
Karma: 0
Posts: 84
Arduino System Go!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset



The working circuit:


Logged

Pages: [1]   Go Up
Jump to: