当前位置:网站首页>Sensor debugging process
Sensor debugging process
2022-07-03 18:11:00 【A special pig...】
“ On a daily basis , We got a new sensor, Generally, it is lit first , Then debug the effect . But there is also a process for lighting and debugging , It needs to be completed step by step according to the process , This article summarizes , About sensor A general process from lighting and plotting to effect debugging . If you think there is something wrong with the text , Or something unclear , Welcome to contact and point out .”
1、Sensor Debugging process

2、 Prepare the material
Confirm the specification of the main chip
Maximum resolution supported 、mclk、mipi Upper rate limit 、 Supported by lane Count 、 Supported by raw Image bit depth 、 Supported by raw Image type (mono/rgb/rgbir)
Hardware schematic diagram
Debug on the customer's motherboard , The customer needs to provide the schematic diagram of the motherboard ; Debugging on the platform board , You need to provide the schematic diagram of the module adapter board 、 Schematic diagram of corresponding male board .
Sensor datasheet
Confirm exposure time 、 How to set the gain , How to modify the frame rate ; confirm WDR The output mode ( Whether it is dol Pattern / dol_virtual channel/ dol_lineinfo).
Initialize setting
towards sensor The specification required by the original factory application sensor setting , Contains information about :mclk、mipi Upper rate limit 、 The resolution of the 、mipi_lane Count 、 Frame rate 、 Output raw Image bit width 、 Plot mode (linera/wdr) .
3、 Configure driver
Good configuration i2c Address 、sensor setting、sensor chip_id;
According to the schematic diagram of the motherboard , stay dts Middle configuration mclk、reset、pwrdn、i2c Pin control , Configure... In the driver sensor pwrdn,reset Pull up and down 、 Power on sequence ;
Other configuration , It needs to be configured according to different platforms , Generally, if there is no problem with the hardware to complete the above configuration , You can light up the map .
4、Sensor Draw a picture
step 3 After completion , If the hardware is ok , Generally, you can plot
if I2C no , It is necessary to check the hardware related problems of the lower board :
1)、 confirm AVDD DOVDD DVDD Hardware voltage
2)、 Confirm according to the schematic diagram reset、pwrdn、i2c、mclk Pin control and voltage value
3)、 confirm mclk frequency
4)、 confirm sensor Power on sequence
If the plot is abnormal ( Image split 、 dislocation 、 Display incomplete ....);
1)、 pat raw chart , confirm raw Whether the diagram is normal .
2)、 if raw The picture is also abnormal , Input the order and check mipi Whether there is an error in the transmission 、 Measure with an oscilloscope mipi wave form , If it's normal , That's usually sensor setting There is a problem , Want to find sensor I went to see the original factory .
3)、 But if raw Figure normal , It should be the driver or ISP What's wrong with the configuration of , Continue to check .
For details, please refer to this article :Sensor bringup Summary of some problems in
5、AE To configure
As shown in the figure above ,AE It is divided into algorithm module and statistics module , The algorithm module is a pure software module . So there are many brand manufacturers , Although using the same platform , But in order to make differentiated products , They are all developed by ourselves 3A Algorithm .AE The statistics module is hardware related , Included in ISP pipeline in .
AE The whole control process , As shown in the above schematic diagram ,AE The algorithm controls a set of exposure parameters ( time of exposure 、sensor Analog gain 、sensor Digital gain 、isp Digital gain ), configured sensor Drive write to sensor In the register (isp dgain Is written directly to the corresponding isp In register , Not through sensor Drive to control ), Output image data .
Data after AE Statistics module , Give the brightness statistics to AE Algorithm module , Again, a group of exposure parameters are calculated in real time , Until the exposure is correct , The cycle is over . When it is powered on for the first time , It's from sensor The driver starts loading , The driver contains a set of default initialization parameters , It can light up the map .
that sensor How to configure in the driver AE ?
1>、 First, configure the exposure time
according to sensor datasheet Configure the maximum and minimum integration time , And then AE Calculated exposure line , Write to the corresponding register that controls the exposure time . Here we are talking about line by line exposure sensor, It is exposed by line , Integral time is relative time ,exposure_time = integration_time * line_time( One line of time ).
2>、 To configure sensor Analog gain 、 Digital gain
Generally, we only need to configure sensor Analog gain is ok , No digital gain , But it will use isp Digital gain , It is AE Algorithmically controlled , No use sensor Configure in the driver . To sum up , About sensor Analog gain control , Generally divided into 3 In the form of .
One is to write sensor again There are specific requirements for the value of the register , There will be one. again_table, Configure the platform and Sensor The matching accuracy of ( Corresponding to several times of gain , What value should be written ), Through investigation again_table write in . Generally, it's from Stevie and gekewei again To configure , All of them need to look up the table and write , The following is sc230ai datasheet Medium again_table .
The other is , write in sensor again The value of the register is continuous , Configure the platform and Sensor The matching accuracy of , Put the platform AE Calculated again Value write sensor that will do . The following is ov08a10 Of again To configure ,0x3503[2]=0 ,real_gain=Gain[12:0]/128, The accuracy is 128,[0-7] Is to configure decimal places ,[8-12] Is to configure integer digits ;0x3503[2]=1, Gain[12:0], Only integer digits 1x,2x,4x,8x .

The latter is as follows imx335 Shown , write in sensor again Register value , It is required to convert into dB write in , It is not written in the way of gain multiples , It's nonlinear , Put the platform AE Calculated gain Value to dB Form write sensor register ;
3>、 Verify whether the exposure and analog gain are configured correctly
Finally, we need to manually control the integration time through the debugging tool 、 Analog gain writing , Then read sensor The value of the corresponding register , To determine whether the written data is correct , To check whether the relevant configuration in the driver is correct .
6、 Image verification
Increase the gain and exposure , Verify whether there is power noise /FPN: As shown in the figure below , Horizontal stripes are generally related to hardware , The vertical stripes are and sensor relevant , Looking for hardware and sensor People from the original factory went to see .
Confirm the lens quality : shooting ISO22233 Analyze the force card raw chart , If the focus of the picture card is not clear , Blurred around , Or one side alone is blurred , Then there is a problem with the lens quality , Need to change the lens .
7、 Image quality tuning
Refer to this article :ISP Overview of commissioning process
边栏推荐
- Implementation of Tetris in C language
- Win32: dump file analysis of heap corruption
- Applet with multiple tabs and Swipers + paging of each tab
- This diversion
- The second largest gay dating website in the world was exposed, and the status of programmers in 2022
- Life perception 1
- How to deploy applications on kubernetes cluster
- Global and Chinese health care OEM and ODM market status survey and investment planning recommendations report 2022-2028
- [combinatorics] generating function (use generating function to solve the number of solutions of indefinite equation)
- An academic paper sharing and approval system based on PHP for computer graduation design
猜你喜欢
Implementation of Tetris in C language
PHP MySQL inserts data
How to expand the capacity of golang slice slice
Research Report on market demand and investment planning for the development of China's office chair industry, 2022-2028
面试官:值为 nil 为什么不等于 nil ?
Deops入门
As soon as we enter "remote", we will never regret, and several people will be happy and several people will be sad| Community essay solicitation
AcWing 271. Teacher Yang's photographic arrangement [multidimensional DP]
How do microservices aggregate API documents? This wave of operation is too good
(8) HS corner detection
随机推荐
PHP MySQL inserts data
Mature port AI ceaspectus leads the world in the application of AI in terminals, CIMC Feitong advanced products go global, smart terminals, intelligent ports, intelligent terminals
Computer graduation design PHP campus address book telephone number inquiry system
The number of incremental paths in the grid graph [dfs reverse path + memory dfs]
网格图中递增路径的数目[dfs逆向路径+记忆dfs]
Image 24 bits de profondeur à 8 bits de profondeur
Change the single node of Postgres database into master-slave
[vscode] convert tabs to spaces
Fedora 21 安装 LAMP 主机服务器
Bidding procurement scheme management of Oracle project management system
面试官:值为 nil 为什么不等于 nil ?
Lesson 13 of the Blue Bridge Cup -- tree array and line segment tree [exercise]
English語法_名詞 - 分類
Leetcode540: a single element in an ordered array
Postfix 技巧和故障排除命令
Redis core technology and practice - learning notes (11): why not just string
圖像24比特深度轉8比特深度
分布式的任务分发框架-Gearman
Enterprise custom form engine solution (12) -- form rule engine 2
Computer graduation design PHP makeup sales Beauty shopping mall