HACKER Q&A
📣 andoando

Programmable Lasers?


I am looking for lasers that I can program myself. I can't find much information on lasers which can be programmed, and even less on how to write software for it. I see theres a few software solutions already but I want to programmatically control the lights.

Anyone can shed some light on this?


  👤 sharphall Accepted Answer ✓
Plugging my small project: https://github.com/sharph/nanometer

I wanted the same thing (to programmatically control a laser) so I took an existing library (oriented around drawing of frames) and hooked into it in a way that I could send an limitless stream of points to it.

Generally, the search term you want to search for is "ILDA". ILDA compatible lasers have a standard connector on the back to set the X/Y position of the laser as well as the intensity of the color components.


👤 al2o3cr
You can get inexpensive "programmable" lasers that are controlled by DMX, but that protocol isn't fast enough (250kb/s) to do anything besides pick preprogrammed patterns. If you're up for some hacking / reverse engineering, maybe you could replace the control electronics for one of these.

Another alternative is a laser projector that uses the ILDA standard - it supplies a bunch of analog channels over a DB-25 connector. With a projector and an ILDA DAC (typically connected via USB), you could write code to generate all the signals to drive the scanner + control the laser color. That'd mean generating 10 signals at audio-ish rates, so pick your language accordingly.

FWIW, there seem to be a handful of packages for the openFrameworks coding toolkit specifically for talking to ILDA ports, for instance:

https://github.com/memo/ofxIlda


👤 CoastalCoder
> Anyone can shed some light on this?

You're looking for a coherent answer, I assume.


👤 tensor
LaserCube[1] makes entry level lasers and has an open core [2]. There are also libraries that people have made that can interface directly with its wifi/ethernet protocol. However, programming lasers is not nearly as simple as doing 2d raster operations.

If all you want to do is make fancy custom laser shows then buy a laser and some control software.

[1] https://www.laseros.com

[2] https://github.com/Wickedlasers/libLaserdockCore


👤 viraptor
I'm assuming you're talking about very basic, low power, pointer style lasers. If that's the case, it's time to go into very basic electronics. You're basically replacing the switch in that with some lines connected to your i2c/gpio/whatever. It's not going to be different from turning on an LED. Laser you can program == cheap laser pointer, taken apart, switch replaced.

If you're talking about some bigger devices, then you probably want more interesting electronics and a lot of info about laser safety...


👤 solardev
Have you seen https://laserboy.org/?

There are also a lot of commercial offerings, like Quickshow and others: https://photonlexicon.com/forums/showthread.php/19036-WHAT-i...

Seems like that's a forum all about lasers and lights.


👤 CephalopodMD
I once took an led string with naked leads, cut off the leds, and soldered on red laser diodes in their place. Then I could control it with an Arduino. I used it to make a laser harp!

You can use laser diodes just like you would a regular LED in an Arduino/rPi setup. They're basically the same thing electrically. Be aware, using those standard laser diodes in public, especially for an event or show, is against the law because of the risk of blinding someone. If you want to do a laser light show or something, you need to use the sub 5 milliwatt kind they have at concerts and such, and you need a permit.


👤 GianFabien
Try searching for DMX-512, the industry standard protocol for controlling all manner of lighting devices. Since you are more interested in the software side, you could look at a product such as: https://djcity.com.au/product/laserworld-el-400rgb-laser which you can then control using a USB-to-DMX512 dongle.

Building your own unit is possible, but you'll need electronics and mechanical engineering skills. Even micro-mirror devices require lots of electronics.


👤 Joel_Mckay
In general, it depends on the type and power class level of your project.

For semiconductor lasers under 5W, the control systems are fairly trivial given the fiber-optic network card industry makes fully integrated current controlled high-speed drivers.

Every student should read this at least once:

"Sam's Laser FAQ" ( http://www.lasersam.org/sam/lasersam.htm )

As there is a lot of hard to find information regarding how these devices are made, and safe handling to prevent cooking your eyes/internal-flesh.

Note when handling IR, be aware many of these optics are poisonous to handle with your bare hands given they have slight solubility in moisture.

There are also pre-made true RGB/White laser modules with PWM control (under $150), but are limited to under 5mW due to US import rules. i.e. unless you are a legitimate company/lab/university importing parts, than you have customs issues building your project.

Have fun, and take the lab safety advice seriously... A pirate eye-patch only looks cool to other people, but makes the world two dimensional. =3


👤 chewmieser
Are you looking for more DIY on the hardware side or more of a commercial offering? Wicked Lasers has a pretty neat "laser cube" that has APIs available for it.

https://www.laseros.com/

https://github.com/Wickedlasers/libLaserdockCore


👤 smcameron
There's openlase https://github.com/marcan/openlase with which you can use the audio output through amplifiers to control galvos of a laser projector.

About 10 years ago a buddy of mine built a home-made RGB laser projector, using a red, green and blue lasers, and dichroic mirrors, and managed to drive it with MAME to run battlezone and some other vector games. The laser projector itself is quite dangerous, and we're probably lucky we didn't end up blind, so I wouldn't really advise doing this.

Battlezone: https://www.youtube.com/watch?v=S2JKr-Vkz8A

SEGA Star Trek: https://www.youtube.com/watch?v=VBALyh1hw5Y

Short clip of the home-made laser projector: https://www.youtube.com/watch?v=-aV0RRmO4gI

Simple rotating cubes demo: https://www.youtube.com/watch?v=OHbsrLW-iag

Running Word War vi via the laser projector: https://www.youtube.com/watch?v=cek1QaNc0Kk

If you look in the Word War vi source, here: https://github.com/smcameron/wordwarvi/blob/master/wordwarvi... and search for "openlase", you can see how it uses the open lase library.

Here's a fork of MAME hacked up to use the laser projector:https://github.com/jv4779/openlase-mame


👤 wslh
We mounted a laser in a plotter, I think you can find the pieces common.

You can see it here in action cutting artworks in the context of the Art Basel [1].

[1] https://youtu.be/46w2XLHd9vs?si=_MnFKGgOiWBnmXj0


👤 _0ffh
These here are meant for experimental physics applications, but they have a simple interface via USB-UART-bridge https://labs-electronics.com/your-products/

👤 asfarley
I did this with a serial-controlled relay once

https://youtu.be/W8FKTQcN4M4?si=7wUexeJavkFiqHzI


👤 personality0

👤 brudgers
[Random advice from the internet on starting your project]

+ If you just want to play around with software, TouchDesigner has a free tier and is very powerful.

+ Buy the cheapest "DJ laser projector" and play around programming it using DMX/MIDI.

+ Then you will have a better understanding of your actual interest in programming laser light shows versus your interest in the-idea-of-programming-laser-light-shows.

+ A habit of working on a new adult interest develops over months and years. Having low investment hardware on hand will let your project advance at a natural pace.

Good luck.


👤 4d4m
ILDA is the standard you'll want to use - check out Pangolin

👤 blitzar
sharks with laser beams attached to their heads or a giant laser beam on the moon? Is this for The Alan Parsons Project?