close-circle
Close
0%
0%

Pedro Petit Robot An Open Source Robotic Arm

Pedro Petit Robot low cost open source 3D printed robotic arm fun and safe to learn, with USB control

Similar projects worth following
Pedro Petit Robot is an Open Source Robotic Arm 4 axes designed in France and fully 3D printed. This robot is easy to program with an Arduino Software (IDE), it can catch and move some objects with a high precision. Pedro Petit Robot is fun and safe way to learn for teacher, student, programmer, artist, designer, amateur or even curious to learn the basics of robotics.

 Pedro Petit Robot full kit is available on Tindie:

I sell on Tindie

You can also order your Pedro Petit Robot 3D printed on Thingiverse:

Pedro Petit Robot 3D printing



Pedro Petit Robot demo


See below for the Arduino code used for this demonstration.


Hardware

Pedro Petit Robot is equipped with 4 mini SG90 servo motors.

  • The servo motor 1 placed at the base of Pedro Petit Robot allows it to rotate 180 degrees on itself giving a very wide field of view of its environment.
  • The servo motor 2 placed shoulder level allows it to rotate 180 degrees vertically.
  • The actuator 3 the elbow makes it possible to lift objects gripped.
  • Servo 4 is Pedro Petit Robot's gripper which allows it to catch any object in its field of view and move.


