13 posts
• Page **2** of **2** • 1, **2**

With two aiming points you describe the whole triangle to the controller. It can figure out each new aiming point on its own. It is not linear, but solvable in real time. Half the math is done once, and the other is done on the fly as you go. Realistically the angle is changing rather slowly compared to the linear motion of the carriage.

I know someone is going to throw real time tilt into the mix now. That adds a whole new level of complexity, but again, probably doable.

I know someone is going to throw real time tilt into the mix now. That adds a whole new level of complexity, but again, probably doable.

Bart

"If you didn't build it, you will never own it."

"If you didn't build it, you will never own it."

- bdring
- Site Admin
**Posts:**2966**Joined:**Sun Nov 22, 2009 7:33 pm**Location:**Chicago, IL, USA

If there's enough memory, look up tables can be produced before the motion starts and are really fast.

A third or forth order polynomial (spline) could be fit for each axis and would probably work for each move segment. The math to do the fit is more intensive, but it scales nicely for many axes and is much faster than trig functions.

Also, the standard trig functions usually compute to the precision of the machine, which is way overkill for some applications. I implemented sin and cos functions using taylor series to a few terms and it was plenty fast for that project (http://www.me.gatech.edu/me6405/Projects/Fall03/Group1/index.html). That was on an old HC11 with a 2 MHz clock, the arduino should have no problem with it.

A third or forth order polynomial (spline) could be fit for each axis and would probably work for each move segment. The math to do the fit is more intensive, but it scales nicely for many axes and is much faster than trig functions.

Also, the standard trig functions usually compute to the precision of the machine, which is way overkill for some applications. I implemented sin and cos functions using taylor series to a few terms and it was plenty fast for that project (http://www.me.gatech.edu/me6405/Projects/Fall03/Group1/index.html). That was on an old HC11 with a 2 MHz clock, the arduino should have no problem with it.

- rogue555
**Posts:**32**Joined:**Sat May 28, 2011 2:40 am

Just curious if anyone has modified Bart's program for an EasyDriver? If someone has I can save myself some time before I start comparing the available pins to the code (and since this is my first Arduino project, it may take some time).

http://www.schmalzhaus.com/EasyDriver/

http://www.schmalzhaus.com/EasyDriver/

- kitsu
**Posts:**2**Joined:**Thu Jan 05, 2012 4:53 am

13 posts
• Page **2** of **2** • 1, **2**

Users browsing this forum: No registered users and 0 guests