Hacked pulsed laser driver using Arduino

In summary: Regarding visible light laser spectra: blue is great for computer network channels because of the bandwidth, and green is great for firearm-aiming optical devices because we have for that range of frequencies more of the right variety of cones in our retinas, but I suppose almost everyone reading here on PF already knew all that. :wink:First thank you everyone for your input :smile: I am eager to learn new things.
  • #1
neanderthalphysics
53
6
TL;DR Summary
Want to be able to hack a laser pointer to pulse according to an input signal from an Arduino. Have transistors, stepper motor drivers, oscilloscope and other basic electronics to play with.
Hey all, I am trying to hack a 5mW laser pointer to be pulsed according to a driver signal from an Arduino. The laser pointer itself has an internal forward bias resistance of 22k and is driven by 2x AAA batteries.

An oscilloscope says that the output voltage from the Arduino is a +5V continuous square wave function as intended.

I tried at first driving a NPN transistor directly from the Arduino (emitter - base loop), with the collector-base loop containing the 2x AAA batteries in series to the laser but for some reason it is not powering the laser.

Any ideas why? Happy to test and provide pictures/diagrams if necessary.

What about driving the laser pointer using a stepper motor driver (like an A4988 chip) instead? I will need to have voltage and current dividers to protect the laser.

Also, one final question about safety. If the laser pointer is overdriven by voltage or current, do I risk the laser becoming a hazard to the eyes?
 
Engineering news on Phys.org
  • #2
Try driving the laser with the transistor circuit on its own without the Arduino first and get that working. Lasers are dangerous to eyes period. No? Overdriving an diode is likely just to burn the thing out. Unless you are already staring at the laser I don’t see how this could be a danger to eyes.
 
  • Like
Likes sysprog and neanderthalphysics
  • #3
Why do you want to do this? If I wanted to do this I'd use a 555 timer IC. Depending on your especial purposes, something else might be a preferable option -- and please understand that, even though some people use laser pointers as feline amusement devices (cat toys), lasers are seriously not toys.
 
  • Like
Likes neanderthalphysics
  • #4
Hey sysprog, thanks for the advice. Because I don't have this IC in the lab at the moment and I would have to order it and it would take a few days to arrive. Thought I could get quick results with just a transistor.
Understood about lasers not being toys, I use safety googles.
 
  • #5
I'm shocked to learn that you don't have any 555s lying around! What are you? NOT Radio Shack? What's up with THAT? You probably don't have a DTMF decoder either!
:rolleyes:
 
  • Haha
Likes berkeman
  • #6
NPN transistor "eats" some of the voltage (something like 0.6 V give or take), I would try MOSFET.

It doesn't have to be THE reason, but trying won't hurt.
 
  • Like
Likes sysprog
  • #7
neanderthalphysics said:
Understood about lasers not being toys, I use safety googles

I don't think you've said what wavelength/color your laser pointer is. What laser safety rating do your goggles have (not googles)?
 
  • Like
Likes sysprog
  • #8
berkeman said:
I don't think you've said what wavelength/color your laser pointer is. What laser safety rating do your goggles have (not googles)?
Thanks for those good words of warning.

Even a welder's helmet may not be secure enough against strong coherent light, but the power rating specified (5mW ) is such that stopping looking when you feel discomfort during a 'less than half a second' glance will probably not hurt (or seriously and permanently eff up) the retina -- "and don't let lasers get pointed into eyes!".

Regarding visible light laser spectra: blue is great for computer network channels because of the bandwidth, and green is great for firearm-aiming optical devices because we have for that range of frequencies more of the right variety of cones in our retinas, but I suppose almost everyone reading here on PF already knew all that. :wink:
 
  • #9
Firstly thank you everyone for your input :smile: I am eager to learn new things.

One question I had for you all was whether transistors are the solid state analogues of flashtubes? In flashtubes you need a trigger pulse across a smaller spark gap (analogous to the base-emitter junction) to turn the thing to a conducting state.

sysprog said:
I'm shocked to learn that you don't have any 555s lying around! What are you? NOT Radio Shack? What's up with THAT? You probably don't have a DTMF decoder either!
:rolleyes:
Hey, you forget this is Stone Age physics. In my cave I have my club, bearskin, fire pit and a few other goodies. 555s appeared only a few thousand years later :wink:
Borek said:
NPN transistor "eats" some of the voltage (something like 0.6 V give or take), I would try MOSFET.
It doesn't have to be THE reason, but trying won't hurt.

