2
\$\begingroup\$

I'm using hx711 adc module and after adc is powered on, the adc values start to increase after 1 minute adc values become stable. how can i get stable value in less time when adc pwored on.

schematic: enter image description here adc read function:

long read_adc(void){
  unsigned long Count;
  unsigned char i;
  PORTC|=(1<<4);
  PORTC&=(~(1<<5));
  Count=0;  
  while((PINC & (1<<4)));
  _delay_ms(1);
  for (i=0;i<24;i++){
     PORTC|=(1<<5);
     for(volatile uint32_t n = 0; n < 3; n++){}
     Count=Count<<1;
     PORTC&=(~(1<<5));
     if((PINC & (1<<4))){ Count++;} 
     for(volatile uint32_t n = 0; n < 1; n++){} 
  }

  PORTC|=(1<<5);
  Count=Count^0x800000;
  PORTC&=(~(1<<5));

  return Count;
}
\$\endgroup\$
  • \$\begingroup\$ Your question is unanswerable as it is and invites guesswork and speculation. Please edit your question and greatly improve it. Show your work and findings so far in considerable detail with a schematic. The schematic tool here is easy to use. The better the quality of question, the better the quality of the answers you will attract. \$\endgroup\$ – TonyM Oct 14 '19 at 6:09
  • \$\begingroup\$ @TonyM thank you for your answer. I use HX711 adc module and i'm not designed the circuit so i thought it's not about circuit. \$\endgroup\$ – 7navy4 Oct 14 '19 at 6:16
  • \$\begingroup\$ But it's either your circuit or your software, neither of which are shown and described. Remember that the circuit must be some outside the board as well as that on it. As now, you're expecting people to search for HX711 and download the datasheet. I'm encouraging you to give yourself the best chance at getting a decent answer :-) Edit your question (don't put info in comments) and rewrite it much longer. \$\endgroup\$ – TonyM Oct 14 '19 at 7:01
  • \$\begingroup\$ Which hx711 module, what do you have it connected to and by how much do the values change before becoming 'stable'? Show us a photo of your setup. \$\endgroup\$ – Bruce Abbott Oct 14 '19 at 7:11
  • \$\begingroup\$ @TonyM okey sorry about that i added schematic and read function. Also thanks for encouraging. :) \$\endgroup\$ – 7navy4 Oct 14 '19 at 12:48
3
\$\begingroup\$

The HX711 is a load cell sensor that contains a 24-bit Analog to Digital converter. A converter of this resolution is going to be extremely sensitive to changes in the system level environment including the chip itself and breakout module that it may be mounted upon. The environmental factors that have to be considered include:

  1. Chip temperature
  2. Ambient or case temperature
  3. Supply voltage stability
  4. Reference voltage stability

If you expect the HX711 to be prepared to give a stable and repeatable reading every time you access the device then the device itself must be in a stable condition. Any variation of parameters, including those I have listed above, will affect the stability of the A/D output.

Since you mention seeing a stabilization time of some 30 to 40 seconds this is indicative of mostly a temperature settling time. When the device is OFF the chip has established itself at a temperature close to the nearby ambient. When you turn it on the chip has to startup and begin operating. In this process the internal circuitry will heat the chip to its operating temperature.

The HX711 data sheet shows that the chip consumes a rather small current via its analogue and digital power pins. With the small power dissipated by the part it can take longer for the overall temperature to stabilize than if there was more power being consumed.

Things to think about to deal with this problem...

  1. Plan for a system usage scenario that does not expect an OFF to ON transition for the part every time a measurement needs to be taken. Instead have an initial turn-on delay and then keep it active through time that readings are taken.
  2. Consider the possibility to provide a closed loop temperature control of the A/D subsystem that keeps the temperature constant at a level above ambient. This also needs to raise the temperature of the part a bit above where it would operate normally on its own without the forced controlled heating. (Note that this method, with enough power being applied, may still be able to operate in an OFF / ON mode if the elevated temperature stabilization time is fast enough compared to what you are seeing now).
| improve this answer | |
\$\endgroup\$
  • \$\begingroup\$ thank you for your answer. I tried heat up and cool down before powered but nothing changed. Do you have any other idea for this problem \$\endgroup\$ – 7navy4 Oct 14 '19 at 13:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.