Need Help. First time using Arduino need to control a very big stepper.

I'm Currently working on my senior project.

Please let me explain things quickly.

The professor ask me to build to machine that can cut an extruded rubber in to an specific dimension.

1.My job is to cut the extruded rubber in to 1cm bead.
2.The rubber will be extrude 37cm/min in linear @83c , and the rubber already have 1.0cm daimeter

The problem I can not find the mechanical properties of NA at 83c any where. My Professor also not have it and say he can't do a test for me. His advice is to use the exist data of NA at room temp.

Here is my plan

I want to cut the rubber mid air using the wind mill cutting machine < 2blade, 1 each side>
From the calculation i need approximately 80nm torque to do that using 5cm blade.
So i decide to use the step motor and a gear box.

I use 12nm nema 34 with a 1:30 gearbox so i can fix the torque problem.

Now i need a to program my arduino for control my driver.

But After watching some tutorial on youtube i can't find what i am looking for.

So i come here for help
If i want to run my stepper half rev at the time with the fixed speed.
For the example those rubber come out from the machine 37cm per min.
I have 2 blade on my cutting mechanism, so 18.5 rev per min is what i am looking for.
After looking Torque vs Rpm curve it feels like i need to run this motor at 500 rpm to archive torque i need.

the system control don't need to be very nice just turn on and off is okay.
I plan to connect my arduino mega to the labtop anyways so i can just run and stop when ever i want.
will do the control part later.

Can u guys post some useful sample code here for me to take a look and learn.

Thank you

Does the extruder stop during the cut? If not, the cutter will have to move at the same speed as the product being cut to get a clean cut. Can you post a drawing of the machine?

The torque on a stepper motor is largely independent of speed.

You need a stepper driver that can provide the required current. Because of the way stepper drivers work, you don't need to over-size the driver. A 2A driver can run a 4A motor just fine, although a 4A driver will give more output torque.

I already have a proper driver and power switch for this motor.

Also done calculating torque and rpm needed.

The problem is i don't know how to coding what i want.

IF for the example i want this motor to rotate at 500 rpm constantly, half rev per rotation with a little bit delay.

Can u guys help me with it.

MorganS:
The torque on a stepper motor is largely independent of speed.

Sorry - not true.

The torque falls off significantly as speed increases. The better motor manufacturers publish graphs showing torque vs speed.

...R

aekahunai:
I want to cut the rubber mid air using the wind mill cutting machine < 2blade, 1 each side>
From the calculation i need approximately 80nm torque to do that using 5cm blade.
So i decide to use the step motor and a gear box.

I can understand the use of a stepper motor to control the extrusion precisely. But I cannot see why the precision of a stepper motor is needed to operate a blade.

run this motor at 500 rpm

That is a high speed for a stepper motor.

Please post a link to the datasheet for your stepper motor.

...R

MY motor and driver data is here. Can you help me?

TORQUE CURVE PPS.pdf (575 KB)

Images from Original Post so we don't have to download it. See this Simple Image Guide (I converted the PDF to a PNG)

...R

You will need to provide a diagram that illustrates what you are trying to make and where the stepper motor fits in.

Those graphs show the motor powered with 60v and even then the torque has almost dropped to 0 at 500 rpm.

...R

This is exactly what i trying to make. The reason of using step motor is because of we need to match the cutting speed with the rubber machine extrude rate.

From the torque above here is idea of using the gear box.

First is use 1:30 gear box @ 500rpm. Therefore 114 NM @ 16.6 RPM
Second is use 1:15 ratio gear box @ 400 rpm. Therefore 87nm @ 26.6 RPM

I only need 18.5 rpm with my blade

Rather than use a stepper motor for the blade, why not use a suitably geared DC motor for the blade and a sensor that measures the speed of the cutter and then use a stepper motor to advance the rubber at a speed that is matched to the blade speed. Put a substantial flywheel on the cutter shaft to provide the extra energy needed to make a cut without significantly dropping the speed.

