Skip to content

17. Machine design

This week, I have to achieve my work on the Delta robot I made on week 15 for the group project. This week will be dedicated to the programation of the robot.

Electronic

To drive my robot, I need to have :

  • Three output for my servomotors
  • One output for my electromagnet

So, I will use a board I use quite a few time in my robotic project : it’s the Dagu S4A EDU Controller.

It’s a board drived by an Atmega328P and with direct output for 8 servomotors and the abilities to drive two DC motors. It’s very compact and easy to program using the bootloader or the ISP connector.

Code

Algorithm of the Delta robots

During my research about the delta robot, I found an interesting document written by Robert L. Williams Mechanical Engineering, Ohio University on October 2016 intitulated “The Delta Parallel Robot: Kinematics Solutions”.

You can find this document here.

Extract of the document - Page 4

After reading it and made some research, I also found that people used this job to make a library in C to drive Delta robot. Tinkersprojects made a great job to simplify this work into an friendly library: Delta-Kinematics-Library

The use is very simple :

Setup

DeltaInverseKinematics(double *angleB1,double *angleB2,double *angleB3,double ArmLength,double RodLength,double BassTri,double PlatformTri);

This Function setup the variables that will be return for the motors.

  • angleBx - The variable used to store the results of the calculation
  • ArmLength - Lenght of the first arm (m)
  • RodLength - Lenght of the second arm (m)
  • BassTri - Distance (Sb) of the upper platform (m)
  • PlatformTri - Distance (Sp) between the axle and the lower paltform (m)

Note

As there is poor informations into the github of the library, I opened an issue to see how I can help the creator of the library to improve the Readme of the library. We are still working on it.

Set

void set(double x,double y,double z);

This function calculate the angle of each motor given the position X, Y and Z. The motor angles will be return thought the variables declared in the setup : angleB1, angleB2 and angleB3. The values of the angles are in radians.

Example

The library provide also a great example using servomotors :

#include <DeltaInverseKinematics.h>
#include <Servo.h>

Servo servo3;
Servo servo2;
Servo servo1;

double angleB1;
double angleB2;
double angleB3;

DeltaInverseKinematics IPK(&angleB1,&angleB2,&angleB3,0.070,0.300,0.139,0.112);

void setup()
{  
  Serial.begin(115200);

  servo1.attach(7);
  servo2.attach(6);
  servo3.attach(5);
}

void servo()
{
  Serial.println(String(angleB1* 180 / 3.14)+","+String(angleB2* 180 / 3.14)+","+String(angleB3* 180 / 3.14));
  servo1.write(angleB1* 180 / 3.14);
  servo2.write(angleB2* 180 / 3.14);
  servo3.write(angleB3* 180 / 3.14);
}

void loop()
{
  IPK.set(0,0,-0.300);
  servo();
  delay(3000);

  IPK.set(0,0,-0.270);
  servo();
  delay(3000);

  IPK.set(0.100,0.100,-0.270);
  servo();
  delay(3000);
}

So, what I need to do now is to setup the correct value for my delta robot and write the communication part. The documentation is on the group page : La Machinerie

First test

And it works ! I’ve got to tune a little bit the values, but it’s alive guys ! 😄

Next ?

For the next of the work, you can go on the group page to have more informations about our realization. And below, you can find the video we made for this project :

Source file