This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

ADS1232接称重传感器,不怎么变化,会是什么原因呢?

Other Parts Discussed in Thread: ADS1232, ADS1234

我使用ADS1232接2mv/v的称重传感器,使用通道2,增益128,速递10次每秒,关闭温度传感器功能,可读出来的数不管怎么按压传感器都不怎么变,这个传感器是没有问题的,在HX711芯片上用四线制测试吹气都能有变化。可在用六线的ADS1232上数值就不怎么变化了。希望大家给予指点。

下面的数值,不管怎么按压压力传感器都不怎么变化。

 

  • 先确认下REFP和REFN引脚上加的电压值是不是在合理的范围内。

  • 具体reference要求datasheet中有:

  • 您好,传感器的接法我是按照datasheet中应变桥的接法:REFP和称重传感器的电源正相连,REFN和称重传感器的负(地)相连。

  • REFP和REFN引脚上加的电压值4.9V。这样没问题吧?

  • 先把传感器拿掉,把基准源电压直接接到ADC输入端,再用单片机读一下,数据看一下数据结果不是正常。

    然后,再将输入端短接,看一下读出的值是不是接近于零。这样就可以确定ADC是不是工作正常。

  • 基准源电压要求是1.5V到模拟电源电压再加0.1V。4.9V是没问题的。

  • 您好,我做了如下几个实验:

    <1>AINP2,AINN2悬空,REFP接基准正,REFPN接基准负,输出结果:8388607(0X7FFFFF)。

    <2>AINP2,AINN2悬空,REFP和REFPN短接,输出结果:76700±200左右。

    <3>REFP接基准正,REFPN接基准负,AINP2和AINN2短接,输出结果:76700±200左右。

    <4>REFP接基准正,REFPN接基准负,AINP2和AINN2短接,输出结果:76700±200左右。

  • #include "ADS1232.H" #include "port.h"

    /* sbit ADS1232_DOUT  = P2^0; sbit ADS1232_SCLK  = P2^1; sbit ADS1232_PWDN  = P2^2; sbit ADS1232_SPEED = P2^3; sbit ADS1232_GAIN1 = P2^4; sbit ADS1232_GAIN0 = P2^5; sbit ADS1232_A0    = P2^6; sbit ADS1232_TEMP  = P2^7; */

    #define ADS1232_SCLK_HIGH    do{ADS1232_SCLK=1;}while(0); #define ADS1232_SCLK_LOW     do{ADS1232_SCLK=0;}while(0); #define ADS1232_PWDN_HIGH    do{ADS1232_PWDN=1;}while(0); #define ADS1232_PWDN_LOW     do{ADS1232_PWDN=0;}while(0); #define ADS1232_SPEED_HIGH   do{ADS1232_SPEED=1;}while(0); #define ADS1232_SPEED_LOW    do{ADS1232_SPEED=0;}while(0); #define ADS1232_GAIN1_HIGH   do{ADS1232_GAIN1=1;}while(0); #define ADS1232_GAIN1_LOW    do{ADS1232_GAIN1=0;}while(0); #define ADS1232_GAIN0_HIGH   do{ADS1232_GAIN0=1;}while(0); #define ADS1232_GAIN0_LOW    do{ADS1232_GAIN0=0;}while(0); #define ADS1232_A0_HIGH      do{ADS1232_A0=1;}while(0); #define ADS1232_A0_LOW       do{ADS1232_A0=0;}while(0); #define ADS1232_TEMP_HIGH    do{ADS1232_TEMP=1;}while(0); #define ADS1232_TEMP_LOW     do{ADS1232_TEMP=0;}while(0);

    void ADS1232_init(unsigned char channel, unsigned char gain, unsigned char speed, unsigned char temp) {     ADS1232_SCLK = 0;     ADS1232_PWDN_LOW;     if(channel==CHANNEL1)     {         ADS1232_A0_LOW;     }     else if(channel==CHANNEL2)     {         ADS1232_A0_HIGH;     }         if(GAIN_1==gain)     {         ADS1232_GAIN1_LOW;         ADS1232_GAIN0_LOW;     }     else if(GAIN_2==gain)     {         ADS1232_GAIN1_LOW;         ADS1232_GAIN0_HIGH;     }     else if(GAIN_64==gain)     {         ADS1232_GAIN1_HIGH;         ADS1232_GAIN0_LOW;     }     else if(GAIN_128==gain)     {         ADS1232_GAIN1_HIGH;         ADS1232_GAIN0_HIGH;     }         if(SPEED_10==speed)     {         ADS1232_SPEED_LOW;     }     else if(SPEED_80==speed)     {         ADS1232_SPEED_HIGH;     }         if(TEMP_ON==temp)     {         ADS1232_TEMP_HIGH;     }     else if(TEMP_OFF==temp)     {         ADS1232_TEMP_LOW;     }         ADS1232_PWDN_HIGH; }

    char ADS1232_read_value(long int *value) {     long int temp=0;     unsigned char i=0;         if(ADS1232_READY==ADS1232_DOUT)     {         ADS1232_SCLK_LOW;         for(i=0; i<24; i++)         {             ADS1232_SCLK_HIGH;             temp <<= 1;             if(1==ADS1232_DOUT)             {                 temp |= 0x01;             }             ADS1232_SCLK_LOW;         }         ADS1232_SCLK_HIGH;  // The 25th SCLK to force DOUT high         ADS1232_SCLK_LOW;         if((temp&0x800000)==0x800000)         {             temp ^= 0Xffffff;             temp = -(temp+1);         }         *value = temp;         return ADS1232_READ_FINISH;     }     else     {         return ADS1232_BUSY;     } }

    驱动代码如下:

     

  • 从测试数据看,转化结果好像不大正确。

    先给ADC的输入端输入固定电压值,读取转化结果,看一下ADC有没有正确转化。如果转化结果不正确,请检查通信的时序是不是正确。

  •  您好,我想买一块您这样的称重ADS1232电路板,因为我调试了很久都没成功。联系电话:13581904589  QQ960546564,或者留下您的联系方式

  • 您好, 在哪里能买到这样的小板,最好是调试好的。要不加我QQ吧,960546564

  • 以前我做过一个ADS1234的板子,是用恩智浦的CORTEX-M0内核的LPC1114控制的,在淘宝有卖过哈,不过后来没再做这方面的事情...你要是需要等我回去把源码和电路给你参考一下

  • 那谢谢你了,等我把称重这个调试稳定了,一定请你吃饭,加我QQ960546564,邮箱bjyibiao@126.com 或者留下您的联系方式

  • 不好意思,这段时间忙的很多事情都忘了...我回去找了找只找到了源程序,时间久了加上工作变化,很多东西都丢了。程序附在这里

  • 谢谢,我也需要一个ads1232的资料,最近在做压力检测,很是苦恼