Scanning system


This configuration may be useful for building a galvanometer controller for an optical scanner or a scanning coil controller for a scanning electron microscope.

Some interesting links on scanning and imaging techniques:


The system outputs the line scan signal to OUT1 and the raster scan signal to OUT2. The trigger and S&H pulses are available from the pins DIO0_N and DIO1_N on the E1 connector. The analog signals corresponding to each pixel are input to IN1 and IN2.

The basic blocks of the system are shown on the following diagram:


The projects/scanner directory contains one Tcl file block_design.tcl that instantiates, configures and interconnects all the needed IP cores.


The projects/scanner/server directory contains the source code of the TCP server (scanner.c) that receives control commands and transmits the data to the control program running on a remote PC.

The projects/scanner/client directory contains the source code of the control program (

Scanner client

Getting started with GNU/Linux

sudo apt-get install python3-numpy python3-matplotlib python3-pyqt5
git clone
cd red-pitaya-notes/projects/scanner/client

Building from source

The installation of the development machine is described at this link.

The structure of the source code and of the development chain is described at this link.

Setting up the Vitis and Vivado environment:

source /opt/Xilinx/Vitis/2020.2/

Cloning the source code repository:

git clone
cd red-pitaya-notes

Building scanner.bit:

make NAME=scanner bit

Building SD card image zip file:

source helpers/ scanner