Convert a Laser Pointer for Microcontroller Use

First of all, this disassembly method work for every laser pointer, and even those that it does work with, there’s still a possibility of damage.  I used a package of 3 lasers like this one from Amazon, which gives you three tries to successfully disassemble it.  The video should explain well enough how to take one apart:

If the end use is to control the laser light automatically, such as in my servo light-graffiti device, controlling the laser directly with a microcontroller is fairly straightforward.  It does, however, involve a few steps.  First, I soldered one side of the switch to another, as shown below, permanently closing the connection.  After this, it’s a matter of replacing the power that would normally come from the battery with a microcontroller output.

In the disassembled laser in the pictures below, the negative lead is hooked to the spring that generally touches the negative battery side.  The positive lead is hooked to the metal strip that touches the laser housing normally as in the video.  Unlike the video, the button is shorted out with solder, so it doesn’t really do anything and it’s free to be automatically controlled.

If your laser takes a small enough amount of power, like small red lasers, the output can directly control the laser as in the aforementioned light graffiti device.

However, if your microcontroller doesn’t have enough current output to power the laser directly, or if the voltage level is off, you’ll have to use a transistor or relay to bypass your controller current limit.  Some variation of the circuit below should work with a transistor, but note that you may have to modify the resistor values to get the desired brightness.  Note that you can sometimes run a laser at higher than the rated voltage, but it may burn out after a while.


For some reason that I still haven’t figured out, the laser comes on when the output is off and vice versa.  This can be corrected programatically, but if anyone has a good answer to why this is happening, please let me know in the comments!  I’m a mechanical engineer by training, so transistors are very much at the edge of my knowledge.

I’ve been using lasers with the pyMCU (see my “servo-powered light graffiti post) and Richard, pyMCU’s founder, was nice enough to provide me with this illustration, and help with the project!  He’s a site sponsor so I have to say nice things, but his “customer” service has been really excellent.

  1. A few things, what you’re taking out of the laser isn’t actually a laser diode but rather a laser diode with a current regulator. Laser diodes are very sensitive to changes in current and can easily blow up if they are simply current limited with a resistor like a typical LED. There are several circuits available for regulating a laser diode, but they’re all slightly more complicated than what you’ve done here.

    Your question about the “reversed” output makes perfect sense if you used a PNP transistor. Do you know the part number? If I’m reading your circuit correctly, you have the emitter tied to the positive rail and the base connected to the micro controller. When you pull the micro controller pin low, you will pull a small amount of current from emitter out the base pin. This will cause a large amount of current to flow from emitter to collector which lights up your diode.

    When the micro controller pin is high, there is no potential difference between the emitter and base, so no current flows.

    Hope that helps!

  2. Hi Ch00f. Thanks for reading, and thanks for the input! I am using a PNP transistor: Common BJT Transistors – PNP 2N3906. So what would I do to make this work when the pin reads “high?” I’ve got some NPN transistors available as well if that makes it easier.

    • If you want to invert it, just use an NPN and move it to the low side of the laser module.

      Connect the emitter of the NPN transistor to ground and the collector to the low side of the laser module. Then connect R2 between the base and ground. This resistor will hold the base down and keep the diode off when you’re not driving the micro controller pin.

      In general, NPN transistors are preferred over PNP because they are more efficient and cheaper. The reason behind this has to do with how much more easily electrons move through silicon than “holes”.

  3. Servo Light Graffiti Enhancements - pingback on April 24, 2013 at 9:17 am

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackbacks and Pingbacks: