My Arduino/Stepper Setup

Home Model Engine Machinist Forum

Help Support Home Model Engine Machinist Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

chucketn

Senior Citizen
Joined
Dec 17, 2009
Messages
1,326
Reaction score
167
Location
Near Jonesborough, TN
Well, success of sorts. I got Chuck Fellows RT/DH program to work with my TB-6560 stepper driver(AKA M335-B). I soldered the control and voltage wires to the LCD Shield, as I didn't have any female headers on hand. I tied the enable to 5V from the Arduino. So far, has worked with all the steppers I have tried, Bipolar, and Unipolar(wired as bipolar).
I used a 5vdc wall wart for motor power and the Driver set to 1/2A.
Now to finish the stepper to RT adapter, and figure out some connectors and an enclosure.
I don't have video capabilities, so no video.

Chuck

DSCF0248.jpg
 
Last edited:
Nice work Chuck, looking forward to watching this progress Thm:
 
Well, success of sorts. I got Chuck Fellows RT/DH program to work with my TB-6560 stepper driver(AKA M335-B). I soldered the control and voltage wires to the LCD Shield, as I didn't have any female headers on hand. I tied the enable to 5V from the Arduino. So far, has worked with all the steppers I have tried, Bipolar, and Unipolar(wired as bipolar).
I uaes a 5vdc wall wart for motor power and the Driver set to 1/2A.
Now to finish the stepper to RT adapter, and figure out some connectors and an enclosure.
I don't have video capabilities, so no video.

Chuck

Good work Chuck!

What are your stepper motor torque specs?
 
I have some modifications in mind for this project. I want to add a 20x4 display, as I have one, and a keypad for data entry. That will have to wait on the proverbial 'slow boat' for parts.

Chuck
 
Last edited:
Not sure on the stepper specs, other than one was 30v, and the others were 3v. Most were salvaged from printers and such. I ordered the stepper Chuck F. did for the actual application to the RT. I have another NEMA23 that will work for the indexer, but it's half the height of the RT one.

Chuck
 
I have some modifications in mind for this project. I want to add a 20x4 display, as I have one, and a keypad for data entry. That will have to wait on the proverbial 'slow boat' for parts.

Chuck

You should try my keypad project. It uses the same analog input A0 and key resistance values as the keypad on the sainsmart LCD keypad. It should be plug and play with Chucks sketch.
 
I have a couple types of 4x4 film keypads from another project to play with. Now that I've got the steppers working I think I'll play with your keyboard sketch. I have ordered another LCD and serial adapter, and the motor/stepper/driver shield, also.
You might know it, I get the old TB-6560 driver board working and the Pololu D8825 drivers come in today...

Chuck
 
I am surprised the motor turns at all with only a 5v power supply. I would be using at least 24 volts. Remember, what you want to control on a stepper is the current through the coil, and the driver does that by being set at 1/2 amp (that also seems low). The higher the voltage the faster the coil gets up to its current set point. With only 5v you may never be getting the motor to its rated current.
 
I am surprised the motor turns at all with only a 5v power supply. I would be using at least 24 volts. Remember, what you want to control on a stepper is the current through the coil, and the driver does that by being set at 1/2 amp (that also seems low). The higher the voltage the faster the coil gets up to its current set point. With only 5v you may never be getting the motor to its rated current.

Ron, Pololu mentions the speed factor increase from using a higher that rated voltage and limiting current, I can see the benefit if driving a cnc machine or lets say a rotary table with a high gear ratio. But for a simple indexing head I wish to use to cut 60 tooth gears how much benefit would it extra voltage add to my project when my step speed is not the limiting factor but rather my manual milling is?

I'm using 12V motor .68A motor w/ 12V supply
 
Well, Ron, I'd rather error on the side of caution. One of the steppers that I tested was a 24v, and it appeared to run at the same speed as the 3v one. I'm not out to win any speed contests, just wanted to see it work. I'm totally new to steppers and such, though some of the now retired F-111 Avionics I worked on used them, they were in replaceable units and it either worked or it was replaced. Component level went by the side early in my military career. I've forgotten most of what I knew...
Still, I'm tickled it worked. Now I can use those steppers I've been saving for so long.

Chuck
 
The speed of the stepper is controlled by the pulse source, unless the torque is to low, then it stalls. So you could connect any stepper and driver to the arduino and it will run at the same programmed speed.

When a stepper is driven by a pwm style driver the voltage is switched on and off. The current though the motor- it is the current that is responsible for the torque- starts to increase at a rate determined by the RL factor of the motor. Since R and L are fixed by the motor coils all we can control is the voltage. The higher the voltage the faster the current will reach its set value and the more torque is generated. If the voltage is to low the current may never reach the set value and the motor will be delivering low torque.

I worry about torque on these kind of indexers when there is no gear to hold position- all the cutting forces must be resisted by the motor alone. And even if you are cutting straight across, say a gear, there will be vibration and side forces that try to move the indexer off position. So I want to see full current thorough the motor so it has max possible torque- how fast it runs from one position to the next is not important.
 
Looking good Chuck !

Another way around "holding" power of the stepper for an indexer is to use a mechanical lock. You just have to remember to lock and unlock at every indexed position.
It would obviously be an issue for a 4th axis, but will work fine for an indexer.

Scott
 
Looking good Chuck !

Another way around "holding" power of the stepper for an indexer is to use a mechanical lock. You just have to remember to lock and unlock at every indexed position.
It would obviously be an issue for a 4th axis, but will work fine for an indexer.

Scott

I have a cam lock design similar to the one in this pic in mind as a retrofit for my indexer if I find it needs more holding power. It can be mounted in parallel with the collet shank

bench_clamp.jpg
 
I found a sketch on CNCZone that adds the ability to input RT movement in # of divisions, or # of Degrees by way of a 4x4 matrix keypad. I'm going through it, tweaking it to my hardware, and trying to figure it out so I can add those features to Chuck F's method.
As I figure things out, I'll update here.

Chuck
 
Chuck, great to see you made some progress. Are you using the 4x4 keyboard via multiple digital I/O pins or have you added some resistors to let you use it on a single analog input? There are a couple of ways to use the hardware.

The code I wrote is totally complete and has all of the features you are looking for and more so it will contain a framework for you to follow as you add your own feature set. I let the smoke out of my stepper driver board and have been doing other things and have not finalised what to purchase in its place and anyway, I'm waiting for additional stuff to arrive so I can get everything back into one enclosure.

I also started with salvaged steppers so have no clue about specs but what I've learnt is that the voltage stated for the stepper is not related to the voltage you drive them at. Eg. my unknowns are rated at 24 volts and I'm running them at 48 volts. JUst make sure the stepper driver has current limiting in place. Some of the Gecko stuff said that torque increases are exponential if voltage is increased. I'd check the maximum voltage of the driver you purchased and maybe run at 80% of it. 24-30 volts is where you should be at. 48-60V if the driver can handle it.

I'm really glad you are not using the tiny Pololou drivers.
 

Latest posts

Back
Top