Counting stepps

I have complete code with solar tracking using a Stepper Motor. Now im setting up limit switchs, is it a unwise idea to use stepper counts as a limiting code ? Or does counting them not always the same. Kinda like "start" point after awhile not = the same? any thoughts ?

If I understand what you're asking then, yes, you should be able to count steps to set your limits providing your mechanical load does not exceed the torque of the motor. I assume for a solar tracker would need a very slow rotation so the motors would be running at their highest torque. It's always a good idea, of course, to physically measure your torque requirements before choosing the motor. If you post some more details of your project you could get a more specific answer.

Bad idea, how you supposed to start-up a system? Manually? And every time its switched off or glitched you will go to site and recalibrate a position?
One rotational encoder, would be a fix.

Well, generally one would initially home the motor to one of the limit switches the way it is usually done on a CNC machine. Much simpler than than an encoder.

hmm - home limit switch sounds like a fun way to run, have you seen any coding to point me twards ?
Also the torque is low - due to the fact that in running it VIA gear reduction.

Sorry, I can't point you to any code but the principle is simple: first, move toward one of the switches. When the switch is contacted stop the motor and sent your count to zero. This will be your "home " position. Note that if you want your home position to be elsewhere you can have the motor back off the switch and move to the desired position and set that to zero instead. Or alternatively you can use a home switch that might be elsewhere on the path. (using a lever action switch that will allow movement past it). The switch needn't be anything special. On my CNC machine I use cheap lever action microswitches like this: Omron Snap Action Switch - COM-00098 - SparkFun Electronics.
There are many variations. For instance, if your motor is moving too fast to stop without overshoot you can move past the switch, back up and approach it slowly.
BTW, if you are using gear reduction you will have higher torque on the output side, not lower.

Correct high torque on the object being move, low torque on the motor . Sorry about that :slight_smile:
I'll see about trackign down some ones code for a CNC machine and extract from there. Since it seems to be the most common usage. :slight_smile:
Yea i have 2 of RadioShack.com Official Site - America's Technology Store prepared for usage as limits switches :wink: