hiimzackjones

Hi everyone. I have a project I have been tinkering with and it seems to be over my head. I have purchased a couple Sony ILX751A linear CCD sensors and need to gather data from them. This is for a graduate class grade and my ability to make this work effects everyone in the class's grade. We will start with the datasheet - http://www.datasheetcatalog.org/datasheet/sony/a6802498.pdf

I understand that this chip needs a main clock pulse and a ROG clock pulse. I also understand that there is a shutter option that can be implemented that will also need a pulse if I decide to use it. My concern is mainly getting the CLK and ROG clock pulses lined up correctly. I've looked at other CCD forum posts, but due to the differences in design, those posts didn't help me much. My experience with programing and Arduino is not quite at the level it should be for a project like this. Any pointing in the right direction would be greatly appreciated.

Concerning which arduino I am using, I have a nano, duemilanove, and an ethernet type arduino. This is for a class and is funded. If I need to purchase the Mega, the money is available.

i have a ILX551A on order (any day now) looks like a 751 without the shutter functionmy experiments withthe upd3799cy are at a stand still (though i belive i know the problem & will revisit it ..)i am using a Due & have some complications that you do not have (3.3v outputs & Adc input ) though i do have more memory to play with ... i'll publish some code when its up & running ...

hiimzackjones

Ahhh. That would save my life. I am in way over my head. I just don't know where to start. Well, I kinda do. Here is a simple question. The chip runs max at 5mhz. That is 20 nanoseconds right? Does that mean my clock pulse should be something like 20 nanoseconds (with a 50% duty cycle) ? Is that what that means? I understand the timing as far as the nanoseconds between when ROG comes on and then CLK comes on and then ROG cuts off then CLK starts its timing stuffs. It is all given in the datasheet in exact nanoseconds. So to program that I'm just going to use the delay function and write stuff HIGH and LOW. But the actual clock pulse that happens after. How fast is that? Do I choose that? Does it have to be relative to the ROG pulse time? You guys are helping a lot and I really appreciate it.

hiimzackjones

Wow, I'm learning a lot from this one little project. Would it be easier in my case (not using a Due) to build a analog to digital converter then have the arduino read the digital data? Also, the only information I need from the camera is pixel number and Intensity of light. Is there a way to skip the unneeded data prior to the analog to digital conversion?

a fast external converter would be possible - not easy but possible even if you got the data at full speed can you work with it (see below)

you can skip the early parts of the data - either by tossing it out (sampling & over writing) or delay first sampiling till the ~first valid bits are available

do you have to run at MAX speed?

other things ( at full speed ) to worry about MEGA runs at 16 Mhz (62.5ns) this means if you had to run the sensor at full speed (5Mhz / 200ns) you MIGHT beable to fit 3 risc instructions in the time between samples - i haven't looked at the chips instructions but even if you wrote a super tight loop in asm(NOT C/C++) i'm guessing you would need 5-10 cycles (to read /save data / test if done ) no irqs, no timers

(the above is why i'm using a Due)

and a problem that i'm fussing about - do you know (i don't) when is the exposure time for the chip ? it likely needs 1-100ms to collect data (enough photons to make a image) - do these chips double buffer the data (so you have the 1-100ms to pull the data) or can you only run one line at a time ... aaaghhh...

follow up :i've just had 'limited' success in driving the ILX551A , very little change programming change from the other chip (upd3799cy) & i save myself two pins

no data collection as yet but i can see the output change on the scope whoo hooo !!

it requires VERY little light (i'm up to 200lines per sec ) & still get resonable responce in a medium dark room on a cloudy day ... & it appears as the native output is close to max 3.5 volts -- so if i clamp it i may beable to feed the arduino direcly (probably have to buffer it but makes life easier ..... )have to wait till monday to get sockets , clamping diodes , & assorted other things ...

hiimzackjones

Oh great! Congrats! I haven't had much time to look at things with Mid-terms blowing things up. The exposure time was a big question mark for me. I thought it was cause I am such a noob at this. Here is another noob question.

what does the data actually look like? I have a friend working on the Gui for this project and he would like to make a csv document for our Gui to open and make a simulation of what things will look like so he can further debug. There is no information on the data sheet about what this stuff looks like. I imagine its intensity and wavelength or color.

I attempted to write code for this the other day and failed miserably. I don't know if it's because I don't know what I am doing, or if it is something simple like I started in the wrong part of the clocking sequence. I'm hunting for backup plans on this project just in case.

these Sony devices have a very simple clocking stucture to follow (as opposed to the National part i was mucking with)

there are really only the 3 steps pulse low on ROG (once)pulse on CLK , sample the data - repeat 2087 times ....pause (! found the comment in the data sheet - integreation time is 10ms ! )and repeat ....use a scope to check that you have the correct polarities ...

not sure about the MEGA but it appears that you should beable to use the transistor buffer shown in the data sheet so easy to connect ( need clamp diodes for the DUE) data will look like a stream of 10 bit numbers .... relative to the total amount of light .... with junk data at the begining & at the end

davpc

I have an arduino due and I'm about to order a Sony ILX751A Linear CCD, I want to put together what you did. I'm really interested in how your project went. Did it work nicely and is it possible to send a diagram, pictures, code etc. of your setup?

Any help would be great even a quick message for now saying how it went would be really nice.

Thank you, Dav.

hiimzackjones

Exam week is here and I finally had to get my butt on the ball to finish this. here are the two codes. one is arduino the other is processing. I can't test this yet because I haven't built the CCD circuit yet. Any tips or suggestions would be great!

}void loop() { //clk initialization Serial.println("start"); // just for kicks digitalWrite(clk,HIGH); // these next few steps starts the clk, this must be done each time prior to a 2087 cycle digitalWrite(rog,HIGH); delayMicroseconds(1); digitalWrite(rog,LOW); delayMicroseconds(1.01); digitalWrite(rog,HIGH); delayMicroseconds(1); for(int i = 0; i < 2087; i++ ) { digitalWrite(clk,LOW); // the 2087 cycle begins here. delayMicroseconds(1); digitalWrite(clk,HIGH); sample = analogRead(vout); // output the ccd's data into a serial sample that can then be read by a processing programing and written to a file Serial.println(sample); // ^^^^^^^^^^^ delayMicroseconds(1);