/Robotic-Arm

6 dof Robot arm build from scratch, mechanical, electrical, hardware & software!

MIT LicenseMIT

Copyright 2023 Ryan Paul McKenna

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

6 DOF Robotic Arm

  • Complete schematic.
  • Complete foot-print.
  • Complete PCB 3D model (Should be auto-generated by easyeda).
  • order SMD soldering kit.
  • Successfully assemble the closed loop driver for one of the motors.
  • Test individual functionality: code upload, magnetic encoder keeping steps.
  • Assemble a second motor and get them to communicate over CAN-bus.
  • Adjust schematic and magnet sizes accordingly for each size of motor.
  • Assemble all motors for the projects.
  • Complete the schematic for the control board and assemble it.
  • Test control board commanding all the motors.
  • Design 3D model of robotic arm.
  • Print 3D model of robotic arm.
  • Assemble full robotic arm.
  • Send off for metal fabrication of 3D model.
  • Re-assemble metal version.
  • Test full basic functionality.
  • Begin to design and develop the actual code for the whole project.
  • Take it to a high level with neural networks, inverse kinematics, control theory, etc.

The Main controller

  • a chip that can support a Linux environment
  • a chip that can support CAN or interface with a CAN controller
  • USB for control via PC
  • WiFi wireless capable
  • 12V Power power management system , steps up and steps down as required
  • Small screen with status’
  • On button
  • Fully controllable from PC

Robotic Arm functions

Laser CNC machine

General lab helper

Assembler robot

The Physical Structure

The 3D model will be designed in FREECAD.

To begin, model all the motors to scale with their pcbs attached to the back and a small animation showing the Motor → magnet → pcb → heat sinks → protective covering → screws being assembled. The motors all have screw holes on their faces so they will be housed in cut out sections the exact size of the motor and screwed in from the other side via their faces.

  • Complete PCB in full for all motors. If necessary Design 3D model. Download 3D models of pcbs for use in FREECAD design.
  • Model All Motors in FREEDCAD. Model animation of Motor assembly.

The whole robot will be designed around these motors based on their strength (Torque) and dimensions. The way the placement and of the harmonic reduction gears affects system must be understood so that the physical design can be optimized.

  • Perform all relevant calculations on simplified cylindrical drawing. So that all the lengths of and weights of the respective arm sections are known.
  • Design 3D Robot Arm based on the afore mentioned calculations.

The Motors

Six motors of different sizes are required and the pcb will need to be adjusted slightly for each one.

Further analysis is needed to know which motors will be used and how this will affect the pcb. The voltage requirements of the Motor driver A4988 are 8V to 35V, however it seems that some of these motors will run on very low power. However, the voltage restriction of the motors themselves is only thermal, if sufficient heat dissapation can be achieved the motors can use a higher voltage.

I could run them all at 8V to stick with the current motors driver which then means all the motors will need heat sinks and that I will need to calculate that these heat sinks will good enough.

One I have solved the afore mentioned problems and chosen 6 motors and found heat sinks for them that will do what is required I can do the next part.

Create 3D models of all motors in FREECAD, their pcbs (Obviously the footprint and whole pcb design will need be completed). Be able to see the assembled Motors with their pcbs and screws and heat skins and see-through protective covering (CNC?, probably order that until I have a CNC), then I can design the rest of the robotic arm around these (to scale) 3D models of the motors.

I have not given thought to BACK EMF yet, this needs to be resolved.

At this point if nothing else has come up, perform the Proof of concept, order some or all of the stuff ready to assemble the closed loop motor driver and get all or some of the motors communicating over CAN.

Chosen Motor sizes

Nema-17 x 3 → Torques: big(42x38), medium(42x28), small (42x23) ORDERED

Nema-11 x 3 → Torques: big (28x52), small (27x28)x2 ORDERED

Motor Front face size Length size diametric magnet required
Nema17-Big 42x42 38
Nema-17-Medium 42x42 28
Nema-17-Small 42x42 23
Nema-11-Big 28x28 52
Nema-11-Small 28x28 28

Chosen Extension lengths

Wrist → ?mm

Forearm →?mm

Elbow →?mm

Arm →?mm

Base →?mm

Nema

Nema sizes range from 6 to 52 but there are smaller and larger options available.

The number refers to the x and y of the motor.

NEMA 17 is 1.7 inches therefore 42mm, the motors are square to 42mm is the length of both sides.

The number does not tell you the torque of the motor.

The length of the steppper motors tells you the torque.

Closed-Loop Motor Driver

Reading motor position: Magnetic Encoder AS5600

Reads positions from magnet via AS5600 and outputs the either as a Voltage that represents the angle as a rationmetric linear absolute value or a digital output which represents the angle as the pulse width. The same pin is responsible for both. Denoted as OUT on the schematic.

Data from OUT is sent to another IC on the motor driver pbd that makes sure the motor never misses a step and is always where it should be off loading some of the computing from the main board.

Writing motor position: Motor Driver A4988

Writes motor positions via A4988 motor driver. Motor driver requires 2 wires (power and ground) for power supply 8V to 35V. Output to motors requires 4 wires. Controlling motor requires to inputs that can be set high or low. Programming is simple PWM.

Control motor pins: DIR, STEP → Motor driver Controller IC.

Power pins: POWER, GROUND → ?

MCU

Reads Motor Position from the the AS5600 OUT pin. Therefore Analog IN pin required.

Writes Motor Position to the A4988 bio-polar stepper motor driver via 2 output pins STEP and DIR. Therefore 2 digital PWM pins required.

Performs logic to ensure Motor does not loose steps. Therefore must be user programmable, pins will be required for this, potentially micro usb would be clean. probably I2C with I2C/USB converter.

Comminication with CAN controller over SPI.

Sends angles to and Receives angles from CAN BUS and processes this data to control A4988 Motor driver. Communicate via SPI. Libararies may be required fo SPI.

SPI

CLOCK

MOSI (Master-Out Slave-In)

MISO (Master-In Slave-Out)

CS ( Chip select line, one per slave) Pulled high when no communication, pulled low during communication.

  • SPI (4 pins)
  • OUT
  • STEP
  • DIR
  • I2C (2 pins)

Main Control Unit USB programmer

FT23RL

CAN BUS Controller and Transceiver

bidirectional communication via CANH and CANL via transceiver processer by CAN controller and bidirectional communication via SPI to MCU.

libraries will be needed to interface with this.

Power management

5V linear voltage regulator is all that is required to separate the logic power supply for the ICs from the power required for driving the motors.