Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davemorl on November 22, 2016, 04:13:06 AM

Title: 4th Axis PID
Post by: Davemorl on November 22, 2016, 04:13:06 AM
Hi all, firstly I'd like to say hello as this is my first post, also thank you for all the help you have provided with me building my DIY cnc router/mill.

I have an idea for a project as we all usually do. I apologise in advance if this has been covered before. I can't find a relevant thread, if there is one I would be great full for a link.

Ok, so my idea which isn't new is to create a 4th axis with a dc motor with a encoder attached via a belt or gear arrangement. Something like this;
http://uk.rs-online.com/web/p/rotary-encoders/9189086/

So my thoughts are if I get a nice big dc motor and have control over position using from my UC300 from mach 3 USB port, this would then output to an arduino or a pic IC custom board with the relevant coding to then give rotation direction and position to the motor using the encoder as a feedback to correct for any errors.

I understand that a stepper is probably the easiest route but as you know a large stepper motor or servo for that matter is very pricey. Also less challenging :)

Can anyone firstly see a flaw in my very embryonic idea firstly and secondly if this has this been done which I'm sure it has does anyone have a link for the c++ code of arduino to save me a lot of headaches and surely weeks of time haha.

I look forward to your replies. Thank you in advance.

Kind regards
Dave
Title: Re: 4th Axis PID
Post by: Davemorl on November 22, 2016, 05:06:03 AM
I forgot to add also that I would like to use this as a turning centre also with threading capability. This is the reason for a dc motor so I can get the rpm and torque required without to much loss in torque or rpm with gear reduction or increase.
Title: Re: 4th Axis PID
Post by: Davemorl on November 22, 2016, 07:27:04 AM
I've just come across this which seems very interesting and may be a way of having a closed loop system that is cost effective.
http://elm-chan.org/works/smc/report_e.html
Title: Re: 4th Axis PID
Post by: mrprecise44 on November 22, 2016, 01:14:05 PM
What you are talking about is not a trivial, or simple task. A long time member of this forum, "sinpson36" has spent a couple of years developing a 4th. axis system, and has abundant YouTube videos of the project. He now sells complete units. He also has numerous posts on this forum regarding this project.
Title: Re: 4th Axis PID
Post by: robertspark on November 23, 2016, 02:09:26 PM
Ok, being devil's advocate ....

Why do you actually need an arduino for a 4th axis?
All you do is set mach3 up with an a axis, and set it as a rotary motion in the configuration.

Why do you need pid?

What error are you expecting to have to correct for?

What are you actually going to use the 4th axis for?

Most cnc users even with a forth axis are not actually 3d machining, but index their 4th axis, or use it as a rotary axis.... Sort of a quazi linear rotary axis motion
.. not 3d

Sorry not trying to be critical of anyone's ideas and I appologise if it reads that way.... Just trying to expand on what you plan to do or more so why?

I bought a rotary table (6" / hv6) of Chinese origin, then bought a cnc adapter for a nema 23 stepper from here

http://medw.co.uk/wiki/Rotary+Table+CNC+Options

.. built the 4th axis, and discovered the backlash was well... A lot, and motion was not fast.... I kind of forgot the purpose for me which was a 4th axis for a plasma cutter... Ok... Stop... Time to do some calcs....  Then I bought a 4" Chinese 6:1 4th axis, belt drive, changed the stepper motor, and now have a very fast with fast acceleration 4th axis for the plasma (and a cnc rotary table for the mill....
http://i.ebayimg.com/images/i/251320056397-0-1/s-l1000.jpgL


Title: Re: 4th Axis PID
Post by: robertspark on November 23, 2016, 02:17:42 PM
  ....https://youtu.be/25FtHEo4Ujo

http://cncdrive.com/AMT103.html