Hexastorm - Laser Direct Lithography
A process known as Laser Direct Imaging.
The code is based upon LDGraphy.
The BOM of the scan head is in the order of $400 including the Beaglebone Green.
- 500mW 405nm laser ($30)
- Commonly available polygon mirror scanner (from laser printers) ($20)
- Beaglebone Black/Green to control it all (using the PRU to generate precise timings for motors and laser) ($50)
- quartz optical window, 2 mm thick, 30x30 mm ($55)
- Photo-diode to determine start-of-line (as the polygon mirrors have slightly different long faces and also phase-drift over time) (BPW34-B) ($5)
- Hexastorm hat ($50)
- cylinder lens pair ($120)
- triangular prism ($50)
The Hexastorm hat is not for sale and has to be produced manually. The prism has to be glued on top of the polygon motor. The frame was donated by Felixprinters.
Work in Progress
The project is work on progress. Currently, it is possible to reach a phase-locked loop with the Hexastorm and sent lines to the scanner via Python 3. A resolution below 100 micrometers can be obtained. The stepper motors can be moved and homed via the limit switches. The scanhad is mounted on a frame. The power of the laser can be set via a digital potentiometer. The firmware is currently under change. The beaglebone cape is ported from v0.1 to v0.2 Firestarterrepo.
The following image was used http://debian.beagleboard.org/images/bone-debian-9.5-iot-armhf-2018-10-07-4gb.img.xz
Enable the PRU
Check wether the uio_pruss driver is loaded.
lsmod | grep uio
There should be something called uio_pruss. If it is not loaded load the module and check again.
sudo modprobe uio_pruss
To enable the uio_pruss module on each boot add it to /etc/modules where by adding the line uio_pruss. An alternative is to load the PRU via the Python module. check
and see if you have /dev/uio1 /dev/uio2 etc. If not modify /boot/uEnv.txt, comment the proc line
uncomment pruss line
Reboot and check again. You can get an overview your config via
sudo /opt/scripts/tools/version.sh .
If it doesnt' work, your old bootloader in the eMMC is blocking u-boot overlays, you can fix it via:
sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=10
Clone the forked py-uio, checkout the setup branch and install. Don't forget to copy
uio-pruss.rules file to
/etc/udev/rules.d/ and reboot.
Install the PRU assembler and prussdrv library as follows:
cd ~ git clone firstname.lastname@example.org:beagleboard/am335x_pru_package.git cd am335x_pru_package make make install
Device tree overlay
To properly prepare the GPIOs and the PRU to be used, you have to install the device tree overlay on your Beaglebone. Compile the DTS to a DTBO and move it to /lib/firmware folder. Load the DTS via uboot with the custom cape variable, dtboverlay. In the laser test we have
You can check whether it is working via;
export PINS=/sys/kernel/debug/pinctrl/44e10800.pinmux/pins cat $PINS | grep 'pin 101'
A good pinout view of the beagle bone is available here:
The STL capabilities of the slicer has been removed for now. Look into the git history for inspiration.
sudo apt install imagemagick
Plug in the 5V and 12V source for the cape, so the laser driver has power. Hook the fan to the board, it should spin. Run the following lines of code;
echo 110 > /sys/class/gpio/export echo high > /sys/class/gpio/gpio110/direction echo low > /sys/class/gpio/gpio110/direction cat /sys/class/gpio/gpio110/direction cat /sys/class/gpio/gpio110/value ls -al /sys/class/gpio
If the laserdiode does not turn on it could be broken or the laserdiode driver could be broken.
Hook the fan to the laserdiode output and see if it spins. If it does the laserdiode is broken.
There is also a test script,
Run the test script ldgraphy/scripts/firestarter_tests/polydriver.py
The polygon should spin. Two types of polygon were considered. The MASQ6DF15RS which are sold with a maximum speed of 24000 RPM although a label indicates they spin at 20787 RPM. A Chinese sticker has been placed to cover this number. The chip used is Panasonic AN44000A. The MASQ0DF9RV rotate at 21000 RPM. The chip used is NBC3111. It was found at that both the input and output of these chips are different and the Panasonic chip rotates the polygon faster than what would be expected of a given pulse rate. We therefore chose to proceed with the NBC3111. The pulse pin of the Panasonic is AN44000A.
The python library is broken, so a python test script could not be made. Turn on the laser via the command line.
echo 110 > /sys/class/gpio/export echo high > /sys/class/gpio/gpio110/direction
Rotate the prism and measure the photodiode input. Pin 20 or pin 116 can be used.
echo 20 > /sys/class/gpio/export echo in > /sys/class/gpio/gpio20/direction cat /sys/class/gpio/gpio20/value