Shop OBEX P1 Docs P2 Docs Learn Events
Help with TSL1401-DB Pixel values — Parallax Forums

Help with TSL1401-DB Pixel values

mclparkermclparker Posts: 15
edited 2011-08-27 21:59 in Accessories
Hi again Phil,

I am using the TSL1401-DB, MoBoStamp-pe, and your pixel readout code [from a previous post] in my shiny new homemade spectrometer.
I use PLX-DAQ for pixel number vs pixel value, and a 12 bit data acquisition system [LabJack DAS] connected directly to the TSL1401-DB AO pin to get volts vs time.
I notice that the voltage magnitudes from the data acquisition system don't correleate as well as I expected when multiplying the pixel output from the pixel value multiplied by reference voltage/255 [although the curve shapes do correlate nicely]. For instance, in one case using the pixel conversion formula yields .9 volts from PLX-DAQ vs 1.3 volts from the DAQ.
The input impedance to the DAS is around 10 meg so I don't imagine the DAS is loaded down too much, but I may be wrong.
The error due to 8 bit vs 12 bit is only .5% or so, so this doesn't seem to be the error source.
Can you help me figure out where the error might be?

Mike

Comments

  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-08-25 08:56
    Mike,

    You may simply be experiencing the difference between real and ideal ADCs. The combined accuracy error (incl. gain, offset, differential non-linearity, etc.) in the Tiny13 can be as high as 3 LSBs. I don't know what it is in the LabJack, but it could account for the discrepancy you're seeing. If you could take an exposure that includes minimum and maximum values, then do a scatter plot of the MoBo outputs vs. the LabJack outputs, you would better to be able to discern where the error is coming from.

    Also, if you're powering the MoBo from the USB port, you should use a Vdd of 3.3V to get the best accuracy from the Tiny13's ADC, since it uses Vdd as the reference for the 1401. The 5V Vdd from the USB can be as low as 4.2V.

    Next, if the Labjack's analog circuitry and the MoBo share a common ground with your PC, you might be seeing the effects of a ground loop.

    Finally, how are you triggering the LabJack to read each pixel value? If it's not reading at the same time (esp. if it's reading during a transition between pixels) you may get bad readings. Also, if the cable going to the LabJack is picking up and introducing noise into either or both readings, that would lad to a discrepancy, too.

    Hopefully, the discrepancy is deterministic (gain, offset, etc.) and can be calibrated out, rather than random (noise).

    -Phil
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-08-26 18:04
    mclparker wrote: »
    ...

    I am using the TSL1401-DB... in my shiny new homemade spectrometer.....

    Mike,

    this sounds like a pretty cool project. What are you using for a source of illumination?
    A couple months ago, I, too, was building a DIY spectrometer but got derailed when a dumpster dive scored me a Beckman that I was able to bring back from the grave with a Propeller chip and lots of help from the forum. If you have any links to your DIY project, please do share. Or, if you haven't already started a blog some where, you can always start one on this site. My revived Beckman uses a Propeller chip to display data on a VGA and write the scan data to an SD card.
  • kwinnkwinn Posts: 8,697
    edited 2011-08-26 22:35
    ElectricAye, I remember that thread. Any chance you could revive that thread and post the results of your project, or place it in the projects forum? I for one would be interested.
  • ElectricAyeElectricAye Posts: 4,561
    edited 2011-08-26 23:23
    kwinn wrote: »
    ElectricAye, I remember that thread. Any chance you could revive that thread and post the results of your project, or place it in the projects forum? I for one would be interested.


    Sure, I can do that. I can't say I've had the chance to use it a lot to wring out any bugs that are probably lurking in the code, but it seems to work fairly well for what I tested it on. Tomorrow we get hit by the hurricane, though, so I'm not sure I'll get it posted until after Irene is past and the power gets back on. I live in a somewhat rural area prone to trees falling across power lines and the power people keep the cities a priority. The bridges to where I live were washed out by a hurricane circa 1993 and were never replaced with proper bridges - just Army Corps temps that are sure to float down river again. So it might be a while, assuming everything here doesn't get sucked up into a tornado.
  • kwinnkwinn Posts: 8,697
    edited 2011-08-27 21:59
    I hope you get through the hurricane safely and with no or at least minimal damage. Look forward to your next postings.
Sign In or Register to comment.