Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can only set position of servo once #26

Open
rstolyarov opened this issue Feb 3, 2014 · 4 comments
Open

Can only set position of servo once #26

rstolyarov opened this issue Feb 3, 2014 · 4 comments

Comments

@rstolyarov
Copy link

When I set my servo's position once with a line such as:

echo 0=120 > /dev/servoblaster

it rotates there and everything is fine. Then, when I try to do it again, it makes a buzzing sound continuously and doesn't move no matter what input I give. What is the problem here?

The servo has 180-degree range, HS-422.

@richardghirst
Copy link
Owner

A continuous buzzing sound suggests it has been asked to move beyond the
end stop. What command did you try after 0=120 ? Does a second 0=120
cause the problem? Does 0=110 or 0=130 cause the problem?

Richard
On 3 Feb 2014 05:18, "Roman Stolyarov" notifications@github.com wrote:

When I set my servo's position once with a line such as:

echo 0=120 > /dev/servoblaster

it rotates there and everything is fine. Then, when I try to do it again,
it makes a buzzing sound continuously and doesn't move no matter what input
I give. What is the problem here?

The servo has 180-degree range, HS-422.

Reply to this email directly or view it on GitHubhttps://github.com//issues/26
.

@richardghirst
Copy link
Owner

A quick google suggests that servo has a center position at 1500us, and is
only guaranteed to move 45 degrees in each direction, for a pulse width
change of 400us (though typically they will move nearer to 180 degrees
total). So, I'd start with 0=150, and try going back and fore from there,
within the range 0=110 to 0=190. That assumes you've run servod with the
default parameters, so step-size is 10us.

Richard

On Mon, Feb 3, 2014 at 7:55 AM, Richard Hirst richardghirst@gmail.comwrote:

A continuous buzzing sound suggests it has been asked to move beyond the
end stop. What command did you try after 0=120 ? Does a second 0=120
cause the problem? Does 0=110 or 0=130 cause the problem?

Richard
On 3 Feb 2014 05:18, "Roman Stolyarov" notifications@github.com wrote:

When I set my servo's position once with a line such as:

echo 0=120 > /dev/servoblaster

it rotates there and everything is fine. Then, when I try to do it again,
it makes a buzzing sound continuously and doesn't move no matter what input
I give. What is the problem here?

The servo has 180-degree range, HS-422.

Reply to this email directly or view it on GitHubhttps://github.com//issues/26
.

@rstolyarov
Copy link
Author

Richard, thank you for our quick response. Indeed, it looks as though the servo rotates to its maximum angle and just stops there, continuing to buzz. The same thing happens when I tried 0=150. Basically, it responds to the first command, but then stops responding to any others.

Also significant: it only rotates in one direction (in response to commands). Although it is capable of rotating in both directions. Any idea what the problem is here?

@richardghirst
Copy link
Owner

Is it possible it is moving to the end-stop on the first command you issue,
whatever position you are trying to set it to? If so, maybe you are
generating a pulse that is much wider than intended, so all reasonable
widths translate to "beyond the end-stop". I assume you are using servod,
and not the old kernel implementation (servoblaster.ko). The code uses the
PWM hardware to generate the delays, but can be told to use the PCM
hardware instead (option --pcm). You could try that, in case there is some
problem/conflict with the use of PWM on your system.

You could also try running ServoBlaster/servodebug.c (see top of file for
instructions), which will attempt to show you the times at which the servo
control output is actually switching. You need to turn an output on first
(e.g. 0=120), then you can send me the output of servodebug, if it doesn't
make sense to you.

Richard

On Tue, Feb 4, 2014 at 3:15 PM, Roman Stolyarov notifications@github.comwrote:

Richard, thank you for our quick response. Indeed, it looks as though the
servo rotates to its maximum angle and just stops there, continuing to
buzz. The same thing happens when I tried 0=150. Basically, it responds to
the first command, but then stops responding to any others.

Also significant: it only rotates in one direction (in response to
commands). Although it is capable of rotating in both directions. Any idea
what the problem is here?

Reply to this email directly or view it on GitHubhttps://github.com//issues/26#issuecomment-34068880
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants