Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO and ESP8266 Wi-Fi Enabled Load Cell Weight Measurement System

View and Edit Project In Cirkit DesignerImage of Arduino UNO and ESP8266 Wi-Fi Enabled Load Cell Weight Measurement System

Circuit Documentation

Summary

This circuit is designed to read data from a load cell via the HX711 interface, display the weight on an LCD display, and send the data via WiFi using the ESP8266 module when the star button on the keypad is pressed. The circuit includes an Arduino UNO, an HX711 load cell amplifier, a load cell, a 16x2 LCD display, a 4x4 membrane keypad, and an ESP8266 WiFi module.

Component List

  1. Load Cell - Red/white/black/green

    • Description: A sensor used to measure weight.
    • Pins: E+, A-, E-, A+
  2. HX711 - Bridge Sensor Interface

    • Description: An amplifier and ADC for load cells.
    • Pins: E+, E-, A-, A+, B-, B+, GND - GROUND, DATA (OUT), SCK - CLOCK (IN), 3.3/3.5V Supply
  3. LCD Display (16 pin)

    • Description: A 16x2 character LCD display.
    • Pins: VSS, VDD, VO, RS, R_W, E, DB0, DB1, DB2, DB3, DB4, DB5, DB6, DB7, A, K
  4. 4X4 Membrane Matrix Keypad

    • Description: A keypad with 4 rows and 4 columns.
    • Pins: R1, R2, R3, R4, C1, C2, C3, C4
  5. Arduino UNO

    • Description: A microcontroller board based on the ATmega328P.
    • Pins: UNUSED, IOREF, Reset, 3.3V, 5V, GND, Vin, A0, A1, A2, A3, A4, A5, SCL, SDA, AREF, D13, D12, D11, D10, D9, D8, D7, D6, D5, D4, D3, D2, D1, D0
  6. esp8266 nodemcu

    • Description: A WiFi module with a microcontroller.
    • Pins: D0, D1, D2, D3, D4, 3V3, GND, D5, D6, D7, D8, RX, TX, A0, RSV, SD3, SD2, SD1, CMD, SD0, CLK, EN, RST, VIN

Wiring Details

Load Cell - Red/white/black/green

HX711 - Bridge Sensor Interface

LCD Display (16 pin)

4X4 Membrane Matrix Keypad

Arduino UNO

esp8266 nodemcu

Code Documentation

/*
 * This Arduino sketch reads data from a load cell via the HX711 interface,
 * displays the weight on an LCD display, and sends the data via WiFi using
 * the ESP8266 module when the star button on the keypad is pressed. The
 * circuit includes an Arduino UNO, an HX711 load cell amplifier, a load cell,
 * a 16x2 LCD display, a 4x4 membrane keypad, and an ESP8266 WiFi module.
 */

#include <LiquidCrystal.h>
#include <HX711.h>
#include <Keypad.h>
#include <SoftwareSerial.h>

// Pin definitions
const int LOADCELL_DOUT_PIN = A0;
const int LOADCELL_SCK_PIN = A1;
const int LCD_RS = 7;
const int LCD_E = 6;
const int LCD_D4 = 5;
const int LCD_D5 = 4;
const int LCD_D6 = 3;
const int LCD_D7 = 2;
const int KEYPAD_STAR_PIN = 10;
const int ESP8266_RX = 1;
const int ESP8266_TX = 0;

// Initialize the LCD library with the numbers of the interface pins
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

// Initialize the HX711 library
HX711 scale;

// Initialize the Keypad
const byte ROWS = 4; // Four rows
const byte COLS = 4; // Four columns
char keys[ROWS][COLS] = {
  {'1','2','3','A'},
  {'4','5','6','B'},
  {'7','8','9','C'},
  {'*','0','#','D'}
};
byte rowPins[ROWS] = {9, 8, 7, 6}; // Connect to the row pinouts of the keypad
byte colPins[COLS] = {5, 4, 3, 2}; // Connect to the column pinouts of the keypad
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, ROWS, COLS);

// Initialize SoftwareSerial for ESP8266
SoftwareSerial esp8266(ESP8266_RX, ESP8266_TX);

void setup() {
  // Set up the LCD's number of columns and rows