total beginner - run stepper motor at continuous speed to drive lathe leadscrew

More
05 May 2018 16:47 #110257 by Stormbird
Spring 2017 I planned to convert an Emcomat 20E lathe to CNC so I went and bought a Nema 34 stepper motor (wantai), a microstep driver (Wantai DQ860MA), a Mesa 7I67E controller, and downloaded successfully LinuxCNC. Actually the motivation for my embarking on this CNC project was that the original leadscrew stepper motor had been removed and the electronics had been known to be faulty, so I needed to at a minimum re-motorize the leadscrew anyway. Since then I have not made any further efforts YET. I am wondering, before trying to master CNC type programming, if there is a possibility of very simple programming just to use one of the motors to continuously drive the leadscrew (at variable speeds) so that I can get smoother finishes to cutting as one does with a regular manual lathe.

Please Log in or Create an account to join the conversation.

More
06 May 2018 00:57 - 06 May 2018 01:00 #110266 by JohnnyCNC
If you don't mind doing a little electronic assembly you can use a Arduino or SparkFun Pro Micro to build a controller which is basically just a pulse generator that will send the step pulses to your stepper driver. Before I CNC'd my mill I build a power feed for it using a SparkFun Pro Micro. You can program the Pro Micro board using the Python language. It's pretty simple and easy to learn. I built a pendant style handheld control that had adjustable speed control that worked with two buttons (left and right) for the X axis. I also had two buttons for rapid movement. It was a fun project and very educational but it didn't last long because after just a short time I went full CNC. The main reason I wanted to CNC my mill was so that I could make things that are impossible to do by had. I never felt the desire to CNC my lathe but would at least like to have a power feed on my late for the same reason hs you. Better finish.

If you set the lathe up for full CNC you can use the MDI interface and just enter the G-Code commands manually. It is easy to do simple back and forth commands.

John
Last edit: 06 May 2018 01:00 by JohnnyCNC.

Please Log in or Create an account to join the conversation.

More
06 May 2018 10:47 - 06 May 2018 10:48 #110268 by Stormbird
Thanks John. I will look into that Spark Fun Pro Micro - not too expensive at £20 here in the UK. I think that CNC for a milling machine is much more exciting and that may well be a project for the future. In the short term I simply want to drive the leadscrew, have already fitted the 2-phase stepper motor and would rather not see myself tapping in G codes each time to get the leadscrew moving (and moving at different speeds according to weight of cut and material being cut), but would much prefer just to operate an MPG rotary knob (or much better if possible a potentiometer which is much cheaper!) mounted near the carriage (the Emcomat 20E does have all the electronic controls mounted on a box attached to the right hand side of the carriage). I see that the Mesa 7i76e does allow connections from MPG's. Is there a very short cut programming that for now ONLY activates the response to an MPG , and skips most of the full setup coding?
Last edit: 06 May 2018 10:48 by Stormbird.

Please Log in or Create an account to join the conversation.

More
06 May 2018 10:57 #110269 by Stormbird
In the longer term, the main benefit of CNC to my Emcomat 20e that I can see as a hobbyist would be easy taper turning and threading. Threading I already do on another lathe (Myford) which has a mechanical leadscrew gearbox. For short tapers, I can get by with angled positioning of the top slide.

Please Log in or Create an account to join the conversation.

More
06 May 2018 11:14 #110270 by rodw
I've seen some Arduino based electronic leadscrews which do exactly what you want including threading. I don't know anything about how they work but here is one github.com/hbilar/arduino-electronic-lead-screw There are some videos on youtube.

The 7i76e is a pretty expensive solution which would be wasted on a single axis machine. However a CNC lathe with 2 MPG's would be quite a nice solution. You can get the MPG's for about $20 on ebay so they are not that expensive.

Please Log in or Create an account to join the conversation.

More
06 May 2018 11:17 - 06 May 2018 11:18 #110271 by Stormbird
Thanks Rodw, I have the expensive 7i67e so might as well use it, although it cost about £150 ! Is there a particular spec of MPG that i should be looking for? A cursory search on ebay for used MPG's turned up very little and new prices seemed to be £100-£500!
Last edit: 06 May 2018 11:18 by Stormbird.

Please Log in or Create an account to join the conversation.

More
06 May 2018 11:22 - 06 May 2018 11:24 #110272 by Stormbird
Rodw that link for the electronic leadscrew looks just the job, but it appears to be a lot of lines of code fit for an expert programmer and not much else!! I would not know where to begin - is it LinuxCNC programming? Do i just copy the code into somewhere and if so where do i copy it? Sorry to be so ignorant
Last edit: 06 May 2018 11:24 by Stormbird.

Please Log in or Create an account to join the conversation.

More
06 May 2018 12:01 - 06 May 2018 12:02 #110273 by rodw
Its always best to start at the beginning :)

If you know where that is!

This MPG will do the job. Get 2 so you can do the second axis later. (4 wire 5 volt is what you need to look for)
www.ebay.com.au/itm/Black-4-Terminal-Han...d:g:0RAAAOSw5V5ag3LN

So start by installing the correct ISO on this link as that includes the PREMPT_RT kernel that the mesa ethernet cards require.
www.linuxcnc.org/testing-stretch-rtpreempt/

I posted a complete working example of a gantry machine based on the 7i76e that uses master branch here
forum.linuxcnc.org/47-hal-examples/34072...ranch-gantry-example
This will not work for version 2.7 which is the release version.

There is a program called pncconf included with LinuxCNC that allows you to build a 7i76e configuration in a graphical environment. I ended up copying someone else's and wrote my configs by hand. Take your pick.

You will need to hand code your MPG wheel and I posted a complete example of a single axis MPG for a 7i76e here. It is exactly what you need as it does not have any axis selection switches as I was planning on using 1 MPG per axis like you.
forum.linuxcnc.org/show-your-stuff/32029...utter-build?start=20
Last edit: 06 May 2018 12:02 by rodw.

Please Log in or Create an account to join the conversation.

More
06 May 2018 12:10 #110274 by Stormbird
Thank you rodw - really that is fantastic help! You are very kind. Adam
The following user(s) said Thank You: rodw

Please Log in or Create an account to join the conversation.

More
09 May 2018 12:48 #110432 by andypugh

. I am wondering, before trying to master CNC type programming, if there is a possibility of very simple programming just to use one of the motors to continuously drive the leadscrew (at variable speeds) so that I can get smoother finishes to cutting as one does with a regular manual lathe.


Yes. You can actually do it with a few commands at the command-line, But it might be a bit inconvenient to start/stop the feed.

setp stepgen,0.velocity-command 10
to start
and then
setp stepgen.0.velocity-command 0
to stop.

A very simple HAL script could connect the output of an MPG to the step generator speed.

Do you have the 7i76 configured and working?

For lathe work I almost never use CAD or G-code. I have this set of macros that I use for nearly everything.

forum.linuxcnc.org/41-guis/26550-lathe-macros?limitstart=0

I used them to make a D1-4 spindle nose (with tapers and chamfers) last week. (The "turning" macro has an optional taper and radius run-out option)

Please Log in or Create an account to join the conversation.

Time to create page: 0.136 seconds
Powered by Kunena Forum