Moritz Kassner

Fab_CAMera

This is a usb camerea interface that is fully fab-able. It serves as a proof-of-concept for the hi-speed usb implementation and the fab pcb process for fine pitched components and bga components. There are no open-soucrce Camera-projects like this one out there. Mostly becasue arduino is laking interface and processing power for a camera interface.

Hardware

The camera ship uses lvds serialization to reduce the number of connections. The interface boards I made acmmodate this by using a random lock lvds deserializer but can also talk to chips with the more common parallel interface.

Firmware

Controll commands are passed via I2c which is implemented in softwaere on the xmos. two USB endpoints are designated for reading and writing registerns through i2c commands onthe camera chip. Using multiple threads a doubple buffering schema is implemented to allow for simulatious sending through usb and receiving of pixel information. Internal RAM is used as pixel buffer.

 
    while(1)
		{
    	par{
    		rx_cam(fromCAM,poision,BUFA,buf_a_pos, item_a_pos);
    		tx_usb(c_ep,poision,BUFB, buf_b_pos, item_b_pos);
			}
    	par{
    		rx_cam(fromCAM,poision,BUFB,buf_b_pos, item_b_pos);
    		tx_usb(c_ep,poision,BUFA, buf_a_pos, item_a_pos);
			}
		}
    }
 

Since we have low-level access to the chip we can tell the chip to only read out subreagions. This allows for very high framerates (200fps).

Demo

The camera operating at ~40 frames per second. This means sustaining 15mbyte/sec of usb transfer. It becomes very hard to sustain higher data rates without dropping frames because the XMOS pixel buffer is rather small. I believe this is mostly a problem of the syncronous interface I use with libUSB