Pedro Petit Robot is a programmable robot with the Arduino IDE thanks to an embedded card equipped with an Atmega328 microcontroller with a storage capacity of 1024 bytes enabling it to record a sequence of 255 positions on each axis and to replay them continuously. The Pedro board is powered by 6V and has 2 pushbuttons each connected to a pilot led allowing different functions to be realized (example: button 1 to register or initialize the movements of the robot, button 2 to replay or stop robot movements, "You're only limited by your imagination" Pedro Petit Robot can be controlled by 4 potentiometers, each connected to an axis, base, shoulder, elbow and gripper. The Pedro card has a USB TTL serial link to connect Pedro Petit Robot with a computer.

Board components required

  • Atmega328P x1
  • 22pF capacitor x2
  • 10uF capacitor x1
  • 0.1uF capacitor x1
  • 220 ohm resitance x5
  • 16Mhz quartz x1
  • regulator 5V LM7805 x1
  • Led 5mm x2
  • push button x2
  • potentiometer 50k or 10M (have been tested) x4
  • pin header x16
  • dc power jack 2.1mm x1

Arduino mapping with Pedro board

  • Button 1                          =>        digital pin 12
  • Button 2                         =>        digital pin 13
  • Led 1                               =>       digital pin 9
  • Led 2                              =>       digital pin 10
  • Servo 1                            =>       digital pin 3
  • Servo 2                           =>       digital pin 5
  • Servo 3                           =>        digital pin 6
  • Servo 4                           =>        digital pin 11
  • Potentiometer 1              =>        analog pin 5
  • Potentiometer 2             =>        analog pin 4
  • Potentiometer 3             =>        analog pin 3
  • Potentiometer 4            =>        analog pin 2



Software

Easily programming with Arduino Software (IDE).

A graphical user interface allows to control Pedro Petit Robot with more function like manage speed. It's developed in python 3 and it's available on Windows, Mac OS and Linux.

Pedro Petit Robot is open source, free software. Please select the download for your platform below.

  • Windows 32 bit (coming soon ...)
  • Windows 64 bit (coming soon ...)
  • Mac OS X 10.7 and up (coming soon ...)
  • Linux 32 bit (coming soon ...)
  • Linux 64 bit (coming soon ...)
  • Source Github (coming soon...
Read more »

pedro_v1.ino

Arduino code run on the demonstration video

ino - 11.03 kB - 08/16/2017 at 23:33

download-circle
Download

  • Arduino code used for video demonstration

    saandial5 days ago 0 comments

    /*
    ============================================================================================================
                                  PEDRO: Programming Educational Robot
    ============================================================================================================
    title           :pedro_v1.ino
    description     :Arduino code for Pedro Petit Robot an open source 3D robotic arm
    authors         :Almoutazar Saandi
    email           :almoutazar.saandi@gmail.com
    date            :2016-2017
    ============================================================================================================
    */
    #include <Servo.h>
    #include <EEPROM.h>
    Servo servo1;
    Servo servo2;
    Servo servo3;
    Servo servo4;
    int addr = 0;
    int recOK = 0;
    int posOne, posTwo, posThree, posFour, posFive;
    int posOne1, posTwo1, posThree1, posFour1, posFive1;
    int n = 200;
    int posServo1[200];
    int posServo2[200];
    int posServo3[200];
    int posServo4[200];
    byte msgByte[6];
    String msgString = "";
    int msg[5];
    boolean replaying = false;
    boolean recording = false;
    int stepSpeed = 10;
    int state = 0;
    boolean btnPlay = false;
    boolean btnRec = false;
    boolean btnStop = false;
    const int ANGLE_MIN = 0;
    const int POS_MIN = 550;
    const int ANGLE_MAX = 172; 
    int POS_MAX = 2400;
    int button_1 = LOW;
    int button_2 = LOW;
    int btnRepeat = LOW;
    int old_btnRepeat = LOW;
    bool serialUsed = false;
    int val1 = 0;
    int val2 = 0;
    int val3 = 0;
    int val4 = 0;
    boolean inRecord = false;
    void setup() {
      Serial.begin(9600);
      pinMode (9,OUTPUT);
      digitalWrite (9, LOW);
      pinMode (10,OUTPUT);
      digitalWrite (10, LOW);
      pinMode (12,INPUT);
      pinMode (13,INPUT);
      servo1.attach(3);
      servo2.attach(5);
      servo3.attach(6);
      servo4.attach(11); 
     
      analog_Write();  
      goHome();
    }
    void loop() {
      analog_Write();
      //serialRead();
      button_1 = digitalRead(12);
      button_2 = digitalRead(13);
      if (digitalRead(12) == true and inRecord == false) {
        inRecord = true;
         record();
         if (digitalRead(13) == true)
         { 
            addr = 0;
            digitalWrite (9, HIGH); //jaune
            while (addr < n) {
              digitalWrite (9, HIGH); //jaune
              posServo1[addr] = 255;
              posServo2[addr] = 255;
              posServo3[addr] = 255;
              posServo4[addr] = 255;
              addr++;  
             }
            addr = 0; 
            digitalWrite (9, HIGH);
            delay(100);
            digitalWrite (9, LOW);
            delay(100);
            digitalWrite (9, HIGH);
            delay(100);
            digitalWrite (9, LOW);
            record();
        }
      }
      if (digitalRead(12) == false) {
          inRecord = false;
      }
      if (digitalRead(13) == HIGH and digitalRead(12) == LOW) {
          addr = 0;
          digitalWrite (10, HIGH); //rouge
          replaying = true;
          replay();
      } else if (button_2 == LOW) {
          digitalWrite (10, LOW);
      }
    }
    void repeat() {
      btnRepeat = digitalRead(13); //stop le robot durant un mode replay
      if ((btnRepeat == HIGH) and (old_btnRepeat == LOW)) {
        if (state == 2) {
          state = 1; //repeat one time
        } else { 
          state++;   //repeat
        }
      }
      old_btnRepeat = btnRepeat;
    }
    void analog_Read() {
      val1 = analogRead(5); 
      val1 = map(val1, 0, 1023, 0, 180);  
       
      val2 = analogRead(4); 
      val2 = map(val2, 0, 1023, 0, 180); 
      val3 = analogRead(3); 
      val3 = map(val3, 0, 1023, 0, 180);
      val4 = analogRead(2); 
      val4 = map(val4, 0, 1023, 0, 180); 
      msg[1] = val1;  
      msg[2] = val2;
      msg[3] = val3; 
      msg[4] = val4; 
      
    }
    void record() {
      digitalWrite (9, HIGH);
      delay(100);
      digitalWrite (9, LOW);
      
      analog_Read();
      //serialRead();
      
      servo1.write (angle(msg[1]));
      posServo1[addr] = msg[1];
      Serial.print("record servo1 =");Serial.println(msg[1]);
       
      servo2.write (angle(msg[2]));
      posServo2[addr] = msg[2]; 
      
      servo3.write (angle(msg[3]));
      posServo3[addr] = msg[3];
      
      servo4.write (angle(msg[4]));
      posServo4[addr] = msg[4];
      addr++;
      if (addr >= n)
          {
            digitalWrite (10, LOW);
            digitalWrite (9, HIGH);
            delay (500);
            digitalWrite (9, LOW);
            delay (500);
            digitalWrite (9, HIGH);
            delay (500);
            digitalWrite (9, LOW);
            addr = 0;
            recording = false;
            goHome();
          }
    } 
    void analog_Write() {
      analog_Read(); 
      servo1.write (msg[1]); 
      servo2.write (msg[2]);
      servo3.write (msg[3]);
      servo4.write (msg[4]);
    } 
    void goHome() {
      analog_Read();
      goSomeWhere(val1, val2, val3, val4);
    }
    void goSomeWhere...
    Read more »

View project log

Enjoy this project?

Share

Discussions

Dan DWRobotics wrote 08/07/2017 at 18:13 point

Despite the simplicity, this is a really great design. I love how compact it is. Would be a great learning tool for kids. Plus I reckon you can make this extremely cheap and produce them very fast. I would be tempted to print loads and get them all going at the same time!!

  Are you sure? yes | no

saandial wrote 08/07/2017 at 18:54 point

Hi @Dan DWRobotics. You are right, the design of Pedro is very simple and can be a great learning tool for children or students to understand the basics of robotics. A copy of the robot with complete kit and 3D accesory is already available on tindie.com for only $61. The programmable board with Atmage328, USB cable and serial link USB TTL is also available for only $19. You can already print Pedro Petit Robot for free with .stl files available at thingiverse.com. Enjoy it.

Pedro links : https://www.tindie.com/stores/saandial/

                    : https://www.thingiverse.com/thing:2465385

  Are you sure? yes | no

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates