• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • PLEASE: Read the FORUM RULES BEFORE registering!

4

Practicality Of Arduino Controlled Precision Power Feed?

3
Like what you see?
Click here to donate to this forum and upgrade your account!
10

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#1
I have been considering an X axis power feed for my mini mill to get cleaner cuts and to speed up the movement of the table. I would like to get a fairly fast jog speed to move the table from one end to the other as with several recent projects I have worn myself out moving the table from one end to another. The machine is an HF X2 clone with 3 axis DRO and belt drive that can get the spindle to about 4000 RPM. I also have a column brace that attaches the column to the base. I was planning to upgrade to a G0704 at the beginning of last month, but I came to realize that there are more than 25 parts I want to make that my machine is capable of but my lathe had more parts I couldn't do than parts I could do. I upgraded the lathe instead and won't have the budget to replace the X2 until next summer.

Picture:
fYOPtkx.jpg

My idea is:

-Directly mount stepper motor to X axis lead screw (16 TPI)
-Wire in switch to cut power to stepper to maintain manual control (as well as E stop)
-Use arduino (not sure which, probably mega) with 4.3" touch screen to control
-Touch screen can control speed, direction, with buttons for jogging with no load
-Keypad to move table precisely once zero'd.

Maybe add a stepper to the Z axis, simply because I find moving the Z axis and locking it precisely to be tedious. A stepper could do it precisely and quickly and could hold it without needing to lock the Z.

I expect to be able to do the X alone for under $100 purchasing:
-Arduino controller
-Compatible driver
-Touch screen
-Stepper
-Power supply
-Stock for mount

The reason I want to go with a stepper and arduino instead of simple DC motor and a voltage controller is because I think with a little extra cost, I can add precision control, more precise feed rates, and options for future upgrades (Full cnc, controllable spindle speed with touch screen, integrate DRO to touch screen).

The programming the arduino isn't an issue for me. I have been a programmer for a few years now and I am pretty good with arduino code.

My questions or calls for advise are:

-What size stepper would I need to move 25 ipm while cutting aluminum with 3/8" end mill with a light cut?
-What size stepper would I need to move simply jog the table 150 ipm under no load?
-Is there an easier/cheaper/less complex way to accomplish the same thing?
-Would it be easier to control the spindle speed using a small stepper on the pot rather than swapping out a board?
-If I were to add a Z axis stepper, is there a way to install it that would negate the need to lock the Z axis when cutting?
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#3
The current one is $205 and offers speeds of 0 to 12 IPM.

Assuming I can use the parts I have been looking at,

Arduino Mega Board: $8.14
566 oz in Stepper (overkill, likely will go smaller): $38
Arduino compatible stepper driver: $5-10
Power supply: $30
Wiring, mounting hardware, other misc: $10 or so
Total: 96.14 though less since I won't need such a large motor or power supply

So yes, it would come in less than the listed option with hopefully higher speeds, and significantly more controllability.
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#4
I suggest that if you want to achieve rapid speeds of 150 IPM you might need to use 70 - 80 volt power supply and compatible motor/drive.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#5
I suggest that if you want to achieve rapid speeds of 150 IPM you might need to use 70 - 80 volt power supply and compatible motor/drive.
If my math is correct, I need to get the motor to spin 2400 rpm to achieve 150 IPM.

At 200 steps/rotation I need to send 48000 pulses/min. I am having trouble finding data about torque curves and how the number of pulses translates to the necessary voltage/stepper size/power supply/etc.

I realize that 150 IPM might be ambitious, it would take about 3.7 seconds for the motor to move the table the entire X travel of 9.25". 75 IPM would do it in 7.4 which would also be a huge improvement.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#7
Here are some realistic charts for various size motor/power supply combinations. Typically you would run the motor in 1/2 step or less mode. I normally run mine at 100:1 (20,000 steps / rev)

https://www.automationdirect.com/static/specs/surestepmotors.pdf
This is exactly what I need! I appreciate that.

With my machine, would there be any benefit to half stepping? 1.8 degrees with a 16 TPI leadscrew would move the table .0003125"/step and I can only measure to .001".
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#8
The motors run smoother and the accel/decel curves are smoother and more controllable.

 

Cadillac STS

Active User
H-M Supporter-Premium Member
Joined
Jul 20, 2012
Messages
506
Likes
156
#9

There you go all done for you.


-Is there an easier/cheaper/less complex way to accomplish the same thing?

Like above all done or you could just use a stepper and controller.


-Would it be easier to control the spindle speed using a small stepper on the pot rather than swapping out a board?

