I want to create a project that will controls multiple stepper motors with feedback. By that I mean that the Arduino to be able to sense exactly how many steps each motor has actually performed. I will need to move each motor several thousand steps at a specified speed and stop at a specific location.
Please advise me as to where to read about this type of hardware for the Arduino and the software to drive the motors.
correct, except for perhaps some oddball application specific (expensive)
to reduce cost and keep an eye on position...
You could put one or more hall/opto sensors at points in the motion path, an recalibrate your step count every time the carriage passes those known, fixed locations.
You should choose a stepper motor that can handle your load without missing steps. Then all the Arduino has to do is keep track of how many steps the motor has been commanded to make. That is the way most hobby 3D printers work.
Accelerating the motor up to higher speeds is an important part of ensuring that steps are not missed.
Generally, if you did have feedback and if the Arduino discovered that a step had been missed there is nothing it can do about it except shut down the whole operation.
And checking the feedback pulses would put a large computational load on the Arduino as it would be even more important not to miss a feedback pulse which would cause a false error indication when there was actually no problem.
Hmmm, good points all. This project is for camera trolley with pan, tilt, and rotate. Maybe it would be best with simple motor controls and base everything on time, speed, and observed results.
The point of steppers is that you don't need feedback. You tell them what to do and they do it. Probably. You need to ensure that your steppers and power supply are up to the task and that your controller software doesn't ask the steppers to do something that is beyond them.
That said, I was working on a project recently where the stepper just responds to step instructions and a rotary encoder lets the Arduino to figure out when to stop. I'm not entirely convinced that the encoder is strictly necessary, but it does help persuade yourself that the stepper is doing what it was told.
I suggest that you start with steppers alone and see how you do. Leave the encoders until you can't live without them.
Note still that you always need a "start" position for your steppers as you do not know where they are when the power goes on.
One way of doing this is to drive them against a hard stop at one end of the travel. This does not harm the stepper and if properly designed should not harm any other part.
A second approach - such as used in your printer - is to use an optical interrupter to find the end position. This may allow more lightweight mechanisms (if the stepper has sufficient power to damage the mechanism, not itself) and means you stop stepping as soon as you hit the end, so is faster and more silent. If the mechanism starts at the end point you move away and back to check the exact point.
You could put the sensor in the middle or reference point of the travel, but on initialisation, it would not "know" in which direction to find it, so that is not particularly useful.
It may in fact, be more practical to use an absolute encoder simply in order to know where the mechanism is at startup. Perhaps a combination - a low resolution absolute encoder and a central reference point sensor.
bkelly:
Hmmm, good points all. This project is for camera trolley with pan, tilt, and rotate. Maybe it would be best with simple motor controls and base everything on time, speed, and observed results.
You need to consider the mass of the camera and then use an appropriately sized stepper. Steppers have the advantage of being good at holding position. As mentioned you need some way to zero the positions when the system starts such as micro switches.
You could add encoders as well but really a bit of experimentation should prove that the setup is working within the limits of the motors.
Controlling the trolley is the area where you are most likely to have problems but the laws of physics apply regardless of the type of motor used. Programmers often forget than in the real world you need to accelerate and decelerate masses, you cannot instantly get to full speed or stop.
ardly:
.... Programmers often forget than in the real world you need to accelerate and decelerate masses, you cannot instantly get to full speed or stop.
The more I think about it the more importance I put on this ardly's post #8. When making video recordings smooth actions seem to count more than precise precision. (Not doing micro photography) Smooth ramp up/down and consistent motion probably better with analog control rather than discrete / steppers.
bkelly:
The more I think about it the more importance I put on this ardly's post #8. When making video recordings smooth actions seem to count more than precise precision. (Not doing micro photography) Smooth ramp up/down and consistent motion probably better with analog control rather than discrete / steppers.
I am guessing your video recording is electronic and not tape. You should be able to stop the recording for the time it takes to move the stepper and then resume and no one would be able to tell the pause ever happened.
Steppers with gearing can give decent results if you can still achieve the speed you require, but dc servo motors with appropriate control are more flexible
Stepper controllers like the TCM2208 and TCM2209 give very smooth movement. I had a 1.5A NEMA17 size stepper run at 30 rpm, 32x microstepping, and it is so silent (smooth moving) that you can't even hear it. The high microstepping is for smooth movement rather than positioning in this application, the controller's data sheet says the stepper is trying to ramp up/down currents in the coils smoothly rather than making discrete steps, giving it the very quiet operation.
If you use the UART interface with that stepper controller it can also give stall warnings, so somehow it can detect it's missing steps, among other errors.
Of course you still need some form of home signal - a microswitch, magnet with hall effect switch or reed contact, optical sensor, whatever works.
Good enough to use it for panning a video camera? Smoother than a good servo? No idea. That's for you to try out.
bkelly:
Hmmm, good points all. This project is for camera trolley with pan, tilt, and rotate. Maybe it would be best with simple motor controls and base everything on time, speed, and observed results.
Pan, Tilt and Rotate are more servo type actuators.
DC motors with encoder feedback.
Also you have smooth motion and probably a better range of speed.
Steppers have are not necessarily known for their great speed, and using a DC motor, gearbox, and encoder you may get the results you are thinking of.
Google
arduino camera slider with pan and tilt mechanism
Will show some examples, stepper for slider and pan and tilt, but no position feedback.
Tom...