Linear Photodiode Array with manual Shift Register

I am attempting to build a small spectrophotometer.

I have the following linear diode array (RL2048PAG-021). Here is the datasheet link: http://www.isgchips.com/pdf/P-series-021web.pdf

This array has 2048 linearly arrange photodiodes. I am attempting to read it with an Arduino, but to no avail. Full disclosure: I’m a beginner.

I’ve attached a diagram of how exactly I have the pins hooked up. You can check the data sheet Figures 3 and 4 for the transfer timing diagrams.

!(http://Photodiode Arduino Connection.png)

/* Linear Array
*--------------
*
*/
int H1 = 2;        //set all digital pin outputs
int H2 = 4;
int RG = 6;
int TG = 8;
int PG = 10;
int AB = 12;
int VOUT = 0;      //analog pin input attached to VOUT, microcontroller pin 2

int val = 0;      //set counter variables
int i = 0;

void setup()
{
    Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
    pinMode(H1, OUTPUT);      // sets the digital pin as output
    pinMode(H2, OUTPUT);
    pinMode(RG, OUTPUT);
    pinMode(TG, OUTPUT);
    pinMode(PG, OUTPUT);
    pinMode(AB, OUTPUT);
    pinMode(VOUT, INPUT);     // sets the analog pin as input
}


void loop()
{
    digitalWrite(H1, HIGH);        //the transfer timing says to begin by holding
    digitalWrite(H2, LOW);         // H1 - HIGH and H2 - LOW
    
    digitalWrite(TG, HIGH);        // next I pulse TG and PG HIGH
    digitalWrite(PG, HIGH);        
    delayMicroseconds(100);        

    digitalWrite(PG, LOW);        // then I pulse PG and TG LOW 
    delayMicroseconds(1000);
    digitalWrite(TG, LOW);
    delayMicroseconds(100);
 
    for (i=0; i<2072; i++)          //shift register for 2048 photodiodes + 20 dark pixels + 4 transfer pixels = 2072
    {
      digitalWrite(H1, HIGH);      //now I utilize the horizontal shift register
      digitalWrite(H2, LOW);       //according to Figure 4 in the Readout Timing waveforms
      digitalWrite(RG, HIGH);
      digitalWrite(RG, LOW);
      delayMicroseconds(100);
      digitalWrite(H1, LOW);
      digitalWrite(H2, HIGH);
      
      val = analogRead(VOUT);      //then after 1 cycle, I try to read the VOUT pin
      Serial.println(val);
    }
    delay(5000);
}

The Serial data is basically the value ‘147’ over and over.

Is it because the voltages called for by the pins are -4 and 4, rather than the 0V and 5V that the arduino is putting out?

Also, I haven’t worked in the Antiblooming control (mostly because I don’t know how or what it is).

Anybody see any obvious errors here?

The spec says that some of the gates need 8V +/-10% (7.2V to 8.8V). The 5V from the Arduino might not be sufficient. Perhaps you need some level shifting.

Yeah that's what I was worried about...

even some of them (for example the Photo Gate) are requiring voltages of HIGH: +8 and LOW: -4

How would I do that?

rcarney:
even some of them (for example the Photo Gate) are requiring voltages of HIGH: +8 and LOW: -4

How would I do that?

You could get close by adding another 3v cell with the + side to ground. Then a pot between -3 and +9 would give you an adjustable voltage that covers most of the desired range. That would work if you don't need to adjust that gate dynamically.

rcarney:
Full disclosure: I'm a beginner.
.
.
.
Anybody see any obvious errors here?

So what's your point?

Just wanted to put potential aides in the right mindset...

You can generate a low-current -4v supply by programming one of the Arduino PWM pins with a 50% duty cycle and using the classic voltage doubler arrangement of 2 diodes, 2 capacitors, and a resistor to limit the Arduino pin current. Ordinary silicon diodes such as 1N4148 will give you a little less than 4v, Schottky diodes may give you a little more.

You’ll need to amplify the TG, PG, AB and RG signals from the Arduino, and for the PG and AB gates, level-shift them as well. See attached image. These amplifiers are inverting, so a HIGH on the output pin will drive the corresponding gate signal low, and vice versa.

Nice chip, where did you buy it. I couldn’t find a supplier of this.

Is it because the voltages called for by the pins are -4 and 4,

Yes if you are just providing 0 to 5V pulses it will not work. You need the voltages shown in Table 4.
It also says on the data sheet the output should be connected to a high impedance amplifier.

You are putting a Serial.println(val); in the read out loop. This will slow the thing down considerably and cause a lot of blurring. They have to be shifted out as rapidly as possible, you can’t afford the time to send out the data serially. Depending on the sort of Arduino you have you might not have enough RAM to store a line of data. In which case you will probably have to get an external memory shield or other fast off board storage. The conversion rate of the internal A/D can also be a problem.

Then you can store a line rapidly and then ship out the value to the serial port.

As the application is a spectrophotometer, I suspect that rcarny doesn't need to use anything like the maximum bandwidth of the chip. That's why I suggested relatively high values (10K) of the pullup resistors in the circuit I gave. For the same reason, I don't think a buffer between the chip and the Arduino analog input is needed. If the -3db point for a 10pF load is 150MHz then that suggests an output impedance of just 110 ohms or so.

Wow, thanks for taking the time to think about this.

Mike, I bought the chip from Perkin-Elmer.
Also, I have the serial.println(val) in there for debugging for right now. But without serial communication, what would you recommend to store the data?

dc42, thanks for that, it looks nice. I don't have all the components to implement it right now, so I'm going shopping. maybe you can expand a bit on what you meant in your next message: do you think it's sufficient to put the VOUT directly to an arduino analogPin? In the end, this spectrophotometer needs to be wireless, able to be put under vacuum and ran. So in effect I need to store up to 200 or 300 consecutive scans of the 2072 pixels, not on the arduino obviously, but on external memory as Mike suggested.

able to be put under vacuum

That complicates things, out gassing and internal chip air pressures might be a problem. It could be that you need a mil spec chip to do that. The crystals might also present a problem.

rcarney:
In the end, this spectrophotometer needs to be wireless, able to be put under vacuum and ran. So in effect I need to store up to 200 or 300 consecutive scans of the 2072 pixels, not on the arduino obviously, but on external memory as Mike suggested.

You might look into an SD adapter or shield and putting the works into a jar or possibly potted in clear acrylic or other highly transparent plastic.

It almost sounds like this device might get sent into orbit....

GoForSmoke:
It almost sounds like this device might get sent into orbit....

I wish.

No, it's going to be stuffed into a centrifuge tube and whirled around.

If you are looking for anything approaching high vacuum then outgassing will be a major problem, as Mike says. I worked with electronics and high vacuum many years ago, and I chose to keep the electronics on the non-vacuum side and feed the connections through metal-in-glass feedthroughs. Unless you need high bandwidth, I suggest you do something similar.

How fast do you need to do the scans? The ADC on the Arduino takes around 110us per conversion if you are using the full 10 bits resolution, so your maximum sampling rate will be less than 9KHz unless you sacrifice some resolution. If that's not fast enough, you need to use a faster external ADC. If it is fast enough, then IMO you don't need to use a buffer from a loading point of view. Unfortunately, the datasheet gives very little information on the range of the output signal, beyond saying that the "Saturation output voltage" is 1100mv, which is highly ambiguous (e.g. it's not clear whether this is the lower or upper limit of the output voltage). So it's hard to say whether it matches the input range of the Arduino ADC well enough. You may need to drive the device with the appropriate signals and use an oscilloscope to see what the output does.

btw I think this is the most poorly-written datasheet I have come across in a long time. Perhaps there is an application note for this device?

so I’m going with a circuit like this in order to get a -4 V and two 8 V sources (or an 8 V and a 4 V)

circuit.png

No, you appear to have misunderstood my sketch:

  • the diode/capacitor arrangement generates -4v

  • the transistor with the 47K base resistor show you how to convert the Arduino 5v signal to an 8v signal, assuming you have an 8v supply available. You need 2 of these, one for driving the reset gate (RG) and one for drivng the transfer gate (TG)

  • the other transistor shows how to generate a signal that goes from -4v to either +4v for the anti blooming gate or +8v for the photo gate. Again, you need to duplicate this circuit.

To generate the other voltages, I suggest you start with a 12v regulated supply. That can feed Vdd for the photodiode array and also the Arduino through the barrel jack or Vin pin. To generate the +8v and +4v, either use LM317LZ voltage regulator chips, or it may be that voltage dividers will suffice because the current requirement is small.

Some of the clock pins have a high input capacitance, so I think active pullup may be required, which involves using a few more transistors. I'll post an updated suggested schematic when I have more time.

you're the man

Here’s a schematic with active pullup as well as pulldown. This also means you can use voltage dividers to get the +8v and +4v signals. I can’t guarantee this will work, it depends on what rise and fall time is needed for the clock signals. You will need to repeat the two transistor driver circuits to get drive signals for all 4 gates.

ok I’ve attempted again to draw the two circuits to make sure I am understanding what you are doing here.

For the top circuit (for TG or RG) used to switch from 0V to 8V, it looks like you have it at ~8V when arduino OUT pin is pulled LOW and at ~0V when the arduino OUT pin is pulled HIGH…

The bottom circuit is still a bit of a mystery to me. What is the combination of HIGH/LOW for the PWM and arduino OUT to get the voltages to swap between -4.4V and 8V?

schematic.tiff (25.3 KB)

rcarney:
ok I've attempted again to draw the two circuits to make sure I am understanding what you are doing here.

For the top circuit (for TG or RG) used to switch from 0V to 8V, it looks like you have it at ~8V when arduino OUT pin is pulled LOW and at ~0V when the arduino OUT pin is pulled HIGH...

Correct.

rcarney:
The bottom circuit is still a bit of a mystery to me. What is the combination of HIGH/LOW for the PWM and arduino OUT to get the voltages to swap between -4.4V and 8V?

PWM should be set to 50% all the time so that the -4.4v supply is always present. High on the OUT pin connected to the 91K resistor will pull the output down to -4v, LOW will pull it up to +8,v or to 4v (for the AB gate) if you change the values of the resistors as indicated in my hand drawn schematic.