go away spammer

Author Topic: Help! Quadruped servo problem  (Read 2795 times)

0 Members and 1 Guest are viewing this topic.

Offline saba_rish91Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Help! Quadruped servo problem
« on: February 16, 2013, 08:42:07 AM »
Hello guys,

I'm building a quadruped robot with 12 DOF. I'm using Arduino UNO and 7.4V LiPO battery (1600mAh).

When I connect the servo, and give command to position at any degree, motors keeps on oscillating or goes from 0 to 180 and back to 0... That is the motors go crazy.

What might be the problem?
Strike when the iron is hot!

Offline ErikY

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #1 on: February 16, 2013, 09:01:11 AM »
Can u post your code?

Offline saba_rish91Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #2 on: February 16, 2013, 09:05:18 AM »
Code was just to position the hip motors at 90 degree and knee motors at 10 degree... Thats all...
Strike when the iron is hot!

Offline Gertlex

  • Supreme Robot
  • *****
  • Posts: 763
  • Helpful? 24
  • Nuclear Engineer ยท Roboticist
    • Index of Oddities
Re: Help! Quadruped servo problem
« Reply #3 on: February 16, 2013, 10:37:47 AM »
Well it sounds like a code issue...

What happens if you hook up a single servo?

What servos are you using?

Are you regulating the voltage down? A 2S LiPO is closer to 8.4 V fully charged, and hobby servos shouldn't be supplied much more than 6 V.
I

Offline saba_rish91Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #4 on: February 16, 2013, 10:51:04 AM »
I'm using 7806 metal case voltage regulator to power down LiPO battery.

For Hip and leg, I'm using the following servo motor.
http://robokits.co.in/shop/index.php?main_page=product_info&cPath=2_5&products_id=187

For the knee, I'm using the following servo motor.
http://robokits.co.in/shop/index.php?main_page=product_info&cPath=2_5&products_id=188

When I hook only one servo, it works properly.

Code: [Select]
#include <Servo.h>

int i=0;

Servo ser[13];

void setup()
{
  ser[1].attach(1);
  ser[2].attach(2);
  ser[3].attach(3);
  ser[4].attach(4);
  ser[5].attach(5);
  ser[6].attach(6);
  ser[7].attach(7);
  ser[8].attach(8);
  ser[9].attach(9);
  ser[10].attach(10);
  ser[11].attach(11);
  ser[12].attach(12);
 
  delay(1000);
}
 
 
void loop()
{
  ser[2].write(90);
  ser[3].write(0);
  ser[5].write(90);
  ser[6].write(0);
  ser[8].write(90);
  ser[9].write(0);
  ser[10].write(90);
  ser[11].write(0);
  delay(500);
}
Strike when the iron is hot!

Offline ErikY

  • Robot Overlord
  • ****
  • Posts: 186
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #5 on: February 16, 2013, 10:57:40 AM »
I could be wrong, but the problem may be that not all those pins have PWM, and I beleive u need PWM to run the servo angle

Offline saba_rish91Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #6 on: February 16, 2013, 10:59:18 AM »
With servo.h library, it possible to generate pwm output on all the pins.
Strike when the iron is hot!

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.
Re: Help! Quadruped servo problem
« Reply #7 on: February 17, 2013, 09:14:09 AM »
First connect your servo start with pin 2
Quote
// Sample sketch for driving 12 Servos from an Arduino UNO, servos are attached to digital pins 2,3,4,5,6,7,8,9,10,11,12,13
next, make sure your power supply can supply the current for all the servo, each servo will need about 0.5 to 1 Amp of current, 7806 can only supply 1A.

Offline saba_rish91Topic starter

  • Jr. Member
  • **
  • Posts: 25
  • Helpful? 0
Re: Help! Quadruped servo problem
« Reply #8 on: February 17, 2013, 09:22:24 AM »
Only the hip motors seems to oscillate like, it seems that it is unable to bear the weight. If current is the problem, then shall I go for LM2676? It looks like it will give a output current of 3A.
Strike when the iron is hot!

Offline billhowl

  • Supreme Robot
  • *****
  • Posts: 376
  • Helpful? 32
  • Your success is in your hands.
Re: Help! Quadruped servo problem
« Reply #9 on: February 17, 2013, 10:45:20 AM »
LM2676 is a Switching Regulator, is not easy build, you can get something like this UBEC

 


Get Your Ad Here

data_list