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
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
- ESP32
- OLED display
- HX711 weight scale sensor and associated hardware for the weight scale
- 3x4 keypad
- Solenoid valve for the shut-off mechanism
- Power supply
- Jumper wires
I have started on a 3d printed version for this project.
Hardware Connections
- Connect the OLED Display:
- Connect the VCC pin of the OLED to the 3.3V output on the ESP32.
- Connect GND on the OLED to the ground on the ESP32.
- Connect SDA on the OLED to the SDA pin on the ESP32.
- Connect SCL on the OLED to the SCL pin on the ESP32.
- Connect the HX711 Weight Scale Sensor:
- Connect the VCC pin of the HX711 to the 5V output on the ESP32.
- Connect GND on the HX711 to the ground on the ESP32.
- Connect DT on the HX711 to a digital pin on the ESP32 (e.g., GPIO12).
- Connect SCK on the HX711 to a digital pin on the ESP32 (e.g., GPIO14).
- Connect the 3x4 Keypad:
- Connect the common pin (COM) of the keypad to a digital pin on the ESP32 (e.g., GPIO27).
- Connect each of the 12 other pins on the keypad to individual digital pins on the ESP32 (e.g., GPIO26, GPIO25, etc.).
- Connect the Solenoid Valve:
- Connect the control pin of the solenoid valve to a digital pin on the ESP32 (e.g., GPIO33).
- Connect the power and ground of the solenoid valve to an appropriate power source.
- Connect Load Cells:
- 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.
- Power Supply:
- Provide power to the ESP32 through its USB port or another suitable power source.
Step 2: Software Setup
- Install Arduino IDE:
- Download and install the Arduino IDE from arduino.cc.
- Install ESP32 Board Support:
- Follow the instructions here to install ESP32 board support in the Arduino IDE.
- Install Libraries:
- Install the necessary libraries for the OLED display, HX711, and keypad using the Library Manager in Arduino IDE.
- 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
- Install Arduino IDE:
- Download and install the Arduino IDE from arduino.cc.
- Install ESP32 Board Support:
- Follow the instructions here to install ESP32 board support in the Arduino IDE.
- Install Libraries:
- Install the necessary libraries for the OLED display, HX711, and keypad using the Library Manager in Arduino IDE.
- 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.
The code is using PlatformIO
Downloads
Testing and Calibration
Things will fail but you just have to keep on going
- Test Each Component:
- Check that the OLED display shows information correctly.
- Verify that the keypad registers key presses.
- Test the HX711 and load cells by placing known weights on the scale.
- Calibrate the Scale:
- Follow the calibration process for the HX711 and load cells to ensure accurate weight measurements.
Integration
- Implement Auto-Pouring Logic:
- Write code to control the solenoid valve based on the weight readings.
- Set a target weight for each honey bottle and close the valve when reached.
- Implement Bottle Counting:
- Use variables in your code to count the number of bottles filled.
- Fine-Tune and Optimize:
- Test the entire system and make adjustments as needed.
- 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)
- Mount Components:
- Secure all components in a suitable enclosure.
- Arrange components for easy access and readability.
- Secure Wiring:
- Ensure all wiring is secure and tidy to prevent issues.
- Seal the System:
- If necessary, seal the system to protect it from environmental factors, like honey spills.
- Power Up:
- Connect the power supply and test the system in its final form.