Close

Going realtime

A project log for Taking digital xray shots for cheap (< 300$)

Reverse engineering a Trophy DigiPan digital xray image sensor for 2D and CT 3D images.

Niklas FauthNiklas Fauth 03/09/2018 at 20:250 Comments

The nice thing about the original DigiPan hard- and software is that the image is displayed in realtime as it is exposed. This saves a lot of time, as you can see right at the beginning if an acquisition is over- or underexposed. With the current software setup, however, realtime processing isn't possible: Data needs to be captured first, and then the software decoder can be used for decoding.

I didn't like the sigrok decoder anyway, it was just a quick workaround to be able to somehow capture UART with 13bit. The proper way to do this is in hardware: Either with an actual CPU that supports 13bit framing, or, for more flexibility, a fpga. I had an iCE40 board laying around and the toolchain set up anyway, so I gave it a go. Using an existing UART-echo demo, it was a matter of few hours to modify the code for my application. As I would require an UART speed of 8Mbaud to transmit 13bit data with 4Mbaud as 2x 8 bit frames, I had to configure the internal PLL to get faster clocking. Also, setting the FTDI to a baudrate >2Mbaud isn't supported by the Linux driver, so you have to do this using some usb magic.

Both the verilog code and the python scripts for capturing and displaying are available here: https://github.com/NiklasFauth/iCE40-digipan-hardwaredecoder

Here is a video of the acquisition:

After playing around with pygame and stty for buffering data while received, I managed to get the same effect as using the original Windows 2000 software: The image is being displayed as the DigiPan is slided along the image:

Discussions