tteskac/rpi-lasershow
Lasershow using Raspberry Pi Zero
LaserShow on Raspberry Pi Zero
This is the second version of my lasershow project. I was using Arduino before but since I started working with linux and RaspberryPi I wanted to move away from Arduino as it is much simpler to write code for me on linux (oh, and of course, multithreading!). Originally based on this project: https://www.instructables.com/id/Arduino-Laser-Show-With-Real-Galvos/
Software
- Written in C++ for Raspberry Pi (all versions should work).
- It uses popular WiringPi lib to control GPIOs.
- It uses ABE_ADCDACPi c++ library from ABElectronics for controlling digital to analog converter from Rpi.
Hardware
- Raspberry Pi Zero
- MCP4822 DAC. I created my own board for that but you can use e.g. ADC-DAC Pi Zero as well.
- galvo kit (2 galvos + controller board)
- laser diode (e.g. green)
Instalation
- Install WiringPi: http://wiringpi.com/download-and-install/
- Clone this project
- Run
maketo build executable - Start with
./lasershow 0 ilda-files/test.ild(0 means delay after every point in microseconds) - Have fun!
Btw, to create own ILDA files I like to use Laserworld Showeditor which has a free version with limited features (but enough for making ILDA files). It's a bit buggy I know but as soon as you get over it you are just fine :) If you know about good open source / free lasershow editor out there that has ILDA export functionality let me know!
Btw#2, this project currently supports only ILDA type 1, so make sure you export correct version.
Wiring
The code is using SPI for communication with DAC and one GPIO for laser diode:
/-----------------------------------------\
| MCP4822 | RASPBERRY ZERO |
|-----------------------------------------|
| PIN 1 (Vdd) | +5V pin, e.g. 2 |
| PIN 2 (CS) | PIN 26 (CE1) |
| PIN 3 (SCK) | PIN 23 (SCK) |
| PIN 4 (SDI) | PIN 19 (MOSI) |
| PIN 5 (LDAC) | GND pin, e.g. 20 |
| PIN 7 (Vss) | GND pin, e.g. 6 |
|-----------------------------------------|
| PIN 8 (VoutA) | To galvo X |
| PIN 6 (VoutB) | To galvo Y |
| LASER ON | PIN 11 (WiringPi pin 0) |
\-----------------------------------------/


