  Maintaining stable and precise alignment of a laser beam is crucial in many
optical setups. In this work, we present a microcontroller-based rapid
auto-alignment system that detects and corrects for drifts in a laser beam
trajectory using a pair of two-dimensional duo-lateral position sensing
detectors (PSDs) and a pair of mirror mounts with piezoelectric actuators. We
develop hardware and software for interfacing with the PSDs and for controlling
the motion of the piezoelectric mirrors mounts. Our auto-alignment strategy --
implemented as a state machine on the microcontroller by a FreeRTOS kernel --
is based on a simple linearized geometrical optical model. We benchmark our
system using the standard case of coupling laser light efficiently into the
guided mode of a single-mode fiber optic patch cable. We can recover the
maximum fiber coupling efficiency in $\sim10$ seconds, even for a laser beam
that was misaligned to the point of zero fiber coupling.
