CCD sensor raw data reading

1.Experimental Purpose

Understand the working principle of CCD and the impact of working environment

2.Introduction to CCD linear sensors

2.1 A simple overview

The model of the CCD sensor for this module is TSL1401, which is a linear sensor composed of a 1x128 photodiode array, related charge amplification circuits, and an internal pixel data retention function. The array consists of 128 pixels, each with a photosensitive area of 3524.3 square micrometers.

2.2 The working principle of linear CCD

The collection timing triggered by this module is shown in the figure: image-2023021500001

conclusion:

3.Experimental wiring

1.The wiring of F103C8T6/RCT6 and linear CCD module is as follows

STM32/GD32CCD
PA3CLK
PA4SI
PA5AO
VCCVCC
GNDGND

2.F103C8T6/RCT6 and serial port wiring are as follows

STM32/GD32USB-TTL
PA9RXD
PA10TXD
GNDGND

If it's enough to buy our black STM32 and GD32, you don't need to use TTL modules, just use a type-c data cable

The configuration of the serial assistant is image-2023021500004

4.Experimental phenomena

The content output by the serial assistant can be seen, outputting 128 data at a time. image-2023021500005

The source code of this tutorial is relatively simple and will not be interpreted. Interested friends can learn it on their own.

5. experimental result

Placing the sensor on the same white paper and changing the brightness of different lighting can result in significant differences in the results obtained. As shown in the following figure: image-2023021500002 image-2023021500003 From this, it can be seen that the sensor is highly affected by environmental conditions, and it cannot function properly in environments that are too dark or too bright (usually normal indoor light can operate).