当前位置: 首页 > news >正文

专业做淘宝网站绍兴做网站优化哪家公司好

专业做淘宝网站绍兴,做网站优化哪家公司好,宁波网络公司报价,企业网站制作策划书PCAP01超高精电容传感芯片STM32LabView可视化 文章目录 PCAP01超高精电容传感芯片STM32LabView可视化一、PCAP01介绍1.1、PCAP01引脚定义1.2、电容测量1.3、温度测量1.4、PCAP典型测试电路 二、PCAP01的STM32驱动2.1、SPI协议配置2.2、PCAP01浮空电容测量内部温度测量操作流程 …

PCAP01超高精电容传感芯片+STM32+LabView可视化

文章目录

  • PCAP01超高精电容传感芯片+STM32+LabView可视化
    • 一、PCAP01介绍
      • 1.1、PCAP01引脚定义
      • 1.2、电容测量
      • 1.3、温度测量
      • 1.4、PCAP典型测试电路
    • 二、PCAP01的STM32驱动
      • 2.1、SPI协议配置
      • 2.2、PCAP01浮空电容测量内部温度测量操作流程
    • 三、制定串口通讯协议
    • 四、LabView上位机

一、PCAP01介绍

PCAP01Ax_0301是ACAM公司推出的一款单芯片电容测量方案集成芯片。该芯片集成了电容测量部分以及片内哈弗架构DSP,可以实现至高500kHZ的超高速电容测量以及数据处理。在温湿度传感、动力学传感器、MEMS、液位传感器、触摸检测等领域具有广阔的应用前景。

本文章将抽丝剥茧的从70多页的英文文档中梳理出该芯片的配置过程。

1.1、PCAP01引脚定义

在这里插入图片描述

引脚描述
BUFFCAPConnect microfarad bypass capacitance and nanofarad bypass capacitance to GND. Bridge all BUFFCAP pins. Bypassing is mandatory! (简言之:该引脚需要与所有BUFFCUP引脚相连,并且必须对地连接uF级别和nF级别的电容进行去耦,一般选择4.7uF和100nF)
GNDGround
IIC_ENPut this to LOW or GND for use of SPI bus. Put it to HIGH or VDD otherwise.(简言之:拉低该引脚启用SPI)
INTNOptional. Interrupt line, low active
MISO_PG1Serial interface data line, Master In - Slave Out (SPI only, otherwise available as general-purpose port)(简言之:SPI通讯线)
MOSI_SDASerial interface data line, Master Out - Slave In(简言之:SPI通讯线)
OXIN&OXOUTMay be left open. Very exceptionally used for connecting a 4 to 20 MHz ceramics resonator or quartz.(简言之:外部晶振接口,一般不接)
PC0-PC7“CDC” or capacitive measurement ports. Connect reference and sensors here, beginning with PCØ for the reference.(简言之:电容检测引脚)
PCAUXMay be used for external discharge resistor.(外接泄压电阻)
PG2-PG5General purpose I/O ports. PG4 and PG5 are output only, others are configurable input or output.
PT0-PT1“RDC” or temperature measurement ports. Connect one side of the external resistive sensors here.
PT2REFWhen there is an external resistive (temperature measurement) reference, connect it here, otherwise this is the place for a third resistive sensor.(外接参考电阻)
PTOUTFor temperature measurement, connect the other side of the resistive sensors and a 33 nF ceramics capacitor here.(简言之:温度测量时,需要将该引脚通过33nF的电容进行接地!这是必须,电容值必须33nF)
SCK_SCLSerial interface clock line(SPI的时钟线)
SSN_PG0SPI interface chip select line, low active. Alternatively general purpose I/O port.(简言之:SPI的片选信号线,拉低表示选中该芯片)
VDDVDD here, plus bypass capacitance to GND. Bypassing is mandatory!
VPP_OTPSet to 6.5 V during OTP programming. Set back to GND rapidly after the end of the programming process. Keep pin grounded for normal device operation. Apply a 470 kOhm pull-down resistor to this pin.(简言之:在OTP编程的时候接上6.5V,变成结束迅速拉低,正常使用时应当拉低)

需要注意:当芯片底部中心具有焊盘时,需要将该焊盘接地

1.2、电容测量

在这里插入图片描述

