front TCD1304AP CCD Sensor
Authors: J. Bajić 
2019 03 29 172747 

This project presents a simple demo of TCD1304AP CCD linear array sensor readout. TCD1304AP is high sensitivity CCD sensor with an array of 3648 light sensitive pixels. This CCD sensor generates analog output and it can be easily connected to microcontroller (MCU) using only few interface lines and minimal to none additional components. However, data rate at analog output is relatively high so it is wise to use more powerful or higher performance MCU with high operating frequency. TCD1304AP CCD sensor can be used for building spectrometers, bar code scanners, range finders, etc.

In this demo project mini-32 for PIC32MZ small development board from Mikroelektronika is used for sensor readout. This board has a high-performance PIC32MZ EF series MCU which is fully supported by the MPLAB® Harmony integrated software framework. More precisely board contains PIC32MZ1024EFH064 MCU with 1MB flash, 512KB SRAM memory, core performance of up to 200 MHz and number of peripheral options. In addition to the mini-32 for PIC32MZ, OPA340PA rail-to-rail operation amplifier is used for sensor analog signal conditioning.

ccd                     pic32mz

Firmware provided below is built using MPLAB Harmony framework. Firmware is built around timer modules using only few lines of code (in image gallery below oscilloscope screenshots of important signals obtained during development are provided). Upon power up MCU starts data acquisition from TCD1304AP sensor. Acquired data can be transferred to PC using USB peripheral configured in CDC mode (COM port emulator with 256000 baud rate). If “GET” string is received by MCU, data transfer is initiated. Using “SET” command followed by 4 bytes sensor integration time, vertical resolution (number of bits per pixel) and number of measurement points (pixels) can be set. First two bytes represent integration time (valid range 1-65535), third byte represents horizontal resolution (valid 0-5), while fourth byte is vertical resolution (valid range 0-3). For acquired sensor data visualization and configuration LabVIEW virtual instrument is provided below.

Demo project is built using following ecosystem:

  1. MINI-32 For PIC32MZ starter boards by Mikroelektronika.
  2. MPLAB X IDE v6.05 - Integrated Development Environment by Microchip.
  3. XC32 v3.01 free compiler version for 32-bit MCUs by Microchip
  4. MPLAB Harmony v3 - Embedded Software Development Framework for 32-bit by Microchip.
  5. PICKIT 3 In-circuit debugger

PROJECT FILES&DOCS:

- TCD1304AP datasheet: link
- PIC32MZ datasheet: link
- Project schematic: pdf
- Firmware source code on github: link
- LabVIEW VI: zip
- Demo video on youtube: link

 

IMAGE GALLERY:

  • labiewlabiew
  • img1img1
  • img2img2
  • schematicschematic
  • 1_10us_int_T1_10us_int_T
  • 2_50us_int_T2_50us_int_T
  • 3_1000us_int_T3_1000us_int_T
  • 5_analog_output5_analog_output
  • 4_50000us_int_T4_50000us_int_T

VIDEO GALLERY:

© - Faculty of Technical Sciences, Novi Sad, 2016