Laser scanning is the controlled deflection of laser beams, visible or invisible.
In a high-speed polygon scanner system, the laser is deflected by a rotating prism or mirror.
The position of the laser is determined via a photodiode.
Hexastorm is a full toolkit for working with polygon lasers scanners using FPGA technology; and provides hardware, gateware, and software
to enable laser scanning applications.
Code is tested on the system shown above, branded as Hexastorm.
The FreeCAD design is shared here
and PCB designs are found here.
A blog can be found on Hackaday.
The code took most inspiration from LDGraphy.
Making a PCB with scanner is shown in the video;
.
The alignment procedure is shown in the following video.
Code can be deployed on microcontroller ESP32S3 and FPGA UP5K.
This requires additional library esp32_hexastorm.
Part of the code can be run on Micropython, rest is Python only.
Install poetry and python.
sudo apt install python3 python3-pip
curl -sSL https://install.python-poetry.org | python3 -
Use poetry to install the dependencies in pyproject.toml. The virtual environment needs to be installed in project for VSCode to detect it.
poetry config virtualenvs.in-project true
poetry install --without raspberry,64bit
Poetry creates a virtual environment for you.
poetry run python
gives you access to the packages installed.
Depending on your operating system you also need to install certain extras.
Look into the pyproject.toml file for the possibilities.
Yosys must be compiled or installed via oss-cad-suite.
An alternative is to install python packages which use wasm but these are experimental.
poetry install --without raspberry
If this doesn't work try You can test code as follows.
poetry run python3 -m hexastorm.movement
If you want to interact with the stepper motors and flash the fpga.
./install.sh