Welcome, Guest. Please Login
News:
Arduino: Forum
05.04.2011 at 20:58:23


Pages: 1 2 3 
Plotter - 3 servos (Read 9659 times)
eziosoft
YaBB Newbies
*
Offline

Arduino rocks

Posts: 11

Plotter - 3 servos
19.01.2010 at 00:14:47
 
Hi
This is my first post here.
I want to show you my simple "plotter".
it is not very precise because of the servos. But it works.
The software reads plt files (eg Corel Draw).
Software and source code I will send soon.




Back to top
 
 
View Profile   IP Logged
NetWorm
Senior Member
****
Offline

Arduino addicted

Posts: 489

Re: Plotter - 3 servos
Reply #1 - 19.01.2010 at 00:53:16
 
Very impressive! Shocked

Good work, man! Cheesy
Back to top
 
 
View Profile   IP Logged
PaulS
God Member
*****
Offline

Arduino rocks

Posts: 9482
Seattle, WA USA
Gender: male
Re: Plotter - 3 servos
Reply #2 - 19.01.2010 at 02:05:37
 
Very clever. Very nice work. I'm impressed.
Back to top
 
 
View Profile   IP Logged
Ste Hughes
Full Member
***
Offline

Arduino rocks

Posts: 151

Re: Plotter - 3 servos
Reply #3 - 19.01.2010 at 02:25:56
 
please tell me how to do this!

i have 3 servo's kicking around

i am dying to use them  Grin
Back to top
 
 
View Profile   IP Logged
eziosoft
YaBB Newbies
*
Offline

Arduino rocks

Posts: 11

Re: Plotter - 3 servos
Reply #4 - 19.01.2010 at 04:04:29
 
Tomorrow will send the software and instructions on how to build it.
Back to top
 
 
View Profile   IP Logged
Otacon2k
Full Member
***
Offline

Arduino rocks your
socks off

Posts: 181
Berlin
Gender: male
Re: Plotter - 3 servos
Reply #5 - 19.01.2010 at 16:34:20
 
I like it, produces the look of those "wiggly lines"-stiles in Google Sketchup...

Keep on the good work!
Back to top
 
 
View Profile   IP Logged
The_Bongmaster
Senior Member
****
Offline

R-Doo-Inoo in the
making :3

Posts: 355
Norway
Gender: male
Re: Plotter - 3 servos
Reply #6 - 19.01.2010 at 20:07:06
 
nice stuffs Smiley
Back to top
 
 
View Profile | WWW   IP Logged
eziosoft
YaBB Newbies
*
Offline

Arduino rocks

Posts: 11

Re: Plotter - 3 servos
Reply #7 - 20.01.2010 at 01:41:58
 
I can't make a picture (my camera doesn't work) so I've made some drawings.

draw 1:

draw 2:


Important:
-When arm is setted as shown on draw 2, servos have to be in their middle positions (90 degree)
-distance between servo 1 and servo 2 has to be the same as distance between servo 2 and servo 3
-length of the parts is not very important


I think that everyone here know how to connect servos to the arduino so I will not describe it.



Arduino code:
Code:
#include <Servo.h>

#define led0 13
#define Servo1Pin 17
#define Servo2Pin 18
#define Servo3Pin 19

Servo servo1;
Servo servo2;
Servo servo3;

byte s1=90;
byte s2=90;
byte s3=90;

byte DELAY=10;
boolean inProgress=false;

//#include <LiquidCrystal.h>
//LiquidCrystal lcd(12, 8, 7, 6, 5, 4, 2);

void setup()
{
   // lcd.begin(16,2);
  Serial.begin(9600);
  pinMode(led0,OUTPUT);
  attachServos();
}

void loop()
{

  digitalWrite(led0,inProgress);

  if(Serial.available())
  {

    if (Serial.read()==0xAA)
    {
      do{
      }
      while(Serial.available()<=4);
      //serwa
      s1=Serial.read();
      s2=Serial.read();
      s3=Serial.read();
      DELAY=Serial.read();
      inProgress=true;
    }
  }


    if (servo1.read()>s1) servo1.write(servo1.read()-1);
    if (servo1.read()<s1) servo1.write(servo1.read()+1);

    if (servo2.read()>s2) servo2.write(servo2.read()-1);
    if (servo2.read()<s2) servo2.write(servo2.read()+1);

    if (servo3.read()>s3) servo3.write(servo3.read()-1);
    if (servo3.read()<s3) servo3.write(servo3.read()+1);


    if (inProgress==true && servo1.read()==s1 && servo2.read()==s2 && servo3.read()==s3)
    {
      Serial.print(1,BYTE);
      inProgress=false;
    }

    delay(DELAY);
    
    /*
        lcd.clear();
        lcd.print(servo1.read(),DEC);
        lcd.print("-");
        lcd.print(s1,DEC);
        lcd.print(" ");
        lcd.print(servo2.read(),DEC);
         lcd.print("-");
        lcd.print(s2,DEC);
        lcd.setCursor(0,1);
        lcd.print(servo3.read(),DEC);
         lcd.print("-");
        lcd.print(s3,DEC);
        lcd.print(" ");
        lcd.print(DELAY,DEC);
        lcd.print(" ");
*/
  
}