Alternatively get a BIG stepper motor that can provide enough torque without any gear reduction, or maybe with a 2:1 or 3:1 ratio so that the motor is operating at a speed where it can deliver high torque.

...R

It's because my professor say it would be easier to cutting precisely. I cant effort the bigger stepper because of the budget and this is the biggest one i can find. According to calculation this one can generate enough torque though.

Can u help me on the coding part. For the example if i want my motor to rotate 1/2 rev per times at 500 rpm what should i write on my arduino. if you can i will feel very appreciate.

aekahunai:
if i want my motor to rotate 1/2 rev per times at 500 rpm what should i write on my arduino.

In simple terms if you want the motor to move at 500 rpm = 8.33 rps = 1666.7 steps per second and for a half revolution you need 100 steps.

BUT ...

Have you not absorbed the message from your graphs? - the motor won't have any useful torque at 500RPM

And you can't get a stepper motor to go instantly from 0 to 500 RPM and back from 500 RPM to zero.

...R

The motor can archive about 3.8NM torque at around 500 rpm, and 5.8NM at around 400 rpm.

the final rpm i want is around 19 so i planed to use 1:30 or 1:15 gearbox the torque i need to archive is around 80 nm .

The only problem is i dont know how to code it.

aekahunai:
The motor can archive about 3.8NM torque at around 500 rpm, and 5.8NM at around 400 rpm.

Are you using a 60v power supply?

The only problem is i dont know how to code it.

These links may help - I thought I had included them in an earlier post.
Simple Stepper Code
Simple acceleration code.

also look up the AccelStepper library

Stepper Motor Basics

...R

yes i have 60v power swtich. Thx a lot.

Um Robin. Is all stepper need the driver to control them. For the example i have my nema34 12nm torque with the MA860H DRIVER and i just want to run it at 500rpm. doesn't really care about resolution. how to set the motor rpm if the driver already control the resolution. I,m so confusing right now.

I don't know what you mean by "resolution" - perhaps you mean the number of steps per revolution?

A stepper driver can cause a stepper motor to stay stationary or to move one step. The speed of a stepper motor is determined by the interval between steps.

Experiment with the simple code in the first link in Reply #14 until you understand the process.

...R

Hey robin could you check this code for me

#include <Stepper.h>

//Define constants

// Number of steps per internal motor revolution
const float STEPS_PER_REV = 200;

// AMOUNT OF GEAR REDUCTION
const float GEAR_RED = 30;

// Actial steps
const float ACTUAL_STEPS = STEPS_PER_REV * GEAR_RED;

// Define Variables

// Number of Steps Required
int StepsRequired;

// Create Instance of Stepper Class
// Specify Pins use for motor coils
// The pins used are 1,2,3,4 'arduino pins'
// Connect to MA860H Motor Driver 1,2,3,4 'driver pins'
// Pins entered in sequence of a-b-c-d for proper step sequencing 'จับคู่สาย'

Stepper steppermotor(STEPS_PER_REV, a, b, c, d);

void setup() {
// put your setup code here, to run once:

}

void loop() {
// Rotate Cw 1/2 turn quickly
StepsRequired = ACTUAL_STEPS / 2;
steppermotor.setSpeed(500);
steppermotor.step(StepsRequired);
delay(100);

does this mean

rotate 1/2 rev cw
at the speed of 500 rpm
delay 0.1 sec

continue

aekahunai:
Hey robin could you check this code for me

Three things ...

{A} the standard Stepper library is not suitable for use with a stepper driver that takes step and direction inputs. Either use the AccelStepper library or write your own code.

{B} have you tried the code in my examples?

{C} when you post a program you should tell us in as much detail as possible what it actually does and what you want it to do that is different. It will make it much easier to focus on the parts you need help with rather than wasting time on things that you can do.

...R