Go Down

Topic: Sony ILX554B for spectrometer (Read 6125 times) previous topic - next topic

schmaffz

Hello,
I want to use the Sony ILX554B ccd to build a spectrometer. Till now I have the ardunio software, a program called LogView Studio for drawing the information the ccd collects and an Arduino Mega 2560 for controlling the ccd. As alternative I could also use Labview for drawing.
This is my first project, so I have no experience in this matter. Unfortunatelly my C skills are very rusty, but I think I should find my way into it. By what I have read so far, I learned, that every pixel has to be read out one by one, am I right?
Another problem is the function of this ccd. I couldn't find a manual whether and when to set the ROG or CLK high or low to scan the light/read out the information.

I hope someone has some experience in this topic and can help me.
Thanks in advance.

Riva

By what I have read so far, I learned, that every pixel has to be read out one by one, am I right?
Yes.
Another problem is the function of this ccd. I couldn't find a manual whether and when to set the ROG or CLK high or low to scan the light/read out the information.
First link from a google search for ILX554B is here.
ROG is normally high and you pulse it low (when CLK is high) for a minimum of 1000ns to start the CCD sample readout.

I hope someone has some experience in this topic and can help me.
I have not used the ILX554B but it looks similar to the ILX511 I have played with.
Don't PM me for help as I will ignore it.

schmaffz

Thank you.
I have another question: Do ich need the S/H-mode (sample and hold)?
Im not sure whats it's for and whether I need it or not.

Riva

I have another question: Do ich need the S/H-mode (sample and hold)?
Im not sure whats it's for and whether I need it or not.
From you first post I assumed you already collect data from this CCD using a similar setup.
The test code I wrote was for the CCD configured as sample and hold. I never tested it using non S/H mode.
If the image on the CCD is likely to change in the time it takes you to read out all the pixels then I would think S/H is the safer option.
Don't PM me for help as I will ignore it.

schmaffz

I put S/H on GND. This is what I have so far. There is a readout, but it only delivers values around 250, no matter, if I change the light or make it dark at all.
I don't see the problem...

Quote
int vout = 94;
int clk = 96;
int rog = 97;
int pixel = 0;

void setup() {
  pinMode(vout,INPUT);
  pinMode(clk,OUTPUT);
  pinMode(rog,OUTPUT);
  Serial.begin(9600);
}

void loop() {
 //read
    Serial.println("n\start readout\n");
    digitalWrite(clk,HIGH); 
    digitalWrite(rog,HIGH);
    delayMicroseconds(3);
    digitalWrite(rog,LOW);
    delayMicroseconds(3);
    digitalWrite(rog,HIGH);
    delayMicroseconds(5);
        for(int i = 0; i < 2087; i++ )
      {
        digitalWrite(clk,LOW);
        delayMicroseconds(1);
        digitalWrite(clk,HIGH);
        pixel = analogRead(vout);
        Serial.println(pixel);
        delayMicroseconds(3);
}
}

Riva

I put S/H on GND. This is what I have so far. There is a readout, but it only delivers values around 250, no matter, if I change the light or make it dark at all.
S/H to GND = Sample and hold mode.

Code: [Select]
int vout = 94;
int clk = 96;
int rog = 97;

What Arduino are you using that has >= 97 pins? I only wrote code for UNO & MEGA2560.
Don't PM me for help as I will ignore it.

schmaffz

Quote
S/H to GND = Sample and hold mode.
You mean, it reads 1 value and saves it all the time, so thats why it's always the same?

Quote
What Arduino are you using that has >= 97 pins? I only wrote code for UNO & MEGA2560.
It is the MEGA2560... Pinmap

Riva

You mean, it reads 1 value and saves it all the time, so thats why it's always the same?
No. With S/H mode on when the CCD receives the ROG signal it samples/stops sampling the pixels until they have all been read out.
It is the MEGA2560... Pinmap
Looks like your using the physical pin numbers instead of the Arduino IDE pin numbers. You need the pink numbers on the below image.
Don't PM me for help as I will ignore it.

schmaffz

Quote
No. With S/H mode on when the CCD receives the ROG signal it samples/stops sampling the pixels until they have all been read out.
So with S/H mode off, it would send the value for 1 pixel one by one?
With S/H mode on, I should save the values in an array before giving it to a program, right?

Quote
Looks like your using the physical pin numbers instead of the Arduino IDE pin numbers. You need the pink numbers on the below image.
Oh, okay. Thanks

Riva

