Close

FPGA: hexastorm + icestorm

A project log for open hardware fast high resolution LASER

bringing additive manufacturing to the next level

HexastormHexastorm 01/03/2020 at 12:262 Comments

The last weeks, I have been doing experiments to see if I can replace the programmable realtime unit on the Beaglebone with a FPGA. On the Beaglebone, there are two programmable real time units, which are very similar to micro-controllers, running at 200 MHZ with 8K byte memory per core and 12K byte shared between them. At the moment, I use one PRU and one memory of 8K byte which acts as a ring buffer.
There are some challenges with the current design. I am locked into the AM335x processor which runs at 1 GHz and is single core. The latest Raspberry 4 runs at 1.5 GHz and is quad core.
If I am able to build an extension for the Raspberry it would not be hard to use the scanner with other boards, e.g. the edge TPU or the NVidia nano.
When I started this project, I actually tried to do this with the Spartan 6 FPGA, using the Xula-LX25.
In the end, I managed to get something to work by writing the laser data to a sdram and then reading this data from the sdram. This was all written in MyHDL, see Github.
MyHDL is converted to verilog and this can then be converted to a bitstream by the Xilinx Ise.
In my latest experiments, I used the IceZero with the ICE40HX4K and Migen. The oscillator on the Icezero runs at 100 MHz and the ICE40HX4k has 81920 bits of memory. In practice, the memory is larger as the Icestorm toolchain is able to program the ICE40HX4k as a ICE40HX8k.
The ICE40HX8k is a lot less powerful than the Spartan 6. It has 1/6 of the SRAM memory and 1/3 of the LUT. The main advantage for me is the open source icestorm toolchain which runs on linux.
My current setup works as follows. Data is streamed to the FPGA via SPI and stored on the FPGA using the internal SRAM. The sram is used as a buffer before the data is placed on the substrate with the laser. My code can be found here, especially look at the spimemmap example.
I did some experiments on the Raspberry 3 using Python and Spidev and I am able to get data rates up to 25 megabit per second.
In my current laser head, the scan line is 8 mm long and a pixel is 10 micrometers. So there are roughly 800 pixels per line, i.e 100 byte per line.  At 20.000 RPM * 4 (facets)/ 60 = 1333 lines per second. This implies 133 kB/s or 1 megabit per second, much less than 25 megabit per second.
Another problem, I am still working on is balancing the prism. I hope to report some progress on that soon.
What might be of interest is that MIT recently released a press statement in which they show that they are working with lasers and ultrasound. The technology is very similar to my previous blog post. The only difference is that they use a laser to detect the vibrations.
Another interesting was one by blog the drive. There apparently is a Dutch startup which use lasers to clean railway tracks.

Discussions

Hexastorm wrote 01/10/2020 at 15:27 point

Thank you for your reply. It would be definitely be interesting to try to measure the vibrations with an optical pickup.  In the end, I decided to use an accelerometer to measure the vibrations.
As this is more commonly used in literature, see https://www.sciencedirect.com/science/article/pii/S2351988616300185 . The position of the rotor is determined with photo tachometer. For full details, see my blog post from today. 

  Are you sure? yes | no

Gravis wrote 01/03/2020 at 21:12 point

Excellent work.  I may have missed it but I don't recall any posts on the nature of balancing prisms but it's been an issue for a while so I thought maybe an idea might help.  It seems like half the issue is accurately measuring the imbalance so I thought about it and came up with something.  You could use an "optical pickup" from a blu-ray drive to map the distance of the edges of the prism as it spins at low speed.  I also suggest testing at various speeds if the prism is actually level and/or generates a bit of lift at higher RPMs.  If you think this is a worth investigating, consider going with a well documented one like the PS3 optical pickup.

  Are you sure? yes | no