高精度ADC——ADS1146电路设计及RT-Thread程序开发 | 技术集结

频道:消费点评 日期: 浏览:51062

ADS1146器件是高精度 16 位模数转换器ADC),集成了众多功能,可降低传感器测量应用中的系统成本和组件数量。这些器件具有低噪声、可编程增益放大器(PGA)、高精度的 (ΔΣ)ADC 以及单周期稳定数字滤波器和内部振荡器

本文将介绍对ADS1146的外部电路设计和利用RT-Thread实现去ADS1146的电路驱动。

电路设计

首先利用电压基准芯片生成稳定的1.25V电压作为ADS1146的偏置电压。如果使用的是ADS1147或ADS1148的话,内部可生成2.408V的偏置电压,可以不使用外部电压作为偏执电压。电压基准电路如图。

00af2772-bd0c-11f0-8ce9-92fbcf53809c.png

使用外部电压的好处是,外部电压稳定,能提高测量精度;外部电压可调节,可以按需求选择量程。

模拟电压AVCC范围为2.7V——5.25V,外部偏置电压要求范围在0.5V——AVCC-1V,也就是说最大范围可为0.5V——4.25V。

测量的输入电压只能在外部偏置电压的绝对值范围内。部分手册参数如图。

具体的ADS1146电路如图所示,

DVDD、DGND号脚作为数字电源输入,0.1uf电容经常作为芯片电源的旁路电容使用。

CLK短接DGND可激活内部时钟

RESET为复位引脚,低电平有限,搭配C5和R5可上电初始时自动复位。

REFP、REFN作为外部偏置电压输入。

AINP、AINN作为测量引脚输入,该输入是一个差分信号。将AINN端接至REEP,优点是可以实现正负双向测量。也就是说AINN端稳定为1.25V,AINP在外部测量信号作用下在0——2.5V变化,差分电压在-1.25——1.25V变化,实现了正负双向测量。如果不AINN不接REEP,也就是AINN为0V,AINP必须大于0,那差分电压只能在0——1.25V变化,只能单向测量。

C8用于滤除差模干扰、C14、C15可滤除共模干扰,R10、R11可减少输入差分信号的纹波。R12、R13为下拉电阻,悬空时,AINP下拉至0V、AINN因为端接REEP,会保持1.25V不变,这么看R13似乎没有作用,但是在共模信号上R13可与R12保持对称,这样在滤除共模干扰会达到同程度滤除,可避免引入差模干扰。也就是说悬空时会采集到-1.25V。

SPI的四个引脚用来实现SPI通信,这个大家都知道。

START用于发送芯片启动转换信号。

DRDY用于接受转换完成信号。

AVDD、AVSS是模拟电压输入端,通过磁珠M1和C9可以接入数字信号源,不过为了避免干扰,在PCB布局时最好模拟电压区域和数字电压区域隔开,只留一个通路连接

右端每个信号都串接了47R电阻、这些电阻可平滑尖锐的过渡,抑制过冲,并提供一定的过压保护。

00df3336-bd0c-11f0-8ce9-92fbcf53809c.png

因为我这里ADS1146模块使用的电源和MCU使用的不是同一类电源,所以通信接口必须使用以下这种数字信号转换器进行连接,此时上面信号上的47R电阻可接可不接,应为数字信号转换器具有抑制过冲、电压保护等功能。如果是信号直接接入MCU,该47R还是建议使用的。

到这,ADS1146的外围电路设计已经完成了,下面开始使用RT-Thread实现程序开发。

RT-Thread 程序开发

这里是基于RT-Thread studio实现ADS1146对电压的精准采集,开发板是我自己画的,MCU是STM32F103C8T6,使用的RT-Thread驱动是5.1.0

(如果遇到无法下载情况,可以把该位置ROM的值调大一点,STM32F103C8T6的实际ROM只有64KB,代码编译完达到了100KB,所以就无法下载,但是实际下载进芯片,发现实际只占用了不到一半ROM,所以我这自行调整到512KB来规避检查,实际的占用情况可以在finsh控制台使用free命令查看)

00fbcf14-bd0c-11f0-8ce9-92fbcf53809c.png

创建工程

