200kg Weighing Scale With Indicator Using Arduino and HX711 ADC
by anoop_ambalakkandy in Circuits > Arduino
3605 Views, 2 Favorites, 0 Comments
200kg Weighing Scale With Indicator Using Arduino and HX711 ADC
Details of the project:
- Platform scale with 200kg capacity
- LCD 16X2 Indicator for weight display
- Wheatstone bridge constructed from four Nos of half bridge load cells of 50kg rating each.
- HX711 ADC for amplification of bridge output
- Options for offset and gain setting (calibration) through momentary switches.
- Calibration using 5kg standard weight.
Follow the below link for an excellent article to know more about using load cells.
Load Cell Equation
Load Cell Wiring
Arduino Code
#include
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
#define DT 12
#define SCK 11
#define swgain 9 //switch for gain calc
#define swzero 8//switch for zeroing (offset calc)
long a;
long offset=8876800;
float w;
float gain=47806.5;
void setup() {
pinMode(SCK, OUTPUT);
pinMode(swzero, INPUT_PULLUP);
pinMode(swgain, INPUT_PULLUP);
lcd.begin(16, 2);
lcd.clear();
lcd.setCursor(0,0);
lcd.print("arduino scale");
delay(3000); }
void loop() {
a= readCount();
w= (a-offset)/gain;
lcd.clear();
lcd.setCursor(0,0);
lcd.print(w);
lcd.setCursor(0,1);
lcd.print("kg ");
delay(50);
if(digitalRead(swzero)==0)
offset=a;
if(digitalRead(swgain)==0)
gain=(a-offset)/5.0;
}
// SUBROUTINE Readcount
unsigned long readCount(void) {
unsigned long Count;
unsigned char i;
pinMode(DT, OUTPUT);
digitalWrite(DT,HIGH);
digitalWrite(SCK,LOW);
Count=0;
pinMode(DT, INPUT);
while(digitalRead(DT));
for (i=0;i<24;i++) {
digitalWrite(SCK,HIGH);
Count=Count<<1;
digitalWrite(SCK,LOW);
if(digitalRead(DT))
Count++; }
digitalWrite(SCK,HIGH);
Count=Count^0x800000;
digitalWrite(SCK,LOW);
return(Count);
}