DJ-SET ROBOTIC ARM CONTROLER

by carmenbaelisava in Circuits > Arduino

174 Views, 0 Favorites, 0 Comments

DJ-SET ROBOTIC ARM CONTROLER

IMG_0890.JPG
IMG_0888.JPG

Do you want to feel like a DJ while controling a robotic arm? Well this is for you! With this simple intructions you will be able to create your own board where you can control anything.

Supplies

Arduino.png
  • Arduino UNO:https://www.amazon.es/Arduino-UNO-A000066-microcontrolador-ATmega328/dp/B008GRTSV6/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=QEATQ984Y2TJ&keywords=arduino+uno&qid=1669886819&qu=eyJxc2MiOiI0LjgzIiwicXNhIjoiMy41MiIsInFzcCI6IjMuMTIifQ%3D%3D&sprefix=arduino+uno%2Caps%2C102&sr=8-5


  • 5 Sliders: https://www.amazon.es/Pod%C3%B3metro-deslizante-resistencia-potenci%C3%B3metro-anal%C3%B3gica/dp/B07TYY53PJ/ref=sr_1_2?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=NQT5J20LRTR0&keywords=potenciometro+slider&qid=1669886704&qu=eyJxc2MiOiIwLjAwIiwicXNhIjoiMC4wMCIsInFzcCI6IjAuMDAifQ%3D%3D&sprefix=potenciometro+slider%2Caps%2C110&sr=8-2


  • 5 Rotatives: https://www.amazon.es/potenci%C3%B3metro-Arduino-Raspberry-proyectos-Knurled/dp/B07B2S62PH/ref=sr_1_7?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=120BDDIZ3UGH4&keywords=potenciometro&qid=1669886743&qu=eyJxc2MiOiI1Ljc3IiwicXNhIjoiNS4zNyIsInFzcCI6IjQuNzYifQ%3D%3D&sprefix=potenciometro%2Caps%2C93&sr=8-7




Other components you may need:

  • Wooden sheet
  • Toothpicks
  • Straws
  • Hot Silicone Gun

Create Your Design

IMG_0888.JPG
  • In this case with laser, we created our own design where we have copied the original logo of Pioneer and incorporates in to our design and cut it and engrave it.
  • This file contains the design of the photo, you can copy it or change it.



Ensamble the Components

TINKER02.png

Following the photo connect all the components

Downloads

Code

//What is the starting angle of the arm


float j0_angle = 0;

float j1_angle = 0;

float j2_angle = 0;

float j3_angle = 0;

float j4_angle = 0;



//Define Slider

int l1 = 3;

int l2 = 4;

int l3 = 5;

int l4 = 6;

int l5 = 7;

//Define Rotative

float r1 = A0;

float r2 = A1;

float r3 = A2;

float r4 = A3;

float r5 = A4;


void setup() {

  Serial.begin(115200);  // activate Serial Communication

  //Serial.begin(9600);

  //Define DIGITAL

  /*The Sliders will be consider Digital components.

  This way their funtion will be  just to turn on or off of each arm */

  pinMode(3, INPUT);

  pinMode(4, INPUT);

  pinMode(5, INPUT);

  pinMode(6, INPUT);

  pinMode(7, INPUT);


  //Define Analog

  /*In this case the rotatives will have the function of moving the arm, so they will be analog */

  pinMode(A0, INPUT);

  pinMode(A1, INPUT);

  pinMode(A2, INPUT);

  pinMode(A3, INPUT);

  pinMode(A4, INPUT);


}


void loop() {

 

  int valorl1 = digitalRead(l1);

  int valorl2 = digitalRead(l2);

  int valorl3 = digitalRead(l3);

  int valorl4 = digitalRead(l4);

   int valorl5 = digitalRead(l5);

  // Serial.println(valorl1); //This is in case you want to know what value is making.


  /*For each arm, we set up  an slider an a rotative. If the slider is ON (1),

the rotative will have current to function. If it is not that case, meaning

the slider is OFF(any other number but 1), then it does not work, it just print in the serial monitor "axis not activated"  */


 /*Due to each arm can rotate different degrees, we have used the function map. With this

 function we stablish that the lowest degree of the arm will be also for the rotative potenciometer.

 And for the higher degree of the arm will be also the higher one for the rotative potenciometer*/


  if (valorl1 == 1) {


    Serial.println(valorl1);

    float valorr1 = analogRead(r1);

    valorr1 = map(valorr1, 0, 1023, 0, 360);

    Serial.println(valorr1);

    j0_angle = valorr1;

    Serial.println("J0_" + String(j0_angle, 3));  // Send Angle data. Format is "A_123.456"

    Serial.flush();                               // wait for messages to be sent

    delay(200);                                   // wait for 5 seconds


  } else {

    Serial.println("axis no activated");

  }

  if (valorl2 == 1) {


    Serial.println(valorl2);

    float valorr2 = analogRead(r2);

    valorr2 = map(valorr2, 0, 1023, -120, 120);

    Serial.println(valorr2);

    j1_angle = valorr2;

    Serial.println("J1_" + String(j1_angle, 3));  // Send Angle data. Format is "A_123.456"

    Serial.flush();                               // wait for messages to be sent

    delay(200);                                   // wait for 5 seconds


  } else {

    Serial.println("axis no activated");

  }


  if (valorl3 == 1) {


    Serial.println(valorl3);

    float valorr3 = analogRead(r3);

    valorr3 = map(valorr3, 0, 1023, -120, 120);

    Serial.println(valorr3);

    j2_angle = valorr3;

    Serial.println("J2_" + String(j2_angle, 3));  // Send Angle data. Format is "A_123.456"

    Serial.flush();                               // wait for messages to be sent

    delay(200);                                   // wait for 5 seconds


  } else {

    Serial.println("axis no activated");

  }

  if (valorl4 == 1) {


    Serial.println(valorl4);

    float valorr4 = analogRead(r4);

    valorr4 = map(valorr4, 0, 1023, 0, 360);

    Serial.println(valorr4);

    j3_angle = valorr4;

    Serial.println("J3_" + String(j3_angle, 3));  // Send Angle data. Format is "A_123.456"

    Serial.flush();                               // wait for messages to be sent

    delay(200);                                   // wait for 5 seconds


  } else {

    Serial.println("axis no activated");

  }

  if (valorl5== 1) {


    Serial.println(valorl5);

    float valorr5 = analogRead(r5);

    valorr5 = map(valorr5, 0, 1023, -120, 120);

    Serial.println(valorr5);

    j4_angle = valorr5;

    Serial.println("J4_" + String(j4_angle, 3));  // Send Angle data. Format is "A_123.456"

    Serial.flush();                               // wait for messages to be sent

    delay(200);                                   // wait for 5 seconds


  } else {

    Serial.println("axis no activated");

  }

}

Work Flow

wf1.jpg
wf2.jpg

Ensamble the Components to You Design

IMG_0880.JPG

We ensambled the components using hot silicone and straws. With this materials we ensure that it is all fixed.

Have Fun!

IMG_0890.JPG

Have fun! Enjoy and feel like a DJ!