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

PWM drivers for lasers. Why/why not?

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
Depends on what you consider high frequencies. When its in the order of 10kHz-100kHz, stray inductance is rarely a real problem, unless you run wires that are meters long.

An input buffer cap on the driver is obviously a good idea, but i reckon it has one already if you got it as an assembled unit. I prefer something like a good quality 100 nF ceramic, possibly augmented with an electrolytic if input voltage isnt all that reliable.
 





drlava

0
Joined
Mar 7, 2007
Messages
1,152
Points
0
I think if you keep it at 2-5 kHz it will be fine. At 10 kHz the pulses start to melt into each other and it won't turn off all the way between pulses.
 

Xer0

0
Joined
Dec 2, 2008
Messages
464
Points
0
Alright. Good to know, a 16khz micro + 0x08 prescaler=2khz PWM.

more concrete? i mean; how you clock a µC at 16kHz, i mostly read about Mhz. and whats a prescaler?


OT; but if you have time:
1. What pulse lenght should i choose, so that its short enough to not be dangerous for the eye and
2. what current setting so it performs stable / not changes power with temp
(445nm of course)
 
Last edited:
Joined
Jul 4, 2008
Messages
2,036
Points
48
You can set an AVR to run at 128khz and a prescaler is basically a divider, so 128khz with a prescaler of 8 is 16khz. And I might have this wrong-the equation for PWM frequency is clock frequency/(2*prescaler). If the clock frequency is 16khz (very low power consumption BTW) and the prescaler is 2, the PWM frequency will be 4khz.
 

Benm

0
Joined
Aug 16, 2007
Messages
7,896
Points
113
A couple of kHz will be fine for the driver. One downside is that you will see a dotted line when you point around with a laser pulsed like that. I've never tried on a flashlight, but i reckon it would be similar but less noticable due to the large beamspot.
 

drlava

0
Joined
Mar 7, 2007
Messages
1,152
Points
0
more concrete? i mean; how you clock a µC at 16kHz, i mostly read about Mhz. and whats a prescaler?


OT; but if you have time:
1. What pulse lenght should i choose, so that its short enough to not be dangerous for the eye and
2. what current setting so it performs stable / not changes power with temp
(445nm of course)

1) there is no pulse length that makes it eye safe. You would have to turn it down to 10mW AND then pulse it, officially. This is not practical.
2) not sure, probably depends on your heatsink.
 

Xer0

0
Joined
Dec 2, 2008
Messages
464
Points
0
How about that?

1555zqkn.png


http://www.micrel.com/_PDF/mic1555.pdf
 
Joined
Jul 4, 2008
Messages
2,036
Points
48
That would take up a ton of space... so would a 555 timer. With a micro, you don't need a single external component....
 

rev0

0
Joined
May 5, 2010
Messages
110
Points
0
I was gonna make a new thread, but I saw this.... Why don't we have any "smart" drivers? It would be really simple to make a driver with modes and memory (low/med/high/etc.) with PWM for lasers. With a µC, you can tailor the PWM frequency to whatever you want and get 8 bit resolution easily (255 brightness levels+off). I would personally like adjustable power output like what wicked is doing in a torch. Perhaps a standard flashlight-like operation where power cycling controls level selection. A fast strobe feature would be equally cool.

I'm working on an adjustable power µC-controlled driver at the moment. Currently waiting on my sample driver IC's from National Semi before I can do any prototyping/testing. The final driver board is actually routed and ready to go and I know what parts I need to order, but I'm holding off till I can test this thing in person and on the oscilloscope. I just don't trust simulations and blind faith that this will be suitable for a laser, especially after reading over this thread and concerns that a plain switcher can kill a LD with power spikes.
 
Joined
Jul 4, 2008
Messages
2,036
Points
48
I'm working on an adjustable power µC-controlled driver at the moment. Currently waiting on my sample driver IC's from National Semi before I can do any prototyping/testing. The final driver board is actually routed and ready to go and I know what parts I need to order, but I'm holding off till I can test this thing in person and on the oscilloscope. I just don't trust simulations and blind faith that this will be suitable for a laser, especially after reading over this thread and concerns that a plain switcher can kill a LD with power spikes.
I have some code for a PWM driver, but I got held up on an RC circuit that determines off time... I should get started again tomorrow, probably. It would be 10x easier in a pen host as I could get constant power to the circuit... Also, if you're using an AVR and you want any code help I'm your man :D
 

rev0

0
Joined
May 5, 2010
Messages
110
Points
0
I have some code for a PWM driver, but I got held up on an RC circuit that determines off time... I should get started again tomorrow, probably. It would be 10x easier in a pen host as I could get constant power to the circuit... Also, if you're using an AVR and you want any code help I'm your man :D

Not sure what you're talking about regarding the RC circuit, so you're using an external solution to create a variable duty cycle? I do use AVRs, I've got a fair bit of experience with them, and I'm going to be using an ATtiny24A or 44A in my driver I'm working on. I've always just used the AVR's "fast PWM" mode. Thanks for the offer, I might take you up on that some time.
 
Joined
Jul 4, 2008
Messages
2,036
Points
48
You know how the power to the micro gets cut whenever you power cycle the laser? I need a way to determine whether or not the laser has been off for x amount of seconds (to determine if I should do a mode change or a reset) even if the micro is off. My current method involves a capacitor, a bleedout resistor, an isolation resistor, and a charging diode. That's what I mean by RC circuit. Also, may I ask why you're using the 24 or 44 and not 25 or 45? 5 (or 6) I/O pins seems like plenty to me...
 

rev0

0
Joined
May 5, 2010
Messages
110
Points
0
You know how the power to the micro gets cut whenever you power cycle the laser? I need a way to determine whether or not the laser has been off for x amount of seconds (to determine if I should do a mode change or a reset) even if the micro is off. My current method involves a capacitor, a bleedout resistor, an isolation resistor, and a charging diode. That's what I mean by RC circuit. Also, may I ask why you're using the 24 or 44 and not 25 or 45? 5 (or 6) I/O pins seems like plenty to me...

Ah, yes I had thought of the same thing if you're trying for the power-cycle-to-change-mode thing. I'm adding a button as user interface to change "options". Yes, for this application, 6 I/O turned out to be enough, initially I was needing 7 I/O and managed to shave one off, plus to get all 6 I/O I'd need to disable the reset pin, and that's not a good idea since I don't have a high voltage serial programmer..
Anyhow, turns out both have the same package for their smallest SMD size -- MLF-20.
 
Joined
Jul 4, 2008
Messages
2,036
Points
48
Ah, yes I had thought of the same thing if you're trying for the power-cycle-to-change-mode thing. I'm adding a button as user interface to change "options". Yes, for this application, 6 I/O turned out to be enough, initially I was needing 7 I/O and managed to shave one off, plus to get all 6 I/O I'd need to disable the reset pin, and that's not a good idea since I don't have a high voltage serial programmer..
Anyhow, turns out both have the same package for their smallest SMD size -- MLF-20.
You're using MLF-20? I assumed you were using SOIC/TSSOP lol, MLF is small! Then I suppose it doesn't really matter. And it would be a million times easier to do what you're doing lol, I'm considering just waiting until I have a pen laser I can modulate as providing constant power is much easier. It shortens the code down to about 10 lines of AVR-C versus probably two or three times that much for power interrupt mode switching lol.
 




Top