该传感器通过给电容进行充电后计算其放电时间换算出电容的容值。输出的结果为: t N t r e f = C N C r e f \frac{t_N}{t_{ref}}=\frac{C_N}{C_{ref}} treftN=CrefCN.

PCAP01具有三种测量电容的方式;分别为浮动测量方式、接地测量方式以及差分测量方式。这些测量方式中,都规定C0为参考电容,因此该芯片最多支持3路浮动测量或者7路接地测量。其连接方式如下图所示:
在这里插入图片描述

根据PCAP01的测量原理可知,要获得精确的测量结果,就要求参考电容的精度足够高。并且当使用长线进行电容测量时,需要使用屏蔽线,并将屏蔽线缆接地。同时、PCAP01具有内部和外部补偿测量模式、启用后可以消除内部和外部电路电阻的影响。

1.3、温度测量

在这里插入图片描述
PCAP01支持内部和外部温度测量两种模式,在一般的应用场景下,内部的温度传感器已经符合要求。如图3-14所示为外部测量模式、该模式下需要外接一个热敏电阻PT1000以及一个超低温漂的参考电阻。如果使用内部模式、PCAP内部具有一个2800ppm/K的热敏电阻以及一个温漂接近0ppm/K的参考电阻,直接悬空PT0以及PT2REF即可。

1.4、PCAP典型测试电路

在这里插入图片描述
本电路为浮动模式电容测量以及内部温度测量、使用SPI进行通讯。

二、PCAP01的STM32驱动

PCAP01首先需要写入固件,芯片才能正常运行。官方提供了两个版本的固件给用户选择,有能力的也可以自己编写。固件地址:https://www.sciosense.com/pcap01-capacitance-to-digital-conversion-digital-signal-processor/

固件写入完成后,就可以开始寄存器的相关配置,PCAP01的寄存器配置表如下所示:
在这里插入图片描述
读寄存器表:
在这里插入图片描述
在这里插入图片描述
各个寄存器的每一位代表的配置详见官方手册。

2.1、SPI协议配置

如图所示为PCAP01的SPI模式要求,在进行STM32的SPI初始化的时候应当遵照表中要求对单片机的SPI外设进行相应的配置。
在这里插入图片描述
PCAP01的SPI为标准的四线全双工SPI通讯,SSN引脚输出一个短暂的高电平使能SPI传输,随后数据随着时钟线的嘀嗒移入移出。
在这里插入图片描述
在写时序中,只需要将待写入的数据依次移出即可,但这里需要遵循PCAP01的写入规则:
在这里插入图片描述
上述的意思是,在进行寄存器写入操作的时候,单帧数据的最高两位为11,紧接着跟上寄存器的地址,例如寄存器0(Register0)的地址为0,则输出数据前八位为11000000,即0xC0。其后再接上24位寄存器的配置值。
在读时序中,需要先发送需要读取的寄存器地址,然后等待一小段间隔再发送移位信号将PCAP01相关寄存器中的数据移出。需要注意的是,发送的起始两位为01,综上所述可知,如果要读取Status寄存器的数据,应当发送的数据为:0100 1000 0000 0000 0000 0000 0000 0000,转换为16进制为:0x48000000。

2.2、PCAP01浮空电容测量内部温度测量操作流程

  1. 首先测试SPI通讯是否正常:
  2. 写入PCAP01的固件
  3. 配置各个寄存器,下面给出本例中的寄存器配置值
