Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Hah. So it just designed to handle the stall and assumed the worst case scenario that it was as far away from the start-point as possible and blindly attempted a full rotation towards it?For those of you remember the Commodore 64 (and Plus 4) floppy disk drives, they simple drove the stepper 256 steps towards the start of the disk, regardless of where it was - hammering against the physical end stop. They made an awful row every time they did this.
Yes. However, the more common way to use a stepper is to put a separate switch/optical sensor which closes at just one position per revolution, or one position at the end of stage travel if the motor is driving an X-Y stage. As the motor is stepped, zero out a software up/down counter used to track position. Once zeroed, increment/decrement the counter for each motor step.
If you lose power to the Arduino, and need to re-establish a new starting position, just slew the motor until you get the sensor output, re-zero the software position counter, and you are good to go until the next time you lose power.
I use this technique in a remote antenna tuner I built. I use stepper motors to position both a large variable capacitor, and a larger roller inductor. It re-calibrates itself every time I power it up.
The switches just go to the arduino and let the arduino know that the stepper has reached a known point. From there, the arduino just counts how many times the stepper has been commanded to move away from that known point, and assumes that the stepper moved without issues and nothing can overpower the stepper and move it against itself. So the switches go on whatever mechanical set up the stepper is driving.How can I do it? Must I couple it to the stepper?
I´m curious to know how you used switches with a stepper too.
... That means that this method will NOT work if the stepper is expected to encounter a load that is able to overpower the stepper and move against itself. You actually do need an encoder in that case.
The switches just go to the arduino and let the arduino know that the stepper has reached a known point. From there, the arduino just counts how many times the stepper has been commanded to move away from that known point, and assumes that the stepper moved without issues and nothing can overpower the stepper and move it against itself. So the switches go on whatever mechanical set up the stepper is driving.
If the stepper is spinning something continuously then you can have some kind of switch or indicator that fires whenever the same point is crossed during the rotation.
If the stepper is moving something not in a continuous rotation (like a rail back and forth), then you can put the switch at one end or both ends so that the switch fires whenever the rail reaches the end.
You might have noticed that the arduino just keeps track of how many times the stepper has been commanded to move and just assumes that the stepper did move and nothing stopped the stepper from moving or overpowered and moved the stepper. That means that this method will NOT work if the stepper is expected to encounter a load that is able to overpower the stepper and move against itself. You actually do need an encoder in that case.
I am assuming you are using the stepper to change the azimuth (direction) of the TV antenna. I further assume that either you have a very powerful stepper, or you are using some sort of gear train between the output shaft of the stepper and the rotating mast on which the antenna is mounted. If not, you should be using a gear because steppers do not do well when coupled to a rotating load that has a large moment of rotational inertia.My issue is how I can make the switch close. My stepper is couple to a Digital Antenna (TV) so I´m thinkink how I can make it, or what I can couple together to press the switch when the antenna is pointing over it.
I am assuming you are using the stepper to change the azimuth (direction) of the TV antenna. I further assume that either you have a very powerful stepper, or you are using some sort of gear train between the output shaft of the stepper and the rotating mast on which the antenna is mounted. If not, you should be using a gear because steppers do not do well when coupled to a rotating load that has a large moment of rotational inertia.
If you use a 200 step per revolution stepper, and a 10:1 gear train, then it would take 2000 steps to move the antenna through 360 degrees. I would mount a microswitch such that it closes when the antenna is pointing due North. Then it will be possible to slew the antenna + or -180 degrees to get to any azimuth from 0 to 359 degrees in the minimum time.
If a mechanical microswitch is closed for a few steps, then average the step number at which the switch closed and step number at which the switch opens while stepping in one direction. Use the step number that is "halfway" between the make and break as the reference position...
Hah. So it just designed to handle the stall and assumed the worst case scenario that it was as far away from the start-point as possible and blindly attempted a full rotation towards it?
I was told at the time that the 1541 drive was designed as a student project!!
Why would a student fail a course for doing that? I think it is pretty clever. It makes it possible to index a linear stage being driven by a stepper motor WITHOUT adding a separate limit switch. A stepper doesn't draw hardly any more current if it is stalled compared to running, or even parked, so other than a little noise while the drive re-indexes itself at power up, what is there to criticize?Presumably they failed the course?.
Some would call it crude.I think it is pretty clever.
.
.
what is there to criticize?
Why would a student fail a course for doing that? I think it is pretty clever. It makes it possible to index a linear stage being driven by a stepper motor WITHOUT adding a separate limit switch. A stepper doesn't draw hardly any more current if it is stalled compared to running, or even parked, so other than a little noise while the drive re-indexes itself at power up, what is there to criticize?