Thanks, that explains some of the voltage drop. Why do transistors have a voltage drop but not MOSFETs?

berkeman said:
I don't think you've said what wavelength/color your laser pointer is. What laser safety rating do your goggles have (not googles)?

Green laser pointer. I am using orange goggles with a 5 log reduction in the wavelength range.
sysprog said:
Thanks for those good words of warning.

Even a welder's helmet may not be secure enough against strong coherent light, but the power rating specified (5mW ) is such that stopping looking when you feel discomfort during a 'less than half a second' glance will probably not hurt (or seriously and permanently eff up) the retina -- "and don't let lasers get pointed into eyes!".

Regarding visible light laser spectra: blue is great for computer network channels because of the bandwidth, and green is great for firearm-aiming optical devices because we have for that range of frequencies more of the right variety of cones in our retinas, but I suppose almost everyone reading here on PF already knew all that. :wink:

Yeah but we have to still be careful about the stated powers of laser pointers. I read some warnings that some laser pointers true powers exceeded the declared ones, at great hazard to the user's eyes.

By the same token from a safety perspective green lasers are best at causing lasting retinal damage...
I could switch to red but I also don't happen to have one lying around ATM.

I don't understand why the bandwidth is greater for blue (because of the higher frequencies?) If data is transmitted by on/off states then the bandwidth for IR should be the same as UV.
 
  • Like
Likes berkeman
  • #10
neanderthalphysics said:
I tried at first driving a NPN transistor directly from the Arduino (emitter - base loop), with the collector-base loop containing the 2x AAA batteries in series to the laser but for some reason it is not powering the laser.

Aiie, there be a problem! The LASER and battery should connect to Collector and Emitter. Negative to Emitter and Positive to Collector.

And maybe another one -- are those AAA batteries perhaps Lithium batteries. A quick web search shows at least some Green LASERs have a threshold volatge around 6V, not the apparent 3V you may be using... but you don't say.

The Emitter should also be connected to the Arduino Ground (Common), and the Arduino output to the Base.

There should also be a series resistor between the Base and the Arduino output to limit Base current. You didn't give a part number so YOU look up the transistor data sheet for the maximum base current and select the resistor accordingly.

Oh, by the way, 5mW of laser power Will cause eye damage, even by reflection from a surface. If I recall correctly, here in the US, anything above 2mW must generally be enclosed with interlocks to shut it off if the enclosure is opened. Eye discomfort is assuredly NOT a means of detecting damage, the eye retina does not have any pain receptors. The first indication of damage is you have a blind spot; for life.

Cheers,
Tom
 
Last edited:
  • Like
Likes sysprog
  • #11
neanderthalphysics said:
Summary: Want to be able to hack a laser pointer to pulse according to an input signal from an Arduino. Have transistors, stepper motor drivers, oscilloscope and other basic electronics to play with.

Hey all, I am trying to hack a 5mW laser pointer to be pulsed according to a driver signal from an Arduino. The laser pointer itself has an internal forward bias resistance of 22k and is driven by 2x AAA batteries.
Edit: your circuit is incorrect. Laser and batteries must be connected in emitter-collector loop, not collector-base.
Also, 2xAAA may have a problem driving blue lasers with NPN driver. Either add third AAA cell or use MOSFET drivers.
 
Last edited:
  • #12
Hi everyone.
Attached are my circuit diagrams and oscilloscope traces. The legend on the graph corresponds to the locations marked in the circuit diagram.
The voltage of the two AAA batteries is 2.74V. By themselves they run the laser pointer fine.
The driving signal is a +5V/0V, 2 second period, square wave.
Will read the latest responses now.
Any other readings/info you need I will be happy to provide.
 

Attachments

  • voltage_time_history.png
    voltage_time_history.png
    6.8 KB · Views: 229
  • circuit_diagram.png
    circuit_diagram.png
    13.6 KB · Views: 232
  • #13
neanderthalphysics said:
Why do transistors have a voltage drop but not MOSFETs?

