Close

Frame Driver High Level Design and Component Selection

A project log for Laser Galvo Clock

Clock projected onto the wall with cheap laser galvos

Alan GreenAlan Green 06/15/2019 at 02:530 Comments

The purpose of the Frame Driver is to receive a "frame" of data from the Raspberry Pi and then output it until it receives a new frame. The Frame Driver will guide the laser beam around a path over the course of 1/30th or 1/50th of a second, turning the beam on and off as appropriate, and then do it, over and over again.

There are several steps between receiving a frame from the Pi, and outputting voltages to the Laser Galvos.

High level block diagram showing Frame Driver components
Frame Driver and its components

Microcontroller

I've decided to use a ‎‎PIC32MX170F256B-50 microcontroller. There were several reasons:

DAC

I chose MCP4822 dual 12-bit DAC. It has an internal 2.048 voltage reference and has an SPI interface. 

In this post on laserpointerforums.com, the consensus seems to be that an 8-bit DAC is not sufficient, but that a 12-bit DAC is plenty. 12 bits gives 4096 steps, which would be somewhere between 0.2 and 0.4mm per step on my kitchen wall, which seems sufficient, especially given that the laser beam is 1-2mm mm wide. Beyond 12 bits, things start to get quite pricey, and there's little additional advantage in having 0.05mm precision over 0.2mm precision at normal view distances.

For the cheaper DACs, there are two common standards for loading data: I²C and SPI. Generally, SPI is a faster protocol, both in terms of physical link speed and in having a lower protocol overhead. The MCP4822 can transfer data with a 20MHz clock and I am expecting to be able to use at least 5MHz. 

Outputting two values from the MCP4822 DAC requires two 16 bit SPI transfers and then setting the LDAC pin low. At 5MHz, this will take (16 * 0.2 * 2 + a bit)μs ~= 8μs, which is fast enough. The DAC requires a "typical" 4.5μs to change its output signal from one level to another, anyway.

To ensure that the internal voltage reference is stable, a very stable power supply is required.

Voltage Shifter

The final component in the Frame Driver is the voltage shifter which takes two single-ended 0-2.048V signals and amplifies them to the +/-10V differential signals (maximum magnitude of any given line is +/- 5V) expected by the Galvo controller boards. It will be composed of 4 op amps, in a single package. I chose the TL084, because cfavreau used it successfully in his Open Laser Show DAC. It's also the same part used on the Galvo driver boards. 

Power

Finally here is how I plan to power each of the components:

ComponentWhat it NeedsHow it Will Get it
PIC323.3V, < 100mA. Pull from RPi 3.3V pins
MPC48223.3V, a few mA, low rippleDedicated 3.3V regulator running from from RPi 5V pins
TL084+ and - 8V supplies, <20mADedicated regulators running from Galvo +/-15V supply lines.

Discussions