5.1.0的驱动对stm32的支持,可以参考文章《基于RT-Thread的STM32F4开发第八讲——SPI(普通、DMA、SFUD)》(链接:https://blog.csdn.net/weixin_58172114/article/details/148234716?spm=1001.2014.3001.5502)完成工程的创建(普通模式即可)。嫌麻烦的可以用4系类的驱动。

下面主要讲解ADS1146驱动代码实现

ads1146.c

代码总览如下:

/** Copyright (c) 2006-2021, RT-Thread Development Team** SPDX-License-Identifier: Apache-2.0** Change Logs:* Date Author Notes* 2025-09-28 H1567 the first version*/#include"ads1146.h"#defineDBG_TAG "ads1146"#defineDBG_LVL DBG_LOG#include structrt_spi_device *ads1146_handle1;structrt_spi_device *ads1146_handle2;structrt_spi_device*ads1146_handle3;/*************************************************************** * @brief ADS1146的S PI设备创建 * @pa ram * @return**************************************************************/voidSPI_device_creation(void){#ifdefBSP_USING_SPI1_ADS1146 rt_err_t spi10_flag; structrt_spi_configurationads1146_cfg1; spi10_flag = rt_hw_spi_device_att ach(SPI1_BUS_NAME, SPI1_NAME, GPIOA, GPIO_PIN_4);//更改为实际的片选引脚 if(spi10_flag != RT_EOK){ LOG_D("fai led to spi10 register"); return; } ads1146_handle1 = (struct rt_spi_device *)rt_device_find(SPI1_NAME); if(ads1146_handle1 != RT_NULL){ ads1146_cfg1.mode = RT_SPI_MSB | RT_SPI_MASTER | RT_SPI_MODE_1; ads1146_cfg1.data_width = 8; ads1146_cfg1.max_hz = 1125*1000; rt_spi_configure(ads1146_handle1, &ads1146_cfg1); }#endif#ifdefBSP_USING_SPI2_ADS1146 rt_err_t spi20_flag; structrt_spi_configurationads1146_cfg2; spi20_flag = rt_hw_spi_device_attach(SPI2_BUS_NAME, SPI2_NAME, GPIOB, GPIO_PIN_12);//更改为实际的片选引脚 if(spi20_flag != RT_EOK){ LOG_D("failed to spi20 register"); return; } ads1146_handle2 = (struct rt_spi_device*)rt_device_find(SPI2_NAME); if(ads1146_handle2 != RT_NULL){ ads1146_cfg2.mode = RT_SPI_MSB | RT_SPI_MASTER | RT_SPI_MODE_1; ads1146_cfg2.data_width = 8; ads1146_cfg2.max_hz = 1125*1000; rt_spi_configure(ads1146_handle2, &ads1146_cfg2); }#endif#ifdef BSP_USING_SPI3_ADS1146 rt_err_t spi30_flag; structrt_spi_configurationads1146_cfg3; spi30_flag = rt_hw_spi_device_attach(SPI3_BUS_NAME, SPI3_NAME, GPIOB, GPIO_PIN_12);//更改为实际的片选引脚 if(spi30_flag != RT_EOK){ LOG_D("failed to spi30 register"); return; } ads1146_handle3 = (struct rt_spi_device *)rt_device_find(SPI3_NAME); if(ads1146_handle3 != RT_NULL){ ads1146_cfg3.mode = RT_SPI_MSB | RT_SPI_MASTER | RT_SPI_MODE_1; ads1146_cfg3.data_width = 8; ads1146_cfg3.max_hz = 1125*1000; rt_spi_configure(ads1146_handle3, &ads1146_cfg3); }#endif LOG_D("succeed to ADS1146 SPI device creation");}/*************************************************************** * @brief ADS1146的初始化 * @param * @return**************************************************************/voidADS1146_init(void){ uint8_t INIT_control_1[2] = {0x01,0x06}; uint8_t INIT_control_2 = 0x16;#ifdefBSP_USING_SPI1_ADS1146 rt_pin_mode(ADS1_start, PIN_MODE_OUTPUT); rt_pin_write(ADS1_start, PIN_HIGH); rt_pin_mode(ADS1_drdy, PIN_MODE_INPUT_PULLUP); rt_spi_send(ads1146_handle1, INIT_control_1, 2); rt_thread_mdelay(10); rt_spi_send(ads1146_handle1, &INIT_control_2, 1); rt_thread_mdelay(10);#endif#ifdefBSP_USING_SPI2_ADS1146 rt_pin_mode(ADS2_start, PIN_MODE_OUTPUT); rt_pin_write(ADS2_start, PIN_HIGH); rt_pin_mode(ADS2_drdy, PIN_MODE_INPUT_PULLUP); rt_spi_send(ads1146_handle2, INIT_control_1, 2); rt_thread_mdelay(10); rt_spi_send(ads1146_handle2, &INIT_control_2, 1); rt_thread_mdelay(10);#endif#ifdefBSP_USING_SPI3_ADS1146 rt_pin_mode(ADS3_start, PIN_MODE_OUTPUT); rt_pin_write(ADS3_start, PIN_HIGH); rt_pin_mode(ADS3_drdy, PIN_MODE_INPUT_PULLUP); rt_spi_send(ads1146_handle2, INIT_control_1, 2); rt_thread_mdelay(10); rt_spi_send(ads1146_handle2, &INIT_control_2, 1); rt_thread_mdelay(10);#endif}/*************************************************************** * @brief ADS1146的PGA设置函数 * @param device:传入的设备名;ADS_setPGA:需要设置的PGA十进制值 * @return**************************************************************/voidADS1146_setPGA(struct rt_spi_device *device,short ADS_setPGA){ if(ADS_setPGA == 1 || ADS_setPGA == 2 || ADS_setPGA == 4 || ADS_setPGA == 8 || ADS_setPGA == 16 || ADS_setPGA == 32 || ADS_setPGA == 64 || ADS_setPGA == 128) { uint8_t INIT_control[5] = {0x43,0x00,0x00,0x04,0x04}; INIT_control[2] = (uint8_t)log2(ADS_setPGA)<<4 | ADS_SPS;    rt_spi_send(device, INIT_control, 5);    }    else {        rt_kprintf("ADS PGA set error!\n");    }}/***************************************************************  *  @brief     ADS1146的当前PGA读取函数  *  @param     device:传入的设备名  *  @return    读取到的该设备PGA十进制值 **************************************************************/shortADS1146_readPGA(struct rt_spi_device *device){    uint8_t read_control[2] = {0x23,0x00};    uint8_t read_datas;    short ADS_readPGA;    rt_spi_send_then_recv(device, &read_control, 2, &read_datas, 1);    ADS_readPGA = (short)powf(2,((read_datas&0xf0)>>4)); return ADS_readPGA;}/*************************************************************** * @brief 实现PGA的自动调节 * @param device:传入的设备名 * @return 0:未超量程,1:超量程**************************************************************/shortADS1146_PGA_AUTO(struct rt_spi_device *device){ short ADS_PGA; staticshort ADC_PGA_old = 1; short PGA_flag = 0; int ADS_value_init; uint16_t read_value; short ads_gain,PGA_gain; uint8_t read_control = 0x12; uint8_t read_datas[2] = {0}; do { rt_spi_send_then_recv(device, &read_control, 1, read_datas, 2); read_value = ((uint16_t)read_datas[0])<<8 | read_datas[1];        //数值绝对值化        if(read_value&0x8000){            ADS_value_init = 65536 - (int)read_value;        }        else{            ADS_value_init = (int)read_value;        }        if(ADS_value_init<1)            ADS_value_init = 1;        ADS_PGA = ADS1146_readPGA(device);        if(ADS_value_init > 32765){ if(ADS_PGA == 1){ PGA_flag = 1; } else { ADS_PGA = 1; } } if(ADS_value_init<16382){            ads_gain = 32767/ADS_value_init;            if(ads_gain>128){ ads_gain = 128; } PGA_gain = 1; do{ PGA_gain *= 2; }while(PGA_gain if(PGA_gain>ads_gain){ PGA_gain /= 2; } ADS_PGA *= PGA_gain; if(ADS_PGA>128){ ADS_PGA = 128; } } if(ADS_PGA != ADC_PGA_old){ ADS1146_setPGA(device,ADS_PGA); ADC_PGA_old = ADS_PGA; rt_thread_mdelay(1500/(5*powf(2,ADS_SPS))); } }while(ADS_value_init > 32765 && PGA_flag == 0); return PGA_flag;}/*************************************************************** * @brief 实现ADS1146采集的电压值输出,单位mV * @param device:传入的设备名; * calibration_k, calibration_b: 校准参数 * 校准函数:ADS_CCD_mV = calibration_k*ADS_mV + calibration_b * PGA_flag:量程标志,0:正常,1:超量程。搭配ADS1146_PGA_AUTO使用可实现自动判断 * @return**************************************************************/voidADS1146_output(struct rt_spi_device *device, float calibration_k, float calibration_b, short PGA_flag){ int ADS_value_init; uint16_t read_value; short read_signed; uint8_t read_control = 0x12; uint8_t read_datas[2] = {0}; rt_spi_send_then_recv(device, &read_control, 1, read_datas, 2); read_value = ((uint16_t)read_datas[0])<<8 | read_datas[1];    //符号位分离    if(read_value&0x8000){        ADS_value_init = 65536 - (int)read_value;        read_signed = -1;    }    else{        ADS_value_init = (int)read_value;        read_signed = 1;    }    short setPGA = ADS1146_readPGA(device);    rt_kprintf("ADS1146 set PGA: %d\n",setPGA);    if(PGA_flag == 1){        rt_kprintf("ADS1146 Exceeding the range  ");    }    else {        float ADS_mV = (float)ADS_value_init / ADS_range_half *reference_voltage /setPGA*read_signed;        rt_kprintf("ADS1146 Not calibrated output data: %.3fmV  ",ADS_mV);        float ADS_CCD_mV = ADS_mV*calibration_k+calibration_b;        rt_kprintf("ADS1146 calibrated output data: %.3fmV\n",ADS_CCD_mV);    }}

别看代码很长,因为写了很多预编译语句(也就是选择性编译的语句)。

“#ifdef标识符”

程序段

“#endif”

如果在这之前标识符经过了#define定义,则编译程序段,否则编译时略过程序段。

第一个函数void SPI_device_creation(void)

用来对SPI设备初始化,因为ADS1146是通过SPI通讯的,所以需要完成对应的SPI初始化,这里通过预编译指令类比写了SPI1、SPI2、SPI3三个外设初始化,基本能囊括所有SPI设备了,如实际中超出,例如使用的是SPI4,可按模板自行添加。

注意board.h要开启对应SPI的宏定义。

代码主要工作完成了ADS1146的SPI片选引脚确认、通信模式、通信字节、通信速度的设置。其中片选引脚需要更改为自己实际使用的引脚,通信速度不建议过高,其他内容不建议更改。

第二个函数void ADS1146_init(void)

完成ADS1146的初始化,主要是向ADS1146发送了三个命令。

0x01:将ADS1146从睡眠中唤醒,

01088506-bd0c-11f0-8ce9-92fbcf53809c.png

0x06:将ADS1146复位,准备下面的工作。(注:因为ADS1146复位需要0.6ms时间,这个时间段不能继续发送命令,我这给了10ms)

01163bd8-bd0c-11f0-8ce9-92fbcf53809c.png

0x16:停止数据读取,当前配置未完成,防止错误数据输出(保险,可加可不加)

012af212-bd0c-11f0-8ce9-92fbcf53809c.png

第三个函数void ADS1146_setPGA(struct rt_spi_device *device,short ADS_setPGA)

该函数有两个形参,device:传入的设备名;ADS_setPGA:需要设置的PGA十进制值

该函数能够将设置的PGA值写入ADS1146,主要命令是0x43。

013a33ee-bd0c-11f0-8ce9-92fbcf53809c.png

0x43表示写入的寄存器如下

0141fa52-bd0c-11f0-8ce9-92fbcf53809c.png

0x04 0x04表示开始转换

014d8fb6-bd0c-11f0-8ce9-92fbcf53809c.png

第四个函数short ADS1146_readPGA(struct rt_spi_device *device)

device:传入的设备名

该函数能够将传入设备读取的PGA值以十进制返回,主要命令是0x23

015f206e-bd0c-11f0-8ce9-92fbcf53809c.png

第五个函数short ADS1146_PGA_AUTO(struct rt_spi_device *device)

evice:传入的设备名

该函数属于最核心函数,能够根据测量的数值自动调节该设备PGA,从而达到自动调节量程,实现最精准测量。并且我还特别优化,能实现快速响应。这部分代码不讲解,能理解就是你的,理解不了直接用就行。

第六个函数void ADS1146_output(struct rt_spi_device *device,float calibration_k,float calibration_b,short PGA_flag);

实现ADS1146采集的电压值输出,单位mV

device:传入的设备名;

calibration_k, calibration_b: 校准参数

校准函数:ADS_CCD_mV = calibration_k*ADS_mV + calibration_b

PGA_flag:量程标志,0:正常,1:超量程。搭配ADS1146_PGA_AUTO使用可实现自动判断

这一个函数就是将读取的电压值输出出来,我这里直接rt_printf,如果需要返回值,可自行拓展。其中 calibration_k, calibration_b是校准参数,我们知道实际值和测量值之间是会存在误差的,这些误差并非都是随机误差,其中很大一部分是具有线性特征的系统误差,这部分误差可以通过一个线性函数来弥补,下图是我通过采集的实际值和测量值计算出来的一次函数,带入函数也就是calibration_k = 0.9994,calibration_b = -0.0045

不过这写数据实在PGA = 8恒定下采集的值,为了省事,我直接运用到了全局PGA中,所以在PGA = 8时校准效果最好,不过应用到其他PGA上也有不错的效果,如果大家有需要,可以将各个PGA下的校准函数求出,搭配ADS1146_PGA_AUTO函数实现更加精准测量。

016e53c2-bd0c-11f0-8ce9-92fbcf53809c.png

ads1146.h

#ifndefAPPLICATIONS_ADS1146_H_#defineAPPLICATIONS_ADS1146_H_#include#include#include"drv_spi.h"#include/*-------------------------- ADS1146 CONFIG BEGIN --------------------------*///需要在board.h中开启对于的SPI预编译#defineBSP_USING_SPI1_ADS1146#defineBSP_USING_SPI2_ADS1146//#define BSP_USING_SPI3_ADS1146#ifdefBSP_USING_SPI1_ADS1146 #define SPI1_NAME "spi10" #define SPI1_BUS_NAME "spi1"externstructrt_spi_device *ads1146_handle1;#endif#ifdefBSP_USING_SPI2_ADS1146 #define SPI2_NAME "spi20" #define SPI2_BUS_NAME "spi2"externstructrt_spi_device *ads1146_handle2;#endif#ifdefBSP_USING_SPI3_ADS1146 #define SPI3_NAME "spi30" #define SPI3_BUS_NAME "spi3"externstructrt_spi_device *ads1146_handle3;#endif// 更改为自己实际的引脚#define ADS1_start GET_PIN(B,0)#define ADS1_drdy GET_PIN(B,1)#define ADS2_start GET_PIN(B,10)#define ADS2_drdy GET_PIN(B,11)#define ADS3_start GET_PIN(B,10)#define ADS3_drdy GET_PIN(B,11)#define ADS_SPS 0x01 //10 SPS#define ADS_range_half 32768#define reference_voltage 1250voidSPI_device_creation(void);voidADS1146_init(void);voidADS1146_setPGA(structrt_spi_device *device,shortADS_setPGA);shortADS1146_readPGA(structrt_spi_device *device);shortADS1146_PGA_AUTO(structrt_spi_device *device);voidADS1146_output(structrt_spi_device *device,floatcalibration_k,floatcalibration_b,shortPGA_flag);

这里面就是各种宏定义,函数声明。大家都知道

因为我做了大量SPI适配的预编写语句,所以在board.h开启SPI宏定义后,这边再开启对应的ADS1146宏定义就能直接使用,开启了SPI宏定义不开启ADS1146宏定义不会对该SPI有任何影响,其他设备正常使用。

//需要在board.h中开启对于的SPI预编译

#defineBSP_USING_SPI1_ADS1146#defineBSP_USING_SPI2_ADS1146//#define BSP_USING_SPI3_ADS1146

main.h

#include#defineDBG_TAG"main"#defineDBG_LVL DBG_LOG#include#include"ads1146.h"#include"ads_can.h"intmain(void){ shortPGA_flag1; SPI_device_creation(); ADS1146_init(); while(1){ PGA_flag1 =ADS1146_PGA_AUTO(ads1146_handle1); ADS1146_output(ads1146_handle1,0.9994,-0.0045, PGA_flag1); rt_thread_mdelay(800); } returnRT_EOK;}

经过前面的解释,相信大家很容易看懂这部分代码。

效果演示

ADS1146Not calibrated output data:0.812mV ADS1146 calibrated output data:0.807mVADS1146set PGA:128ADS1146Not calibrated output data:0.758mV ADS1146 calibrated output data:0.753mVADS1146set PGA:128ADS1146Not calibrated output data:0.691mV ADS1146 calibrated output data:0.686mVADS1146set PGA:128ADS1146Not calibrated output data:0.067mV ADS1146 calibrated output data:0.062mVADS1146set PGA:128ADS1146Not calibrated output data:0.030mV ADS1146 calibrated output data:0.025mVADS1146set PGA:128ADS1146Not calibrated output data:0.018mV ADS1146 calibrated output data:0.014mVADS1146set PGA:128ADS1146Not calibrated output data:0.015mV ADS1146 calibrated output data:0.011mVADS1146set PGA:32ADS1146Not calibrated output data:25.015mV ADS1146 calibrated output data:24.995mVADS1146set PGA:32ADS1146Not calibrated output data:25.011mV ADS1146 calibrated output data:24.992mVADS1146set PGA:32ADS1146Not calibrated output data:25.012mV ADS1146 calibrated output data:24.993mVADS1146set PGA:16ADS1146Not calibrated output data:50.032mV ADS1146 calibrated output data:49.998mVADS1146set PGA:16ADS1146Not calibrated output data:50.030mV ADS1146 calibrated output data:49.995mVADS1146set PGA:16ADS1146Not calibrated output data:75.040mV ADS1146 calibrated output data:74.990mVADS1146set PGA:16ADS1146Not calibrated output data:75.042mV ADS1146 calibrated output data:74.993mVADS1146set PGA:8ADS1146Not calibrated output data:100.064mV ADS1146 calibrated output data:100.000mVADS1146set PGA:8ADS1146Not calibrated output data:100.069mV ADS1146 calibrated output data:100.005mVADS1146set PGA:8ADS1146Not calibrated output data:100.079mV ADS1146 calibrated output data:100.014mVADS1146set PGA:8ADS1146Not calibrated output data:100.050mV ADS1146 calibrated output data:99.985mVADS1146set PGA:128ADS1146Not calibrated output data:0.098mV ADS1146 calibrated output data:0.093mVADS1146set PGA:128ADS1146Not calibrated output data:0.100mV ADS1146 calibrated output data:0.095mVADS1146set PGA:128ADS1146Not calibrated output data:0.103mV ADS1146 calibrated output data:0.098mVADS1146set PGA:1ADS1146Not calibrated output data:1000.671mV ADS1146 calibrated output data:1000.066mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1000.710mV ADS1146 calibrated output data:1000.105mVADS1146set PGA:1ADS1146Not calibrated output data:1041.870mV ADS1146 calibrated output data:1041.240mVADS1146set PGA:1ADS1146Not calibrated output data:1200.600mV ADS1146 calibrated output data:1199.875mVADS1146set PGA:1ADS1146Not calibrated output data:1204.987mV ADS1146 calibrated output data:1204.259mVADS1146set PGA:1ADS1146Not calibrated output data:1220.818mV ADS1146 calibrated output data:1220.081mVADS1146set PGA:1ADS1146Not calibrated output data:1220.818mV ADS1146 calibrated output data:1220.081mVADS1146set PGA:1ADS1146Not calibrated output data:1230.583mV ADS1146 calibrated output data:1229.840mVADS1146set PGA:1ADS1146Not calibrated output data:1240.692mV ADS1146 calibrated output data:1239.943mVADS1146set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:1ADS1146Exceeding the range ADS1146 set PGA:2ADS1146Not calibrated output data:359.287mV ADS1146 calibrated output data:359.067mVADS1146set PGA:32ADS1146Not calibrated output data: -12.507mV ADS1146 calibrated output data: -12.504mVADS1146set PGA:128ADS1146Not calibrated output data: -0.660mV ADS1146 calibrated output data: -0.664mVADS1146set PGA:128ADS1146Not calibrated output data: -0.497mV ADS1146 calibrated output data: -0.501mV

上面是我的一点运行日志,这边输入的是0mv、25mv、50mv、75mv、100mv、1000mv,~~。大家可以比较一下,优化校准哈桑农户,测量还是能达到uV级别的。

  • 随机文章
  • 热门文章
  • 热评文章