<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.element14.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/challenges-projects/element14-presents/benheck/f/forum/44497/coordinated-stepper-motor-motion-factoring-aceel-decel-for-arduino</link><description>Ok so I&amp;#39;m creating a machine for myself and its going to be like an X,Y CNC with a possible A axis rotary. What I want to do with it is write the code from scratch to so it&amp;#39;s lean and fast. I might not be able to achieve this but it&amp;#39;s going to serve as</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><lastBuildDate>Thu, 20 Feb 2014 01:26:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://community.element14.com/challenges-projects/element14-presents/benheck/f/forum/44497/coordinated-stepper-motor-motion-factoring-aceel-decel-for-arduino" /><item><title>RE: Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/thread/46465?ContentTypeID=1</link><pubDate>Thu, 20 Feb 2014 01:26:40 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:b754f941-f0e2-4398-bfad-d45ec658b7f3</guid><dc:creator>pfrantz</dc:creator><description>&lt;p style="margin:0;"&gt;The trick is to use the same method that is used by the bresenham line drawing algorithm.&amp;nbsp; Look it up on the web.&amp;nbsp; Consider using an add statement instead of the x2 multiply that you will generally find to boost motor max slew speed.&amp;nbsp; You will write 8 different subroutines per the algorithm (2 per quadrant).&amp;nbsp; This method will ensure that both motors start and stop at the correct locations at the same time.&amp;nbsp; The motors will track each other within about one step of error and you can do any angle.&amp;nbsp; Write your code to pace the entire algorithm at your desired accel, decel and slew rate.&amp;nbsp; The motor with the longest travel will be limited by this speed.&amp;nbsp; The motor with the shortest (or equal) travel distance will run at the same speed or slower.&amp;nbsp; I did this years ago and it worked fine.&amp;nbsp; Max motor slew speed is a bit slow due to the calculations involved but they are all integer math and compares.&amp;nbsp; No floating point required.&amp;nbsp; &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/thread/43404?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2013 15:55:56 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:eb599c97-9380-4f39-b1d3-15d134798b2b</guid><dc:creator>ckraft</dc:creator><description>&lt;p style="margin:0;"&gt;If you write the C-code yourself it has the potential to be faster than the Arduino code but it is not a guarantee. Ultimately the Arduino code at some point ends up compiled code so there is not an obvious difference in performance. Plus odds are that you and the Arduino code are compiling in/linking the same libraries from Atmel/AVR so there won&amp;#39;t be much difference there.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;That said when you write the code yourself you have the ability for tighter control over what code is there and how it is structured. So if the Arduino tool is doing something stupid for the sake of consistency between platforms you can make your code more efficient.&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;It is a great exercise to learn more about the platform. That&amp;#39;s why I encourage people using the Arduino tool to dig under the surface and take a look at the code it generates to better understand what is going on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/thread/43361?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2013 19:40:32 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:55a488eb-39c2-4fad-bed8-67ab6b15f021</guid><dc:creator>timryder</dc:creator><description>&lt;p style="margin:0;"&gt;Chris!&lt;/p&gt;&lt;p style="margin:0;padding:0px;"&gt;&amp;nbsp;&lt;/p&gt;&lt;p style="margin:0;"&gt;You nailed it with GRBL, I took sections from it&amp;#39;s AVR_C and made my own using it as inspiration. Very cool program. &lt;/p&gt;&lt;p style="margin:0;"&gt;Now when you write a program with AVR_C and compile it, does it run faster than using one written through the Arduino IDE? &lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/thread/42908?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2013 17:28:14 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:95e9929a-3fd0-4bcf-a302-90a7d8c5d2b8</guid><dc:creator>ckraft</dc:creator><description>&lt;p style="margin:0;"&gt;Wish I could help but If I need lean/decent stepper control on an Arduino I usually use grbl (&lt;a class="jive-link-external-small" href="http://bengler.no/grbl" rel="nofollow ugc noopener" target="_blank" title="http://bengler.no/grbl"&gt;Bengler: GRBL&lt;/a&gt;) which is very nice and very lean, even runs on a standard Arduino.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Coordinated Stepper Motor motion factoring Aceel/Decel for arduino</title><link>https://community.element14.com/thread/42897?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2013 17:08:28 GMT</pubDate><guid isPermaLink="false">93d5dcb4-84c2-446f-b2cb-99731719e767:c0f1ce02-d17c-425c-8b9d-6439c6d79948</guid><dc:creator>e14 Contributor</dc:creator><description>&lt;p style="margin:0;"&gt;If you are using arduino, then is shouldn´t be a problem.Try to write some examples first, to drive stepper&lt;span style="font-size:10pt;line-height:1.5em;"&gt;s, then try to write all logic that it needs to preform tasks.&lt;/span&gt;&lt;/p&gt;&lt;p style="margin:0;"&gt;At the end, combine all those into one .ino file. Write a function for all axis and then try to combine all together. &lt;span&gt;&lt;a href="https://community.element14.com/resized-image/__size/16x16/__key/communityserver-discussions-components-files/75/5635.contentimage_5F00_2516.png"&gt;&lt;img alt="image" src="https://community-storage.element14.com/communityserver-components-secureimagefileviewer/communityserver/discussions/components/files/75/5635.contentimage_2516.png-16x16.png?sv=2016-05-31&amp;amp;sr=b&amp;amp;sig=Yi%2B6RBRwk49KTF8TdR%2BzaEH4IQDI81%2FSqeuc%2BrsUZsQ%3D&amp;amp;se=2026-08-27T23%3A59%3A59Z&amp;amp;sp=r&amp;amp;_=heES4XYcBt0dSn/cCMo/FA==" style="max-height: 16px;max-width: 16px;" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>