valx76
Posts: 12
Joined: Fri Feb 07, 2014 1:18 pm

[RESOLVED] ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 4:33 pm

Hi, I'm facing to a rotation bug in ServoBlaster..

I'm using these values:

Code: Select all

1500us : Idle
1530us : Pulse left
1480us : Pulse right
For example :

Code: Select all

echo 1=1500us > /dev/servoblaster
BUT, my problem is the (continuous) servo which rotates itself sometimes.. I mean, I make it to rotate to the right, I stop (idle), rotate to the left, stop (wait some seconds), and sometimes it will begin to rotate again itself and don't stop until I give it pulse left or pulse right value (it will not stop anymore with idle pulse)..

Do you have an idea ?

EDIT: I'm using an external battery for the motor (5V 2.1A). The battery GND pin is not connected to the RPi GND pin (otherwise, the motor is crazy sometimes).
Last edited by valx76 on Fri Jul 25, 2014 11:54 am, edited 1 time in total.

User avatar
joan
Posts: 14589
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 4:39 pm

What connections do you have between the Pi, the servo, and the servo power supply?

User avatar
mikronauts
Posts: 2736
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 4:43 pm

Is your servo calibrated?

Most continuous rotation se3rvos have a hole leading to a potentiometer that you use to calibrate the stopped (1500us) position.

Some cheap servos have pots that drift over time.
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

valx76
Posts: 12
Joined: Fri Feb 07, 2014 1:18 pm

Re: ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 4:55 pm

Wow, fast answers, thanks :) !

My servo is DF05SR.

@mikronauts: I have a hole in the servo which should be a potentiometer yes, but I don't know how to calibrate it..
And please note that the servo can work normally 2min without any problem, and starting to bug after that amount of time so I'm not sure if it's a calibrating problem..

@joan: I've uploaded an image for the connections.
NOTE: The GPIO-4 connected servo is non continuous (and is working fine).
Attachments
img_circuit.png
img_circuit.png (41.55 KiB) Viewed 1524 times

User avatar
mikronauts
Posts: 2736
Joined: Sat Jan 05, 2013 7:28 pm
Contact: Website

Re: ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 7:14 pm

You calibrate the servo by sending it continous 1500us pulses, then

turn the pot right, then left, to find the range the servo does not move in

then set the pot for the centre of the "dead/no movement" space
http://Mikronauts.com - home of EZasPi, RoboPi, Pi Rtc Dio and Pi Jumper @Mikronauts on Twitter
Advanced Robotics, I/O expansion and prototyping boards for the Raspberry Pi

valx76
Posts: 12
Joined: Fri Feb 07, 2014 1:18 pm

Re: ServoBlaster - Continuous servo bug (auto rotate)

Mon Jul 21, 2014 7:15 pm

Right, I'll try it, but I really don't think that this is the problem..
I'll let you know :) !

EDIT: mikronauts -> That solved the problem, that was the calibrate which was buggy.. Thanks a lot :D !

Return to “Troubleshooting”