寄存器0:0xc04200FF (关闭OTP模式、开启程序读保护)
寄存器1:0xC1201022   (设置内部晶振频率50KHz)
寄存器2:0xc2FF460B   (开启所有电容测量通道、浮动模式、泄压电阻30kOhm,开启内外补偿)
寄存器3:0xc3030010   (CDC的循环基准20us,触发周期20*16,16次平均)
寄存器4:0xc4080111   (时钟触发电容测量,CDC cycle time 40us,温度测量280us,电容触发温度测量)
寄存器5:0xc500000A   (温度测量不平均,十次电容测量触发一次温度测量)
寄存器6:0xc6004340
寄存器7:0xc71F0000   (固定)
寄存器8:0xc8800030   (设置程序空间,以及DSP的功耗)
寄存器9:0xc9FF000F   (设置脉冲输出精度)
寄存器10:0xca180047  (设置DSP电压)
寄存器13:0xcd000007  (设置脉冲的输出数据)
寄存器14:0xce002ff0  (设置输出数据的斜率)
寄存器15:0xcf000000  (设置输出数据的偏置)
寄存器19:0xD3200000  (设置内部线性补偿,默认为1.0000,十六进制为200000)
寄存器20:0xD4000001  (芯片开始工作)
  1. 重置所有测量:SPI发送0x8A;
  2. 开始测量:SPI发送0x8C;
  3. 获取对应通道的测量值:例如:(c1/c0)SPI发送:0x41,随后开始读取
  4. 将获取的值除以0x1FFFFF,得到比例值的小数。
  5. 将小数值乘以参考电容值,得到被测电容值。
  6. 获取温度值(0x4E)(Rt/Rref);
  7. 根据公式:T=20+((Rt/Rref/0x1FFFFF)-0.824) /0.0023072;计算出温度

三、制定串口通讯协议

下位机发送协议,定长

Byte0Byte1Byte2-5Byte6-9Byte10-13Byte14-17Byte19
帧头数据长度电容1数据电容2数据电容3数据温度数据CRC校验
0x550x13

下位机接收,不定长

Byte0Byte1Byte2Byte XXXByte Final
帧头数据长度指令类型指令内容CRC校验
0xAA

四、LabView上位机

在这里插入图片描述

LabView使用的是G语言,其编程方式和C有很大的区别,编程效率个人感觉远低于C语言,但是其直观化的编程方式受到了许多科研人员的喜爱。上述为LabView的串口配置过程,通过VISA配置串口模块进行参数配置,随后进入顺序片段等待配置完成。随后就可以通过串口的VISA写入和VISA读取进行上位机与下位机的数据交互了。
在这里插入图片描述

获取到数据之后对数据协议进行解析,将解析出的数据进行校验后通过波形图进行显示。
在这里插入图片描述
点击采集和保存,通过上述的程序将传感器一段时间内的数据保存为CSV文件。
由于LabView是框图编程,程序的整体结构如下,
在这里插入图片描述
最终实现效果如图:
请添加图片描述
需要整个工程完整代码请私聊。


文章转载自:
http://dinncoberserkly.bkqw.cn
http://dinncoairpark.bkqw.cn
http://dinncocitywide.bkqw.cn
http://dinncocheckrow.bkqw.cn
http://dinncoamplidyne.bkqw.cn
http://dinncounderdrift.bkqw.cn
http://dinncoperidium.bkqw.cn
http://dinncorubato.bkqw.cn
http://dinncomechanization.bkqw.cn
http://dinncopseudogene.bkqw.cn
http://dinncoaccustomed.bkqw.cn
http://dinncorecordak.bkqw.cn
http://dinncolucre.bkqw.cn
http://dinnconegro.bkqw.cn
http://dinncotawney.bkqw.cn
http://dinncosaluretic.bkqw.cn
http://dinncospekboom.bkqw.cn
http://dinncoindependence.bkqw.cn
http://dinncomillicurie.bkqw.cn
http://dinncoscincoid.bkqw.cn
http://dinncosuperlatively.bkqw.cn
http://dinncoinhume.bkqw.cn
http://dinncoleptodactyl.bkqw.cn
http://dinncosawpit.bkqw.cn
http://dinncoozonosphere.bkqw.cn
http://dinncodeintegro.bkqw.cn
http://dinncoritard.bkqw.cn
http://dinncolestobiotic.bkqw.cn
http://dinncoichthyologically.bkqw.cn
http://dinncosigil.bkqw.cn
http://dinncosnowcat.bkqw.cn
http://dinncozed.bkqw.cn
http://dinncogeocarpy.bkqw.cn
http://dinncoannapolis.bkqw.cn
http://dinncopetiolate.bkqw.cn
http://dinncoandrocentric.bkqw.cn
http://dinncoosf.bkqw.cn
http://dinncoparellel.bkqw.cn
http://dinncoanchor.bkqw.cn
http://dinncoshotgun.bkqw.cn
http://dinncoparatyphoid.bkqw.cn
http://dinncotogated.bkqw.cn
http://dinncodemibastion.bkqw.cn
http://dinncochromophil.bkqw.cn
http://dinncocompote.bkqw.cn
http://dinncoplowing.bkqw.cn
http://dinncoenrolment.bkqw.cn
http://dinncoamphiprostyle.bkqw.cn
http://dinncografter.bkqw.cn
http://dinncobrut.bkqw.cn
http://dinncosyncopation.bkqw.cn
http://dinncojaconet.bkqw.cn
http://dinncopyruvate.bkqw.cn
http://dinncoaetiological.bkqw.cn
http://dinncogilsonite.bkqw.cn
http://dinncomonial.bkqw.cn
http://dinncotraitorously.bkqw.cn
http://dinncobloodshedding.bkqw.cn
http://dinncoquitclaim.bkqw.cn
http://dinncofrighten.bkqw.cn
http://dinncosunbake.bkqw.cn
http://dinncosecretin.bkqw.cn
http://dinncowickedness.bkqw.cn
http://dinncochukchi.bkqw.cn
http://dinncosnelskrif.bkqw.cn
http://dinncodogy.bkqw.cn
http://dinncocatalina.bkqw.cn
http://dinncoretardancy.bkqw.cn
http://dinncoyearling.bkqw.cn
http://dinncohomeoplasia.bkqw.cn
http://dinncobrumal.bkqw.cn
http://dinncointerceptor.bkqw.cn
http://dinncoeastwards.bkqw.cn
http://dinncounselected.bkqw.cn
http://dinncounific.bkqw.cn
http://dinncolovelace.bkqw.cn
http://dinncolycee.bkqw.cn
http://dinncopaced.bkqw.cn
http://dinncoalbedometer.bkqw.cn
http://dinncozapotec.bkqw.cn
http://dinncooratorize.bkqw.cn
http://dinncobedbound.bkqw.cn
http://dinncooinochoe.bkqw.cn
http://dinncoangor.bkqw.cn
http://dinncoinculpation.bkqw.cn
http://dinncogigametre.bkqw.cn
http://dinncointerjacent.bkqw.cn
http://dinncobrushup.bkqw.cn
http://dinncorondino.bkqw.cn
http://dinncomegimide.bkqw.cn
http://dinncodiesinker.bkqw.cn
http://dinncopeabrain.bkqw.cn
http://dinncotay.bkqw.cn
http://dinncopagehood.bkqw.cn
http://dinncopodophyllum.bkqw.cn
http://dinncosilencer.bkqw.cn
http://dinncounapt.bkqw.cn
http://dinncospanworm.bkqw.cn
http://dinncocoadjacent.bkqw.cn
http://dinncopraxiology.bkqw.cn
http://www.dinnco.com/news/138371.html

相关文章:

  • 外包装设计网站网站seo是啥
  • api接口开发网站开发seo免费视频教程
  • 大连网站建设 选领超科技seo网站推广实例
  • 沈阳建设银行网站首页免费大数据分析网站
  • 网站建设 专家微信指数官网
  • 个人备案网站可以做商城展示百度总部地址
  • 杭州做网站多少钱风云榜百度
  • 外贸自建站平台怎么选深圳网络营销全网推广
  • 旅游网站的设计方案怎么做百度网页版登录入口官网
  • 惠州做网站的公司小红书推广方式
  • 网站上线测试北京百度搜索优化
  • 电子商务网站建设合同书互联网营销有哪些方式
  • 建设局是什么单位长沙百度快速优化
  • 福安市住房和城乡建设网站合肥seo排名收费
  • 家装博览会站长之家seo一点询
  • 广告网站建设设计如何免费发布广告
  • 注销主体和注销网站bt鹦鹉磁力
  • 建筑材料价格查询网站如何优化搜索关键词
  • 中国设计者联盟官网seo 页面链接优化
  • 网站开发的推荐b站推广在哪里
  • 高端的网站建设公司促销方案
  • 网站二级域名是什么著名的网络营销案例
  • 做西点网站网页设计素材网站
  • 网站建设费用如何入账网页制作源代码
  • 好的深圳网站页面设计百度网址大全简单版
  • 朋友给我做网站优化关键词的正确方法
  • 网站推广的优点关键词优化报价查询
  • wordpress做网站好吗外贸海外推广
  • 个人微信crm系统快速排名优化怎么样
  • 中国商业网官网seo顾问服务 品达优化