More average

I’ve not yet discovered any bugs in the march updates of the TCD1304-driver firmware, but that doesn’t mean there’s no room for improvement.

For instance, the time to capture a dataset can be as short as 15 ms + integration time,  but transmission of the same dataset takes more than 642 ms.¹  So if you want to average just two readings, it will take you at least 1.3 s regardless of the integration time.

Wouldn’t it be wonderful if the firmware could handle averaging on it’s own? Well, now it can. You can request from 1-15 integrations, which will then be collected, averaged and sent back to your pc (in that order).

The CCD isn’t flushed between readings as the integration time is the same for each collection. That means you’ll save up to:

15·(15 ms + 642 ms) = 9855 ms

that you can spend doing things you love. But wait, there’s more! To actually make it work the CLI has also been updated:

TCD1304-driver firmware (UART) [sep. 10th 2017]

Otterly CCD CLI (sep. 10th 2017)

On an entirely different note, I’ve changed laptop, and somehow it has broken the Otterly CCD GUI. (Well to be fair it was held together with chewing gum and duct tape.) The program’s not exactly beautiful – not on the outside and certainly not on the inside – but I will clean up the communication functions in the coming days.

Oh and I almost forgot. Here are two captures from my OtterVIS with the new firmware:


One single integration.


Fifteen integrations averaged.

There are all sorts of artifacts present in this spectrum of an incandescent bulb, so it’s not so easy to see the improvement. I will see if can find it in my heart to make a better example.

1 The 15 ms goes to flushing the CCD. The 640 ms is because the UART runs at 115.2 kbps.


2 thoughts on “More average

  1. Colin Brosseau says:

    This is a really nice project. I can’t wait to see the next step. The last post seemed a bit hardcore for me (anodizing Al).

    I’m not sure I get the whole idea of this post. What I get is that reading (CCD>TCD1340) is fast (15 ms). The slow part is in communication between TCD1340 and the PC (~640 ms).

    Have you tough about oversampling ( This would be interresting to increase the bit depth of the detection. This is nothing but a sophisticated mean.

    Have you tough about spectral intensity calibration? You use a known spectrum to calibrate your system. Hot filament of tungsten is often used. The “only” thing you need to know, is the temperature of the filament.


    Colin Brosseau


  2. Hi Colin
    Thanks, I enjoy the project as well 🙂

    This post is really just a firmware-update notice, and there aren’t really any other points than the ones you already got.

    Actually reading the CCD takes only:
    3694 · 4 / 2.0 MHz = 7.4 ms
    but due to the way an acquisition is set up in the firmware, there’s an overhead of 14.8 ms to flush the CCD twice. So one read is actually:
    14.8 ms + Integration time + 7.4 ms + 642 ms

    This can be faster. You can compile the firmware with an MLCK of 4.0 MHz, then it’s:
    7.4 ms + Integration time + 3.7 ms + 642 ms

    And finally you can use the SPI-firmware instead, then the 642 ms shrinks to 4.2 ms

    I should definitely read more about signal processing. The stuff I don’t know about that could fill a warehouse. I’m not sure how one would oversample the CCD-output, or what’s better: to sample each pixel for as long as possible, or sample each pixel as many time as possible?

    One thing I’m also not sure about is if a simple average is actually the best way to treat the data?

    I have never thought of (or heard of) spectral intensity calibration before. I will keep it in mind for when I actually have a spectrograph (the little OtterVIS doesn’t count and will have to settle for wavelength calibration – which Jens-Ulrich Fröhling put into his GUI for the TCD1304-firmware:


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.