By using a RP2350 to directly interface with the ADC found on the sensor assembly it allows for high quality data capture and direct control over exposure. To store the data a SD card is used which allows for high speed data storage using the 4-bit SDIO protocol.

Pi pico connected to the sensor assembly
Pi pico connected to the sensor assembly

The camera can be used un-tethered unlike other scanning camera's where a computer is used to control the scanner and store the data. As the RP Pico 2 used in this project has a limited amount of pins the camera is controlled using a web interface hosted on the camera itself. 
So it is not completely independent but that might change in the future.


Using the web based control panel the scan angle and exposure time can be set. It also allows for the user to preview the photo by streaming a binned and compressed version of the photo to the users browser. Instead of repeatedly previewing and focusing the camera the user can select a line in the preview where the user wants to focus on. The camera then moves to that location and captures that line continuously. It then determines the sharpness by  calculating the contrast comparable to a contrast auto-focus. This sharpness metric is then send to the user where it can be used to quickly move to lens to the optimal focus.

After composing and focusing the user can decide to capture the photo which then will be saved to an SD card as a  linear uncompressed 16-bit per

color tiff file. Currently it is not possible to save a full size image as a JPEG due to ram constrains. This tiff file is like an raw image and still needs to be processed by shifting lines, dark count subtraction and gamma correction.

TU/e Atlas building captured by PicoPan
TU/e Atlas building captured by PicoPan

The panorama mechanism uses a 3d printed base that mounts to a tripod. It houses a geared stepper motor  and a rotating platform connected to the base by two large diameter deep groove bearings. On top of the platform a camara body is mounted which houses the sensor with the electronics and a lens mount. The rotating platform is driven by a belt connected to the geared stepper motor. The lens m42 lens mount allows for a large of range of lenses. Note with a different focal length the scan angle per line has to be different.

Linear CCD as it sits in the camera body
Linear CCD as it sits in the camera body
Backside of the PicoPan
Backside of the PicoPan
Front of the PicoPan
Front of the PicoPan

To capture the data from the linear sensor it is first digitized using an ADC/Timing generator also called an AFE. This device also is in charge of sending the timing signals to the CCD to move the charges and shift them towards the output. The AFE found on the V10/V100/V350 is an AK8419 from AKM. It has a publicly available datasheet which makes it easy to interface with. 

To get the data of the AFE it uses a 8 bit parallel DDR data bus. For configuration it uses a serial interface. As the CCD has no public datasheet i captured the data being sent from the main board from the scanner to the sensor board.

FPC sniffer board made to capture the data being sent from scanner main board
FPC sniffer board made to capture the data being sent from scanner main board

This sniffed data is then used to reconstruct the register settings of the AFE. 
In order to capture the image data the PIO of the RP2350 is used to read out the parallel bus. The data is streamed to a sort of circular buffer using DMA from which is it is then written to the SD card. As the memory of the RP2350 is only able to store a small amount of lines in memory the SD card has to support high enough speed and have low latency to avoid the image buffer overflowing. 
Using 4 bit SDIO protocol it is possible to reach around 30MB/s write speed, which is enough to capture the image data without hick-ups. 
To generate the trigger signal for a new line another PIO block is used and signals to the capture block using an IRQ to keep everything in sync. The clock signal to the ADC is generated using a PWM to reduce the amount of PIO blocks required. 

The image is stored as a tiff file as it very simple and the...
Read more »