<?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=22&amp;t=9614" />

<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>2013-08-31T05:16:30+01:00</updated>

<author><name><![CDATA[RoboSavvy Forum]]></name></author>
<id>http://forum.robosavvy.com/feed.php?f=22&amp;t=9614</id>
<entry>
<author><name><![CDATA[OddBot]]></name></author>
<updated>2013-08-31T05:16:30+01:00</updated>
<published>2013-08-31T05:16:30+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38530#p38530</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38530#p38530"/>
<title type="html"><![CDATA[Timer Interrupts]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38530#p38530"><![CDATA[
In cases where external interrupt pins are limited the next best way is to create a timer interrupt. This generates an interrupt at precise intervals. The ISR (Interrupt Service Routine) then checks the pins attached to the encoders.<br /><br />There is an Arduino library here that is quite useful: <a href="http://playground.arduino.cc/Code/Timer1" class="postlink">http://playground.arduino.cc/Code/Timer1</a> <br /><br />Unfortunately this library uses the same timer as the servo library so you cannot use servos with it unless your using An Arduino Mega or DAGU Spider controller. There is also a timer3 version of the library suitable for these boards.<br /><br />Alternatively, if your main code repeats quickly enough then simply monitor the inputs with each loop of the program. This is ok for distance measurements but not suitable for speed measurement which needs accurate timing.<br /><br />I often use the millis() or micros() function to call my ISR once every millisecond. The accuracy of this method depends on how quickly your main loop is running. If your encoders or maximum speed is low enough then you can check your encoder inputs at longer intervals.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=2431">OddBot</a> — Sat Aug 31, 2013 5:16 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Grumpybeard]]></name></author>
<updated>2013-08-30T11:59:31+01:00</updated>
<published>2013-08-30T11:59:31+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38528#p38528</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38528#p38528"/>
<title type="html"><![CDATA[Wild Thumper DC Motor Controller Encoder Setup]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38528#p38528"><![CDATA[
I would be very much interested in a solution to what Toby asks - indeed a later revision of the thumpers cam with encoders built into 2 of the motors, so how to connect these up to the thumper controller board would be great to know.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=4299">Grumpybeard</a> — Fri Aug 30, 2013 11:59 am</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[BotThoughts]]></name></author>
<updated>2013-08-26T15:42:05+01:00</updated>
<published>2013-08-26T15:42:05+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38512#p38512</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38512#p38512"/>
<title type="html"><![CDATA[Wild Thumper DC Motor Controller Encoder Setup]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38512#p38512"><![CDATA[
What encoders?<br /><br />I've used QRE1113 reflectance sensors from Sparkfun (Pololu sells these too I think). And it's a matter of giving them power and ground, and then plugging signal into some ports.<br /><br />On ATmega, you can have an interrupt fired every time there's a transition on these type of reflectance sensors, then write interrupt handler code to increment a counter based on which pin changed. Or if you use ATmega's special INT0 and INT1 pins, you can specific which transition (rising or falling or both) and fire interrupts with handlers unique to each pin.<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=4893">BotThoughts</a> — Mon Aug 26, 2013 3:42 pm</p><hr />
]]></content>
</entry>
<entry>
<author><name><![CDATA[Toby]]></name></author>
<updated>2013-07-01T23:30:03+01:00</updated>
<published>2013-07-01T23:30:03+01:00</published>
<id>http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38237#p38237</id>
<link href="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38237#p38237"/>
<title type="html"><![CDATA[Wild Thumper DC Motor Controller Encoder Setup]]></title>

<content type="html" xml:base="http://forum.robosavvy.com/viewtopic.php?t=9614&amp;p=38237#p38237"><![CDATA[
Hey everybody,<br /><br />anybody could comment my ideas on hooking up Thumper 4WD encoders to the motor controller?<br /><br />Probably pin D2 and D4 for left encoder and D7 and D8 for right encoder would be ok? Does the color coding white and yellow matter in any way?<br /><br />Also would you like to share some arduino code for quering encoder state? I would like to learn how you address the fact, that there is only one free interrupt available at D2, so an separate interrupt for left and right encoder is not an option. Thus, do you pack everything in the main loop?<br /><br />Looking forward for your replies <img src="http://forum.robosavvy.com/images/smilies/icon_biggrin.gif" alt=":D" title="Very Happy" /><br /><br />Cheers<br />Toby<p>Statistics: Posted by <a href="http://forum.robosavvy.com/memberlist.php?mode=viewprofile&amp;u=4770">Toby</a> — Mon Jul 01, 2013 11:30 pm</p><hr />
]]></content>
</entry>
</feed>