I am afraid I am not qualified to answer that in more details than "these are different devices with different principle of operation, no wonder they behave differently". Precise answer needs to dissect how the np junction works.
 
  • Like
Likes neanderthalphysics
  • #14
Thanks guys. How does this circuit look?
I note that the maximum base current of a TIP117 transistor is 50mA, which is more than the maximum current per GPIO of 40mA.
 

Attachments

  • circuit_diagram_v2.png
    circuit_diagram_v2.png
    14 KB · Views: 213
  • #15
Borek said:
I am afraid I am not qualified to answer that in more details than "these are different devices with different principle of operation, no wonder they behave differently". Precise answer needs to dissect how the np junction works.

Thanks, I like it that you know the limits of your knowledge and are not afraid to say it :smile:

But let's hazard a guess for the sake of discussion. Could it be because MOSFETs are voltage operated devices, which means near zero current flow through the gate (hence 0-current x Resistance = 0 voltage drop) while transistors have a small base current which means a small voltage drop?
 
  • #16
Tom.G said:
Oh, by the way, 5mW of laser power Will cause eye damage, even by reflection from a surface. If I recall correctly, here in the US, anything above 2mW must generally be enclosed with interlocks to shut it off if the enclosure is opened. Eye discomfort is assuredly NOT a means of detecting damage, the eye retina does not have any pain receptors. The first indication of damage is you have a blind spot; for life.
Pain is not the only kind of discomfort we can experience. Even reflected laser light from a cat-toy pointer off non-shiny surfaces is irritating to me and causes me to turn my gaze. Laser pointer beams inadvertently cast briefly across audiences can cause discomfort without causing pain or ocular damage.

From: https://www.ehs.uci.edu/programs/radiation/Laser%20Pointer%20Safety%20Factsheet.pdf
Possible optical hazards include startle effects, flash-blindness, glare, and after-images if a person is struck in the eye. Reports of those exposed include automobile drivers, airplane and helicopter pilots, sports figures, and the police. This is very dangerous since such exposures can cause serious accidents. Longer eye exposures can cause more permanent eye damage including retinal burns.
But when I just now asked myself, what would Safety Joe do, the answer was always be heedful of the advice of such advisors as @Tom.G
 
  • Informative
Likes Tom.G
  • #17
Here are the oscilloscope readings for the circuit with the laser + battery put across the emitter-collector terminals. The laser remains unactivated.
 

Attachments

  • voltage_time_history.png
    voltage_time_history.png
    7.3 KB · Views: 192
  • #18
Here are the oscilloscope readings with 3xAAA batteries in series instead of 2. The laser is still inactive.
I tested the laser again with 2x AA batteries directly connected to it. It works.
 

Attachments

  • voltage_time_history.png
    voltage_time_history.png
    7.2 KB · Views: 193
  • #19
Hey, it's early and all but isn't the battery in the schematic in #14 upside down? If not it could explain why my stuff never works.

[note added in proof] upside down relative to the transistor. Seems like the laser diode should be flipped around as well.
 
  • #20
I thought it is +ve terminal of the battery to +ve terminal of the diode and vice versa?
 
  • #21
neanderthalphysics said:
I thought it is +ve terminal of the battery to +ve terminal of the diode and vice versa?
The current by convention flows from the + terminal to the - terminal of the battery. What has me confused is that the current flow for a saturated NPN is down through the collector and out through the emitter. In your diagram the current is flowing up through the emitter and out the collector.
 
  • Like
Likes davenn
  • #22
Paul Colby said:
Hey, it's early and all but isn't the battery in the schematic in #14 upside down? If not it could explain why my stuff never works.

[note added in proof] upside down relative to the transistor. Seems like the laser diode should be flipped around as well.
Yes! Most definitely.
 
  • Like
Likes Paul Colby
  • #23
Thank you for your advice.
I implemented the changes you suggested but it is still not working.
 

Attachments

  • circuit_diagram_v2.png
    circuit_diagram_v2.png
    15.1 KB · Views: 192
  • voltage_time_history.png
    voltage_time_history.png
    7.2 KB · Views: 188
  • #24
neanderthalphysics said:
Thank you for your advice.
I implemented the changes you suggested but it is still not working.
you DIDNT change it ... the battery terminals are still incorrect relative to the transistor
 
  • #25
