tag:blogger.com,1999:blog-57217396759930073422024-02-02T09:31:04.753+02:00Mini Sumo Robot "Destroyer 3000"This blog is a full specification of a Mini Sumo Robot with everyday updates and upgrades. The most of the blog is a student engineering skills.Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.comBlogger18125tag:blogger.com,1999:blog-5721739675993007342.post-2008121768592891062013-09-14T01:29:00.001+03:002013-09-14T01:32:34.824+03:003D Print<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="text-align: center;">
"MakerBot Replicator" 3D printer is the next step in MiniSumo category:</div>
<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="344" src="//www.youtube.com/embed/efPIWsR9YrY" width="459"></iframe><br />
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
Strong structured ABS plastics and unordinary design, more design, more solidworks, less makeshift engineerings.</div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-10942949970449828482013-06-27T10:24:00.000+03:002013-06-27T10:24:23.958+03:00Convert IF to CASE statements<div dir="ltr" style="text-align: left;" trbidi="on">
While working with ABB ACS800 and AC500 with CoDeSys, found out some interesting syntaxis in ST (Structured Text), which has been discussed in <a href="http://forum.arduino.cc/index.php?topic=172629.msg1294405#msg1294405" target="_blank">Forum </a>of <a href="http://arduino.cc/" target="_blank">Arduino</a>.<br />
<br />
The results bellow, from IF:<br />
<pre><span style="color: #7e7e7e;">/*IDLE RUN STATE*/</span>
<span style="color: #cc6600;">void</span> idleRunUpdate(){
<span style="color: #7e7e7e;">//Conditions for transition to a Line Avoid State</span>
<span style="color: #cc6600;">if</span>((sensorSum>=16 && sensorSum<=63)||(sensorSum>=80 && sensorSum<=127)||(sensorSum>=208 && sensorSum<=255)){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(lineAvoidState);
}
<span style="color: #7e7e7e;">//Conditions for transition to a Attack State</span>
<span style="color: #cc6600;">if</span>(sensorSum==2||sensorSum==4||sensorSum==6||sensorSum==7||sensorSum==14){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(attackState);
}
<span style="color: #7e7e7e;">//Conditions for transition to a Spin State</span>
<span style="color: #cc6600;">if</span>(sensorSum==1||sensorSum==3||sensorSum==8||sensorSum==12){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(spinState);
}
<span style="color: #7e7e7e;">//Conditions for transition to a Overfall Avoid State</span>
<span style="color: #cc6600;">if</span>((sensorSum>=64 && sensorSum<=79)||(sensorSum>=128 && sensorSum<=143)||(sensorSum>=192 && sensorSum<=207)){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(overfallAvoidState);
}
}
</pre>
<br />
to CASE statements:
<br />
<pre><span style="color: #7e7e7e;">/*IDLE RUN STATE*/</span>
<span style="color: #cc6600;">void</span> idleRunUpdate(){
<span style="color: #7e7e7e;">// Serial.println("idleRunUpdate");</span>
<span style="color: #cc6600;">switch</span>(sensorSum){
<span style="color: #7e7e7e;">//Conditions for transition to a Line Avoid State</span>
<span style="color: #cc6600;">case</span> 16 ... 63:
<span style="color: #cc6600;">case</span> 80 ... 127:
<span style="color: #cc6600;">case</span> 208 ... 255:
stateMachine.<span style="color: #cc6600;">transitionTo</span>(lineAvoidState);
<span style="color: #cc6600;">break</span>;
<span style="color: #7e7e7e;">//Conditions for transition to a Attack State</span>
<span style="color: #cc6600;">case</span> 2:
<span style="color: #cc6600;">case</span> 4:
<span style="color: #cc6600;">case</span> 6:
<span style="color: #cc6600;">case</span> 7:
<span style="color: #cc6600;">case</span> 14:
stateMachine.<span style="color: #cc6600;">transitionTo</span>(attackState);
<span style="color: #cc6600;">break</span>;
<span style="color: #7e7e7e;">//Conditions for transition to a Spin State</span>
<span style="color: #cc6600;">case</span> 1:
<span style="color: #cc6600;">case</span> 3:
<span style="color: #cc6600;">case</span> 8:
<span style="color: #cc6600;">case</span> 12:
stateMachine.<span style="color: #cc6600;">transitionTo</span>(spinState);
<span style="color: #cc6600;">break</span>;
<span style="color: #7e7e7e;">//Conditions for transition to a Overfall Avoid State</span>
<span style="color: #cc6600;">case</span> 64 ... 79:
<span style="color: #cc6600;">case</span> 128 ... 143:
<span style="color: #cc6600;">case</span> 192 ... 207:
stateMachine.<span style="color: #cc6600;">transitionTo</span>(overfallAvoidState);
<span style="color: #cc6600;">break</span>;
}
}
</pre>
The result has saved 12 bytes of memory
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-11744866274749292212013-03-18T14:43:00.001+02:002014-04-05T17:17:16.538+03:00Start Module Implement Yourself<div dir="ltr" style="text-align: left;" trbidi="on">
<a href="http://www.robotchallenge.org/">RobotChallange 2013</a> ordered <a href="http://www.startmodule.com/">Start Modules</a> for Robot Sumo, which we can just buy for 15 EUR or <a href="http://www.startmodule.com/implement-yourself">implement ourselves</a>.<br />
<br />
I've implemented that with my own IR Receiver and Arduino IDE, according to <a href="http://www.startmodule.com/implement-yourself/modes-of-operation/">Modes Of Operation</a>:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://p1r.se/startmodule/wp-content/uploads/2012/11/modes-of-operation_V0_02.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://p1r.se/startmodule/wp-content/uploads/2012/11/modes-of-operation_V0_02.jpg" /></a></div>
<br />
<div>
<br /></div>
<br />
So here is a code example, how to implement it.<br />
UPDATE: 2014.04.04 after RobotChallenge 2014<br />
<br />
<div>
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//IR control PINs</span></div>
<span style="font-family: 'Courier New', Courier, monospace; font-size: x-small;">#define RECV ## </span><span style="color: #999999; font-family: 'Courier New', Courier, monospace; font-size: x-small;">//Your pin number instead '##'</span><br />
<div style="-webkit-text-stroke-width: 0px; color: black; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;">
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define LED ##</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: #999999;"><br /></span><span style="color: #999999;">//LIMIT COMMAND VALUES</span></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define MinimumCommandValue 0xC4</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define MaximumCommandValue 0xFE</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define UnderMinimumCommandValue 0x00 ... 0xC3</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define OverMaximumCommandValue 0xFF</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//EEPROM ADDRESS</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define StateAddress 0</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define CommandAddress 1</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//EEPROM StateValues</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define POWERON 0</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define STARTED 1</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define STOPPED 2</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//OVERALL NUMBER OF STATES</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#define NumOfStates 2</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//THE LIBRARIES YOU NEED</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <<a href="https://github.com/cyborg5/IRLib">IRLib.h</a>></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <<span style="color: orange;">EEPROM</span>.h></span></div>
<div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">#include <<a href="http://www.arduino.cc/playground/uploads/Code/FSM_1-6.zip">FiniteStateMachine.h</a>></span></div>
</div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//THE STATES YOU NEED TO DECLARE</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">State </span>powerOnState = <span style="color: orange;">State</span>(powerOnEnter, powerOnUpdate, powerOnExit);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">State </span>idleRunState = <span style="color: orange;">State</span>(idleRunUpdate);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">State </span>stoppedState = <span style="color: orange;">State</span>(stoppedSafe,stoppedUpdate, NULL);</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*MORE OF YOUR STATES HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//THE STATE YOU START FROM</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">FiniteStateMachine </span>stateMachine = <span style="color: orange;">FiniteStateMachine</span>(powerOnState);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//VARIABLES</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">int </span>STOP, STOP2, START, START2;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">byte </span>StateValue, CommandValue;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//INIT IR RECEIVER</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">IRrecv </span>My_Receiver(RECV);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">IRdecode My_Decoder;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
</div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span><b><span style="color: orange;">setup</span></b>(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*PUT ALL YOUR SETUPS*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="background-color: white;"><span style="color: orange;">pinMode</span></span>(LED, <span style="color: #6fa8dc;">OUTPUT</span>);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="background-color: white; color: orange;">pinMode</span>(RECV, <span style="color: #6fa8dc;">INPUT</span>);</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//RESTORE THE PROGRAMMED COMMAND VALUE FROM EEPROM</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//RESTORE THE STATE VALUE AFTER UNPREDICTED TURN OFF</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> RestoreCommandStateValues();</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> My_Receiver.enableIRIn();</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//RETURN TO THE RESTORED STATE</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> ReturnToCurrentState();</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;"><br /></span><span style="color: orange;">void </span><b><span style="color: orange;">loop</span></b>() {</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> check_irrecv_signal();</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*YOUR ESSENTIAL FUNCTIONS*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> stateMachine.<span style="color: orange;">update</span>();</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
</div>
<div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void</span> check_irrecv_signal(){</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> if (My_Receiver.GetResults(&My_Decoder)) {</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> My_Decoder.decode();</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//ACCORDING TO THE STATE, CHOOSE COMMANDS</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">switch</span>(StateValue){</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>POWERON:</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">if</span>(My_Decoder.value == START || My_Decoder.value == START2){</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> startCommand();</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> } </span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> remoteStopProgramCommands(); <span style="color: orange;">break</span>;</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>STARTED: remoteStopProgramCommands(); <span style="color: orange;">break</span>;</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>STOPPED: <span style="color: orange;">break</span>;</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> My_Receiver.resume(); //Prepare to receive the next value </span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>remoteStopProgramCommands(){</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">if</span>(My_Decoder.value == STOP || My_Decoder.value == STOP2) stopCommand(); <span style="color: #999999;">//Cannot use in switch because STOP is not a constant</span></span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">switch</span>(My_Decoder.value){</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//THESE ARE POSSIBLE PROGRAMM COMMAND VALUES</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case</span><span style="color: orange;"> </span>0x12C4 ... 0x12FE:</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case</span><span style="color: orange;"> </span>0x1AC4 ... 0x1AFE: programmCommand(); <span style="color: orange;">break</span>;</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
</div>
</div>
<div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
</div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>RestoreCommandStateValues(){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> CommandValue = <span style="color: orange;">EEPROM</span>.<span style="color: orange;">read</span>(CommandAddress);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">switch</span>(CommandValue){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="background-color: white;"><span style="color: orange;">case </span></span>UnderMinimumCommandValue:</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>OverMaximumCommandValue:</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> CommandValue = MinimumCommandValue;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(CommandAddress, CommandValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">break</span>;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> makeStartStopValues();</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = <span style="color: orange;">EEPROM</span>.<span style="color: orange;">read</span>(StateAddress);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">if</span>(StateValue > NumOfStates){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = POWERON;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(StateAddress, StateValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void</span><span style="color: orange;"> </span>makeStartStopValues(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//ACCORDING TO NEW SWEDEN IR REMOTE YOU MAY</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//GET 2 DIFFERENT VALUES AT THE SAME BUTTON</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//BUT DIFFERENT PUSH TIMES</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> STOP = CommandValue + 0x1100;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> STOP2 = CommandValue + 0x1900;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> START = STOP + 1;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> START2 = STOP2 + 1;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">void ReturnToCurrentState(){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">switch</span>(StateValue){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>POWERON: <span style="color: orange;">break</span>;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>STARTED: startCommand(); <span style="color: orange;">break</span>;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">case </span>STOPPED: stopCommand(); <span style="color: orange;">break</span>;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;"><br /></span><span style="color: orange;">void </span>startCommand(){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = STARTED;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(StateAddress, StateValue);</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*ENABLE DRIVERS HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> digitalWrite(RXLED, HIGH);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> stateMachine.<span style="color: orange;">transitionTo</span>(idleRunState);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>stopCommand(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*DISABLE DRIVERS HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = STOPPED;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(StateAddress, StateValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> stateMachine.<span style="color: orange;">transitionTo</span>(stoppedState);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>programmCommand(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*DISABLE DRIVERS HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = POWERON;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(StateAddress, StateValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> CommandValue = My_Decoder.value & 0x00FE;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(CommandAddress, CommandValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> makeStartStopValues();</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">//FLASH THE LED 2 TIMES 500MS</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> LED_FLASHING(2, 500);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> stateMachine.<span style="color: orange;">transitionTo</span>(powerOnState);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*POWER ON STATE*/ </span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>powerOnEnter(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*YOUR CODE HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void</span><span style="color: orange;"> </span>powerOnUpdate(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*YOUR CODE HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">} </span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void</span><span style="color: orange;"> </span>powerOnExit(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*YOUR CODE HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*IDLE RUN STATE*/ </span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void</span><span style="color: orange;"> </span>idleRunUpdate(){</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*YOUR CODE HERE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><br /></span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*STOPPED_SAFE STATE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>stoppedSafe(){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> LED_FLASHING(4, 250);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> StateValue = POWERON;</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">EEPROM</span>.<span style="color: orange;">write</span>(StateAddress, StateValue);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
<div style="margin: 0px;">
<span style="color: #999999; font-family: Courier New, Courier, monospace; font-size: x-small;">/*STOPPED STATE*/</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"><span style="color: orange;">void </span>stoppedUpdate(){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> <span style="color: orange;">while</span>(1){</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> LED_FLASHING(5, 500);</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;"> }</span></div>
<div style="margin: 0px;">
<span style="font-family: Courier New, Courier, monospace; font-size: x-small;">}</span></div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com6tag:blogger.com,1999:blog-5721739675993007342.post-3681181578809668632013-01-31T16:33:00.001+02:002013-01-31T18:54:53.225+02:00A-Silicone or PU Tires?Tested polyurethane rubber with the surface of the dohyo, with <a href="http://www.testingmachines.com/32-07-monitor-slip-friction.html">32-07 Monitor/Slip and Friction</a> from <a href="http://www.testingmachines.com/">Testing Machines Inc.</a><br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.testingmachines.com/images/32-07-monitor-slip-friction.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.testingmachines.com/images/32-07-monitor-slip-friction.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Introduction:</b></div>
Slip and Friction testing aids in the evaluation of chemicals and additives used to create or minimize the degree of friction between two contacting test specimens.<br />
<br />
<b>Applications:</b><br />
Paper, Flexible Packaging, Foils, Rubber, Plastics, Wood,<br />
Linoleum, Metal, Printing, Coatings, Composites<br />
<br />
<b>Specifications:</b><br />
<br />
<ul>
<li>Selectable speed from 5 to 43 cm/min (2 to 17 inch/min)</li>
<li>Selectable travel distance from 2.5 to 30.5 cm (1 to 12 in.)</li>
<li>Meets TAPPI T816, T549, and ASTM D1894</li>
</ul>
<br />
<b>Features:</b><br />
<br />
<ul>
<li>Digital display, storage and editing of up to 100 readings, and selectable units (COF or grams)</li>
<li>Settable limits</li>
<li>Statistics-average, standard deviation, high/low results.</li>
<li>Report printout with built in printer</li>
<li>RS-232</li>
<li>Static and kinetic coefficient of friction calculated in one operation.</li>
<li>Direct drive arm with unique skid control.</li>
<li>Sled-connecting mechanism ensures level pulling action.</li>
<li>Easily interchangeable sleds.</li>
<li>Full color easy to read Display</li>
</ul>
<br />
<b>Instrument size:</b><br />
<blockquote class="tr_bq">
Depth:<span class="Apple-tab-span" style="white-space: pre;"> </span>495 mm (19.5 in.)<br />
Height:<span class="Apple-tab-span" style="white-space: pre;"> </span>508 mm (20 in.)<br />
Width:<span class="Apple-tab-span" style="white-space: pre;"> </span>515 mm (20.3 in.)<br />
Weight<span class="Apple-tab-span" style="white-space: pre;"> </span>25 kg (55 lb)</blockquote>
<b>PDF product sheet:</b><br />
<a href="http://www.testingmachines.com/pdf/32-07-monitor-slip-friction.pdf">Monitor/Slip and Friction</a><br />
<br />
<b>Product Video:</b><br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/Q3wimomi0zM?feature=player_embedded' frameborder='0'></iframe></div>
<br />
<b>Brief test results:</b><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">* TEST REPORT *</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Test Name: SL</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Date: 31 Jan 2013</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Sample ID: -</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Sled Type: B - 200g (.44Lb)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Sled Info: -</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Speed: 10cm/min</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Travel: 20cm</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Unit: COF</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Total Meas.: 3</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Rejected: 0</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Static:</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Mean: .654</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> SD: .089</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Lo: .601 (#1)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Hi: .758 (#2)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Kinetic:</span><br />
<br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Mean: 1.536</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> SD: .210</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Lo: 1.410 (#1)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> -> Hi: 1.780 (#2)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">Reading #: S K (X=reject)</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> 1: .601 1.410</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> 2: .758 1.780</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"> 3: .604 1.420</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;">* END *</span><br />
<span style="font-family: Courier New, Courier, monospace; font-size: xx-small;"><br /></span>
<b>Conclusion:</b><br />
Graph bellow is found from motor parameters, by ramming the robot to the wall.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6j-oF9JlFhz2D4f_p0QcGdlEIFp419U8bAx2_iDssg3ipYE7FyFJ3S4NNWhz26rSU9rvPok1FVyyG9hbc_fjuWshV4P_8elJIwJ8xIlSj0JT7Yj66Wxsx28iEtbtqvFkFnT1knnrCZss/s1600/Force+vs+speed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6j-oF9JlFhz2D4f_p0QcGdlEIFp419U8bAx2_iDssg3ipYE7FyFJ3S4NNWhz26rSU9rvPok1FVyyG9hbc_fjuWshV4P_8elJIwJ8xIlSj0JT7Yj66Wxsx28iEtbtqvFkFnT1knnrCZss/s640/Force+vs+speed.png" width="640" /></a></div>
<ol>
<li>As expected, static is lower than kinetic friction coefficient.</li>
<li>These aren't final results, because 3 measurements at one speed means nothing.</li>
<li>It is essential to conduct full experiment at different speeds and normal loads, in order to achieve force vs speed load graph and compare with DC motor load graph.</li>
<li>Next: Full experiment conduction with PU and silicone rubbers.</li>
</ol>
<br />
<br />
<b>Useful links:</b><br />
<ul>
<li><a href="http://www.utwente.nl/ctw/tr/Research/Publications/PhDTheses/thesis_Deladi.pdf">STATIC FRICTION IN RUBBER-METAL CONTACTS WITH APPLICATION TO RUBBER PAD FORMING PROCESSES</a></li>
<li><a href="http://insideracingtechnology.com/tirebkexerpt1.htm">Rubber Friction</a></li>
</ul>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com2tag:blogger.com,1999:blog-5721739675993007342.post-74203090323290431802013-01-30T18:31:00.001+02:002013-01-30T18:34:05.776+02:00Rotor Inertia MeasurementHow do we measure rotor inertia?<br />
<div>
We can calculate it out of free run.</div>
<div>
<br />
<b>Method:</b></div>
<div>
<ul>
<li>Connect motor to the battery;</li>
<li>Measure no-load current;</li>
<li>Connect oscilloscope to the terminals;</li>
<li>Disconnect the battery;</li>
<li>Let the single measurement appear in the oscilloscope.</li>
</ul>
<div>
<b><br /></b></div>
<div>
<b>Results:</b></div>
</div>
<div>
We measured free run BEMF dynamic process, which is equivalent for speed.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvdnXxSHh-dx6DmwNTkWlXaHQ_uIAp_CLbsnvZKBHE-C-7eR2p0pbWbOG1ntuO3g1B7kweHGzt97KbJAIHQ_stE7oKoEosRzrZ7kHHD2evYp5KnQ_1dEbAycSbpWA7sM96DL4bSvY6ySU/s1600/IMAG001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvdnXxSHh-dx6DmwNTkWlXaHQ_uIAp_CLbsnvZKBHE-C-7eR2p0pbWbOG1ntuO3g1B7kweHGzt97KbJAIHQ_stE7oKoEosRzrZ7kHHD2evYp5KnQ_1dEbAycSbpWA7sM96DL4bSvY6ySU/s1600/IMAG001.png" /></a></div>
<div>
We can approximate the achieved graph to linear, which will allow us to use approximated differential dynamics:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoDNbK9qGh8YkiqQ9LNxW8hlN6BbTz960h1HmzNf7bfQY9XVrtCIzp0IkPjenVrZE84KEAUXv5Y4BMVR14h9RRZHoLUwJSa3T2oWegcRxQpufl29buclx4qcsVh5Ii9cQsv3aM5ECRg4Q/s1600/Torque.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjoDNbK9qGh8YkiqQ9LNxW8hlN6BbTz960h1HmzNf7bfQY9XVrtCIzp0IkPjenVrZE84KEAUXv5Y4BMVR14h9RRZHoLUwJSa3T2oWegcRxQpufl29buclx4qcsVh5Ii9cQsv3aM5ECRg4Q/s1600/Torque.JPG" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ol>
<li>Main dynamic formula (M_din - dynamic torque, M_t.v. - no load torque).</li>
<li>Useful torque.</li>
<li>Dynamic Torque equal to No Load Torque.</li>
<li>Torque and current link.</li>
<li>EMF and angular velocity link.</li>
<li>Voltage balance equation.</li>
</ol>
<div class="separator" style="clear: both; text-align: left;">
Moment of inertia is equal to:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFt-b_3naRSDUsfAGwecyC_K37jNnWnPDhpWYIBw7-YPX0vYX3C29axqtLAvlA4DBMTkFcqW3Z9Wra47jx1qRB-KUjPkRqt8I1IbQ612nHkMNpJ5mUJRyu28oKXUdesXmf4kHjYR2B4y0/s1600/Inertia.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="65" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFt-b_3naRSDUsfAGwecyC_K37jNnWnPDhpWYIBw7-YPX0vYX3C29axqtLAvlA4DBMTkFcqW3Z9Wra47jx1qRB-KUjPkRqt8I1IbQ612nHkMNpJ5mUJRyu28oKXUdesXmf4kHjYR2B4y0/s640/Inertia.JPG" width="640" /></a></div>
<br />
<div>
Where I_t.v. - no load current, k - motor constant, T - time, E_bat - battery EMF, r_a - armature resistance, r_bat - battery resistance.</div>
<div>
<br /></div>
<div>
<b>Simulation:</b></div>
<div>
Simscape electrical in Matlab, helps us to have this approximated dynamic process and calculate the rotor inertia, which is equal to 1,081e-4 kgm^2:</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikPnOvH_v74RSU6cV36OQMW3gSnlkDo77aDUGBTJe7bSysRPYRX2dVnF_YTs4Rtk7HglgPt6elXMsH1atqZicvbJ8hy0FbtughbTf8SmtlmsRscNVxaBxoF2_RZ4lHjlC65nEUaFuy5pw/s1600/%D0%91%D0%B5%D0%B7%D1%8B%D0%BC%D1%8F%D0%BD%D0%BD%D1%8B%D0%B9.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="359" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEikPnOvH_v74RSU6cV36OQMW3gSnlkDo77aDUGBTJe7bSysRPYRX2dVnF_YTs4Rtk7HglgPt6elXMsH1atqZicvbJ8hy0FbtughbTf8SmtlmsRscNVxaBxoF2_RZ4lHjlC65nEUaFuy5pw/s640/%D0%91%D0%B5%D0%B7%D1%8B%D0%BC%D1%8F%D0%BD%D0%BD%D1%8B%D0%B9.png" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Conclusion:</b></div>
<div class="separator" style="clear: both; text-align: left;">
This is quite accurate method for rotor inertia calculation, if the gearmotor has static load (friction), which linearised the exponential graph of the speed.</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-61833936063993568932013-01-30T16:42:00.002+02:002013-01-30T16:45:25.715+02:00Cast Silicone TiresCasted new tires with <a href="http://en.zhermack.com/Technical/Silicones/Duplication/C400821.kl">Elite Double 22</a> from <a href="http://en.zhermack.com/">Zhermack</a><br />
<br />
A-Silicone for laboratory model duplication. Ideal for duplicating models with slight undercuts and casting investments. Use of a plastic duplication flask is recommended. Available in light green for better definition of detail.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://en.zhermack.com/imgpub/img21487_0_0.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://en.zhermack.com/imgpub/img21487_0_0.jpg" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
<b>Advantages:</b></div>
<div class="separator" style="clear: both;">
</div>
<ul>
<li>Mixing facilitated by the 1:1 base to catalyst ratio;</li>
<li>High fluidity: does not require mixing in a vacuum;</li>
<li>Absolute precision for faithful reproduction of detail;</li>
<li>Dimensional stability over time and non-deformability, allowing a number of duplications to be made;</li>
<li>Compatible with all plasters, polyurethane resins, phosphate investments and acrylic resins.</li>
</ul>
<b><br /></b>
<b>Characteristics:</b><br />
<ul>
<li>Extreme fluidity;</li>
<li>Versatile, thanks to the 22 Shore A hardness;</li>
<li>Light green colour.</li>
</ul>
<div>
<b><br /></b>
<b>DOWNLOAD:</b></div>
<div>
<ul>
<li><a href="http://en.zhermack.com/ImagePub.aspx?id=21526">Brochure</a></li>
<li><a href="http://en.zhermack.com/ImagePub.aspx?id=60519">Instructions</a></li>
<li><a href="http://en.zhermack.com/ImagePub.aspx?id=85859">Safety Data Sheets</a></li>
<li><a href="http://en.zhermack.com/ImagePub.aspx?id=27907">Press Release</a></li>
</ul>
<div>
<b><br /></b>
<b>RESULT:</b></div>
</div>
<div>
Center the rims in the form, and apply the mixed liquid to the gap. Polimerisation shouldn't take long, about half an hour. In the result we get newly casted tyres with perfect friction (while new).</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiITXJQQMU3OqyBMxmHxjauLVj85W3_-wrMtSqiXnzBT67hmUhXIEQVWE2BmC4uILYvHfA_dhrAqHo8PjKF_Dk8IeR4ZOa44a5Fk7PCuov4rwtIb6FEoBeyoXI_WfyFJdakyQbQYus2jd8/s1600/290120131764.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiITXJQQMU3OqyBMxmHxjauLVj85W3_-wrMtSqiXnzBT67hmUhXIEQVWE2BmC4uILYvHfA_dhrAqHo8PjKF_Dk8IeR4ZOa44a5Fk7PCuov4rwtIb6FEoBeyoXI_WfyFJdakyQbQYus2jd8/s200/290120131764.jpg" width="200" /></a><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWcGUmQiv3rMjh4mFW1y4gozwn5pkvg3yFoGGNNheWXwfbwGUfa87KF2CnJTfTISk9-yARoK_tpwBOLcoMZiDDp05XbckAzbeV0ciTixPp6omwZUgPgpaBtY7Iub2oNXUpJS8F5-MFQWI/s1600/290120131765.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="150" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWcGUmQiv3rMjh4mFW1y4gozwn5pkvg3yFoGGNNheWXwfbwGUfa87KF2CnJTfTISk9-yARoK_tpwBOLcoMZiDDp05XbckAzbeV0ciTixPp6omwZUgPgpaBtY7Iub2oNXUpJS8F5-MFQWI/s200/290120131765.jpg" width="200" /></a></div>
<div>
<b><br /></b></div>
<br />Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com4tag:blogger.com,1999:blog-5721739675993007342.post-46106663099855436592013-01-04T16:56:00.003+02:002013-01-04T16:56:40.342+02:00Block Diagram<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6MyhiDBXQ8LauH0gjMptBZprKmsXEtyeYUWf3zYkB6qpkgCuFD0Chewp3BBINXGaPx2DAqCwmgEyBQ8UDi4YWRWQOCpk4pFIq3O-COmDCG3YPBknRsS8YoZ1-H2EaytLOJ1wGMpUGLa4/s1600/Block+Diagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="332" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6MyhiDBXQ8LauH0gjMptBZprKmsXEtyeYUWf3zYkB6qpkgCuFD0Chewp3BBINXGaPx2DAqCwmgEyBQ8UDi4YWRWQOCpk4pFIq3O-COmDCG3YPBknRsS8YoZ1-H2EaytLOJ1wGMpUGLa4/s640/Block+Diagram.png" width="640" /></a></div>
<br />
Electrical energy source ES feeds programable logic controller together with the voltage feedback. Electrical energy flows to both drivers D, which are controlled with PLC and regulate the power for the motors M, where the energy is converted to mechanical. Both motors drive a single transmission device TD, which is actually a full robot mechanical system, except motors, and a Dohyo together, energy parameters are transformed to fit the work unit WU, wich is an opponents robot system and a Dohyo ring too.<br />
The force you need to push the opponent have to be bigger than critical friction force of the opponent's wheels and the Dohyo surface.<br />
<br />
<b>Conclusion:</b><br />
You don't need an enormous power for motors, only slightly bigger than the product of critical friction force of your TD and prefered nominal speed (e. 10cm/s, depends on termal ability, should not overheat).<br />
<div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-52417935627640298222012-12-26T12:29:00.002+02:002013-01-30T18:34:43.319+02:00SolidWorks Drawings UpdateThis documentation is required for my cource work. I use SolidWorks Drawings, user friendly environment and fast view creation, drawings made in no time.<br />
The file is in <a href="http://destroyer3000.blogspot.com/p/cad-design.html">CAD design</a> section. <i>2012.12.31, 20:43:38</i><br />
<br />Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-74929208528942683982012-12-15T23:54:00.002+02:002013-01-04T01:33:15.782+02:00Acceleration When I first tried to launch this robot, I've set the full speed to have a good show.<br />
But I've noticed that the front had been raised significantly at full thrust.<br />
If my robots front is raised each attack state, he's dead from the start.<br />
<br />
It needs a Soft Start, maximum acceleration allowed to drive the platform.<br />
<br />
Recently I've been playing to solve that problem.<br />
Robot has tactile surface sensors - micro switches, which deactivate if the front is raised.<br />
<br />
With the help of MegunoLink Tool, Analog reading, Serial communication and code adjustment, we can make an experiment. The Report is bellow.<br />
<br />
My course project asks for 20:1 speed regulation range, so speed is 5% steps discrete.<br />
A delay between steps is adjusted.<br />
<br />
Adjustment results:<br />
<ul>
<li>Full thrust: No Soft Start applied, as you already noticed that the front has raised, Switch1 readings shows that 0 value, which is OFF. 270ms flying.</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOtVzOOK7p6H6PJVa_DXwqaHw4kEp_P2ZFDiB9DiGhwunh12VbxviM44cCv7Wy6vSFCTeVqq0Xr2gWZMHWjI5zRq68s2mhWf7pVaPnik9Isjo4PF0TLU7418eO-qehjcbm7DDeBBVah-Q/s1600/Full+thrust.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOtVzOOK7p6H6PJVa_DXwqaHw4kEp_P2ZFDiB9DiGhwunh12VbxviM44cCv7Wy6vSFCTeVqq0Xr2gWZMHWjI5zRq68s2mhWf7pVaPnik9Isjo4PF0TLU7418eO-qehjcbm7DDeBBVah-Q/s400/Full+thrust.png" width="400" /></a></div>
</div>
<ul>
<li>1 ms between steps: Not enough yet, 237ms flying.</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOPppoVuOqJr-kTkzf2pQiXTmJZIZ-zXANfeJxAQi_rhgFLWhCJd_v7a6X7MEvgkkqepW2Qjj5aVUqt6mOJpGJqrAy4sYEiTljiG9lT8A48OFtR_6vHI9SFL4wuCgGnmEJYzjVLBJP3M/s1600/Acceleration+100percent+per+20ms.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvOPppoVuOqJr-kTkzf2pQiXTmJZIZ-zXANfeJxAQi_rhgFLWhCJd_v7a6X7MEvgkkqepW2Qjj5aVUqt6mOJpGJqrAy4sYEiTljiG9lT8A48OFtR_6vHI9SFL4wuCgGnmEJYzjVLBJP3M/s400/Acceleration+100percent+per+20ms.png" width="400" /></a></div>
</div>
<div>
<ul>
<li>2ms between steps: 220ms flying blade.</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4CvZ8VGgx7fK5O1rgL8HqdIUgY46imyjNqVZKBOefXNUq_o_3MQrLeoL_dbyFby1AsDhRFX5yiONGa2ihyphenhyphenVk-a9Vm_gRdo00cDv-boLm-CLu86hzv3MbHJ6-2H0gUX-0OAWcMZFZ3Hk/s1600/2ms+step+acceleration.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjq4CvZ8VGgx7fK5O1rgL8HqdIUgY46imyjNqVZKBOefXNUq_o_3MQrLeoL_dbyFby1AsDhRFX5yiONGa2ihyphenhyphenVk-a9Vm_gRdo00cDv-boLm-CLu86hzv3MbHJ6-2H0gUX-0OAWcMZFZ3Hk/s400/2ms+step+acceleration.png" width="400" /></a></div>
</div>
</div>
<div>
<ul>
<li>3 ms between steps: 193ms flying blade</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKDlXV8WSm3vRfarQcHCaiPM5B6i27Kmr-jHJYkY8RQkS7O94FoIsew0RRwdC2JME8XKEgo8vMFGPYPcPGocsSa8dGtwFVi3L7n2xgBmdjCgNvoyF0EW44VDtdTV5BHkdg8f_iw1Ri2oM/s1600/3ms+acceleration.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKDlXV8WSm3vRfarQcHCaiPM5B6i27Kmr-jHJYkY8RQkS7O94FoIsew0RRwdC2JME8XKEgo8vMFGPYPcPGocsSa8dGtwFVi3L7n2xgBmdjCgNvoyF0EW44VDtdTV5BHkdg8f_iw1Ri2oM/s400/3ms+acceleration.png" width="400" /></a></div>
</div>
</div>
<div>
<ul>
<li>4 ms between steps: 159ms max flying blade, unstable yet.</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXNHbWkP8ZaJG90lktISF4BtMZkdhueG_NUmbq4vvRbpsjM3p-ZhApAOrv6EofgN0gGumDTZTmxrAs6hIY4CiTJUDIjzqwJnuWLYxL671ImNnlb5GnhIbfAvrVlq9F4s8x59O8NnLDqCs/s1600/4ms+acceleration+3samples.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjXNHbWkP8ZaJG90lktISF4BtMZkdhueG_NUmbq4vvRbpsjM3p-ZhApAOrv6EofgN0gGumDTZTmxrAs6hIY4CiTJUDIjzqwJnuWLYxL671ImNnlb5GnhIbfAvrVlq9F4s8x59O8NnLDqCs/s400/4ms+acceleration+3samples.png" width="400" /></a></div>
</div>
</div>
<div>
<ul>
<li>5ms between steps: Eureka the Golden middle! No flying blades.</li>
</ul>
<div style="text-align: center;">
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjsOVJUeKGgfD7XNazz2ZMIicChjADFtIe-3upm0q9zJDXiWt_ItEqftZvXTK48I-ah7QHksy4G6NhnwH1pcwLOkiNZtSkcvF6kx-BEZ8vYR8aI4R__U5I1tvRmyn6qhF-Gl9XqKm5yYA/s1600/5ms+acceleration+2+samples.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="205" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhjsOVJUeKGgfD7XNazz2ZMIicChjADFtIe-3upm0q9zJDXiWt_ItEqftZvXTK48I-ah7QHksy4G6NhnwH1pcwLOkiNZtSkcvF6kx-BEZ8vYR8aI4R__U5I1tvRmyn6qhF-Gl9XqKm5yYA/s400/5ms+acceleration+2+samples.png" width="400" /></a></div>
</div>
</div>
<div style="text-align: left;">
<b>Conclusion:</b></div>
<div style="text-align: left;">
It might be better to add a millisecond as 20% more in reserve, because the dead zone for switches is 2mm (~0.1") between flying blade and surface. Rate of voltage change should be 92.5~111 V/s, provides a Soft Start for motors.</div>
<div style="text-align: left;">
<br /><i>Update 2013.01.03:</i> Another more accurate way to find out if the blade is being raised:<br /><ul>
</ul>
<ol>
<li>Place a sheet of standard A4 paper on the surface of Dohyo in front of the vehicle;</li>
<li>Soft start it to full speed;</li>
<li>Do it several times;</li>
<li>If the blade gets on top of the paper, that means it is still being raised, add a millisecond or two between 5% PWM duty cycle steps.</li>
<li>If the paper is being pushed only, configuration is over and you're good to go.</li>
</ol>
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-56022893475417687372012-12-15T21:55:00.001+02:002013-01-04T02:01:03.100+02:00Battery Resistance Measurement<div class="separator" style="clear: both; text-align: left;">
Decided to check out the current peaks and measure the voltage drop on the battery.</div>
<div class="separator" style="clear: both; text-align: left;">
The currents FB_L and FB_R are different, because motors have a little difference resistances.</div>
<div class="separator" style="clear: both; text-align: left;">
<i>Update 2013.01.04:</i> Motors have the same resistance, the problem is somwhere in the right motor's power line, might be the R_DS(ON) Resistance of the H-bridge, because one of them was prieviously used. Soldering a fresh MC33887 may solve the problem.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
Peak currents are 1,69A and 1,33A<br />
<div class="separator" style="clear: both; text-align: left;">
Voltage before load 11,74V</div>
<div class="separator" style="clear: both; text-align: left;">
Voltage during load 10,37V</div>
<div class="separator" style="clear: both; text-align: left;">
So resistance R=(11,74-10,37)/(1,69+1,33)=0,454 Ohm</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
May be I'll add negative voltage feedback, to compensate the error during loads someday in future.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Love this feature.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMxiedDjXm7j0gEQZKJ_p5fytabfUBBZAR1dCy-rG3fCF1WEvhMu_kiRpMIm7PwZZqHwnTCeAmj0yUHDUQPKt_VoDd7fCA5fyn_F7D-Ez5_RprlghFk2g3H7q7H4p_QMLL1ehz1epd-TI/s1600/Battery+resistance.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMxiedDjXm7j0gEQZKJ_p5fytabfUBBZAR1dCy-rG3fCF1WEvhMu_kiRpMIm7PwZZqHwnTCeAmj0yUHDUQPKt_VoDd7fCA5fyn_F7D-Ez5_RprlghFk2g3H7q7H4p_QMLL1ehz1epd-TI/s640/Battery+resistance.png" width="640" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com1tag:blogger.com,1999:blog-5721739675993007342.post-39268145606452916172012-12-15T16:48:00.005+02:002012-12-15T17:10:12.135+02:00Over Fall SensorI have always had a problem with my previous Mini Sumo "<a href="https://www.facebook.com/media/set/?set=a.104155819609659.8815.100000457231529&type=1&l=9b170b90e4">Raizo</a>" (<a href="http://www.huv.com/miniSumo/">Seeker II/IIx</a> inspired) the second place winner at RobotChallange 2010 in Austria.<br />
Every time the slope type opponent pulled it's front my robot had the full throttle, which cause over falling. So I thought about tactile surface sensor and not just on but two.<br />
2 microswitches act as a tactile sensors as you can see bellow in photo, where they have been installed.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-snc6/230809_495714770453760_941280830_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://fbcdn-sphotos-h-a.akamaihd.net/hphotos-ak-snc6/230809_495714770453760_941280830_n.jpg" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
Each of them going to sense the side, where opponents blade has got under the platform.</div>
<div class="separator" style="clear: both; text-align: left;">
Both of them generate an analog signal, which is measured with one of analog inputs of Arduino and decides which one of them is activated.</div>
<div class="separator" style="clear: both; text-align: left;">
The method is called Resistor Ladder or R-2R network (digital to analog conversion, or DAC).</div>
<blockquote class="tr_bq">
A resistor ladder is an electrical circuit made of repeating units of resistors. Cited: <a href="http://en.wikipedia.org/wiki/Resistor_ladder">Wikipedia "Resistor Ladder"</a></blockquote>
<div class="separator" style="clear: both; text-align: center;">
A part of schematic sheet</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSr8zX3uKX4JUQjR0SkzybqenG_7pUISiQUfhJlW1IJVLlrGJ8pPo515TKaeJ3_1M7pr9ELvobwBqWKoqh4kkkK3fqqTDk2QscvOGbeI1OmNuk11zXyEccqdBmT043rUeChxbje2R_IA/s1600/microswitches.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdSr8zX3uKX4JUQjR0SkzybqenG_7pUISiQUfhJlW1IJVLlrGJ8pPo515TKaeJ3_1M7pr9ELvobwBqWKoqh4kkkK3fqqTDk2QscvOGbeI1OmNuk11zXyEccqdBmT043rUeChxbje2R_IA/s1600/microswitches.JPG" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="MsoNormal">
<span lang="LT">V<sub>out </sub>= V<sub>ref</sub> </span><span lang="LT">× VAL / 2<sup>N</sup>;<br />
N = 2 → 2<sup>N</sup> = 4; </span><span lang="LT">V<sub>ref</sub> </span><span lang="LT">= 5V;<br />
</span><span lang="LT">V<sub>out</sub> (00, VAL = 0; 11, VAL = 3);<br />
</span><span lang="LT">Minimum single step </span><span lang="LT">V<sub>out
</sub>= 5 </span><span lang="LT">× 1 / 2<sup>2</sup> = 1.25V;<br />
Maximum output </span><span lang="LT">V<sub>out </sub>= 5 </span><span lang="LT">×
3 / 2<sup>2</sup> = 3.75V;<o:p></o:p></span></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
The truth table</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div align="center">
<table border="1" cellpadding="0" cellspacing="0" class="MsoTableGrid" style="border-collapse: collapse; border: none; mso-border-alt: solid windowtext .5pt; mso-padding-alt: 0cm 5.4pt 0cm 5.4pt; mso-yfti-tbllook: 1184;">
<tbody>
<tr>
<td style="border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">V<sub>out</sub></span></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">S<sub>1</sub></span></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">S<sub>0</sub></span></div>
</td>
<td style="border-left: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">10bit value</span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">1.25</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">1</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">256</span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">2.50</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">1</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">0</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">512</span></div>
</td>
</tr>
<tr>
<td style="border-top: none; border: solid windowtext 1.0pt; mso-border-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">3.75</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">1</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">1</span></div>
</td>
<td style="border-bottom: solid windowtext 1.0pt; border-left: none; border-right: solid windowtext 1.0pt; border-top: none; mso-border-alt: solid windowtext .5pt; mso-border-left-alt: solid windowtext .5pt; mso-border-top-alt: solid windowtext .5pt; padding: 0cm 5.4pt 0cm 5.4pt;"><div align="center" class="MsoNormal" style="margin-bottom: 0.0001pt; text-align: center;">
<span lang="LT" style="font-size: large;">768</span></div>
</td>
</tr>
</tbody></table>
</div>
<br />
<div class="separator" style="clear: both; text-align: left;">
So in order to make it work together with the other sensors in one byte we do this chain of substitutions:</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li>Make an array of possible weight in the byte:</li>
</ul>
<pre><span style="color: #cc6600;">const</span> <span style="color: #cc6600;">byte</span> microswitch[]={0, 64, 128, 192};</pre>
<ul>
<li>Create a function with return values, which are dependent on the measured value:</li>
</ul>
<pre><span style="color: #7e7e7e;">/*SWITCH DETECT*/</span>
<span style="color: #cc6600;">byte</span> Switch(){
<span style="color: #cc6600;">int</span> switchVal=<span style="color: #cc6600;">analogRead</span>(SWITCH);
<span style="color: #cc6600;">if</span>(switchVal==0) <span style="color: #cc6600;">return</span> 3;
<span style="color: #cc6600;">if</span>(switchVal>200 && switchVal<300) <span style="color: #cc6600;">return</span> 2;
<span style="color: #cc6600;">if</span>(switchVal>400 && switchVal<600) <span style="color: #cc6600;">return</span> 1;
<span style="color: #cc6600;">if</span>(switchVal>700 && switchVal<800) <span style="color: #cc6600;">return</span> 0;
}</pre>
<ul>
<li>Add the microswitch weigth value, which has been chosen from array.</li>
</ul>
<pre><span style="color: #7e7e7e;">/*SENSOR DATABYTE*/</span>
<span style="color: #cc6600;">void</span> SensorSum(){
sensorSum = sharp_sl[<span style="color: #cc6600;">digitalRead</span>(SHARP_SL)]
+ sharp_fl[<span style="color: #cc6600;">digitalRead</span>(SHARP_FL)]
+ sharp_fr[<span style="color: #cc6600;">digitalRead</span>(SHARP_FR)]
+ sharp_sr[<span style="color: #cc6600;">digitalRead</span>(SHARP_SR)]
+ vishay_l[<span style="color: #cc6600;">digitalRead</span>( TCRT_L )]
+ vishay_r[<span style="color: #cc6600;">digitalRead</span>( TCRT_R )]
+ microswitch[Switch()];
}</pre>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-86789562518908604792012-12-15T14:28:00.000+02:002012-12-15T17:21:26.785+02:00Electromagnetic Interference Reduction<div class="separator" style="clear: both; text-align: left;">
In the previous <a href="http://destroyer3000.blogspot.com/2012/12/armature-current-measurement.html">message</a>, you've seen that measured current wasn't so smooth because of the comutation noise in the motor.</div>
There are several ways of filtering the noises from the motors starting from simple to Hi End one:<br />
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div style="text-align: left;">
<b>A single-capacitor filter.</b><br />
The capacitor is simply soldered across the motor terminals.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.stefanv.com/quiet/2000-05/figure1.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.stefanv.com/quiet/2000-05/figure1.gif" /></a></div>
<div style="text-align: left;">
<b>A two-capacitor filter.</b><br />
Each capacitor has one lead attached to a motor terminal, and the other lead attached to the case.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.stefanv.com/quiet/2000-05/figure2.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.stefanv.com/quiet/2000-05/figure2.gif" /></a></div>
<div style="text-align: left;">
<b>A three-capacitor filter.</b></div>
<div style="text-align: left;">
This is basically a combination of the one- and two-capacitor circuits.</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.stefanv.com/quiet/2000-05/figure3.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.stefanv.com/quiet/2000-05/figure3.gif" /></a></div>
<b>A capacitor-choke filter.</b><br />
These are usually assembled on a separate circuit board which is then soldered to the motor terminals.<br />
<div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.stefanv.com/quiet/2000-05/figure4.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://www.stefanv.com/quiet/2000-05/figure4.gif" /></a></div>
<div class="separator" style="clear: both;">
A capacitor-choke filter sold by Graupner, designed to be soldered directly to any 05-sized can motor, such as a Graupner Speed 600. Graupner also sells a Speed 400 sized filter.</div>
<div style="text-align: center;">
<a href="http://www.stefanv.com/quiet/2000-05/photo2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="236" src="http://www.stefanv.com/quiet/2000-05/photo2.jpg" width="320" /></a><br />
<div style="text-align: left;">
Not much of place soldering that stuff to my robot:</div>
</div>
<div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash4/319093_495714587120445_52582099_n.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" height="240" src="https://fbcdn-sphotos-c-a.akamaihd.net/hphotos-ak-ash4/319093_495714587120445_52582099_n.jpg" width="320" /></a></div>
I personally suggest to twist it with a steel wire, to make it more effective.</div>
Twisting the wires making up a circuit results in many smaller magnets with opposing polarity, which cancel each other out.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="http://www.stefanv.com/quiet/2004-06/figure3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="262" src="http://www.stefanv.com/quiet/2004-06/figure3.jpg" width="640" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: left;">
Citation: <a href="http://www.stefanv.com/rcstuff/qf200005.html">www.stefanv.com</a></div>
<div class="separator" style="clear: both; text-align: left;">
<b>Motor Isolation.</b></div>
<div class="separator" style="clear: both; text-align: left;">
A simple isolated power supply for robot motors and circuits</div>
<a href="http://www.beam-wiki.org/w/images/3/3b/Isolated_Power_Spply.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em; text-align: center;"><img border="0" src="http://www.beam-wiki.org/w/images/3/3b/Isolated_Power_Spply.GIF" /></a><br />
<div class="separator" style="clear: both; text-align: left;">
A pseudo-isolated power supply for robot motors and circuits</div>
<div class="separator" style="clear: both; text-align: left;">
<a href="http://www.beam-wiki.org/w/images/1/16/Semi-Isolated_Power_Spply.GIF" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://www.beam-wiki.org/w/images/1/16/Semi-Isolated_Power_Spply.GIF" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="clear: both;">
Citation: <a href="http://www.beam-wiki.org/wiki/Reducing_Motor_Noise">Beam-Wiki "Reducing Motor Noise"</a></div>
<br />
<div>
</div>
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-2710183721224060532012-12-15T13:41:00.000+02:002012-12-15T13:41:47.225+02:00Armature Current Measurement<div class="separator" style="clear: both; text-align: left;">
With the help of <a href="http://www.blueleafsoftware.com/Resources/EmbeddedSand/MegunoLink">MegunoLink 1.0.6</a> application form <a href="http://www.blueleafsoftware.com/">Blue Leaf Software</a> You can measure all sorts of dynamic processes, such as armature current of the motor using arduino analog input and serial communication.</div>
<div class="separator" style="clear: both; text-align: left;">
Use just two lines for two motor current feedback:</div>
<pre> <span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">"{FB_L,T,"</span> + <span style="color: #cc6600;">String</span>(<span style="color: #cc6600;">analogRead</span>(FB_L))+<span style="color: #006699;">'}'</span>);
<span style="color: #cc6600;"><b>Serial</b></span>.<span style="color: #cc6600;">println</span>(<span style="color: #006699;">"{FB_R,T,"</span> + <span style="color: #cc6600;">String</span>(<span style="color: #cc6600;">analogRead</span>(FB_R))+<span style="color: #006699;">'}'</span>);
</pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9bIBLzF4piP93hbNUmd92BokxscUaR_XeQ2YBC7iuFwZpCsPf50I3ASVnz2bWW0kRidPSwN8isOOvvv3sS7DO1tvFlbS82VB1TiUhI6_V99mihvnkHqY6OA2JR6dU566qE1fD_YHCOrI/s1600/Motor+Current+Read+Serial.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="328" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi9bIBLzF4piP93hbNUmd92BokxscUaR_XeQ2YBC7iuFwZpCsPf50I3ASVnz2bWW0kRidPSwN8isOOvvv3sS7DO1tvFlbS82VB1TiUhI6_V99mihvnkHqY6OA2JR6dU566qE1fD_YHCOrI/s640/Motor+Current+Read+Serial.png" width="640" /></a></div>
<br />Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-63511820657452830032012-12-14T00:04:00.001+02:002012-12-14T18:00:15.777+02:00Arduino Source Code Update<div class="separator" style="clear: both; text-align: left;">
</div>
<div class="separator" style="background-color: #fafafa; clear: both; color: #333333; font-family: 'Helvetica Neue Light', HelveticaNeue-Light, 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; line-height: 19px; margin: 0px; outline: none; padding: 0px; text-align: center;">
<a href="http://arduino.cc/" imageanchor="1" style="-webkit-transition: color 0.3s; color: #009eb8; display: inline; margin-left: 1em; margin-right: 1em; outline: none;"><img border="0" height="200" src="http://www.varesano.net/files/arduino_logo.jpg" style="-webkit-border-image: url(data:image/png; border-image-repeat: stretch; border-image-slice: 9; border-image-source: url(data:image/png; border-image-width: 9px; border: 9px none; box-sizing: border-box; height: auto; margin: 10px auto; max-width: 100%; padding: 8px; position: relative;" width="200" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
<span style="font-size: large;">Split the code into tabs to have an easier access:</span></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcyeK2j-wHrCAAW0OZ3EpxSvwsaNyhdUF3avJuE-SaKUG_yKQ3T_ghTqFeFVaLPRcYUar10L9RvyA2WcssLEedtnuIfXaGl12_5a0M9WU6KOsMFPk7gA9ZdU69CtDcbPCc4RkQEQYr9yQ/s1600/Tabs.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjcyeK2j-wHrCAAW0OZ3EpxSvwsaNyhdUF3avJuE-SaKUG_yKQ3T_ghTqFeFVaLPRcYUar10L9RvyA2WcssLEedtnuIfXaGl12_5a0M9WU6KOsMFPk7gA9ZdU69CtDcbPCc4RkQEQYr9yQ/s1600/Tabs.JPG" /></a></div>
<div class="separator" style="clear: both; text-align: left;">
</div>
<ul>
<li><a href="https://docs.google.com/folder/d/0B0TEWg8kMGXnQnF4ZlVEelhxcWs/edit">FOLDER</a></li>
</ul>
<br />
<div>
<ol>
<li style="text-align: left;"><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnWW1MWVdCX3JENEU">Destroyer_3000.ino</a> for global functions and variables;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXncWlKWkU2Z0F6Ync">FSM.ino</a> for Finite State Machine functions;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnZWtCQTJHODBrMGs">Loop.ino</a> for critical actions and functions;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnTXpXYXFicFJobDQ">Motor.ino</a> for motor speed control;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnQ0NPOE1FbldZR2c">PWM.ino</a> just for prescaler choice;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnd1M1LU1MdWFyWW8">Serial_Monitor.ino</a> for sensor data monitoring;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnSVdCVXJmVjVnTlU">Setup.ino</a> for all the data setup and single run functions;</li>
<li><a href="https://docs.google.com/open?id=0B0TEWg8kMGXnaDRVR3hHWktRVWs">definitions.h</a> for all global constants.</li>
</ol>
</div>
<pre><span style="color: #7e7e7e;">//<a href="http://www.arduino.cc/playground/uploads/Code/FSM_1-6.zip">http://www.arduino.cc/playground/uploads/Code/FSM_1-6.zip</a></span>
#include <<span style="color: #cc6600;">FiniteStateMachine</span>.h>
</pre>
Added some more states:<br />
<div>
<pre><blockquote class="tr_bq">
<span style="color: #cc6600;">State</span> idleRunState = <span style="color: #cc6600;">State</span>(idleRunEnter, idleRunUpdate, NULL);
<span style="color: #cc6600;">State</span> spinState = <span style="color: #cc6600;">State</span>(spinEnter, spinUpdate, spinExit);
<span style="color: #cc6600;">State</span> lineAvoidState = <span style="color: #cc6600;">State</span>(lineAvoidEnter, lineAvoidUpdate, NULL);
<span style="color: #cc6600;">State</span> attackState = <span style="color: #cc6600;">State</span>(attackEnter, attackUpdate, NULL);
<span style="color: #cc6600;">State</span> overfallAvoidState = <span style="color: #cc6600;">State</span>(overfallAvoidEnter, overfallAvoidUpdate, NULL);
<span style="color: #cc6600;">FiniteStateMachine</span> stateMachine = <span style="color: #cc6600;">FiniteStateMachine</span>(idleRunState);</blockquote>
</pre>
The data sum of 8 sensors might have the result from 0~255 as a byte, so it is not efficient to write a switch-case for that. In order to find all combinations, use windows calc.exe in programmer mode for 1 byte in decimal units. Click "+", "1" and keep clicking "=" to increment the value, check the binary code while clicking.<br />
<pre></pre>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDoImsWhBkGLCw0FURDwttQ2Na6zXEo569dtNTXv-6c4enZg0Rd7wxWb_iPL-jKohFt2FqmyskfaDVCms14pirj9R8HBH9HODwii3Mspqcl3Wz-Px5Ixh7xUHuGmRGALgotjh0DAADr2U/s1600/calcexe.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="366" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgDoImsWhBkGLCw0FURDwttQ2Na6zXEo569dtNTXv-6c4enZg0Rd7wxWb_iPL-jKohFt2FqmyskfaDVCms14pirj9R8HBH9HODwii3Mspqcl3Wz-Px5Ixh7xUHuGmRGALgotjh0DAADr2U/s400/calcexe.png" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
"B00010001" states that proximity sensor on the left side and left line sensor are active at the same time, but priority is to avoid the line of the Dohyo, so the number "17" will be included in the interval which activates the "lineAvoidState".</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
During finite state, just toggle constant forward speed for patrolling.</div>
<pre><blockquote class="tr_bq">
<span style="color: #7e7e7e;">/*IDLE RUN STATE*/</span>
<span style="color: #cc6600;">void</span> idleRunEnter(){
motor(50, 50);
}</blockquote>
<span style="white-space: normal;"><span style="font-family: Arial, Helvetica, sans-serif;">Update it with continuous sensor readings, several if's will do the transitions.</span></span></pre>
<pre><span style="white-space: normal;"><span style="font-family: Arial, Helvetica, sans-serif; font-size: xx-small;">(Update 2012.12.14 17:57): Fixed the condition for attackState, was the same as spinState's, in result robot runs stright forward as forever in idleEnter function, no line detection.</span></span></pre>
<pre><blockquote class="tr_bq">
<span style="color: #cc6600;">void</span> idleRunUpdate(){
SensorSum();
<span style="color: #cc6600;">if</span>(sensorSum==1||sensorSum==3||sensorSum==8||sensorSum==12){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(spinState);
}
<span style="color: #cc6600;">if</span>((sensorSum>=16 && sensorSum<=63)||(sensorSum>=208 && sensorSum<=255)){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(lineAvoidState);
}
<span style="color: #cc6600;">if</span>(sensorSum==2||sensorSum==4||sensorSum==6||sensorSum==7||sensorSum==14){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(attackState);
}
<span style="color: #cc6600;">if</span>((sensorSum>=64 && sensorSum<=79)||(sensorSum>=128 && sensorSum<=143)||(sensorSum>=192 && sensorSum<=207)){
stateMachine.<span style="color: #cc6600;">transitionTo</span>(overfallAvoidState);
}
}</blockquote>
<span style="white-space: normal;"><span style="font-family: Arial, Helvetica, sans-serif;">Under line avoid state are some setups on the enter: a timer, mask, a switch. </span></span><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">2 line sensors are used, so there is 3 combinations of them: left, right and both. </span><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">Each result drives the system accordingly.</span></pre>
<pre><blockquote class="tr_bq">
<span style="color: #7e7e7e;">/*LINE AVOID STATE*/</span><span style="color: #cc6600;">void</span> lineAvoidEnter(){
timeOld=<span style="color: #cc6600;">millis</span>();<span style="color: #7e7e7e;">
</span> sensorMask=!(sensorSum & 48);<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">switch</span>(sensorSum & 48){<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 16: timer=600; motor( 0, -50); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 32: timer=600; motor(-50, 0); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 48: timer=1000; motor(-50, -50); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> }
}</blockquote>
<span style="white-space: normal;"><span style="font-family: Arial, Helvetica, sans-serif;">While avoiding the line, scan the sensor readings for a change and ignore the previous sensor, </span></span><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">while in state in order not to </span>tristate<span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;"> the state. The state will transit back if timer is out </span><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">or there is a positive sensor result. But there is a condition for both activated line sensors, </span><span style="font-family: Arial, Helvetica, sans-serif; white-space: normal;">it will transit to spin state if no sensor was found after timeout.</span></pre>
<pre><pre><blockquote class="tr_bq">
<span style="color: #cc6600;">void</span> lineAvoidUpdate(){
SensorSum();<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">if</span>(sensorSum & sensorMask > 0 || <span style="color: #cc6600;">millis</span>()-timeOld >=timer*8){
<span style="color: #cc6600;">if</span>(sensorMask==!48 && <span style="color: #cc6600;">millis</span>()-timeOld>=timer*8){
timeOld=<span style="color: #cc6600;">millis</span>();
stateMachine.<span style="color: #cc6600;">immediateTransitionTo</span>(spinState);
}
stateMachine.<span style="color: #cc6600;">immediateTransitionTo</span>(idleRunState);
}
}</blockquote>
</pre>
<span style="white-space: normal;"><span style="font-family: Arial, Helvetica, sans-serif;">Analogical situation in the spin state.</span></span></pre>
<pre><pre><blockquote class="tr_bq">
<span style="color: #7e7e7e;">/*SPIN STATE*/</span><span style="color: #cc6600;">void</span> spinEnter(){
timeOld=<span style="color: #cc6600;">millis</span>();<span style="color: #7e7e7e;">
</span> sensorMask=!(sensorSum & 9);<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">switch</span>(sensorSum & 9){<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 0: timer=1000; motor(-50, +50); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 1: timer=1000; motor(-50, +50); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">case</span> 8: timer=1000; motor(+50, -50); <span style="color: #cc6600;">break</span>;<span style="color: #7e7e7e;">
</span> }
}
<span style="color: #cc6600;">void</span> spinUpdate(){
SensorSum();<span style="color: #7e7e7e;">
</span> <span style="color: #cc6600;">if</span>(sensorSum & sensorMask > 0 || <span style="color: #cc6600;">millis</span>()-timeOld >=timer*8){<span style="color: #7e7e7e;">
</span> stateMachine.<span style="color: #cc6600;">immediateTransitionTo</span>(idleRunState);
}
}
<span style="color: #cc6600;">void</span> spinExit(){
}</blockquote>
</pre>
<span style="font-family: Arial, Helvetica, sans-serif;">Functions not programmed yet.</span></pre>
</div>
<pre><blockquote class="tr_bq">
<span style="color: #cc6600;">void</span> attackEnter(){
}
<span style="color: #cc6600;">void</span> attackUpdate(){
}
<span style="color: #cc6600;">void</span> attackExit(){
}
<span style="color: #cc6600;">void</span> overfallAvoidEnter(){
}
<span style="color: #cc6600;">void</span> overfallAvoidUpdate(){
}
<span style="color: #cc6600;">void</span> overfallAvoidExit(){
}</blockquote>
</pre>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-41211687930968600392012-12-12T18:01:00.000+02:002014-02-27T13:23:30.882+02:00Specifications<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">I present my mini sumo robot </span><a href="http://destroyer3000.blogspot.com/" rel="nofollow" style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">"Destroyer 3000"</a><br />
<br style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;" />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">Parts:</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">Aluminum body;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2 aluminum wheels with casted PU tires;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">3 cell LiPo 0.8Ah battery</span><br />
<br style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;" />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">Mechanical:</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2x 12V 1000RPM motors;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2x Pairs of 1:2 Bevel gears;</span><br />
<br style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;" />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">Electronics:</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">1x Arduino Nano v3.0;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2x Freescale MC33877 drivers;</span><br />
<br style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;" />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">Sensors:</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">1x TSOP31236 IR receiver;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">4x SHARP 340K 40cm proximity sensors;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2x TCRT1000 Line sensors;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;">2x Overfall detection microswitchs;</span><br />
<span style="background-color: white; color: #555555; font-family: Verdana, 'DejaVu Sans Condensed', 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px;"><br /></span>
<br />
<div class="separator" style="clear: both; text-align: center;">
A photo render of 3D <a href="http://destroyer3000.blogspot.com/p/cad-design.html">CAD design</a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDPB06GWCZv1WNXkzSCsjuK0q-XlcDeeQQchzDbgk4I4jFD8TELrRkm7oAgYYTIm4SCguVHCFHTlS_r5XDW1CnG9Nmpa9geX9Ekm1oA4OtjM3RsVSBbzjppyXoOHDuwkBzsUo1kPhE_NQ/s1600/12.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDPB06GWCZv1WNXkzSCsjuK0q-XlcDeeQQchzDbgk4I4jFD8TELrRkm7oAgYYTIm4SCguVHCFHTlS_r5XDW1CnG9Nmpa9geX9Ekm1oA4OtjM3RsVSBbzjppyXoOHDuwkBzsUo1kPhE_NQ/s640/12.JPG" height="360" width="640" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
The design files are in <a href="http://destroyer3000.blogspot.com/p/cad-design.html">CAD design</a> section</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<br /></div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-48624943084864130862012-12-12T17:04:00.001+02:002012-12-12T17:09:07.566+02:00Line Sensor Test<div style="text-align: center;">
<iframe allowfullscreen="" frameborder="0" height="344" src="http://www.youtube.com/embed/HWx65VV7FD4?fs=1" width="459"></iframe><br />
<br />
Arduino controlled mini sumo robot is being tested on official Baltic Robot Sumo Mini Dohyo surface.<br />
<br />
Line sensors:<br />
Vishay Telefunken Reflective Optical Sensor with Transistor Output <a href="http://www.vishay.com/docs/83752/tcrt1000.pdf">TCRT1000</a><br />
<br />
The robot on the video is preprogrammed with arduino sketch using <a href="mailto:alexanderbrevig@gmail.com">Alexander Brevig's</a> <a href="http://playground.arduino.cc/Code/FiniteStateMachine">Finite State Machine</a> library: <a href="http://arduino.cc/playground/uploads/Code/FSM_1-7.zip">FSM</a><br />
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-74265809906645219212012-12-12T14:09:00.001+02:002012-12-13T01:29:57.434+02:00Finite State Machine<blockquote class="tr_bq">
<span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">A </span><b style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">finite-state machine</b><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"> (</span><b style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">FSM</b><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">) or </span><b style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">finite-state automaton</b><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"> (plural: </span><i style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">automata</i><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">), or simply a </span><b style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">state machine</b><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">, is a mathematical </span><a href="http://en.wikipedia.org/wiki/Model_of_computation" style="background-color: white; background-image: none; color: #0b0080; font-family: sans-serif; font-size: 16px; line-height: 24px; text-decoration: initial;" title="Model of computation">model of computation</a><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">used to design both </span><a class="mw-redirect" href="http://en.wikipedia.org/wiki/Computer_programs" style="background-color: white; background-image: none; color: #0b0080; font-family: sans-serif; font-size: 16px; line-height: 24px; text-decoration: initial;" title="Computer programs">computer programs</a><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"> and </span><a href="http://en.wikipedia.org/wiki/Sequential_logic" style="background-color: white; background-image: none; color: #0b0080; font-family: sans-serif; font-size: 16px; line-height: 24px; text-decoration: initial;" title="Sequential logic">sequential logic</a><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"> circuits. It is conceived as an </span><a href="http://en.wikipedia.org/wiki/Abstract_machine" style="background-color: white; background-image: none; color: #0b0080; font-family: sans-serif; font-size: 16px; line-height: 24px; text-decoration: initial;" title="Abstract machine">abstract machine</a><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"> that can be in one of a finite number of </span><i style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;"><a href="http://en.wikipedia.org/wiki/State_(computer_science)" style="background-image: none; background-position: initial initial; background-repeat: initial initial; color: #0b0080; text-decoration: initial;" title="State (computer science)">states</a></i><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">. The machine is in only one state at a time; the state it is in at any given time is called the </span><i style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">current state</i><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">. It can change from one state to another when initiated by a triggering event or condition, this is called a </span><i style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">transition</i><span style="background-color: white; font-family: sans-serif; font-size: 16px; line-height: 24px;">. A particular FSM is defined by a list of its states, and the triggering condition for each transition. <a href="http://en.wikipedia.org/wiki/Finite-state_machine">Wikipedia </a></span><br />
<h1 class="firstHeading" id="firstHeading" lang="en" style="background-image: none; border-bottom-color: rgb(170, 170, 170); border-bottom-style: solid; border-bottom-width: 1px; font-family: sans-serif; font-size: 1.6em; font-weight: normal; line-height: 1.2em; margin: 0px 0px 0.1em; overflow: hidden; padding-bottom: 0px; padding-top: 0px;">
<span dir="auto">Finite-state machine</span></h1>
</blockquote>
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_6J3O5axHdJ8kSHniivTa5WiAvHTlYOOC0nOiduEiSozH4x7zOqfEDAxNqF24nzCKtFjjBRaF8FTKMSmeCgLMbUGEcpa_MXCBHdGl1N8UQKN3UzN9snIMoUZWP0MQlrTd1vTAsZt1eVo/s1600/IMG.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="640" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg_6J3O5axHdJ8kSHniivTa5WiAvHTlYOOC0nOiduEiSozH4x7zOqfEDAxNqF24nzCKtFjjBRaF8FTKMSmeCgLMbUGEcpa_MXCBHdGl1N8UQKN3UzN9snIMoUZWP0MQlrTd1vTAsZt1eVo/s1600/IMG.jpg" width="449" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
A sketch for Moore Automata Model, which is going to be reduced in process with the help of <a href="http://www.stateworks.com/">StateWorks</a> reference.</div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div style="text-align: center;">
<img border="0" src="http://www.stateworks.com/active/images/book_cover.jpg" /></div>
<div class="separator" style="clear: both; text-align: center;">
<strong style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">"Modeling Software with Finite State Machines:<br />A Practical Approach"</strong></div>
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">Wagner F., Schmuki R., Wagner T.,</span><br />
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">Wolstenholme P.</span><br />
<br style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;" />
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">Publication Date: May 16, 2006</span><br />
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">ISBN: 0-8493-8086-3</span><br />
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">Number of Pages: 392 </span><br />
<span style="background-color: white; color: #333333; font-family: 'Trebuchet MS', Verdana, Arial, sans-serif; font-size: 16px; text-align: left;">CRC Press</span><br />
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
Here is The Theory of Computation Lectures explaining the FSM<br />
<iframe allowfullscreen="allowfullscreen" frameborder="0" height="360" src="http://www.youtube.com/embed/videoseries?list=PL601FC994BDD963E4&hl=ru_RU" width="640"></iframe>Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0tag:blogger.com,1999:blog-5721739675993007342.post-61708104739216135632012-12-12T00:46:00.001+02:002013-01-19T02:45:00.582+02:00Cheap Powerful Electric Gearmotors<div class="separator" style="clear: both; text-align: left;">
Bought 2 powerful motors for a mini sumo from <a href="http://www.ebay.com/">Ebay</a> for $11 each.</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.ebayimg.com/t/Brane-New-12V-1000RPM-Torque-Electric-Gear-Box-Motor-Vehicle-Transmission-/00/s/MjAwWDIwMA==/$(KGrHqJHJ!wE+TpmwVU-BP2V+3BYm!~~60_35.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="http://i.ebayimg.com/t/Brane-New-12V-1000RPM-Torque-Electric-Gear-Box-Motor-Vehicle-Transmission-/00/s/MjAwWDIwMA==/$(KGrHqJHJ!wE+TpmwVU-BP2V+3BYm!~~60_35.JPG" /></a></div>
<br />
<div style="text-align: center;">
<a href="http://www.ebay.com/itm/140774301955?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1497.l2649">12V 1000RPM Torque Electric Gear Box Motor</a></div>
<div style="text-align: center;">
<br /></div>
<div style="text-align: left;">
</div>
<span style="font-family: Arial;"><b>Specifications:</b></span><br />
<span style="font-family: Arial; font-size: x-small;"></span><br />
<ul><span style="font-family: Arial; font-size: x-small;">
<li>Static Torque: 1.5 N*cm</li>
<li>Voltage: 12V DC</li>
<li>RPM: 1000RPM</li>
<li>Diameter: 25mm</li>
<li>Length: 52mm</li>
<li>Shaft diameter: 4mm (D-profile)</li>
<li>Weight: 76g</li>
</span></ul>
<b style="font-family: Arial;">Measured parameters:</b><span style="font-family: Arial; font-size: x-small;"></span><br />
<ul><span style="font-family: Arial; font-size: x-small;">
<li>Inductance: 0.9 mH</li>
<li>Resistance: 2.5~3 Ohm</li>
<li>BEMF or Torque constant: 0.112</li>
<li>Inertia: 1.071e-4 kg*m^2</li>
<li>No-load Current: 0.11 A at 12V</li>
<li>No-load Torque: 1.232 N*cm</li>
<li>Electromagnetic time constant: 0.36 ms</li>
<li>Mechanical time constant: 21.34 ms</li>
</span></ul>
<span style="font-family: Arial; font-size: x-small;">By connecting a signal generator to a motor with a resistor in series to measure current with an oscilloscope.</span><br />
<div>
<span style="font-family: Arial; font-size: x-small;"><br /></span>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE2GGJub-A8Ln-Vl90SylK7OUxIp7uruIRfGPG5VmDzd4JKPX21QP3ITUhe0NcmvpF-jpsHfoYWgdJsmk8czMKW8mz-PqnY4JZv4hhCeI79sxBUoWbg2uXmaEVcIeDahCFc5o-ul2PIGQ/s1600/IMAG001.BMP" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjE2GGJub-A8Ln-Vl90SylK7OUxIp7uruIRfGPG5VmDzd4JKPX21QP3ITUhe0NcmvpF-jpsHfoYWgdJsmk8czMKW8mz-PqnY4JZv4hhCeI79sxBUoWbg2uXmaEVcIeDahCFc5o-ul2PIGQ/s1600/IMAG001.BMP" width="400" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
Image from DSO203</div>
<div>
<span style="font-family: Arial; font-size: x-small;"><br /></span></div>
<div>
<span style="font-family: Arial; font-size: x-small;">Measure Time Constant of a dynamic process and multiply it with Full active resistance in series, to find out the Inductance.</span></div>
</div>
Anonymoushttp://www.blogger.com/profile/07950520177154940670noreply@blogger.com0