Laser pointer discussion. Read/write reviews of laser pointers and laser pointer companies. Learn about all types of laser pointers and lasers

 Welcome to Laser Pointer Forums! If you are looking for a laser pointer or want to compare different laser pointer companies, you may want to check out the LPF Laser Pointer Company Database. The link will open in a new window for your convenience.

One laser store meets all your needs

 Laser Pointer Forums - Discuss Laser Pointers [PICS] Driver with Modes: WITHOUT A Controller!

LPF List of Laser Pointer Companies (link opens new window)

10-01-2013, 05:30 PM #1
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
[PICS] Driver with Modes: WITHOUT A Controller!

Hey everyone. I figure that I should have done this sooner rather than now, but I wasn't sure how much interest this would garner.

In my I "C" Red entry, I used a very unique driver design that allows me to have power modes (eight modes total) without the use of a PIC or microcontroller. While this may not seem spectacular, it is if you consider that these modes are controlled only by two momentary-on buttons!

I'd appreciate it if you'd vote for me, but I will use this driver regardless (may just end up having to use it for a standard red though - oh no!). Post here to vote!

So, without further ado, here is a detailed explanation of its operation!

Before I go into the operation, here is the layout.

Here is the schematic.

So, an explanation.

We begin by looking at the big block on the upper left hand corner. This is the main current regulator. The way this driver functions is that there is a constant current (50uA) feeding out from the Vfb pin (bottom pin of the regulator). So, having a various currents there will determine the voltage on that pin. For example, if I had a 10k resistor there, we could apply Ohm's Law to find the voltage at that pin.

Vfb = IR = (50uA) * (10k Ohms) = 0.5V.

I will call the resistance at that pin Rset from now on. So,

Vfb = (50uA) * (Rset Ohms).

So, adjusting the resistance here changes the current. We'll get into how I change that resistance later. But, for now, assume that I can change the resistance at that pin.

Why is that pin useful? The regulator takes that exact voltage and applies it to the output pin (the pin on the right of the regulator). Because I have a sense resistor on that output pin, the voltage there is directly proportional to the current. So, we can apply Ohm's Law again and solve for the current at the output.

I = V/R = Vfb / Rsense.

Substituting in the equation we used to find Vfb, we have

Iout = (50uA) * (Rset Ohms) / (Rsense Ohms).

What does this output current have to do with the laser diode current though? The laser diode is on the input, not the output! Well, because this is a LINEAR regulator, the input current is exactly equal to the output current! Because this regulator requires an input control voltage (the left pin) higher than the power input voltage (the top pin), we simply put the laser diode between the input rail and the power input voltage! After all, that is where most of the input current is drawn. So, now we have a power input voltage that is lower than the control voltage (V_pwr-in = Vin - V_fw), and the current being pulled through the power input pin is exactly equal to the current pushed out through the output current. So, finally, we have that

I_diode = (50uA) * (Rset Ohms) / (Rsense Ohms).

If you're observant, you'll notice some circuitry between the battery contacts and the diode. This circuitry is simply an off-momentaryOn switch. The MOSFET is used a switching mechanism so that not much current needs to pass through the switch.

Now comes the question of how do I change the resistance of Rset by pressing two buttons? Usually, you could use a potentiometer to adjust the resistance, but that wasn't the goal of this project. The phaser already had two built in buttons, so I wanted to use those!

That raises the question: how do I select a different number of resistors in the series array for different modes? So, I came up with the idea of using a binary counter.

At its most basic, an up/down binary counter is a simple IC that has a certain number of outputs, one for each bit, a few controlling inputs (input voltage, GND input, etc.), and then two other inputs, one for counting up and one for counting down.

The binary counter I chose was a 4-bit binary counter, because I needed at least three bits to have eight modes (2^3 = 8). Further, the counter I used requires that both the up and down pins have 3-5V on it at all times, and will raise the count by one each time one of those pins goes to 0V and then back up to 3-5V.

