first i try to explain the outlines of my project before i go deeper into my problem.
- Its a project for my company (R&D)
- a small industrial robot will get a stepper motor (NEMA 24 or 34) onto his arm
- the Steppermotor will be connected to a Stepper Driver who shall be controlled over an Arduino Board
- the robot shall tell the Arduino ( Model not actually specified) when he wants to turn the Motor and if he has to turn Anglewise (like for gears) or full turns (around 300 rpm until robot say stop)
- because of the Anglewise turn, i need a proper resolution ( Microstepping) for good results in accuracy
- the part on the Motor that have to worked on will just continously turn or be stepped a specific angle until its ready (example 20 x 18 degrees).
The outlines of my programm are finish, just need to polish the programming and add functions. Until now i couldnt really test everything in reality with a robot and everything wired together, so until now everything is just theoretically.
Im robotprogrammer and quiet new to arduino programming.
So now about my problem:
After reading back and forth (at google and Arduino.cc) about PWM and possible librarys that i could use, i ran into problems between my desired specs and what the librarys and buildin PWM can do.
For the Anglewise turn i would need a microstepping with around 1600 to 3200. So for 300 rpm (5 rps) i would need minimum 5x1600= 8000 hz for the PWM.
Also i need a solution at which i can just use one signalcable from Arduino to Stepper Drivers PUL+.
The simple Stepper library is for Controlling 2 or 4 Wire Steppers
The AccelStepper library seems to be the same
The Timer1 or Timer3 Option seems interesting but i don't understand what i read about it.
Do someone has an idea what i could use or a completely different solution? Or give me a better shortcut about Timer library?
Thanks for reading and help
P.S. i hope my english was not too bad
Welcome to the Arduino forum. Your English if ok, and your description is readable.
I detect one very glaring problem. Nowhere do you know the beginning position for any of your stepper motors. The standard way to determine the zero position at the beginning of your program is to return a stepper to a switch that identifies the zero position. From then on, all positioning is done by counting steps from the zero position.
Also, you define some movement in degrees. You must convert degrees to the nearest number of steps for your motor and use that for the motion.
Best advice is get a stepper motor and an appropriate controller board and begin learning.
The AccelStepper library has lots of options for drivers, including Step&Direction drivers. You can even write your own drivers if you have a particularly strange stepper.
When doing an Anglewise turn, does your stepper have an absolute or relative encoder attached for position feedback? A stepper alone doesn't know its position. Often a switch is used to indicate a 'home' position.
Maybe a stepper motor with closed loop will make your project easier.
01mechatronics has modified pretty strong RC-servos with very precise positional control
And DC-Motor Feedback-Loop Controls
best regards Stefan
Sorry for the long waiting, but i was pretty busy at work. The Home position will be done later with 2 Lightsensors or something like that and a plate mounted on the rotating part so that i can say something like "Turn motor until both sensors are switched to high". This is just needed for picking up and drop the part.
The rotating stuff can start where ever it wants. The converting from degrees to steps is also done so far, just still not finally tested. First i wanted to use group inputs for the degrees but "SURPRISE", group inputs seem to not be supported by Arduino. Now i send an Analog Signal with a specific voltage that will be converted by Arduino to an appropriate Amount of, for example Tooth, that i then convert to steps per Tooth. That is already tested and works.
But you are right i need the Hardware to test and learn all that stuff.
Thanks for your help
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.