Pages: [1]   Go Down
Author Topic: Hitech HS-311 rotation problem  (Read 1111 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

My problem is regarding servo rotation, The blink and other examples ran well on my new arduino board.

I have connected yellow wire - Pin 9(PWM)
black wire - ground pin on arduino board
red wire - +5v power on arduino board

Board is powered via USB.

Uploaded the sweep program and when the board started running the servo rotation was in step. Like it rotated in steps took many seconds(30+) to complete half-roatation.

I refer datasheet of hs-311 and came across following:
Dead Band Width: 5usec
Operating Angle: 40° one side pulse traveling 400usec
Direction: Clockwise/Pulse Traveling 1500 to 1900usec

What does this mean?

If any body have worked with this component please share some information.


Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8821
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The Sweep example delays 15 milliseconds between steps so it should take about 2.7 seconds per sweep:
Code:
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }

If it's taking 43.2 seconds per sweep that means your processor is running at the factory default 1 MHz instead of the Arduino normal 16 MHz. If that is the case the Blink example would also have been very slow. Is the servo turning the full 180 degrees forward and back?
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How to reset to factory default 1mhz to 16mhz?

Is the servo turning the full 180 degrees forward and back?
NO, It is moving in step only in one direction.

Its becoming challenging to control this servo motor.
Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 208
Posts: 8821
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The servo might be drawing more power than the Arduino can provide.  Try supplying a separate 4.8V to 6.0V (1A or more) power supply for the servo.  Connect Red and Black to the servo power supply.  Connect Yellow and Black to the Arduino.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

I'm stuck with the problem yet.

I have two servos which I'm contolling through arduino,can you tell me ways about powering it up.

One more important information, I'm powering up arduino through laptop i.e Arduino is connected to my laptop through USB cable.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The servo might be drawing more power than the Arduino can provide.  Try supplying a separate 4.8V to 6.0V (1A or more) power supply for the servo.  Connect Red and Black to the servo power supply.  Connect Yellow and Black to the Arduino.

Thank you for your kind help. The problem is solved, I took four 1.5V AA Batteries and connected them to my one of the servos.

The servo worked perfectly fine.

But...

One servo out of my two servos one is in wrong position. Its in the 45 degree angle. It completes 0 to 180  degree but its slant.

Any suggesstions?

It makes buzzing noise too.....
« Last Edit: February 08, 2013, 08:05:23 am by gbit » Logged

0
Offline Offline
Tesla Member
***
Karma: 141
Posts: 9541
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
One servo out of my two servos one is in wrong position. Its in the 45 degree angle. It completes 0 to 180  degree but its slant. Any suggesstions? It makes buzzing noise too.....

Buzzing often occurrs when the servo is straining against its internal rotation hard stop (generally not a good practice). If the angle has to do with the servo horn position, remove the horn screw and reposition the horn on the hren splines, then replace the screw.
Logged

Consider the daffodil. And while you're doing that, I'll be over here, looking through your stuff.   smiley-cool

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
One servo out of my two servos one is in wrong position. Its in the 45 degree angle. It completes 0 to 180  degree but its slant. Any suggesstions? It makes buzzing noise too.....

Buzzing often occurrs when the servo is straining against its internal rotation hard stop (generally not a good practice). If the angle has to do with the servo horn position, remove the horn screw and reposition the horn on the hren splinesc, then replace the screw.

There are various problems occuring with testing my two servo motor. The example code in the arduino ide is ineffective. Can you provide resource related to servo programming in arduino.

Servo motors doesn't back and forth when the code is uploaded...Why?


Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

This code doesn't work on HS-311 Servo motors. The servo is making buzzing noise.

Code:
// Sweep
// by BARRAGAN <http://barraganstudio.com>
// This example code is in the public domain.


#include <Servo.h>
 
Servo myservo;  // create servo object to control a servo
                // a maximum of eight servo objects can be created
 
int pos = 0;    // variable to store the servo position
 
void setup()
{
  myservo.attach(9);  // attaches the servo on pin 9 to the servo object
}
 
 
void loop()
{
  for(pos = 0; pos < 180; pos += 1)  // goes from 0 degrees to 180 degrees
  {                                  // in steps of 1 degree
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
  for(pos = 180; pos>=1; pos-=1)     // goes from 180 degrees to 0 degrees
  {                               
    myservo.write(pos);              // tell servo to go to position in variable 'pos'
    delay(15);                       // waits 15ms for the servo to reach the position
  }
}
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 67
Posts: 3677
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The code looks ok. You could try making the delays longer, but I suspect your issue is power related - batteries out of juice perhaps.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The code looks ok. You could try making the delays longer, but I suspect your issue is power related - batteries out of juice perhaps.

The battries are new. I'm powering servo trough 4 X1.5V AA battery box.

What happens is that: The arm rotates in anti-clockwise direction for some degree (I don't know what position is it) and makes BUZZZ noise.

NOTE: THE POSITIVE AND NEGATIVE terminals are connected to POSITIVE AND NEGATIVE terminal of battery.

ONLY YELLOW WIRE IS CONNECTED TO ARDUINO PWM PORT 9

I have-

  • Checked the electrical connections
  • Tested this code on other servo same happens
  • Tried out various code nothing seems to work same motion happens as prescibed above

Please point out mistakes or mishaps that might have happened during this project.
Logged

New Jersey
Offline Offline
Faraday Member
**
Karma: 67
Posts: 3677
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Have you connected ground on the battery to ground on the arduino?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 8
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The problem is solved. The battery negative terminal and servo negative terminal connected to arduino gnd pin did it.

Thank you johnwasser, wildbill and zoomkat .
Logged

Pages: [1]   Go Up
Jump to: