Before I got the DigiPan delivered, I did some research on the internet and was rather disappointed to find nothing about this sensors at all. However I contacted a guy on a medical support forum that seemed to know about Trophy devices. As it turned out this guy had all the documents I could have wished, including pinouts and confidential powerpoint presentations. Without his help I probably wouldn't have come so far yet.
First challenge was to get the DigiPan powered. The only connection is a 8-pin DIN plug on a ~20cm long cable. Both power and data goes through this connector.
Here is the pinout of a similar type of DigiPan as mine, pinout is identical for both:
As you can see, the sensor requires 5V (2A) and +/- 15V (700mA). Also there is some hint of the type of interface this thing uses: RS422.
Unfortunately RS422 is only a specification of the physical layer, not the actual protocol. So it was still unclear how this thing sends out image data. However, RS422 is a mono-directional interface and there is no second RX channel. This means the panel can only send out data, it can't receive anything from the computer. This is nice, as this means it doesn't require any magical initialization commands or settings transmitted to it to operate normal. It works standalone, which makes it perfect for further reverse engineering
With this information I was able to power my DigiPan once I received it. Applying the 5V is enough to get the digital circuitry running. In fact there is a relais inside that only lowers the CCD and analog circuitry during exposure.
From the support manual I knew that the DigiPan sends out a test image at powerup. It is a greysgale gradient with the resolution of a typical x-ray scan.
First goal was to capture this image and display it. However, first we have to understand how this sensor actually works:
The actual CCD sensor has a resolution of 1244 x 61 pixels. While today's image sensors use a 2D image sensor with the size of the required area (up to 200 x 200mm, which is basically a whole silicon wafer as a single image sensor), this DigiPan sensor has to be slided during exposure. It is basically a 1D sensor that has to be moved to generate 2D images. From what I know, this also means maximum image witdh is unlimited as the data isn't buffered, but streamed out during exposure.
But wait, why does the sensor has 61 pixels in x direction then?
X-rays are rather weak, especially in medical context. So to get well exposed images, long exposure times are necessary. This isn't a problem for stationary 2D image sensors, but as this thing moves, long integration times would cause motion blur.
In order to achieve both high sensitivity and fast movement Trophy uses a trick called time delay integration (TDI). This works by having multiple (61) rows of elements which each shift their partial measurements to the adjacent row synchronously with the motion of the image across the array of elements.
Here you can see the data sent out by the DigiPan at powerup. Sampled with a Saleae China clone at 24MSa/s and PulseView:
Some measuring revealed a bit rate of ~7.9MHz. The crystal next to the cpu on the DigiPan pcb has 16MHz, so it's 8MHz. The protocol contains one Start bit and no Stop bit.
The actual data is 12bit + 1 control bit that seems to be always 1. The 12 bit data is the actual ADC reading of each pixel. Data is streamed out pixel by pixel, line by line, 1244x 13 bit data packets per CCD line.
This is very similar to genuine UART, however UART usually has baud rates of 9600-115200 and 8 data bits + 1 stop bit. Sigrok-cli already has an UART decoder, however only for these standard values....Read more »
This is an awesome project and I will be digging into it soon.