-
Notifications
You must be signed in to change notification settings - Fork 0
6‐DOFenshmirtz: Roadmap & Gallery
This document outlines the phases and progress made in the development of the 6DOF arm project.
Brainstorm initial concepts and develop basic control for all 6 motors.
- Created initial sketches and CAD models to conceptualize the design and dimensions of the 6DOF arm.
- Developed code to control all 6 motors simultaneously for basic movement and testing.
- Speculated that excessive current might be sent into drivers, leading to concerns about driver safety and reliability.
#include <Stepper.h>
Stepper motor1(STEPS_PER_REVOLUTION, MOTOR1_STEP_PIN, MOTOR1_DIR_PIN);
...
Stepper motor6(STEPS_PER_REVOLUTION, MOTOR6_STEP_PIN, MOTOR6_DIR_PIN);
void setup() {
motor1.setSpeed(60);
...
motor6.setSpeed(60);
}
void loop() {
motor1.step(1000);
...
motor6.step(6000);
delay(1000);
}
Refine CAD models, and gear ratios; 3D print them, and move on to creating a schematic.
Conduct initial testing to evaluate the functionality of the 6DOF arm.
- Updated CAD sketches and schematics based on initial testing and feedback.
- Created 2-3 revisions of schematics in Altium.
- Refined MotorHeap implementation, ISR & Timer Interrupts.
- Conducted small tests with the implemented code and hardware.
Drivers malfunctioned due to the high current load, highlighting the need for better current management.
Reassess our approach completely, and identify areas for improvement to implement necessary changes in the next phases. Our goal was to focus on designing a new custom PCB and refining control algorithms.
- Designed a new custom PCB to address current management issues and enhance overall performance.
- Explored CAD brainstorming sessions to refine the design and optimize the arm's structure and components.
- Implemented a kinematics library from scratch, and included testing and validation steps of forward and inverse kinematics algorithms to ensure accurate arm positioning.
- Integrated the AccelStepper library to mitigate current-related risks and improve motor control precision.
test_forward.py
import kinematics
import math
kin = kinematics.Kinematics(3)
mat = kinematics.MatrixUtils()
kin.add_joint_axis([0, ... 1])
...
kin.add_joint_axis([0, ... -0.1])
kin.add_initial_end_effector_pose([[-1, 0, 0, 0],
[0, 1, 0, 6],
[0, 0, -1, 2],
[0, 0, 0, 1]])
joint_angles = [math.pi/2.0, ..., math.pi]
transform = kin.forward(joint_angles)
mat.print_matrix([transform], 4, 4, "Joint angles")
test_inverse.py
import kinematics
import math
DOF = 6
kin = kinematics.Kinematics(3)
mat = kinematics.MatrixUtils()
kin.add_joint_axis([0, ... 1])
...
kin.add_joint_axis([0, ... -1])
kin.add_initial_end_effector_pose([[-1, 0, 0, 0],
[0, 1, 0, 6],
[0, 0, -1, 2],
[0, 0, 0, 1]])
desired_transform = [
[0, 1, 0, -5],
[1, 0, 0, 4],
[0, 0, -1, 1.69],
[0, 0, 0, 1]
]
joint_angles_0 = [1, ... math.pi]
joint_angles = kin.inverse(desired_transform, ... joint_angles_0, ...)
mat.print_matrix([joint_angles], 1, DOF, "Joint angles")
#include <AccelStepper.h>
#include <MultiStepper.h>
AccelStepper stepper1(AccelStepper::DRIVER, STEPPER1_STEP_PIN, STEPPER1_DIR_PIN);
...
AccelStepper stepper6(AccelStepper::DRIVER, STEPPER6_STEP_PIN, STEPPER6_DIR_PIN);
steppers.addStepper(stepper1);
...
steppers.addStepper(stepper6);
...
steppers.moveTo(positions.getPositions());
Unit tests of AccelStepper integration are successful, move on to rigorous testing of kinematics, and find a way to integrate a Python package into Arduino.
Perform rigorous testing to validate the redesigned system and components via simulation tools and refine communication protocols.
- Utilized PyBullet simulation to simulate arm movements and assess system dynamics.
- Created a URDF model of the arm for simulation and visualization purposes.
- Developed final CAD models based on feedback and testing results, ensuring optimal design and functionality.
- Implemented UART communication via the serial port for reliable data transfer between components.
Check out our simulation branch here.
control.py
import serial
uart = serial.Serial(port="COM3", baudrate=115200, timeout=0.1)
...
uart.write(joint_angles .encode())
motor-control.ino
String readUART() {
while(Serial.available() == 0){
pinMode(13, OUTPUT);
}
String jointAngles = Serial.readStringUntil('\r');
return jointAngles;
}
Simulation works as intended for Forward & Inverse Kinematics, sample UART code via a port works as intended; we now move on to the final assembly & integration.
- Integrated all components into the final assembly, ensuring compatibility and functionality.
- Conducted comprehensive testing and validation to verify performance and reliability.
Achieved a stable and functional 6DOF arm, meeting our project requirements and objectives :) Please refer here for a comprehensive guide to how our arm works.