An advanced robotic system designed for precise butt welding of pipes with gap mapping, dynamic filler control, and torch positioning using Raspberry Pi, Arduino Mega, and multiple sensors and motors.
- Introduction
- Features
- Hardware Components
- Wiring Diagram
- System Architecture
- Installation
- How It Works
- Contributing
- License
This project automates the process of butt welding two pipes by:
- Mapping and analyzing gaps in the seam.
- Dynamically adjusting filler feed and torch positioning based on real-time gap measurements.
- Coordinating multiple motors and sensors for precise operation.
The system is designed for 30 cm diameter pipes (~30 kg each) and includes features for error detection, job rejection, and process logging.
- 360° Pipe Rotation: Stepper motor with encoder feedback for accurate positioning.
- Torch Movement: Horizontal (X-axis) and vertical (Y-axis) adjustments for precise welding.
- Gap Mapping: Raspberry Pi camera with OpenCV analyzes seam gaps.
- Dynamic Filler Control: Adjusts filler speed based on gap measurements.
- Error Handling: Rejects jobs with gaps >6 mm.
- Data Logging: Stores seam profiles for analysis and traceability.
- Raspberry Pi 5: Vision processing, decision-making, and system coordination.
- Arduino Mega 2560: Real-time motor and sensor control.
- Stepper R: Rotates the pipe at a controlled speed (e.g., 60 RPM).
- Stepper X: Moves the welding torch horizontally.
- Stepper Y: Adjusts torch height dynamically using a distance sensor.
- Stepper F: Feeds filler material based on gap size.
- VL53L0X: Distance sensor for maintaining torch-to-surface gap (~1-2 mm).
- E6A2 Encoder: Tracks pipe rotation angle.
- Raspberry Pi Camera V2: Captures seam images for gap analysis.
- Laser Module: Provides alignment guidance.
- Relays: Controls the welding torch and laser.
- Power Supply: 12V/24V DC for motors and sensors.
Below is an overview of the connections:
Component | Pin Assignments |
---|---|
DC Motor (Pipe Rotation) | Pin 12 (Relay) |
Encoder A/B | Pins 9, 10 |
X Stepper | STEP: Pin 2, DIR: Pin 5 |
Y Stepper | STEP: Pin 3, DIR: Pin 6 |
F Stepper | STEP: Pin 4, DIR: Pin 7 |
VL53L0X | SDA: A4, SCL: A5 |
Laser Module | Pin 11 (Relay) |
- Pipe Rotation Subsystem (Stepper R):
- Rotates the pipe and tracks position with the encoder.
- Torch Positioning Subsystem (Stepper X/Y):
- Moves the torch horizontally and vertically.
- Gap Mapping Subsystem:
- Uses Raspberry Pi camera and OpenCV for seam analysis.
- Filler Control Subsystem (Stepper F):
- Feeds filler material dynamically based on gap measurements.
- Assemble pipe holders and align motors.
- Mount Raspberry Pi and camera for a clear view of the seam.
- Wire all motors, sensors, and relays as per the diagram.
-
Install Raspberry Pi OS.
-
Install Python libraries:
sudo apt update sudo apt install python3-opencv pip3 install vl53l0x smbus
-
Clone this repository:
git clone https://github.com/amirholakoo/Welding-Vision.git
cd <repository-folder>
- Install the Arduino IDE.
- Add libraries for VL53L0X and stepper motor control.
- Upload the provided firmware to the Arduino Mega.
- The pipe rotates incrementally.
- Raspberry Pi captures images and calculates gaps using OpenCV.
- A gap map is created and stored (angle vs. gap size).
- Torch positions itself based on the gap map.
- Pipe rotates continuously.
- Filler feed adjusts dynamically.
- Welding completes after a full 360° rotation.
- Motors stop.
- Torch and laser guide return to their home positions.
- Logs are saved for analysis.
Feel free to contribute by:
- Reporting issues.
- Suggesting new features.
- Submitting pull requests.
This project is licensed under the MIT License. See the LICENSE
file for details.
- Special thanks to ChatGPT for detailed planning and implementation support.
- Kudos to the community for their feedback and testing!