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

Buy Site Supporter Role (remove some ads) | LPF Donations

Links below open in new window

FrozenGate by Avery

Adjust your laser's output on the fly(digital pot)

Re: Adjust your laser's output on the fly(digital

lasersbee said:
Hey DanQ...
I just looked at your link using the "chip" out of a Photon Micro-Light....
That unknown  chip is an 8 pin PIC micro controller... you can tell by the pin usage...
yesh, I've figgered that out ;-)
amazing how primitive our own scope of knowledge is/was just a year ago, eh?

a lot of neurons under the bridge since then ::)
 





Re: Adjust your laser's output on the fly(digital

Hey guys i have a nwe way to do it, using PWM.

We'll have 2 normal potentiometers, one adjusted to max current value for each laser, and the other adjusted so that, if both are in paralell, the "sum" of resistance is the threshold lasing value. One mosfet to connect or disconnect the paralel potentiometer. And PWM to whitch fast between them.

As simple as that. That way, if it works, we could have "fader" drivers with 1024 output levels.

Prototype with big parts and for a DDL driver will be done today. (or tomorrow).
If it works, the next step will be using it in a rkcstr driver.
And if it still works, i'll design the PCB and make a "final" version which will be sent to someone with lavadrievs in stock to test it.
 
Re: Adjust your laser's output on the fly(digital

I don't understand what you're proposing - could you post a circuit diagram? or I suppose I could just wait to see if you get it to work...

DanQ
 
Re: Adjust your laser's output on the fly(digital

erdabyz said:
Hey guys i have a nwe way to do it, using PWM.

We'll have 2 normal potentiometers, one adjusted  to max current value for each laser, and the other adjusted so that, if both are in paralell, the "sum" of resistance is the threshold lasing value. One mosfet to connect or disconnect the paralel potentiometer. And PWM to whitch fast between them.

As simple as that.

Why do you want to switch between full power and treshold, not just between full power and zero?

Running the laser at treshold in the 'off' periodes does nothing useful - in fact, it dissipates power only resulting in higher diode temperatures at anything below full on.

I've built laser drivers with PWM control - they work fine. 1024 levels should not be any problem if you supply the pwm from a microcontroller. A simple PIC controller could drive it over the full range and still hold a few 100 Hz pwm speed (providing you can switch in 3 instructions or so, at 1/1024 worst case and 1 MHz instruction rate (4 MHz clock).
 
Re: Adjust your laser's output on the fly(digital

Benm said:
[quote author=erdabyz link=1231947558/0#17 date=1232189891]Hey guys i have a nwe way to do it, using PWM.

We'll have 2 normal potentiometers, one adjusted  to max current value for each laser, and the other adjusted so that, if both are in paralell, the "sum" of resistance is the threshold lasing value. One mosfet to connect or disconnect the paralel potentiometer. And PWM to whitch fast between them.

As simple as that.

Why do you want to switch between full power and treshold, not just between full power and zero?

Running the laser at treshold in the 'off' periodes does nothing useful - in fact, it dissipates power only resulting in higher diode temperatures at anything below full on.

I've built laser drivers with PWM control - they work fine. 1024 levels should not be any problem if you supply the pwm from a microcontroller. A simple PIC controller could drive it over the full range and still hold a few 100 Hz pwm speed (providing you can switch in 3 instructions or so, at 1/1024 worst case and 1 MHz instruction rate (4 MHz clock).
[/quote]

it's because that way the diode never stops lasing, so switching effects would be less noticeable in spirometers or things like that.


And, as there's going to be two potentiometers, you could adjust for example if you want 0 or max, threshold or max, 1024 levels between 90 and 120mA, two fixed positions...
It's a flexible design.
I was thinking about using a PIC12F615, small one with hardware 10 bit PWM module, and at 4mhz, it can have 10bit resolution at max 400Hz (i think) which is more than enought
 
Re: Adjust your laser's output on the fly(digital

I have been playing around with an arduino and a 5mW aixiz pointer and switching on and off poses no problems.  I just have a pot hooked up to an A/D converter and an output pin connected straight to the pointer (through a few diodes to drop the voltage a bit).  Not a real solution but it works fine for the cheap pointer since it only needs ~15mA.  I can adjust the brightness from nothing to full power while it is running without any problems.

Be aware that anything below 5kHz will produce dotted lines when moved quickly, however most microcontrollers wont have any trouble putting out PWM an order of magnitude faster than that as long as you do it in software. Even a PIC running only at 4MHz will do a million instructions a second and in all honesty, I cant tell the difference between 30 or so brightness levels.

And I suppose we better keep in mind that a microcontroller isn't strictly necessary.  A PWM generator would be a trivial circuit and should have no problems meeting the required frequency as well.
 
Re: Adjust your laser's output on the fly(digital

691175002 said:
And I suppose we better keep in mind that a microcontroller isn't strictly necessary.  A PWM generator would be a trivial circuit and should have no problems meeting the required frequency as well.
Right you are! the micro is only needed if you want some other bells and whistles. ;-)

DanQ
 
Re: Adjust your laser's output on the fly(digital

I suppose so - you can easily implement pwm using basic hardware like ramp generators and comparators, but the uC allows fancier controls.

Still, if you switch to treshold instead of zero, the laser will effectively be off at treshold, so it will not make any difference at all in the pattern produced.
 
Re: Adjust your laser's output on the fly(digital

danq said:
[quote author=691175002 link=1231947558/20#21 date=1232237854]And I suppose we better keep in mind that a microcontroller isn't strictly necessary.  A PWM generator would be a trivial circuit and should have no problems meeting the required frequency as well.
Right you are! the micro is only needed if you want some other bells and whistles. ;-)

DanQ[/quote]



OMFG!!! SOME PIC MICROCONTRLLERS have HARDWARE PWM MODULES (AKA pwm generators) and are CHEAPER than PWM generator IC's, and they don't need any extra part!!!!

Plus, if i want, i can also use software PWM.

I'll try to do the prototype today, but i haven't got a part in stock, so if i can't find any other i'll have to wait till tomorrow to buy it.
 
Re: Adjust your laser's output on the fly(digital

Hmm.. arent the builtin-hardware-pwm's usually limited to 8 bits resolution? That would be a problem getting 1024 steps.

Also, you do not need a 'pwm ic' at all... a dual opamp will suffice (tl072 costs what, a dime?), with one half operating as ramp generator and the other as comparator (if you want to control it using a pot or external analog voltage).
 
Re: Adjust your laser's output on the fly(digital

Benm said:
Hmm.. arent the builtin-hardware-pwm's usually limited to 8 bits resolution? That would be a problem getting 1024 steps.

Also, you do not need a 'pwm ic' at all... a dual opamp will suffice (tl072 costs what, a dime?), with one half operating as ramp generator and the other as comparator (if you want to control it using a pot or external analog voltage).


Nope, all PIC's i know that have PWM module, have 10 bits PWM module (although it's variable, because they can only get 10 bit resolutions at "low" frequencies, decreasing its resolution when you increase the frequency, but nah, they are perfect for this task.

Using 2 opamps would mean some external compnents such as an RC network for timing and things like that. Using a pic would mean just the pic, which also would mean a smaller device and less chances to fail. And you can also make effects and things like that, or vary the output with a push button all for the same price! And hell, a 16F615 is $1 !!!


I know you love analogic electronics, but for things like this, GO DIGITAL!!
 
Re: Adjust your laser's output on the fly(digital

Benm said:
Hmm.. arent the builtin-hardware-pwm's usually limited to 8 bits resolution? That would be a problem getting 1024 steps.

Also, you do not need a 'pwm ic' at all... a dual opamp will suffice (tl072 costs what, a dime?), with one half operating as ramp generator and the other as comparator (if you want to control it using a pot or external analog voltage).

Exactly!

A dual comparator, dual op-amp, or 555, and you get 0-100%, virtually infinite resolution, no assembly (language) required - I have one in my shed that dims 12V light bulbs, and that is what I used for the driver (LM393), because I didn't like the PWM limitations of the PICs. ;)
 
Re: Adjust your laser's output on the fly(digital

Most of the newer PIC's can provide ten bits of PWM at up to 20 kHz and up to 208kHz at the expense of resolution.

I think the real benefit of a microcontroller is it opens up a lot of options. For example, having the switch work as press-on press-off if held down for less than 0.2 seconds and momentary if held down for longer. You could also adjust brightness with buttons instead of having a pot sticking out of the host.

Finally, brightness does not vary linearly with the duty cycle of the PWM. Almost all of the 70%+ duty cycles look very similar to me while the lower 20% goes through a massive drop in brightness. A microcontroller would allow you to compensate for that a bit.
 
Re: Adjust your laser's output on the fly(digital

I'm not opposed to using microcontrollers in any way - in fact, i'm quite fond of them for performing certain tasks. I'm just saying PWM can be done with very simple discrete electronics, which is just as simple if you want a potmeter to control the brightness of a led or something like that.

Finally, brightness does not vary linearly with the duty cycle of the PWM. Almost all of the 70%+ duty cycles look very similar to me while the lower 20% goes through a massive drop in brightness. A microcontroller would allow you to compensate for that a bit.

Power should be linear with duty cycle, given power-up-time is neglible for the light source you are using (at kHz frequencies and leds or ld's, this assumption is fair).

Apparent brightness is a different thing though, but also varies on other circumstances such as ambient light.
 
Re: Adjust your laser's output on the fly(digital

Sorry for not answering in this time, but i had two problems:
1st, i'm a student== lots of homework

2nd, i had done a prototype, with a custom PCB, and i had already soldered the wires to the driver and when i was going to solder the two wires left, my solderng iron fell and... broken. New one must arrive today or tomorrow, so expect results in this week.

I also think that my digital pots order was rejected... that would be the perfect way, no PWM, linear variation...


About generating PWM with discrete electronics... we need something small enough to fit in small hosts without having to re-design heatsinks and that. The smallest will be a microcontroller. And it's cheap.This project was thought as an addon for already available laser drivers (Flexdrive, microdrive, DDL...) not as an independent laser driver.
 
Re: Adjust your laser's output on the fly(digital

I've got a driver nearly done with testing which uses a 10k pot, and never sends more than 0.5 mW through the pot. If my driver was integrated with your digital pot, that would be an awesome mod! And I have adjusted the pot while it was on!

The driver will work from around 40 mA to 210 mA.

Send me a PM and let's see if we can work out some trade :).
 


Back
Top