Intro: I'm a software engineer professionally, but I dabble in many other areas - electronics (mostly digital), mechanical engineering, CNC machining, welding, physics, and science in general.
How did I end up here? Well, my interests certainly alignBut, it started with a statement from a friend, "I bet you can whip that up in a weekend"...and I agreed....ahhh, yes.... hubris
What were we referring to? A dumb idea to use an RGB laser projector in the dumbest possible way - to project Christmas lights onto a house's upper levels! I figured, you wouldn't need expensive lasers, expensive galvos, or expensive DACs. That much, may still be true, but I'm yet to find out
![]()
So, what I started with was the lowest power analog/TTL RGB laser I could find (3W combined power...), not necessarily the cheapest galvos, but nearly the cheapest, "30kpps" (ha!), and the soundcard DAC? Didn't even try. Under electronics I said "mostly digital"...so the correction amp didn't seem like something I wanted to take on yet. So, I bought an ether-dream. (or 2).
Things went predictably wrong, the laser maxed out its PWM dimming at 5KHz which was great for making ant trails. Had I known I would be replacing the driver, I'd have bought a much lower power laser. Though, its nice having the power there "just in case I need it"I'd never use this thing to make any sort of public display though. This will be for my learning, and jollies only. Of course, the idea that the PWM would be synchronized to the DAC is pretty laughable. That would have required some sort of clock synch somewhere. It might have been possible to use a soundcard DAC, and sacrifice a channel as a sync source...but that was way more than I was thinking at first!
I ended up making a voltage controlled current source using a TLV9151 opamp driving a STP40NF03L mosfet. I voltage divided the input 0-5V signal to 0-1V, which I based the sense resistor off of, and then added a second voltage divider with a potentiometer to pinch off the drive strength effectively limiting the power of the laser with a screw (instead of software). I figured the resistors in the divider using low current/power, are more reliable than software, and less power hungry than a pot on the sense side, though I do want to look into it at some point down the road. The opamp selection was a pain. I had originally found a circuit using a CA3140, but the chip shortage means we won't see more of those until late 2022. There are tons of rail to rail opamps with wide common mode input ranges...that polarity invert close to 0V. There are many solutions to this issue that keep power across the sense resistor low, but the cheapest and easiest is to find an opamp that can handle the conditions, and there are many. It's just hard to get mouser or digikey to let you search based on features, so I ended up just going to TI's site and using their selector. Even with that, I had to just hint at what I was looking for! I happened to come across two that allowed common mode input below the negative rail. The 9151 was the faster of the two 4.5MHz, 20V/uSec slew rate... Mouser had the 9152's in stock, so I used them. I powered the opamp with a 12V suppply so it would easily hit enough voltage for the mosfet gate. For the lasers power source, I used cheap 2596s based buck converters to bring the 12V supply down close to what is actually required for the laser, so the mosfet doesn't need to dissipate quite so much power. Each laser has its own 2596s. In simulation, using an LED as a stand-in, the mosfet was dissipating 20W from the 12V supply! That would be quite hot! Enough to operate a 3D printer hot endIt turns out the mosfet is a pretty poor voltage regulator.
With the buck regulator bringing things down, simulated power dissipation was about 1/2 a watt. Not bad!
The resultant dimming is fantastic. Far better than I expected. I made a hexagon shape that had lines from red to yellow, yellow to green, and so on through the various color combinations, and it drew almost exactly what the software showed, the full color range was visible. Even better is that the mosfet is dissipating very little energy for dimming, so I'm not losing a ton of efficiency there. (The mosfet wasn't even warm to the touch)
So, will I do the rest of the project? Well, maybe, but as a low priority side project. I know I need to setup a power target just to be sure the galvos haven't frozen up and are sending out a static beam...and disable laser output if the target is missed. I also need to see what power range "works the best". It's going to be a balance between power, distance, scan angle, and laser dispersion. I think if power can be limited to the static beam being in the old class IIIa range, the idea has a lot of merit. Even the IIIb range has merit, but the safety becomes an even bigger issue. Some can be mitigated by mounting the projector up high. As long as the scan angle is up, there are no issues. I can even block a lot of the lower range at the projector source, so there's no way to scan a kids eyes with the laser. I'd still prefer to have it be that the power was limited to a range where the likelihood of causing eye injury was quite low. There are likely other safety features I'm not aware of. I'd also like to get power monitoring laser diodes, and use power meters, rather than current, to control the laser. The color reproduction would probably be more accurate that way, and you'd have one more data point for telling whether you were throwing more power downrange than you expected.
The software, initially, can have the movement programmed by hand, basically in a low power scanning mode you just move the laser where you want to draw. Then adjust brightness since darker surfaces will reflect less. Then it would just generate the "points" for the "lights" and make a nice static display. Next would be basic animations. "Light Chases", even ones that could be synchronized to music. After that, things "regular" Christmas lights can't do. Draw bars of light along the programmed path along the edges of the house, with smooth color transitions, or have the points ant crawl along the path rather than chase with color changes, for example. Projection mapping becomes basically a requirement for the next level of complexity - shapes...on irregular surfaces, with different reflection profiles.
I am probably going to try for the basic software but I only have until just after years end, then it's back to reality, and my main projects. I don't anticipate getting very far. If I get as far as operating the projector, I'll do so only while watching it (training a neural net as a safety system)