Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Intro and laser project

  1. #1
    Join Date
    Dec 2021
    Posts
    9

    Default Intro and laser project

    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 align But, 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 end It 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 )

  2. #2
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    There is absolutely nothing complicated about modifying a sound device and adding a correction amp.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  3. #3
    Join Date
    Dec 2021
    Posts
    9

    Default

    So, let me fill in that part of the story....First thing to know was the hubris extended to making this a holiday project to be done while I was away from my home lab. I had a week to get everything together. I had ordered the laser and galvo well prior, but didn't get to looking at them until a week before I'd leave for time off for christmas/new years. Before I left I needed to get the laser and galvos mounted and lined up. I also wanted to include mounts for power supplies, galvo drivers, and everything else I would need. The night before getting in the plane, instead of packing, I was laser cutting acrylic to mount everything to I needed to have the laser alignment tested before I left, because I was leaving my laser cutter and 3d printers behind! So that sets the stage for the time crunch.

    I did read through several of the wrong threads on correction amps. All were about specific implementations, not what they were, how they worked, and like I said, my analog skills are weak (better after this week, but still weak). I turned to my good friend google for information about what a correction amp was and found some obviously irrelevant material. Noting I had a week, I decided it was a better idea to buy a dac. Information seemed scarce except for people selling products.

    There was a part of the story I omitted....basically, I had pulled in incorrect pin for ground, so it appeared to me that for some strange reason that no one documented, my RGB signals were referenced from -5V and went to ground...don't ask, I'm an idiot. Before realizing this, I used another opamp to shift my signal up, and it worked perfectly....Up until I realized what I had done, and plugged the RGB signals directly into the dimmer instead of through the "level shifter". But, I did shift my signal by a dc offset, and do understand setting up gain on the opamp, so I could take a 1v peak to peak signal centered around 1V and make it a 10v peak to peak centered around 0V. After coming back and searching this weekend, I did find one thread that seemed to indicate sound cards output with a dc offset, and I assume they aren't in the correct voltage range. What I don't know is how much I may need to shift by, and how much I would need to amplify by (guessing that sound cards aren't outputting more than 10v peak to peak?) If you have a good thread discussing the details of this, I'd appreciate the link....maybe my searching skills are terrible...

  4. #4
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Why don't you just order my kit?

    http://laserboy.org/forum/index.php?topic=561.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  5. #5
    Join Date
    Dec 2021
    Posts
    9

    Default

    Well, first let’s start with the fact that I asked for technical information and you pointed me at a thread selling something that is ancient (your thread hasn’t been updated since 2014!) (I meant that humorously...it sounded good in my mind, but not the second time I read it...sorry about that!) I came across a similar thread that ended with people asking if that guy was still around and if they could buy the correction amp. A random thread from 2014 doesn’t sound promising on that front...that and like all the other #^+% threads discussing them you linked to a sale thread burying the info deeper yet!

    In reality, knowing you’re responding, I’d love to order one...but you mention a few different offerings, what’s the most up to date list? Maybe a new post in that thread would help

    The reality is, I mostly do want to understand what’s going on. I suspect just “reverse engineering” your kit would get me most of the information.

    I should add, I’m on the fence about this thing being a product...ever...on one hand I see companies that put up, take down, and store Christmas lights...their lights are boring and static (one neighbor has static white lights, the other alternates between white and red...they are nice and straight, plenty bright...but oh so boring!). Yet people pay them! I never asked, but I suspect it costs in the hundreds of dollars per year! So, no matter what, a laser projector will cost more than light strings. That’s just a given. But would the price point be able to sway some of these people buying light service? The other side is dealing with production, software glitches/technical support (you know no matter how easy/good you make it, someone will have trouble!), fine tuning for general cases, dealing with the fda...omg I can think of lots of terrible things I’d rather do than deal with the fda...and that’s all assuming the effect was good, despite being low power...so when I say reverse engineer, I probably mean for my own fun and knowledge, but there’s this minuscule possibility that it could be used in a product of my own...that said, I could just go clamp my scope to my sound card outputs...assuming I connect the right pins
    Last edited by corry; 12-27-2021 at 18:13. Reason: Word choice sounded mean the second time I read it!

  6. #6
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Wink

    A typical sound device works entirely in the positive voltage domain. There are a few internal and at least 1 usb 7.1 sound devices. That's an 8 channel DAC. You want the absolute voltage from each channel of the DAC before it goes through a DC blocking cap. There is a variable negative voltage regulator on the correction amp that gets set to roughly -1.5 times the DC offset. There are 6 op amp inverters. Each one sums a dac channel with the negative voltage (to null it out). Each one also provides a gain of 0 to 10x.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  7. #7
    Join Date
    Dec 2021
    Posts
    9

    Default

    Ah, that makes so much sense...after reading a ton on analog circuits over the past couple weeks, I’d begun to wonder how the usb soundcards were getting their negative voltage...if I’d thought about it hard enough I remembered discussions of the “output capacitor” and I would have figured it out...duh. (There is no spoo...err negative voltage supply)

    So it’s really that simple...only hard part, I’m guessing, is checking your individual usb sound card chip for the range of the dac outputs. Since they’re likely not rail to rail, and likely differ between models.

    Ultimately, this is the route I want to go, because I want to drive the whole thing from a raspberry pi 4b 8gb which I already have sitting around! I already compiled laserboy for the pi, so I know that works.

    I do have a lot of reading to do on, for example, the ilda format, to know if it and therefore “standard” laser projector software will do what I want. Basically, The thought...and maybe a dumb one, is to flash the laser as its moving between two positions. If the sweep is linear, I can get multiple “lights” out of 1 galvo move...saving movements on cheap galvos is important .

  8. #8
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    C-Media makes a USB chip CM-6206. It is found in a device called USB SND8. It can be found for less than $20. It works with a Raspberry Pi.
    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

  9. #9
    Join Date
    Jul 2008
    Posts
    768

    Default

    Quote Originally Posted by james View Post
    C-Media makes a USB chip CM-6206. It is found in a device called USB SND8. It can be found for less than $20. It works with a Raspberry Pi.
    Have you tried shopping for one lately? They're getting hard to find.

  10. #10
    Join Date
    Mar 2012
    Location
    Akron, Ohio USA
    Posts
    2,197

    Default

    Creator of LaserBoy!
    LaserBoy is free and runs in Windows, MacOS and Linux (including Raspberry Pi!).
    Download LaserBoy!
    YouTube Tutorials
    Ask me about my LaserBoy Correction Amp Kit for sale!
    All software has a learning curve usually proportional to its capabilities and unique features. Pointing with a mouse is in no way easier than tapping a key.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •