当前位置:网站首页>As7341 spectrum sensor measures color temperature color_ temperature_ Study notes
As7341 spectrum sensor measures color temperature color_ temperature_ Study notes
2022-07-21 20:18:00 【LiangWF22】
AS7341 brief introduction
(1) Its spectral response is defined at about 350nm to 1000nm Wavelength range , Eight optical channels cover the visible spectrum , One channel can be used to measure near-infrared light (NIR), One channel is a photodiode without a filter (C). The combination of near-infrared light channel and other visible light channels can provide ambient light conditions ( The light source ) Detected information .
(2) The six channels can be independent 16 position ADC parallel processing , Other channels are accessed through multiplexers .
(3) The device also integrates a dedicated channel , Can be detected 50Hz or 60Hz Ambient light flashes , The flicker detection engine can also be used to buffer data when calculating other flicker frequencies externally .
(4) The device can also pass through pins GPIO Synchronize with external signals .
(5) Small size and low power spectral sensor .
Measurement principle
We can use it directly AMS The correction data of mass production of sensors provided and based on CIE1931 Of XYZ Modify the matrix to calculate the color temperature ,XYZ The correction matrix is shown in the following table 2.CIE1931XYZ In the primary color system X、Y、Z The value of can be calculated according to the following formula (3):
CIE1931xyz Relative coefficient in color space x、y、z The following formula can be used (4) Calculation :
Color temperature calculation formula :
Color temperature detection function
// Need a parameter :spectraNum[10] Array
//spectralNum[10], Stored F1-F8 and Clear,NIR The data of
int color_temperature(unsigned int *spectralNum)
{
float X,Y,Z,x,y,n,cdc;
X=0.39814*spectralNum[0]+ 1.29540*spectralNum[1]+ 0.36956*spectralNum[2]+ 0.10902*spectralNum[3]+ 0.71942*spectralNum[4]+ 1.78180*spectralNum[5]+ 1.10110*spectralNum[6] -0.03991*spectralNum[7] -0.27597*spectralNum[8] -0.02347*spectralNum[9];
Y=0.01396*spectralNum[0]+ 0.16748*spectralNum[1]+ 0.23538*spectralNum[2]+ 1.42750*spectralNum[3]+ 1.88670*spectralNum[4]+ 1.14200*spectralNum[5]+ 0.46497*spectralNum[6] -0.02702*spectralNum[7] -0.24468*spectralNum[8] -0.01993*spectralNum[9];
Z=1.95010*spectralNum[0]+ 6.45490*spectralNum[1]+ 2.78010*spectralNum[2]+ 0.18501*spectralNum[3]+ 0.15325*spectralNum[4]+ 0.09539*spectralNum[5]+ 0.10563*spectralNum[6]+ 0.08866*spectralNum[7] -0.61140*spectralNum[8] -0.00938*spectralNum[9];
x=X/(X+Y+Z);
y=Y/(X+Y+Z);
n=(x-0.3320)/(0.1858-y);
cdc=437*n*n*n+ 3601 *n*n +6831 *n+ 5517;
return (int)cdc;
}
Reference article
[1] Wang Wei .AS7341 Analysis and research of spectral sensor [J]. Electronic testing ,2021(13):59-61.DOI:10.16520/j.cnki.1000-8519.2021.13.018.
边栏推荐
- Original code, inverse code, complement and logical operation "and or not"
- Detailed explanation and use of swagger
- 1.从零开始学习paddlepaddle之环境安装与基础计算
- mac brew install mysql 安装步骤
- Nacos-配置中心原理解析
- Wechat public number Development Access, Application for Test number for Local Development Using Wechat public Platform
- 【ol-cesium】OpenLayers与Cesium的二三维联动
- Jenkins plug-in development - provide external access interface
- Exclusive locking of this profile failed. Another running VMware process may be using a profile.
- 1451 - cannot delete or update a parent row has multiple foreign key constraints to delete the data rows of the sub table
猜你喜欢
[404] the server starts successfully, and the default page cannot be accessed
【PCB】基于合泰HT32F52352芯片电路板绘制实验(WiFi及光传感模块)-画板笔记
汇编语言大作业
Gaode map API obtains the surrounding information corresponding to the current location
1451 - cannot delete or update a parent row has multiple foreign key constraints to delete the data rows of the sub table
【404】服务器启动成功,默认页面无法访问
[3D modeling] SolidWorks 3D modeling and prusaslicer slice printing learning notes
Database design introduction to database system (Fifth Edition)
How to successfully get offers from ant, jd.com, Xiaomi, Tencent and other major manufacturers
Nacos-配置中心原理解析
随机推荐
Idea2020 open run dashboard
Annotation related learning
Linux Redis-6.2.6单机部署
【PCB】基于合泰HT32F52352芯片电路板绘制实验(WiFi及光传感模块)-画板笔记
3.从零开始paddlepaddle之基本模型构建(与keras和pytorch比对)
Jenkins plug-in development - provide external access interface
批量去除文件名中的空格,替换数据库中存储数据的空格
【ol-cesium】OpenLayers与Cesium的二三维联动
针对部分软件无法开机自启动情况的解决措施(已解决)
Web.Config自定义类的读取
【PCB】基于STM32F103RCT6摇杆-蓝牙模块开发板-画板笔记整理
Fluent customizes form and encapsulates form components
LeetCode 76. Minimum covering substring sliding window method
pytorch安装
转换String三种方式比较:(String)、toString()、String.valueOf()
Object copying tool class (fastjson)
【PCB】Altium Designer 中(Via过孔)(文本string)(走线Linear Dimension)等项目修改默认设置
解决Oracle数据库查询单表排序顺序错误问题之一
Character function and memory function
基于STM32F407的摄像头(不带FIFO的OV7670)图像采集及LCD显示实验-笔记整理