A Scale for Automatic Bottle Filling and Honey Filling Machine

by henkol1 in Circuits > Microcontrollers

578 Views, 6 Favorites, 0 Comments

A Scale for Automatic Bottle Filling and Honey Filling Machine

Skjermbilde.PNG

This is definitivly a work in progress project. But it is taking its form in a secound gen. Its a scale for automatic production of filling eiter small conitaners or maybe also bottles. You set a target weight and it has an automatic shutoff valve for when you reach the target weight

Supplies

  1. ESP32
  2. OLED display
  3. HX711 weight scale sensor and associated hardware for the weight scale
  4. 3x4 keypad
  5. Solenoid valve for the shut-off mechanism
  6. Power supply
  7. Jumper wires

I have started on a 3d printed version for this project.

Hardware Connections


  1. Connect the OLED Display:
  2. Connect the VCC pin of the OLED to the 3.3V output on the ESP32.
  3. Connect GND on the OLED to the ground on the ESP32.
  4. Connect SDA on the OLED to the SDA pin on the ESP32.
  5. Connect SCL on the OLED to the SCL pin on the ESP32.
  6. Connect the HX711 Weight Scale Sensor:
  7. Connect the VCC pin of the HX711 to the 5V output on the ESP32.
  8. Connect GND on the HX711 to the ground on the ESP32.
  9. Connect DT on the HX711 to a digital pin on the ESP32 (e.g., GPIO12).
  10. Connect SCK on the HX711 to a digital pin on the ESP32 (e.g., GPIO14).
  11. Connect the 3x4 Keypad:
  12. Connect the common pin (COM) of the keypad to a digital pin on the ESP32 (e.g., GPIO27).
  13. Connect each of the 12 other pins on the keypad to individual digital pins on the ESP32 (e.g., GPIO26, GPIO25, etc.).
  14. Connect the Solenoid Valve:
  15. Connect the control pin of the solenoid valve to a digital pin on the ESP32 (e.g., GPIO33).
  16. Connect the power and ground of the solenoid valve to an appropriate power source.
  17. Connect Load Cells:
  18. Connect the load cells to the HX711 in accordance with the datasheet. This typically involves connecting the four strain gauge wires to the appropriate pins on the HX711.
  19. Power Supply:
  20. Provide power to the ESP32 through its USB port or another suitable power source.

Step 2: Software Setup

  1. Install Arduino IDE:
  • Download and install the Arduino IDE from arduino.cc.
  1. Install ESP32 Board Support:
  • Follow the instructions here to install ESP32 board support in the Arduino IDE.
  1. Install Libraries:
  • Install the necessary libraries for the OLED display, HX711, and keypad using the Library Manager in Arduino IDE.
  1. Download and Upload Code:
  • Download or write the code for your honey production scale.
  • Replace placeholders with your pin configurations.
  • Upload the code to your ESP32 using the Arduino IDE.

Software Setup

  1. Install Arduino IDE:
  2. Download and install the Arduino IDE from arduino.cc.
  3. Install ESP32 Board Support:
  4. Follow the instructions here to install ESP32 board support in the Arduino IDE.
  5. Install Libraries:
  6. Install the necessary libraries for the OLED display, HX711, and keypad using the Library Manager in Arduino IDE.
  7. Download and Upload Code:
  8. Download or write the code for your honey production scale.
  9. Replace placeholders with your pin configurations.
  10. Upload the code to your ESP32 using the Arduino IDE.

The code is using PlatformIO

Downloads

Testing and Calibration

Things will fail but you just have to keep on going

  1. Test Each Component:
  2. Check that the OLED display shows information correctly.
  3. Verify that the keypad registers key presses.
  4. Test the HX711 and load cells by placing known weights on the scale.
  5. Calibrate the Scale:
  6. Follow the calibration process for the HX711 and load cells to ensure accurate weight measurements.

Integration

  1. Implement Auto-Pouring Logic:
  2. Write code to control the solenoid valve based on the weight readings.
  3. Set a target weight for each honey bottle and close the valve when reached.
  4. Implement Bottle Counting:
  5. Use variables in your code to count the number of bottles filled.
  6. Fine-Tune and Optimize:
  7. Test the entire system and make adjustments as needed.
  8. Optimize the code for performance and reliability.

Also added a video of how the model is built in fusion 360

Final Assembly (Not All the Way There Yet Unfortunately)

20231101_173256.jpg
20231101_173313.jpg
Skjermbilde2.PNG
Skjermbilede1.PNG
  1. Mount Components:
  2. Secure all components in a suitable enclosure.
  3. Arrange components for easy access and readability.
  4. Secure Wiring:
  5. Ensure all wiring is secure and tidy to prevent issues.
  6. Seal the System:
  7. If necessary, seal the system to protect it from environmental factors, like honey spills.
  8. Power Up:
  9. Connect the power supply and test the system in its final form.