6 Replies Latest reply on Dec 9, 2013 1:50 PM by aaron.visser

    PSOC4 ADC of 2048bit linear sensor at 200kHz

    aaron.visser

       Wondering if anyone can point me in the right direction for this problem.  I need to record the analog voltage level for 2048 pixels on a linear sensor.       http://www.hamamatsu.com/resources/pdf/ssd/s11639_kmpd1136e04.pdf
       

         

      My circuit for controlling and reading data from the sensor is working great. I can hardware trigger the ADC from a trigger signal from the sensor, and I can control the clock rate of the sensor between 200kHz and 10MHz, so I should be able to run the ADC fast enough to get data from each pixel.

         

      What's the best(most efficient or fasted) way of storing that data from the sensor/ADC?  For some reason it feels like my solution is bogging down responding to the ADC's interrupts. The slowest the hardware trigger for the ADC will run is 200kHz...and I need to get the data for every hardware trigger.

         

      Thanks for any help/advice/whatever.

         

       

         

      Aaron

        • 1. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
          user_1377889

          Since the PSoC4 doesn't have a DMA-channel you will have to use "Poor Man's DMA" which means transferring data with the help of the CPU. Additionally the restricted amount of sram throws up the question what you are going to do with the digitized data. Sending them via USB to a PC?

             

          How much time may you spend after digitizing? How many bytes sram has a PSoC4 got? Any mis-matches you can see?

             

           

             

           

             

          Bob

          • 2. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
            aaron.visser

             In the ultimate solution, I would do some analysis of the digitized data on the PSOC, but right now I'll just be sending it to the PC over UART/USB.

               

            There's no time limit once the data has been captured, so I can capture data and then wait while the data goes to UART.

               

            And actually, I was just playing with it, and it looks like the lower clock rate limit is more of a limit for the integration time period, not reading the data out of the pixels.   

               

             

               

            Oh... PSOC4 has 4KB of SRAM...hmmm... I won't even be able to store the full 2048 pixels even if they are only UInt16s...

            • 3. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
              user_1377889

              Fine, this is settled.

                 

              Now, when you stick to the project's solution you will have to look for something more powerful.

                 

              PSoC4 was made for small projects which are covered by PSoC1 as well and the pricing for larger quantities is really low.

                 

              The PSoC5 Development Kit comes with 64kB sram, 256kB flash, 2k EEProm, 24 (instead of 2) UDBs. So when you are looking for a solution that does not get limited by the properties of the device, you will have to look for something bigger.

                 

               

                 

              Bob

              • 4. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
                user_1377889

                By the way...

                   

                When you look at the "Photoresponse Nonuniformity" in your sensor's datasheet (which is given as typ. 2%) you can see that an 8-bit conversion already woud get near the resolution's limit.

                   

                 

                   

                Bob

                • 5. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
                  user_14586677

                  Due to worst case non linearity you might as well throw the bottom 10 bits away.

                     

                   

                     

                  In fact at +/-10% worst case response, ~ 2 bits, design begs for a periodic cal cycle with

                     

                  a fixed source, and error curve fit computation performed over the row before

                     

                  sending out to serial interface. Note PSOC 4 has a 32 x 32 single cycle multiplier so

                     

                  curve fitting functions, like power f() or least squares would execute fast.

                     

                   

                     

                  Regards, Dana.

                  • 6. Re: PSOC4 ADC of 2048bit linear sensor at 200kHz
                    aaron.visser

                     Thanks Bob and Dana!

                       

                    Dana,  I might be a bit over my head now. Lol. But what else is new.  But all those keywords should give me a good place to start my further research.

                       

                    Aaron