Almost all the time you would just use one spindle speed so set it manually


-If I were to add a Z axis stepper, is there a way to install it that would negate the need to lock the Z axis when cutting?

If there was a stepper on Z with power on and not moving the stepper holds the axis still so it is locked when not moving anyway.
 

chips&more

Active User
Active Member
Joined
Mar 19, 2014
Messages
2,041
Likes
1,373
#10
I would make it all CNC. Then you would have the power feed, readouts and a huge more capability all in the CNC conversion…Dave.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#11
I would make it all CNC. Then you would have the power feed, readouts and a huge more capability all in the CNC conversion…Dave.
I would like to CNC one day but one of my favorite things about machining is finding ways to complete operations manually and accurately. I have wanted a power feed for a while and after learning what I have about steppers and arduino, I thought I could make a better power feed for the same cost. I think the full CNC after all 3 motors, 3 drivers, power supply(ies?), ball screws, PC to run it, mounts, wiring, etc, will cost $600 - $700 which is a good bit more than I have to spend at the moment. The plan is to use this machine manually for another year or two then get a G0704 or similar and do a full CNC conversion on that one.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#12
There you go all done for you.


-Is there an easier/cheaper/less complex way to accomplish the same thing?

Like above all done or you could just use a stepper and controller.


-Would it be easier to control the spindle speed using a small stepper on the pot rather than swapping out a board?

Almost all the time you would just use one spindle speed so set it manually


-If I were to add a Z axis stepper, is there a way to install it that would negate the need to lock the Z axis when cutting?

If there was a stepper on Z with power on and not moving the stepper holds the axis still so it is locked when not moving anyway.
Looks like the available packages are more than double the price, run slower, and can't be precisely controlled. I think I will go ahead with it since at the very least, I can easily build one that will feed 0-12 IPM and I will get the precise control. The plan is to be able to input a value on the touch screen and have the table jog to that position. If its off a few thousandths by the DRO, ill just send a few more steps.

Regarding the spindle speed, the machine has no tach and its tough to set it to the same speed repeatably. I have been looking for ways to control it better and faster and someone elsewhere said the easiest way was a $5 stepper on the pot then select a few positions and determine the speed, and use a few buttons to control it accurately and quickly. I think installing a tach and stepper control would take about the same amount of effort as just the tach.

Do you know of the best way to mount a stepper to the Z axis? I have seen them mounted to the head or column with a block and a lead screw or on the fine feed with a pulley system. Not sure what the pros and cons of each are.
 

hman

Active User
H-M Supporter - Sustaining Member
Joined
Feb 17, 2013
Messages
1,531
Likes
1,045
#13
Shooter - Knowing what you want to achieve, I'd certainly agree with you that the LMS power feed is not quite the right answer. For one thing, it doesn't have a rapid traverse button. For another, as it's now on closeout and about to be discontinued, replacement parts or support might become an issue. OK, closeout price is pretty good, compared with the original price. But as you said, the Arduino parts will come out to considerably less. Plus, you get to feed what sounds like a passion of yours!!!

PS - I have one of these LMS table feeds on my HF mini-mill (same as yours), so I'm pretty familiar with it. I modified it to add rapid traverse (basically a momentary switch across the pot wiper). I also moved the electronics to a remote enclosure. This lowers the profile of what hangs off the end of the table, allows me to quickly and reproducibly mount and dismount the motor (it's more difficult to crank the table with the motor attached!), and keeps (conductive!) swarf away from rapidly moving electrons.

As for powering the Z axis, I'd avoid using the existing knob. There are way too many moving parts and linkages for any kind of accuracy. You've probably noticed this if you've ever compared the scale reading on the Z axis knob to what the DRO says. A separate leadscrew or ball screw is the only way to get any decent results.

Good luck ... and be sure to post the details of your final design!
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#14
Shooter - Knowing what you want to achieve, I'd certainly agree with you that the LMS power feed is not quite the right answer. For one thing, it doesn't have a rapid traverse button. For another, as it's now on closeout and about to be discontinued, replacement parts or support might become an issue. OK, closeout price is pretty good, compared with the original price. But as you said, the Arduino parts will come out to considerably less. Plus, you get to feed what sounds like a passion of yours!!!

PS - I have one of these LMS table feeds on my HF mini-mill (same as yours), so I'm pretty familiar with it. I modified it to add rapid traverse (basically a momentary switch across the pot wiper). I also moved the electronics to a remote enclosure. This lowers the profile of what hangs off the end of the table, allows me to quickly and reproducibly mount and dismount the motor (it's more difficult to crank the table with the motor attached!), and keeps (conductive!) swarf away from rapidly moving electrons.

As for powering the Z axis, I'd avoid using the existing knob. There are way too many moving parts and linkages for any kind of accuracy. You've probably noticed this if you've ever compared the scale reading on the Z axis knob to what the DRO says. A separate leadscrew or ball screw is the only way to get any decent results.

Good luck ... and be sure to post the details of your final design!
I appreciate the response. I think LMS discontinued it in favor of a different one here: http://www.littlemachineshop.com/products/product_view.php?ProductID=3387&category=2 which runs $205.

I am a fan of tinkering and adding features to my machines. The end result isn't just to have a power feed, but to make something new as well, I hope that qualifies for a passion! Im sure a lot of people know what its like to start working at 6 and have 7 hours go by in the blink of an eye.

Regarding the Z axis, I will probably put that off for a while. I think I can make a lead screw pretty easily and inexpensively in the future then rig up a nut/block to attach to the head to get it moving. Ill add that to the list of projects but ill stick to manual for now.

Ill be sure to take pictures along the way and post some documentation and the results I achieve.
 

JPigg55

Active User
H-M Supporter-Premium Member
Joined
Nov 8, 2012
Messages
645
Likes
144
#16
Sounds like you're more versed in Arduino than I am.
I've seen a few YouTube videos by NYCCNC that may be some help.
I'm wanting to do something similar on my Clausing 8520 so I'll be watching your progress.
 

pstemari

H-M Supporter - Premium Member
H-M Supporter-Premium Member
Joined
May 18, 2015
Messages
230
Likes
251
#17
The problem you'll run into is that the simple stepper driver boards for Arduinos can't handle the rates you're looking for. Stepper motors have a LOT of induction, and even though they only drop a couple volts holding still, getting enough current flowing fast enough to maintain a decent step rate requires some sophisticated electronics and a lot of voltage.

Because of the induction, in order to get the current to make a nice pulsing square wave, you have to supply a voltage that looks like sharp spikes with exponential decay. That's what drivers like the Geckos handle for you, and you'll have to have something like that in your setup.

Sent from my Nexus 6 using Tapatalk
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#18
The problem you'll run into is that the simple stepper driver boards for Arduinos can't handle the rates you're looking for. Stepper motors have a LOT of induction, and even though they only drop a couple volts holding still, getting enough current flowing fast enough to maintain a decent step rate requires some sophisticated electronics and a lot of voltage.

Because of the induction, in order to get the current to make a nice pulsing square wave, you have to supply a voltage that looks like sharp spikes with exponential decay. That's what drivers like the Geckos handle for you, and you'll have to have something like that in your setup.

Sent from my Nexus 6 using Tapatalk
You are absolutely right. I have been looking into specifics based on what I have learned recently and most of the arduino boards can only handle 36 V. Now I am looking into an interface between the arduino and a proper stepper driver or lowering my expectations. I think at 36 V I should be able to run 75 IPM with the rapids and roughly 20 IPM with the cuts. I haven't worked out all the details yet but thats what this research phase is for.
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#19
It wouldn't be any problem to interface the Arduino with a higher powered stepper drive. They all have a 5V input.
 

mzayd3

Active User
Active Member
Joined
Feb 10, 2014
Messages
363
Likes
157
#20
I used an automation direct stepper driver paired with an arduino mini for my power feed. I used the arduino to enable the drive, rapid and set direction based on a few switches as inputs. I also mapped a pot to pulse outputs for speed. I don't know what size motor I used, but it ended up being under powered- it still is. I don't have it usefully installed. I need to gear it down to get the torque I need. I don't know what size it is, and I'm across the country from it right now so I can't look. I'll get back to you on that. My mill is a rong fu, don't know which model, knockoff. It was a great learning experience on multiple fronts!


Sent from my iPhone using Tapatalk
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#21
It wouldn't be any problem to interface the Arduino with a higher powered stepper drive. They all have a 5V input.
Well thats great news. I have been trying to figure out how they communicate because it isn't as clear for boards that aren't specifically for arduino. I have also been having trouble finding high voltage drivers. I have found 1 that supports 80V and it was $75 which is a bit high for this project. It looks like I would need a pin for direction, a PWM output to control speed, then another pin that sends step info. I think I have enough information at this point to select a stepper and microcontroller, now I just need to determine which driver and power supply will make it work.
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#22
Last edited:

pstemari

H-M Supporter - Premium Member
H-M Supporter-Premium Member
Joined
May 18, 2015
Messages
230
Likes
251
#23
Yep, standard 5v TTL compatible signals. The other reason for using the driver is that you can't just feed in 36v or even 5v to hold the stepper in place. Steady state holding voltage is usually only a couple volts.

Sent from my Nexus 6 using Tapatalk
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#24
Here is one, not the cheapest but I keep a few on the shelf.

http://www.ebay.com/itm/Wantai-Step...457981?hash=item417d8feabd:g:wCAAAOxyni9TFxFi

All of these take a 5V square wave step input, 50% duty cycle and a 5V binary direction input. None use PWM for speed. Speed is determined by the frequency of the step pulse train. Thus only requires 2 pins to operate.
I looked at those but the power supply, driver, and motor needed to make all that work made everything a bit too expensive.

Are the torque curves from the page you linked pretty accurate universally?

Looking at these components

Motor - http://www.ebay.com/itm/US-Ship-Nem...634897?hash=item35f78f5e91:g:1tcAAOSwyQtVmybn - $34
Driver - http://www.ebay.com/itm/TB6600-0-2-...285412?hash=item51d2850ae4:g:YYoAAOSwrklVekYh - $17
Power Supply - http://www.ebay.com/itm/AC110-220V-...hash=item568004ea32:m:m-Tt3_1c6P79IZt8SZqzWPw - $28
Arduino - http://www.ebay.com/itm/MEGA-2560-R...025121?hash=item4af69c6761:g:L7EAAOSwKtVWy2GU - $13
Screen - http://www.ebay.com/itm/4-3-5-7-TFT...hash=item1c53a37023:m:m_LgsCZ0JW3NbAeGCZZJmxQ - $32
Total - $124

If my math was correct, and 100 oz-in is enough torque for rapids, this set up would be capable of about 115 IPM. Any thoughts or input? I think at 75 ipm rapids I would be happy, anything more is gravy.
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#25
Are the torque curves from the page you linked pretty accurate universally?
I think you could use those charts as a general guideline. Automation Direct gives you pretty accurate documentation. I have seen other charts that I would consider rather optimistic.

If my math was correct, and 100 oz-in is enough torque for rapids, this set up would be capable of about 115 IPM. Any thoughts or input?
There are too many variables to really give you a coherent answer. You might wrap a string around the handwheel dial and use a spring scale to figure out how much torque is required to turn the lead screw.

I think at 75 ipm rapids I would be happy, anything more is gravy.
I'm perfectly happy with 100 IPM on my machine and I have 32.5 inches of travel on my X axis. 200 IPM is frighteningly fast. So I would say 75 IPM on your machine would be plenty.
 
Last edited:

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#26
I think you could use those charts as a general guideline. Automation Direct gives you pretty accurate documentation. I have seen other charts that I would consider rather optimistic.



There are too many variables to really give you a coherent answer. You might wrap a string around the handwheel dial and use a spring scale to figure out how much torque is required to turn the lead screw.



I'm perfectly happy with 100 IPM on my machine and I have 32.5 inches of travel on my X axis. 200 IPM is frighteningly fast. So I would say 75 IPM on your machine would be plenty.
Thanks for all of your help here. I have ordered most of the parts and I have a design sketched out and I think I have the circuit mostly designed at this point. I should start getting parts in the next week or two. I went with a 3.6" screen instead of the 4.3 because it was 1/3 the cost and ended up with a less expensive power supply because the one I selected originally was out of stock.

There are a few things I haven't completely figured out and i was wondering if you could assist at all.

I want to wire in an e-stop for the stepper that works with the same button that cuts the spindle power. I was thinking I could run a relay to the button that would take the mill power and the power supply AC lines. Hit the estop and AC to both the mills motor and the stepper power supply are both cut. Could this be done safely or is there a better way?

I also want to put in a switch that will turn the stepper off completely so I can turn the handle without resistance. Is the best way to do that to interrupt power from the supply to the driver? It would need a fairly beefy 48V DC switch but I found several that should be able to handle that. However, I read that cutting power to the steppers like that could damage them. If thats the case, is there another way to safely turn the stepper off?
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#27
I want to wire in an e-stop for the stepper that works with the same button that cuts the spindle power. I was thinking I could run a relay to the button that would take the mill power and the power supply AC lines. Hit the estop and AC to both the mills motor and the stepper power supply are both cut. Could this be done safely or is there a better way?
That should work fine. It's the way I would do it. I would wire it so the E-stop cuts power to the relay coil, but require another button push (control power ON) to energize it again, a standard 3 wire control. That way on a power fail it stays off, also just pulling the E-stop out won't energize the system. Just adds another layer of safety.

