Skip to content

ESP32 MQTT Bambu X1C watcher that activates a motor when "poop" is conveyed

License

Notifications You must be signed in to change notification settings

devoh747/Bambu-Poop-Conveyor-ESP32

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Bambu Poop Conveyor for ESP32

Overview

The Bambu Poop Conveyor is an application designed to manage the waste output of a Bambu X1 3D printer. It utilizes WiFi and MQTT protocols to monitor the printer's status and control a motor that moves waste material away from the printing area.

IMG_1297.mov
IMG_1299.mov

Conveyor Makerworld files

Features

  • WiFi and MQTT Connectivity: Connects to a local WiFi network and communicates with the printer via MQTT.
  • Motor Control: Activates a motor to manage the printer's waste output based on the printer's status.
  • Web Server: Hosts a web server to provide manual control and configuration of the system.
  • Stage Monitoring: Monitors various stages of the printer to determine when to activate the motor.

Setup

WiFi and MQTT Configuration

Enter your WiFi and MQTT credentials in the following variables:

// WiFi credentials
char ssid[40] = "your-ssid";
char password[40] = "your-password";

// MQTT credentials
char mqtt_server[40] = "your-mqtt-server-ip";
char mqtt_password[30] = "your-mqtt-password";
char serial_number[20] = "your-printer-serial-number";

GPIO Pins

The application uses the following GPIO pins for motor and LED control:

#define BLED 2
const int greenLight = 19;
const int redLight = 4;
const int yellowLight = 18;

int motor1Pin1 = 23;
int motor1Pin2 = 21;
int enable1Pin = 15;

Motor Control Timings

Configure the motor run time and wait time:

int motorRunTime = 15000; // Motor runs for 15 seconds by default
int motorWaitTime = 25000; // Wait 25 seconds before running the motor
int delayAfterRun = 50000; // Delay after running the motor to avoid duplicate detection

PWM Configuration

Set the PWM properties for motor control:

const int freq = 5000;
const int pwmChannel = 0;
const int resolution = 8;
int dutyCycle = 220;

Usage

Web Server

The application hosts a web server to provide manual control and configuration. Access the following URLs for different functionalities:

  • Root URL: Activates the motor (/)
  • Control URL: Manual motor control page (/control)
  • Config URL: Configuration page to update settings (/config)

Configuration Screen Configuration Screen

Printer Stage Monitoring

The application monitors the printer's stages and activates the motor when necessary. The stages are identified using MQTT messages from the printer.

Installation

  1. Connect the ESP32 to your computer.
  2. Open the code in the Arduino IDE.
  3. Enter your WiFi and MQTT credentials in the respective variables.
  4. Upload the code to the ESP32.
  5. Access the web server via the IP address assigned to the ESP32 to configure and control the application.

List of some supplies

Not listed

  • Wires
  • LEDs (Standard dev kit leds)

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

ESP32 MQTT Bambu X1C watcher that activates a motor when "poop" is conveyed

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 100.0%