Dawn Robotics Forum Support and community forums for Dawn Robotics Ltd 2014-12-29T12:13:37+01:00 http://forum.dawnrobotics.co.uk/feed.php?f=13&t=1312 2014-12-29T12:13:37+01:00 2014-12-29T12:13:37+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1312&p=1562#p1562 <![CDATA[Re: Rover 5 Pan/tilt servos]]>
Welcome to the forums. :)

I think that the problem may be in how the pan/tilt servo was assembled. I probably didn't make it clear enough in the instructions, but ideally the pan servo should be assembled so that 90 degrees corresponds to the head pointing forward. There is a bit of an art to this as the range of motion of each servo can vary somewhat. One useful technique can be to turn the pan servo all the way left and then detach and reattach the metal bracket so that it points roughly 90 degrees to the left. The commands that you can send to the servo are limited to the range 0 to 180 degrees so you need to assemble the pan/tilt head so that the key angles (0, 90, 180 etc) correspond to directions you want.

The following short Arduino sketch may also help you when assembling the pan/tilt head
Code:
#include <Servo.h>

const int SERVO_PIN = 9;           // The signal pin for the servo
const int SERVO_ANGLE = 90;    // Set this to the desired angle

Servo gServo;

void setup()
{
    gServo.attach( SERVO_PIN );
}

void loop()
{
    gServo.write( SERVO_ANGLE );
}


Hope that helps, please let me know if you need more info or if I've misunderstood something.

Regards

Alan

Statistics: Posted by Alan — Mon Dec 29, 2014 12:13 pm


]]>
2014-12-28T16:43:48+01:00 2014-12-28T16:43:48+01:00 http://forum.dawnrobotics.co.uk/viewtopic.php?t=1312&p=1558#p1558 <![CDATA[Rover 5 Pan/tilt servos]]>
I've run into problems with the rovers pan/tilt servos and the wall follower program (and I guess any future programs). It started with the rover not looking forward so I altered the look_forward angles to 40 degrees for pan and 0 for tilt. Ideally I would want a value of about -10 but negative values don't seem to work. This causes another problem when, as the rover is driving forward and looking slightly up, it will reach the wall and turn left as planned but then it is unable to look more than 40 degrees right to keep following the wall. Is there any way to use negative values to control the servos or, failing that, reset the zero of the servos to a more practical point (say pan facing backwards and tilt upside down).

Sorry, if I'm missing some really obvious solution,

Thanks for your help,

Aidan

Statistics: Posted by Aidan — Sun Dec 28, 2014 4:43 pm


]]>