So then the question comes up of how I use standard buttons to make this happen. I initially thought I would just have two buttons, each one connected to the pin on one leg and the other connected to GND on the other end. But that didn't work. Using a standard button doesn't work! There is a thing called "bounce" which causes the button to switch on and off really quickly before it settles. This is a standard thing for most buttons. But, it always needs to be fixed. So, what I did was use a Schmitt trigger and a capacitor. When I pressed the button, it dropped the voltage at the pin to zero, and when I released it (or when it released on its own due to bounce), it would charge a capacitor and once the capacitor reached a certain voltage, the Schmitt trigger would activate and send 3-5V to the input pin again. This works to debounce the button because it takes TIME for the capacitor to charge. So, because bounce only occurs for a few miliseconds, if it takes longer for the capacitor to charge than it takes for the switch to stop bouncing, then the capacitor basically filters the bounce out! Sorry that was kind of wordy. Was hard to explain.

The next step is to take those binary outputs (bit 1, 2, and 3) and convert them to selecting outputs. This part was clever, I thought!

There is a type of integrated circuit called an analog switch. Imagine it as a standard, SPDT switch. Then, I have a ladder of these analog switches. Bit 3 controls the top of the ladder, bit 2 controls the next step, and bit 1 controls the final step. Here are some pictures depicting what exactly goes on.

State 0: This is the off state. Here, all the binary counts are low, which means, in decimal, the number it corresponds to is 0*2^2 + 0*2^1 + 0*2^0 = 0.

State 1: This is the lowest state, gotten by turning on the least significant bit, bit 3. You'll see a voltage up at the top, and this voltage is the voltage that Vfb sees. You can trace the resistance yourself!

State 2: Similar to before, except now bit 2 is on and bit 1 is off. You'll recognize the pattern as 000 -> 001 -> 010 -> and so on.

State 3: As before, except now bit 3 and bit 2 are on. You'll notice that the voltage Vfb will see is the sum of the voltage it saw from Bit 3 and Bit 2 being on separately.

State 4: Here is the first time that Bit 1 turned on. Again, it's the same process as before.

State 5: Now, Bit 1 and Bit 3 are on, yielding a voltage that is the sum of the two separate voltages.

State 6: The next state, almost to max power!

State 7: The final state! Here, all the bits are on, so the resistance at Vfb is equal to the entire resistance of the series array of resistors.

Now, you may wonder, can I cycle through, i.e. go from state 7 to state 0 by going up? Yes, I can! The counter will actually automatically do it for me

So, because the resistance changes at each mode, so will the output power! I selected the resistors to be approximately right at the threshold voltage from state 1 onwards, up to around 3.3A.

I hope you guys learned something from this write-up! I thought it was informative

If you have any questions, feel free to ask.

Last edited by Wolfman29; 10-01-2013 at 05:31 PM.

LPF List of Laser Pointer Companies (link opens new window)

10-01-2013, 08:50 PM #2
 Class 3B Laser Join Date: Feb 2008 Location: Lincoln, NE Posts: 2,989 Rep Power: 242
Meatball
Class 3B Laser

Join Date: Feb 2008
Location: Lincoln, NE
Posts: 2,989
Rep Power: 242
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Hmm.... this is very clever indeed.

So the idea is achieve more discreet steps in current adjustment?

Then scaling up to whatever current you need could be done in 7 steps. Neat!

You don't suppose you could use 2-3 flip flops to represent each of your states? Depending on how you want it, it could be done with 2 or with 3. But from that, you could remove the extra switch, and then just "clock" your counter into changing the state of the FFs enabling different switches in that analog IC.

This is neat.
__________________
FIAT LUX

(\__/)
(='.'=)
(")_(")

10-01-2013, 08:55 PM #3
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Yeah, that's the idea!

Initially, I planned on using three flip-flops, actually. In fact, I even have a board laid out for it. But then I started thinking that this sort of thing probably exists in a prepackaged form and would probably be significantly smaller, too. Especially since I needed synchronous switching (which would require some other gates). So, I figured I would just use a 4-bit synchronous timer from TI and then ignore the fourth bit =p

10-01-2013, 09:19 PM #4
 Class 3B Laser Join Date: Oct 2012 Location: S.E. Michigan U.S.A. Posts: 3,274 Rep Power: 46823
BowtieGuy
Class 3B Laser

Join Date: Oct 2012
Location: S.E. Michigan U.S.A.
Posts: 3,274
Rep Power: 46823
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Hey Wolfman, have you built one of these yet, or is it still in the concept stage?
Either way, it's an impressive job. Technically way over my head, but I can appreciate the work, time, and expertise involved.

BTW - You're right, you should have posted this earlier. I'll bet it could have swayed a few votes your way.

+1 Great job, hope to see it in action!
__________________
405nm Solarstorm S3 (1.09W) • W/L Sonar (264mW)
405nm Custom JETLASERS Ti-B (1.08W)

445nm Build "Ole Blue" (2.8W+)
445nm 1.3W JETLASERS PL-E (1.5W)

450nm Custom JETLASERS Ti-B (327mW)
465nm 1.4mW JETLASERS Mini (1.64mW)
467nm "Maraxus" (2.3W)
470nm "Silver Bullet"
515nm 30mW Ehgemus titanium (84mW)
520nm S/S build (250mW) •50mW JETLASERS Ti-B (73mW)
520nm Ehgemus Custom (1.45W) •Coleman Jr. (234mW)
532nm 1.5W Goldenstar lab (3W)
532nm 500mW JETLASERS PL-E (754mW)
532nm 100mW JETLASERS Ti-B (161mW)
532nm 5mW "Eclipse" mints tin (54mW)

589nm 80mW CNI PGL-III-C (154mW)
589nm 50mW Dragonlasers Spartan (124mW)

594nm L/G Rigel-6 "LPF Anniv. Ed." (6.7mW)
635nm 20mW JETLASERS Ti (30mW)
638nm "Coleman Special" (260mW)
638nm Build in sinner's "MS-SSW Stubby" (1.25W)
650nm W/L E2 (89mW) • Laserbtb PL-650 1000 (1W)
660nm S/S Build (383mW)
674nm 501B/Melles Griot u/k Build 20mW

LK-3D Projector

5W Ophir/dmm LPM, nospin 5W LPM

10-01-2013, 09:25 PM #5
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Yes, I have built one of these, and it works exactly as expected! There was a bump or two along the ride (wasn't aware about the bounce issue of the switches, so needed another one made that included the Schmitt trigger) and the initial current setting was a bit off, but the version I have right now hooked up to the phaser's buttons and battery contacts works exactly as intended!

10-02-2013, 12:32 AM #6
 Class 4 Laser Join Date: Sep 2007 Location: Wisconsin Posts: 9,142 Rep Power: 9321
Cyparagon
Class 4 Laser

Join Date: Sep 2007
Location: Wisconsin
Posts: 9,142
Rep Power: 9321
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Jeez, I'd rather use a microcontroller. Or a pot.
__________________
A problem well stated is a problem half solved.

10-02-2013, 01:26 AM #7
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Well, a pot can't be controlled by two buttons. And I have zero experience with microcontrollers and I wanted to do something original! Anyway, I don't need to do any programming with this. A few ICs, a few resistors, and two capacitors did the job! Anyway, if I had a microcontroller, I would need a DAC still.

10-02-2013, 02:10 AM #8
 Class 4 Laser Join Date: Sep 2007 Location: Wisconsin Posts: 9,142 Rep Power: 9321
Cyparagon
Class 4 Laser

Join Date: Sep 2007
Location: Wisconsin
Posts: 9,142
Rep Power: 9321
Re: [PICS] Driver with Modes: WITHOUT A Controller!

You are correct. Pots are not controlled with buttons, they are controlled with fingers

You wouldn't use a DAC with a microcontroller, you would use PWM.

It's an interesting solution, and I congratulate you on your efforts. But let's be honest; It is not practical or cost effective to have 10 ICs do the work that one could.
__________________
A problem well stated is a problem half solved.

10-02-2013, 02:27 AM #9
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Yes, I could use PWM. But that means its not analog, which everyone knows is better!

Of course it's not practical or cost effective. That's not the point! But I have no knowledge of microcontrollers nor do I have the means to program them (unless I get the USB programmable ones, but then I need a programming board, right?). But, it is a neat proof of concept. Most people don't think about using analog switches as rudimentary DACs, and I wanted something unique. An analog controlled, handheld driver!

10-02-2013, 07:17 AM #10
 Class 4 Laser Join Date: Sep 2007 Location: Wisconsin Posts: 9,142 Rep Power: 9321
Cyparagon
Class 4 Laser

Join Date: Sep 2007
Location: Wisconsin
Posts: 9,142
Rep Power: 9321
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Microcontrollers aren't as difficult to learn about as you might think. Programmers can be purchased for \$10, and the rudimentary micros can be \$2 or less. Regardless of the status of this project, I would advise you learn about them. Pick up an arduino and play around with it. You'll learn a lot.
__________________
A problem well stated is a problem half solved.

10-02-2013, 02:28 PM #11
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

I may have to do that. Maybe over winter break when I get some free time!

10-02-2013, 11:43 PM #12
 Class 3B Laser Join Date: Feb 2008 Location: Lincoln, NE Posts: 2,989 Rep Power: 242
Meatball
Class 3B Laser

Join Date: Feb 2008
Location: Lincoln, NE
Posts: 2,989
Rep Power: 242
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Hell. If you can use discreet FFs, counters, and DACs, you'll think micros are a godsend.
__________________
FIAT LUX

(\__/)
(='.'=)
(")_(")

10-03-2013, 02:16 AM #13
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Hah. Probably =p Well, contest is over. But doesn't mean this won't get put to good use. Just need to get the funds then to get one of them diodes.

10-06-2013, 03:54 PM #14
 Class 3R Laser Join Date: Jun 2011 Posts: 2,232 Rep Power: 11361
Atomicrox
Class 3R Laser

Join Date: Jun 2011
Posts: 2,232
Rep Power: 11361
Re: [PICS] Driver with Modes: WITHOUT A Controller!

Awesome project! I might have voted for you if you had posted this earlier :/

Would you mind sharing the specific components you used, specifically the linear regulator? I'd like to do something like this but using a pot instead.

@Cyparagon: the problem with PWM is that it doesn't make the low power modes eye-safe(r). If there's a way around that please let me know, I'd love to do an Arduino controlled laser!
__________________
405nm: NewWish (29.1mW avg|5mW rtd) | Dilda (81.5mW avg|200mW rtd) | 501B by Blord (633mW pk)
low 445nm: C6 from Survival Lasers (1351mW pk|1289mW avg|1100mW rtd)
high 450nm: NewWish (12.6mW pk|5mW rtd) | Dominator by Blord (3010mW pk|2779mW avg during 5min)
462nm: 501B by Atomic (1507mW avg)
473nm: BWB-10-OEM labby by CNI (10mW rtd)
~462-476nm "Tunablue" by Atomic (1.5W pk)
low 520nm: MXDL pen by DTR (31.6mW pk|28.8mW avg)
high 520nm: Laserlands (8mW avg)
532nm: NewWish (28.6mW pk|26.8mW avg|10mW rtd) | Dapper (30.3mW pk) | Classic (120.0mW pk|103.1mW avg|100mW rtd) | "The Green Box" by Atomic (176.7mW pk|140.0mW avg)
589nm: Spartan from Dragon Lasers (58.4mW pk|37mW avg|50mW rtd)
632.8nm: HeNe pointer by Atomic (0.68mW rtd)
635nm: NewWish (4.6mW avg|5mW rtd)
638nm: Classic from Lazerer (409.3mW pk|389.4mW avg|415mW rtd)
650nm: NewWish (10.6mW pk|5mW rtd) | Dilda (216.3mW avg|200mW rtd)
685nm: laser-in-a-box by Atomic (30.4mW pk|29.3mW avg) | 501B by Atomic (32.4mW avg)
780nm: module (2.7mW avg|5mW rtd)
808nm: Classic modded from a 532nm (162mW avg)
850nm: module (8.8mW avg|7mW rtd)
980nm: NewWish (81mW pk|5mW rtd) | 2nd line around 490nm

5W Ophir LPM

HV: Flyback, Plasma Speaker, The Arcsynth and SSTC

10-06-2013, 04:05 PM #15
 Class 3B Laser Join Date: Jan 2011 Location: Davis, CA Posts: 3,828 Rep Power: 227
Wolfman29
Class 3B Laser

Join Date: Jan 2011
Location: Davis, CA
Posts: 3,828
Rep Power: 227
Re: [PICS] Driver with Modes: WITHOUT A Controller!

That's the one part I will have to keep a trade secret =p Usually I wouldn't except it's very similar to a part I use for the BlitzLinear, and that I do want to keep secret.

10-06-2013, 07:26 PM #16
 Class 3R Laser Join Date: Jun 2011 Posts: 2,232 Rep Power: 11361
Atomicrox
Class 3R Laser

Join Date: Jun 2011
Posts: 2,232
Rep Power: 11361
Re: [PICS] Driver with Modes: WITHOUT A Controller!

You (or if you don't like the idea, someone else) should make a commercial variable power driver. It'd have an internal pot to set max current and an external one to vary the power. The host would probably have to be specific to support this, with a hole for the pot handle.
__________________
405nm: NewWish (29.1mW avg|5mW rtd) | Dilda (81.5mW avg|200mW rtd) | 501B by Blord (633mW pk)
low 445nm: C6 from Survival Lasers (1351mW pk|1289mW avg|1100mW rtd)
high 450nm: NewWish (12.6mW pk|5mW rtd) | Dominator by Blord (3010mW pk|2779mW avg during 5min)
462nm: 501B by Atomic (1507mW avg)
473nm: BWB-10-OEM labby by CNI (10mW rtd)
~462-476nm "Tunablue" by Atomic (1.5W pk)
low 520nm: MXDL pen by DTR (31.6mW pk|28.8mW avg)
high 520nm: Laserlands (8mW avg)
532nm: NewWish (28.6mW pk|26.8mW avg|10mW rtd) | Dapper (30.3mW pk) | Classic (120.0mW pk|103.1mW avg|100mW rtd) | "The Green Box" by Atomic (176.7mW pk|140.0mW avg)
589nm: Spartan from Dragon Lasers (58.4mW pk|37mW avg|50mW rtd)
632.8nm: HeNe pointer by Atomic (0.68mW rtd)
635nm: NewWish (4.6mW avg|5mW rtd)
638nm: Classic from Lazerer (409.3mW pk|389.4mW avg|415mW rtd)
650nm: NewWish (10.6mW pk|5mW rtd) | Dilda (216.3mW avg|200mW rtd)
685nm: laser-in-a-box by Atomic (30.4mW pk|29.3mW avg) | 501B by Atomic (32.4mW avg)
780nm: module (2.7mW avg|5mW rtd)
808nm: Classic modded from a 532nm (162mW avg)
850nm: module (8.8mW avg|7mW rtd)
980nm: NewWish (81mW pk|5mW rtd) | 2nd line around 490nm

5W Ophir LPM

HV: Flyback, Plasma Speaker, The Arcsynth and SSTC

Last edited by Atomicrox; 10-06-2013 at 07:26 PM.

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

All times are GMT. The time now is 03:43 PM.

 -- DarkShadows V5 -- Responsive LPF -2562016 -- Default Style Contact Us - Laser Pointer Forums - Archive - Top