Raspberry Pi Controlled Fiber Optic Laser

Building a breadboard adapter + configuring PI’s GPIO + color programs in Python

Lasers are cool. Lasers you can program to do what you want are even cooler. We had connected with a company that makes a fiber optic laser that beams high intensity colored light through what looks like fishing line.

The fishing line can be very long and it can be wrapped around objects. We started off with a generic remote control system that had colors and some lighting sequences programmed into it.

Fiber Optic Laser

The goal was to figure out how to make a Raspberry Pi control the laser to do the same stuff. This way we could wrap that fishing line around a game console at one of our events and program the game itself to trigger the lighting.

Getting hit triggers a red flash for example.

Hardware

I had never used a Raspberry Pi before, but had spent my childhood building and fixing PCs. It didn’t seem that far away from things I already knew.

Before even touching the laser I approached the problem by looking up Raspberry Pi projects where you use a breadboard to control a very simple LED using the Pi.

GPIO Pinout Diagram

Once I was able to turn a light on and off as well as dim and brighten it, I tried to figure out how to make an adapter to connect the laser to the Pi instead of the LED.

Controlling an LED with the Raspberry Pi

Once I was able to get the Pi to control the laser on one channel I added 2 more channels for the remaining primary colors and blended them together to make all the colors of the rainbow.

This approach worked out well for me, as I was able to get this whole thing working in about 4 days.

Connecting to GPIO

Using a Breadboard to Connect the Laser to the Pi

In order to send these signals from the raspberry pi back to the laser I stripped wires on a 6 pin SVGA adapter. The manual for the laser showed separate wires for each color primary color channel as well as a ground, power, and one other wire that didn’t seem to be used anywhere.

Resistors

I connected each primary color to the breadboard as well as the power from the Laser and the ground from the Pi. I then completed the circuit using a 330 Ohm resister to keep the Raspberry Pi from blowing up.

Beyond keeping the Pi from exploding the strength of the resistor also effected the color strength and through some trial and error I found this to produce the most accurate color.

Writing a Rainbow Program

Clean Up