Welcome to Laser Pointer Forums - discuss green laser pointers, blue laser pointers, and all types of lasers

LPF Donation via Stripe | LPF Donation - Other Methods

Links below open in new window

ArcticMyst Security by Avery

Switching laser on/off with transistor

Joined
Mar 9, 2013
Messages
4
Points
0
Hello,

after some time reading here, I have finally made a laser driver based on the LM317. I followed tutorial by rog8811: Laser driver - It can be done. It works very well, but I would like to replace the on/off switch by a transistor, so I can send a signal for turning on/off.

My question is: Which option is better, NPN or PNP? I was thinking on the TIP120-TIP127 family. But I'm not sure if a NPN switching the returning ground is a good solution or if a PNP switching the voltage IN is better.

So, what is you opinion?

Thanks a lot in advance.
 





Things

0
Joined
May 1, 2007
Messages
7,517
Points
0
Either will work, NPN's tend to be more common, and thus cheaper. It depends on your application. For example, if you were building this into a host where the host itself was ground, it'd be more convenient to use a PNP and switch the highside instead of trying to isolate the module from the host.
 
Joined
Mar 9, 2013
Messages
4
Points
0
Hello,

Thanks for your answer!

If I connect like in the picture, is there somenthing wrong?
I have tested with leds and it binks as expected, but I'm not sure if I'm making in the bad way.

Thanks again.
Regards.
 

Attachments

  • 09032013561.jpg
    09032013561.jpg
    38.9 KB · Views: 972

Things

0
Joined
May 1, 2007
Messages
7,517
Points
0
If that's a PNP transistor, yes, but if it's an NPN, no, it needs to go on the ground lead. So connect the LM317 ground to the collector, and ground to the emitter.

If you use a PNP, keep in mind that because it has no ground reference, in order to turn it on, you need to allow current to flow out of the base pin. This means that the base pin needs to be pulled (roughly) around 0.7V below the + rail voltage for it to turn on.

If you use a NPN, it's much easier to interface to things like microcontrollers.
 
Joined
Oct 26, 2007
Messages
5,438
Points
83
If you haven't already built the driver, you can omit the LM317 altogether and just use transistors directly like this. One thing nice about the circuit in the link is that you don't need that large voltage drop across the LM317.
 
Joined
Mar 9, 2013
Messages
4
Points
0
Hello,

thank you booth for you explanations.

I have already made driver based on the LM317, so cannot use the solution by Bionic-Badger. But it was interesting for a future.

Finally I'm working with the circuit in the picture. I think that now is as teached by Mr Things.

I can finally switch on and off the laser with the arduino.

Thanks again.
 

Attachments

  • 09032013563.jpg
    09032013563.jpg
    17.3 KB · Views: 449
Joined
Mar 9, 2013
Messages
4
Points
0
Hello,

I finished the driver.

I share here the final result. except the case, that is not finished.

The jumper allows to run in tow modes:
1. Arduino controlled (will work always in this mode).
2. always ON.

Regards.

By the way, this is my first circuit!!!
 

Attachments

  • 10032013573.jpg
    10032013573.jpg
    21.6 KB · Views: 2,005




Top