I also suggest replacing the laser with a 1k dummy load resistor. The laser is a diode which permits current flow only in one direction so getting it in wrong is a show stopper. Check the voltages across the the resister and make certain the transistor is switching as expected before substituting the laser.
 
  • #26
OK thanks for your input.
I replaced the laser diode with a resistor, and the battery with a lab PSU set at 3V.
I am still getting a flatline of voltage across the resistor. The PSU reports no current flowing through it.
Think all my experimentation has killed the transistor?
 

Attachments

  • voltage_time_history.png
    voltage_time_history.png
    6.8 KB · Views: 149
  • circuit_diagram_v4.png
    circuit_diagram_v4.png
    11.5 KB · Views: 153
  • #27
neanderthalphysics said:
the battery
What battery ? Don't see none...
 
  • #28
Okay, one needs a battery. ##V_{BE}## should be about +0.7V for a silicon NPN for it to be saturated. ##V_{CE}## in this state would be zero should the battery be absent. Your scope trace shows a negative ##V_{BE}##. Signs of voltages and currents really matter here. An NPN is like a current control where a small current, ##I_B##, injected -into- the base results in an ##I_{E}## ##\approx \beta I_{B}## where ##\beta\approx 100##. I think the transistor (any NPN transistor) spec sheet would have all these things plotted and would be helpful for you.
 
  • #29
OK guys, got it working :smile:
Thanks for everyone's help.
The problem was the transistor - it was faulty.
Replacing it with another transistor got the circuit to work.
The circuit without the battery with a PSU instead is attached below.
 

Attachments

  • circuit_diagram_v5.png
    circuit_diagram_v5.png
    10.7 KB · Views: 162
  • voltage_time_history.png
    voltage_time_history.png
    7.8 KB · Views: 153
Last edited:
  • Like
Likes Paul Colby
  • #30
Looks as if it only works because the transistor is abused to short-circuit the "voltage" source (the psu)
 
  • Like
Likes rbelli1
  • #31
OK, how would you improve it?
 
  • #32
How to use a transistor to drive an LED

Your circuit only works because the series impedance of the battery is high. If you put that on a strong enough battery you would instantly explode the transistor.

BoB
 
  • #33
Thanks for the article. It is very readable and explains basic concepts which I have forgotten from my mammoth hunting classes.
 
Last edited:

1. What is a hacked pulsed laser driver?

A hacked pulsed laser driver is a device that controls the power and timing of a pulsed laser. It is typically created by modifying an existing laser driver or using an Arduino microcontroller to control the laser.

2. How does an Arduino control a pulsed laser driver?

An Arduino can control a pulsed laser driver by sending precise electrical signals to the driver, which then controls the laser's power and timing. The Arduino can be programmed to adjust the laser's parameters, such as pulse duration and repetition rate.

3. Can I build my own hacked pulsed laser driver using an Arduino?

Yes, it is possible to build your own hacked pulsed laser driver using an Arduino. However, it requires a good understanding of electronics and programming. It is recommended to follow a tutorial or seek help from experienced individuals.

4. What are the advantages of using a hacked pulsed laser driver?

Using a hacked pulsed laser driver allows for more precise control over the laser's parameters, which can be useful in scientific experiments and applications. It also allows for customization and flexibility in controlling the laser, as well as potentially being more cost-effective than purchasing a commercial pulsed laser driver.

5. Are there any safety concerns when using a hacked pulsed laser driver?

Yes, there are safety concerns when using a hacked pulsed laser driver. It is important to follow proper safety protocols when working with lasers, including wearing appropriate protective gear and ensuring the laser is not pointed at any living beings. It is also important to properly shield the laser to prevent accidental exposure to the laser beam.

Similar threads

  • Electrical Engineering
Replies
7
Views
3K
  • Electrical Engineering
Replies
1
Views
1K
  • Electrical Engineering
Replies
4
Views
6K
Replies
6
Views
4K
  • Electrical Engineering
Replies
1
Views
3K
  • Electrical Engineering
Replies
2
Views
4K
  • Electrical Engineering
Replies
13
Views
6K
Replies
8
Views
3K
  • Electrical Engineering
2
Replies
38
Views
5K
Back
Top