<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
<link rel="self" type="application/atom+xml" href="http://forum.robosavvy.com/feed.php?f=17&amp;t=6575" />

<title>RoboSavvy Forum</title>
<subtitle>Robosavvy Forum: The largest online community of Humanoid Robot Builders</subtitle>
<link href="http://forum.robosavvy.com/index.php" />
<updated>2010-09-28T01:47:32+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=17&amp;t=6575</id>
<entry>
<author><name><![CDATA[clarkden]]></name></author>
<updated>2010-09-28T01:47:32+01:00</updated>
<published>2010-09-28T01:47:32+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28291#p28291</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28291#p28291"/>
<title type="html"><![CDATA[RCservo functions]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28291#p28291"><![CDATA[
<blockquote><div><cite>RN1AsOf091407 wrote:</cite><br />Continuous rotation servos will do that. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /> For a continous rotation servo, the mid-position (feedback for rotational position) is fixed to give you rotation in either direction proportionally as your signal deviates away from center. The speed difference you see is likely due to the motor itself. Motors always work better in one direction than the other, typically at the motor shaft itself, counter-clockwise will be faster. It has to do with the timing of the motor. You will never have perfect control of the revolutions without an additional sensor, continous servos don't have feedback, so you can't be sure of position.<br /><br />You have a few options:<br /><br />* Set up limit switches to actuate at extents of travel, and have Roboard stop sending pulses when limit switches attached to GPIO are triggered.<br />* Set up an optical encoder  (a few ways to do this, from an LED / phototransistor pair to a &quot;real&quot; optical encoder depending on the resolution you need) for measuring turns and feed these back into GPIO. You could even use a tiny magnet on one side of your shaft and a reed switch.<br />* Rework to include a &quot;regular&quot; (non-continuous rotation) servo, and your position will be whatever it is set to from Roboard. Sweep the position to move your sensor. <br /><br />You could also build a circuit to inhibit the signal to the servo when the limit switches are reached instead of using GPIO pins, that should work as well.<br /><br />Personally, I'd use a standard servo, it's the easiest method. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><br />Another quick note, if you go with a standard servo, it will be even easier to do &quot;tracking&quot;, such that if a near object moves, you move left just a bit, sample, sample, sample, move right just a bit, sample, sample, sample, then move to the point of signal indicating closest object. Have a set-point for distance change, then repeat &quot;peaking&quot; to find closest point when current distance +/- set point is not equal to value when object found.<br /></div></blockquote><br /><br />thanks for the information <br /><br />Clarkden<br /><a href="http://www.villoo.com" class="postlink">RC Hobby Shop</a><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2347">clarkden</a> — Tue Sep 28, 2010 1:47 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[PaulL]]></name></author>
<updated>2010-09-19T20:49:21+01:00</updated>
<published>2010-09-19T20:49:21+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28212#p28212</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28212#p28212"/>
<title type="html"><![CDATA[RCservo functions]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28212#p28212"><![CDATA[
Continuous rotation servos will do that. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /> For a continous rotation servo, the mid-position (feedback for rotational position) is fixed to give you rotation in either direction proportionally as your signal deviates away from center. The speed difference you see is likely due to the motor itself. Motors always work better in one direction than the other, typically at the motor shaft itself, counter-clockwise will be faster. It has to do with the timing of the motor. You will never have perfect control of the revolutions without an additional sensor, continous servos don't have feedback, so you can't be sure of position.<br /><br />You have a few options:<br /><br />* Set up limit switches to actuate at extents of travel, and have Roboard stop sending pulses when limit switches attached to GPIO are triggered.<br />* Set up an optical encoder  (a few ways to do this, from an LED / phototransistor pair to a &quot;real&quot; optical encoder depending on the resolution you need) for measuring turns and feed these back into GPIO. You could even use a tiny magnet on one side of your shaft and a reed switch.<br />* Rework to include a &quot;regular&quot; (non-continuous rotation) servo, and your position will be whatever it is set to from Roboard. Sweep the position to move your sensor. <br /><br />You could also build a circuit to inhibit the signal to the servo when the limit switches are reached instead of using GPIO pins, that should work as well.<br /><br />Personally, I'd use a standard servo, it's the easiest method. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /><br /><br />Another quick note, if you go with a standard servo, it will be even easier to do &quot;tracking&quot;, such that if a near object moves, you move left just a bit, sample, sample, sample, move right just a bit, sample, sample, sample, then move to the point of signal indicating closest object. Have a set-point for distance change, then repeat &quot;peaking&quot; to find closest point when current distance +/- set point is not equal to value when object found.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=741">PaulL</a> — Sun Sep 19, 2010 8:49 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Xinux]]></name></author>
<updated>2010-09-19T20:29:43+01:00</updated>
<published>2010-09-19T20:29:43+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28211#p28211</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28211#p28211"/>
<title type="html"><![CDATA[RCservo functions]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28211#p28211"><![CDATA[
Ahh I see, I got the servo to move and I always set the frequency at 20000.<br />I was testing a continuous rotation servo, the dead zone (stop value) seems to be in the range of 1529 and 1555. I want to use this servo to move a sonic sensor left or right so that it scans for objects. So I made a function to turn the servo motor left and then to turn it back right again back to straightforward position. But this is inaccurate, it moves left so much, and then right too much, it never makes it back to a straightforward position. Is there anyway to do this?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2336">Xinux</a> — Sun Sep 19, 2010 8:29 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[PaulL]]></name></author>
<updated>2010-09-19T13:49:28+01:00</updated>
<published>2010-09-19T13:49:28+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28209#p28209</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28209#p28209"/>
<title type="html"><![CDATA[RCservo functions]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28209#p28209"><![CDATA[
Channel defines which PWM output to use.<br />Period defines the frequency of the PWM pulse.<br />Duty is the &quot;high&quot; duration of the PWM signal.<br />Count is the number of PWM pulses to send.<br /><br />PWM for servos isn't absolute, different servos move different amounts depending on the duty. How much movement you get for a specified duty depends on the servo.<br /><br />SendPWMPulses isn't constant, it only sends a pulse train of a specified number of pulses.<br /><br />For values when calling this function, have a look at rcservo_SetServo to see what different values are for some of the predefined servos.<br /><br />In building my own driver, I use the &quot;continuous&quot; mode of the PWM generator on Roboard, and I do not intend to read back servo positions at present. To do the same in RoboIO, you might try using the PWM lib directly. <br /><br />Otherwise, there are other methods for using RoboIO to control servos, I think a few of those have been posted, maybe one of the guys using the RC Servo code will chime in if you want to do that instead of trying to use this function. <img src="http://forum.robosavvy.com/images/smilies/icon_smile.gif" alt=":)" title="Smile" /><p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=741">PaulL</a> — Sun Sep 19, 2010 1:49 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Xinux]]></name></author>
<updated>2010-09-19T05:46:03+01:00</updated>
<published>2010-09-19T05:46:03+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28201#p28201</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28201#p28201"/>
<title type="html"><![CDATA[RCservo functions]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=6575&amp;p=28201#p28201"><![CDATA[
rcservo_SendPWMPulses(int channel, unsigned long period, unsigned long duty, unsigned long count)<br /><br />How is this used to control a servo motor? What do period duty and count control? How would I go about figuring out how to move the motor a half a degree for instance?<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2336">Xinux</a> — Sun Sep 19, 2010 5:46 am</p><hr />
]]></content>
</entry>
</feed>