#9
Aug 26, 2015, 02:07 pm Last Edit: Aug 26, 2015, 02:10 pm by Riva
So with S/H mode off, it would send the value for 1 pixel one by one?
With S/H mode on, I should save the values in an array before giving it to a program, right?
With S/H on when the ROG signal is sent the CCD pixels freeze their readings until they have all been read out (or to be more precise x number of clock cycles have elapsed since the ROG signal). With iS/H off the CCD pixels continue to register light changes as your reading them out.

Look here to see my sample code for the Mega and also processing code to view the results.
Don't PM me for help as I will ignore it.

schmaffz

I suppose, I don't need the S/H mode.
I changed the cables. This ist what I have now. Maybe I made a mistake with the cables?

Klick

Code: [Select]
int vout = 12;
int clk = 5;
int rog = 11;
int pixel = 0;

void setup() {
  pinMode(vout,INPUT);
  pinMode(clk,OUTPUT);
  pinMode(rog,OUTPUT);
  Serial.begin(9600);
}

void loop() {
 //read
    Serial.println("n\start readout\n");
    digitalWrite(clk,HIGH); 
    digitalWrite(rog,HIGH);
    delayMicroseconds(3);
    digitalWrite(rog,LOW);
    delayMicroseconds(3);
    digitalWrite(rog,HIGH);
    delayMicroseconds(5);
        for(int i = 0; i < 2087; i++ )
      {
        digitalWrite(clk,LOW);
        delayMicroseconds(1);
        digitalWrite(clk,HIGH);
        pixel = analogRead(vout);
        Serial.println(pixel);
        delayMicroseconds(3);
}
}

Riva

I don't see any decoupling, resistors or transistor as suggested in the datasheets reference design in your picture.
I would also be surprised if you can read anything sensible out with your code as digitalWrite is to slow.
I had to resort to direct port manipulation, increase the ADC read speed and buffer the readings before sending them over serial.

Attached is a picture of the module I made up. It has tape over most of the CCD window but still the CCD is still VERY sensitive to light.
Don't PM me for help as I will ignore it.

schmaffz

#12
Sep 15, 2015, 03:44 pm Last Edit: Sep 15, 2015, 03:45 pm by schmaffz
I changed the timings and added the needed parts.
Nothing changed... I have the same output as before. So I pulled out the cable for Vout. And suprise... it doesn't matter. I don't know where it takes the data from, but surely not from the sensor. I looked in this topic http://forum.arduino.cc/index.php?topic=136921.0. You used A0 as Vout, not an IDE pin, is that right? If yes, which number do I have to give A0, because there is no pink number for it on the pin map.

Klick

Code: [Select]
int vout = 12;
int clk = 5;
int rog = 11;
int pixel = 0;

void setup() {
  pinMode(vout,INPUT);
  pinMode(clk,OUTPUT);
  pinMode(rog,OUTPUT);
  Serial.begin(9600);
}

void loop() {
 //read
    Serial.println("\nstart readout\n");
    digitalWrite(clk,HIGH);  
    digitalWrite(rog,HIGH);
    delayMicroseconds(1);
    digitalWrite(rog,LOW);
    delayMicroseconds(1.01);
    digitalWrite(rog,HIGH);
    delayMicroseconds(5);
        for(int i = 0; i < 2087; i++ )
      {
        digitalWrite(clk,LOW);
        delayMicroseconds(1);
        digitalWrite(clk,HIGH);
        pixel = analogRead(vout);
        Serial.println(pixel);
        delayMicroseconds(1);
}
}

 


Riva

You used A0 as Vout, not an IDE pin, is that right? If yes, which number do I have to give A0, because there is no pink number for it on the pin map.
The pins I use are...
Code: [Select]
//******************
//* MEGA ONLY CODE *
//******************

// CLK pin = D5
// ROG pin = D11
// Vout pin = A0
// Debug pin = D7

A0 is the first analogue pin (green). As the output of the ILX is an analogue signal you need to read it using analogue.

You code says your using A12 as vout but the picture does not show anything plugged into analogue 12 on the mega board.
Also, I have not looked in detail but your breadboard layout looks suspect. If the breadboard is a standard layout then your shorting pins 4 & 11 together.
Don't PM me for help as I will ignore it.

schmaffz

Quote
If the breadboard is a standard layout then your shorting pins 4 & 11 together.
Yes right, thank you. I used it the wrong way.

Quote
You code says your using A12 as vout but the picture does not show anything plugged into analogue 12 on the mega board.
Didn't you mean that the numbers in the pink field of the pin map are the pins I have to write in the code?
So I thought Vout = 12 is "pin 12"(digital) on the right side. I get, that I have to use an analog pin, but thats why I ask, what number I have to give it, when the 12 ist reserved for the pin on the right side of the board.

Go Up