Ignore the OL contact in the drawing, not needed in this case.

upload_2016-9-13_8-43-49.png

I also want to put in a switch that will turn the stepper off completely so I can turn the handle without resistance. Is the best way to do that to interrupt power from the supply to the driver? It would need a fairly beefy 48V DC switch but I found several that should be able to handle that. However, I read that cutting power to the steppers like that could damage them. If thats the case, is there another way to safely turn the stepper off?
When turned by hand, the motor becomes a generator and the power is fed back to the drive. Under extreme conditions, you could damage the drive by hand cranking. You need to break the connection between the motor and drive. This requires a 4 pole switch, could also be done with a 4 pole relay. But......You need to power down the drive before you break the connection so you don't damage the drive. The drive can be powered down under any condition, no problem there.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#28
That should work fine. It's the way I would do it. I would wire it so the E-stop cuts power to the relay coil, but require another button push (control power ON) to energize it again, a standard 3 wire control. That way on a power fail it stays off, also just pulling the E-stop out won't energize the system. Just adds another layer of safety.

Ignore the OL contact in the drawing, not needed in this case.

View attachment 135816



When turned by hand, the motor becomes a generator and the power is fed back to the drive. Under extreme conditions, you could damage the drive by hand cranking. You need to break the connection between the motor and drive. This requires a 4 pole switch, could also be done with a 4 pole relay. But......You need to power down the drive before you break the connection so you don't damage the drive. The drive can be powered down under any condition, no problem there.
I like that way of running the E-stop. What is the button called that holds itself in as long as power is running through it? Do I just need to buy an estop button thats already wired that way?

As to breaking the connection between the motor and the driver, is it safe to put a switch between the driver and power supply and another 4 pole switch between the drive and the motor? Then to return to manual, flip the switch to the drive to power it down then flip the switch to the motor to break the connection? When turning it back on, would I power the drive or reconnect the motor first?
 

JimDawson

Global Moderator
Staff member
Director
Joined
Feb 8, 2014
Messages
6,427
Likes
4,149
#29
I like that way of running the E-stop. What is the button called that holds itself in as long as power is running through it? Do I just need to buy an estop button thats already wired that way?
It's called a ''maintained contact button'' True E-stop switches are Normally Closed (NC) and push to open. Many are twist to release (recommended). They are mechanically held in position, not electrically. A relay can be held electrically, M1 in the drawing above is a relay, and one of the contacts is used to hold the power to the coil. This is called a ''seal in'' contact.
An example of an E-stop switch:
https://www.automationdirect.com/ad...ttons_Illuminated_-a-_Non-Illuminated/GCX1131

As to breaking the connection between the motor and the driver, is it safe to put a switch between the driver and power supply and another 4 pole switch between the drive and the motor? Then to return to manual, flip the switch to the drive to power it down then flip the switch to the motor to break the connection? When turning it back on, would I power the drive or reconnect the motor first?
A switch between the power supply and the drive is perfectly acceptable in all cases. When powering up, always connect the motor to the drive first then power up the drive.
 

shooter123456

Active Member
Active Member
Joined
Jan 20, 2016
Messages
218
Likes
238
#30
I have all the parts and I have been working on getting it all together. Think I may have broken some stuff already. The parts I am using are:

Driver - http://www.ebay.com/itm/351424285412

Power Supply - http://www.ebay.com/itm/351769808694

Stepper - http://www.ebay.com/itm/231786634897

I had the stepper hooked up to the driver in bipolar parrallel, with the A to A+ and A bar to A- and same with B. Then DC - on the driver to DC - on the power supply and DC + on driver to DC + on the power supply. Then wired the pulse + to an arduino output button and pulse - to arduino ground. Then same with direction. I set the power supply to 120V AC, set the driver to 3A, and full steps. I got it running like this for a few minutes. When I pressed a button, the motor would start stepping. As a ramped up the speed, there was a flash, a pop, and the supply conked out. I opened it up and there was a blown fuse in it. I ordered a better power supply here:

https://www.amazon.com/gp/product/B0113JHSRO/ref=od_aui_detailpages00?ie=UTF8&psc=1

And when hooked up with the marked + and -, there is no activity from the power supply. I got a DC output of 1.05V. When I disconnected the stepper and controller, then reversed it, DC - to + and vise versa, I get activity from the power supply, but nothing from the driver. Did the first power supply blowing also blow the driver? Does anything I did sound incorrect?
 
6
5 7