Post Go back to editing

switching between channels in the fastest way possible

Thread Summary

The user is experiencing slow data acquisition when reading six channels from a fabricated six-axis force/torque sensor using the AD7794 ADC with an STM32 microcontroller. The issue is resolved by configuring the ADC in continuous conversion mode and optimizing the channel switching process in the code, reducing the full scan time across six channels to a more acceptable level. The user confirms that the suggested changes significantly improved the performance.
AI Generated Content
Category: Software
Product Number: AD7794
Software Version: Keil

Hi i have fabricated a six-axis force/torque sensor using strain gauges and for data acquisition process i used AD7794 ADC in order to read all six channel each related to a Wheatstone bridge of my strain gauges.

I have a BIG problem and i need to fix it. I have created a PCB already and installed it on my sensor i use STM32 as my microcontroller and i use Keil IDE for programing and changing the hardware is not an option for me.

I know that AD7794 does not have a auto switching mode for reading all channels. Therefore i try to switch channels in the STM32 programming code but the problem is that reading all channels takes so much time and i believe it is because of my programming. It takes approximately 1.2 seconds to read all channels and this is very slow for what i plan to do.

In the datasheet it says the maximum sampling speed is 470Hz but clearly i am reading all channels much slower. Can someone tell me how to fix my issue? 

I need to read all channels as fast as possible and show them on the output (i use UART).

Can someone tell me how to fix my problem and what code should i write and how i configure it ?(changing the hardware and the circuits is not an option because the PCB is already fabricated and is not changeable) 

Thanks. 

Parents
  • Hi  ,

    Have you configured the ADC with CHOP ENABLED or DISABLED?

    As the ADC powers up and performs a single conversion, you should take note that the oscillator requires 1 ms to power up and settle. The ADC then performs the conversion, which takes a total time of conversion time plus settling time when chop is disabled. With chop enabled, the settling time is two times the conversion time.

    So, you may want to configure the ADC with CHOP DISABLED. Can you please confirm if have set MR3 to MR0 of the MODE REGISTER to 0001? 

    Could you share your configuration settings if possible? 

    Thanks and regards,

    Rod

  • hi again  

    I have replied again as a reminder to tell you i look forward to your help if you be kind ad put your time.

    i still suffer from the same problem and i have issues with the speed of my work

    Regards

  • Hi  

    Apologies for missing the thread. 

    Have you tried exploring the continuous read mode? 

    Since you set the ADC inn continuous conversion mode, the ADC continuously performs conversions and places the result in the data register. With this, you can read these conversions by placing the device in continuous read mode whereby the conversions are automatically placed on the DOUT/RDY line when SCLK pulses are applied. 

    You can do this rather than writing to the communications register each time a conversion is complete to access the data and see if it improves your setup.

    i can also provide my full code and settings.
    • Yes, this would be great. It would help give a wider perspective on how the ADC was configured and is being used. 

    Thanks and regards,

    Rod

Reply
  • Hi  

    Apologies for missing the thread. 

    Have you tried exploring the continuous read mode? 

    Since you set the ADC inn continuous conversion mode, the ADC continuously performs conversions and places the result in the data register. With this, you can read these conversions by placing the device in continuous read mode whereby the conversions are automatically placed on the DOUT/RDY line when SCLK pulses are applied. 

    You can do this rather than writing to the communications register each time a conversion is complete to access the data and see if it improves your setup.

    i can also provide my full code and settings.
    • Yes, this would be great. It would help give a wider perspective on how the ADC was configured and is being used. 

    Thanks and regards,

    Rod

Children

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.