Go Down

Topic: 24v dc servo motor (Read 3255 times) previous topic - next topic

shashi9819

can i control 6 wire dc servo motor ( link shown below ) directly with arduino ? i will be using power supply shown in second link.. plz help me with CODE and Wire connection diagram ?

Link1) motor : http://robokits.co.in/motors/dc-servo-motor-24v-100w-with-2000-ppr-encoder?cPath=2_71&

link 2 ) power supply : http://robokits.co.in/power-supply/industrial-power-supply/24v-10a-industrial-power-supply

thanks

MarkT

[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

shashi9819

thanks mark as instructed i bought driver but still m confused as this servo has 6 wires. how to give input to motor and at what rate is not mentioned in datasheet. i tried one form arduino tutorial ( one with 180 degree ). motor runs continuously. need help on code. plz help

Isaac96

That is not a hobby servo. Hobby servos have 3 wires. The servo motor that you have has an encoder, while hobby servos have a potentiometer checking the position.
Do not PM me for help. I will delete immediately.
CONNECT THE GROUNDS!

After Tuesday, even the calendar goes W T F

MarkT

#4
Jul 24, 2016, 02:34 am Last Edit: Jul 24, 2016, 02:36 am by MarkT
thanks mark as instructed i bought driver but still m confused as this servo has 6 wires. how to give input to motor and at what rate is not mentioned in datasheet. i tried one form arduino tutorial ( one with 180 degree ). motor runs continuously. need help on code. plz help
Its a DC motor (2 wires) and a quadrature encoder (4 wires).  The correct driver will have connections for
power to the motor (2 wires) and an encoder (4 wires?).   It should also have step/direction inputs (probably
opto-isolated), which connect to the Arduino - use the AccelStepper library or similar.


Yes, don't confuse a servomotor (a position and/or speed controlled industrial motor) with
a hobby servo (aka servo-mechanism or actuator)
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

shashi9819

can u plz suggest any link where I Will find the connection diagrams for above accelstepper lib ?

meanwhile i tried  a code shown in NYC-CNC video. ( from same accelstepper lib )

motor starts running but after half revolution it gives error on driver but rotates further and same error pop up during whole program

m posting code over here

#include <AccelStepper.h>

AccelStepper stepper(1,9,8);
int pos = 3600;

void setup() {
stepper.setMaxSpeed(500);
stepper.setAcceleration(300);
// put your setup code here, to run once:

}

void loop() {
  if ( stepper.distanceToGo() == 0)
  {
    delay(500);
    pos=-pos;
    stepper.moveTo(pos);
   
  }
  stepper.run();
  // put your main code here, to run repeatedly:

}

shashi9819

#include <AccelStepper.h>

AccelStepper stepper(1,9,8);
int pos = 3600;

void setup() {
stepper.setMaxSpeed(500);
stepper.setAcceleration(300);
// put your setup code here, to run once:

}

void loop() {
  if ( stepper.distanceToGo() == 0)
  {
    delay(500);
    pos=-pos;
    stepper.moveTo(pos);
   
  }
  stepper.run();
  // put your main code here, to run repeatedly:

}

MarkT

Can you provide any information about the error.  A video of the test might be useful.
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

shashi9819

alright i have video but how to upload it?? maximum size allowed ?

thanks Mark

MarkT

What's wrong with youtube?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

shashi9819

alright here u go I am sending a link to the video

https://youtu.be/ySaoxK_6YGk

hope it works.

MarkT

So the LED lights up - I can't see what that LED is - is there writing next to it or what?

It's not stopping it working though from what I can tell, nice smooth acceleration and deceleration.
Is the movement of the shaft what you'd expect?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

shashi9819

m attaching a datasheet of driver which do specifies some error on page 6 ... the red light is error light ... and whenever it blinks u can feel a jerk whereas I need a smooth operation... datasheet shows some gain settings error or pulses might be too high but which exactly one of it that I don't know really. thanks for ur time and help Mark.

shashi9819

hey Mark,

thanks for help. i think my problem is solved i reduced the acceleration in code and changed servo loop gain and input multiplier on driver to 8x and 4x. no error on driver now and also motor runs smoothly.

now i will move on to next step on my project. thanks for help may need it in future.

MarkT

Good, I'm glad its working - how well is the combination of motor and driver performing under load?
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Go Up