Go Down

Topic: CCD line scan camera (Read 3 times) previous topic - next topic

Martin magakian

Oct 14, 2010, 04:23 am Last Edit: Oct 14, 2010, 11:28 am by martini69 Reason: 1
Hi guys,
I find this CCD line scan camera:
The kind of component you can find in a scanner I suppose.

Maybe I didn't understand but it's 'pixel clock', so does it mean I got all my time to look one by one the pixels captured by the camera?

For more information datasheet :

Martin Magakian


Basically, what it is saying is that your interface has to:

1) Wait for SOS (start-of-scan) line to go low (for what looks like 2 pixel clock pulses). When it goes back to HIGH...
2) Wait for 32 pixel clock (PCLK) transistions (count the transitions as they happen on PCLK)...
3) On the next PCLK transistion, read pixel 1 (via the analog output pin SOS).
4) Continue reading (2047 more PCLK transistions) to read the rest of the pixels.

Basically, your interface reads PCLK at a particular rate (as set by ps0,1,2 - you can specify an internal PCLK, or an external one if you want to control it with an oscillator or by other means), and you read the data out per clock pulse as specified by the timing diagram.

For the Arduino and using the internal PCLK, I would tie the PCLK line to an I/O pin that can sense an interrupt, then fill a buffer in the interrupt handler (though you would have to skip some pixels, if you are sampling the analog voltages - as there wouldn't be enough space for that many values).

I hope this helps you to understand how this device works (BTW - SH and SHUT lines I think control when to scan, and whether the output is an analog level value or (digital b/w?))...

BTW - remember your 50K pullup resistors on the input pins!

This would actually be an interesting sensor to use for a laser distance measuring device aka LIDAR (triangulation-based - not time-of-flight).

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


BTW - note the test circuit hooked up to a 2-channel o-scope; one channel (top input on diagram) is hooked to show the SOS line output (pin 11), and the other output (pin 2) is the CCD output showing the analog output (bottom input on diagram) as a series of voltage transistions. A simple 7805 and a regulated 12VDC power supply runs the whole thing (pin 4 is ground).

Oh - and re-reading that diagram - you don't use 50K pullups - those are internal, so ps0-2 left unconnected set a 4 MHz pixel clock, and ts0-2 sets shutter controls (4.2uS, 520 uS); really fairly simple to work with - just apply power and start sampling (keeping the timing diagram in mind to know when pixel 1 comes into play and clocking properly).

With the default settings, I would again recommend using an interrupt-based system to read the analog voltages coming out of the CCD line, sampling them and stuffing them into an array (realizing you don't have much memory to play with - so you might have to sample every 2-4 pixels, and average, or do skipping of pixels, or map the value you get down to something smaller to fit two pixels in one byte with only 16 grey scales per pixel, or add extra memory, dump to an SD card, or buffer a half scan, send it off via serial pausing the interrupt then scan the other half)...

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.


Oct 14, 2010, 06:31 pm Last Edit: Oct 14, 2010, 06:34 pm by focalist Reason: 1
If you are interested in those sensors and similar ones, you can often find "business card scanners" at flea markets and the like.  They use these or similar CCD's.  I recently ripped apart one that came my way, netting a nice little stepper motor, a couple of other useful toys, and a very similar sensor.  Epson CardScan I think it was.  Not even really read specs on it, but as set up, it was a 8-pin connection and seemed to be a standard-type module, made by someone called "MUST technologies".  The point is, it's the kind of thing which might be very well suited to fiddling with, especially with the Arduino.  If I remember right, I think it's set up as digital, SPI interface, memory mapped data.  Think it might be neat to mount on a stepper and add some optics, and give the arduino slow-scan (physical!) vision...

Point being, this is the type of module that you can get by ripping apart something that can be had for little cash or free, rather than purchasing (usually for some inflated price).

Get yourself some SCUBA gear.. jump on in, the dumpster's great for diving.....
When the testing is complete there will be... cake.

Go Up