Why I built it
I joined the lab in my first month as a freshman. I already had a lot of coding experience, so I ended up working on much of the software, and through the research I learned DAC control and serial communication well before any of my classes covered them. The contrast was adjusted by hand, which meant a lab technician had to be there the whole time the system ran. The lab asked me to automate it with an Arduino, and the software now makes those adjustments on its own.
The hard part
The automatic control loop kept oscillating. It would overshoot, correct, then overshoot again, bouncing the laser current between 19% and 21%. I added logic that detects the alternating corrections, holds the current at 20% and pauses adjustment for five seconds, plus a 0.3% dead band so small fluctuations are ignored.