/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
void attachServos()
{
  
  servo1.attach(Servo1Pin);
  servo2.attach(Servo2Pin);
  servo3.attach(Servo3Pin);
}



 




and finally the PC software is here:
http://ezio.ovh.org/pliki/arm_plotter.rar

There is a file "settings.txt". You can set up and down limit of the servos to avoid destroy your arm.

Back to top
 
« Last Edit: 20.01.2010 at 03:28:33 by eziosoft »  
View Profile   IP Logged
eziosoft
YaBB Newbies
*
Offline

Arduino rocks

Posts: 11

Re: Plotter - 3 servos
Reply #8 - 03.02.2010 at 00:14:29
 
I've updated the software.
here is new version.
http://ezio.ovh.org/pliki/arm plotter v2.rar

It has better resolution. And I added excel sheet to calibrate servos outputs.


Back to top
 
« Last Edit: 03.02.2010 at 04:42:05 by eziosoft »  
View Profile   IP Logged
aventgps
Junior Member
**
Offline

Venezuelan
Arduinologist.

Posts: 82
venezuela
Gender: male
Re: Plotter - 3 servos
Reply #9 - 04.02.2010 at 07:28:56
 
really impresive work........... makes my think....... going to give it a try............................. thanks for sharing......   Cheesy
Back to top
 
 
View Profile   IP Logged
Nachtwind
God Member
*****
Offline



Posts: 897
Bonn, Germany
Gender: male
Re: Plotter - 3 servos
Reply #10 - 04.02.2010 at 12:49:39
 
very impressive thing... might have really a gooood idea on how to use it :0)


Back to top
 
 
View Profile | WWW | MSN   IP Logged
A.Wafik
YaBB Newbies
*
Offline

Arduino rocks

Posts: 3

Re: Plotter - 3 servos
Reply #11 - 11.02.2010 at 19:59:24
 
Hey man, very cool project. You should just work on the appearance of the arm more and it should be perfect.
How do u know that the servo has reached the required angle for a specific x,y location...before feeding the next angular position??
I really need to know how this is implemented.
Thanks.
Back to top
 
 
View Profile   IP Logged
eziosoft
YaBB Newbies
*
Offline

Arduino rocks

Posts: 11

Re: Plotter - 3 servos
Reply #12 - 12.02.2010 at 13:56:01
 
Arduino sends one byte to confirm that it is ready for next position.

Full arduino code is here: http://ezio.ovh.org/pliki/arm plotter v2.rar

hope this helps

 if (inProgress==true && servo1.read()==s1 && servo2.read()==s2 && servo3.read()==s3)
   {
     Serial.print(1,BYTE);
     inProgress=false;
   }


appearance of the arm -
hmm well this is not very useful project. And this is only proof of concept. Servos are not very precise.
Back to top
 
 
View Profile   IP Logged
Andrew
Senior Member
****
Offline



Posts: 489
UK
Gender: male
Re: Plotter - 3 servos
Reply #13 - 12.02.2010 at 18:38:05
 
I thought servo.read() only returned what angle you'd set it to - the servo doesn't have any way of returning it's actual physical position. Or am I wrong?

Andrew
Back to top
 
 
View Profile   IP Logged
A.Wafik
YaBB Newbies
*
Offline

Arduino rocks

Posts: 3

Re: Plotter - 3 servos
Reply #14 - 13.02.2010 at 17:18:47
 
I'm confused as well. Can you kindly explain again from where do you get the measurement of the servo angle...when it doesn't have any feedback.
I really appreciate your help. It's essential for me to understand this, as I'm doing a somewhat similar project, and it's driving me nuts!
Back to top
 
 
View Profile   IP Logged
Pages: 1 2 3