PDA

View Full Version : Info on Encoders & Accuracy (re: Cable-Drive ShopBots)



Support (Admin)
05-22-1999, 05:04 PM
This is another of those "You may not want to know all this!" postings in which we try to provide some detailed information on the way your ShopBot works, in this case the way the software on a cable-drive tool handles the location information provided by encoders.

There are two things you need to know about to really understand what goes on in the action of your tool:

1. The first is understanding that, even though encoders provide continuous feedback on the location of your tool, a move must begin with a projection or expectancy about how many steps the motors will actually have to take to complete a move, say a diagonal line. This expectancy is important because it allows the tool to start off with an estimate of how to produce the correct angle for the diagonal (that is an estimate of the ratio of steps on one axis to steps on the second axis). Yes, the encoders can relatively quickly correct any deviations from the angle you want, but the better the estimate, the more likely the encoders will need to do minimal correcting (avoiding very small corrections in the tool path).

How do we create the expectancies? An important question. You'll notice on the diagnostic display [UD] that there is a number for 'Steps' for the X and Y axes. On an encoder tool, this number floats around (usually about 17) and reflects a running average of the number of steps for every 4 encoder tics. That is, it relates what the motors are doing to what the encoders know about physical location. When you first run the Version 2 software, the number is 16. You will need to make several 20-30 inch [M2] moves around the table before the number settles in to a good estimate of the relation between steps and encoder units (on a rack & pinion, non-encoder tool, this number is constant at 16). Even then, the number will float around a little, reflecting day-to-day differences in chain tension and differences from one side of the table to the other.

The dependence on the action of your tool for this value means that your new Version 2 software will not be accurate until you move it around a bit. Try half a dozen [M2] moves. The moves need to be [M2]'s and not arrow key moves. Do not try to calibrate the tool until you have made some moves. After you've done it once, you don't need to worry about it again unless you delete your configuration file or reset to default values.

2. The floating estimate used to determine the expectancy of how many steps will be needed for a move is one of ShopBot's techniques to deal with the variation in encoder chains that occur over time. A second process related to encoders and the vagaries of encoder chains is how corrections from expected location are made. Because there are small inaccuracies in the positioning of beads in the chain, we would not want to make an instant correction every time an encoder noticed the tool slightly out of location. Even if it were off, we wouldn't want an instant jump back to location, but a smooth transition. For this reason, the software makes a gradual move toward the right location, rather than an instant jump, whenever the encoders reveal that it is the least little bit off track. This assures that movement will be smooth and accurate over several inches of encoder chain, even though several of the beads may be a little off. As long as the average spacing of beads remains constant, the tool will stay accurate. Note though, that problems can occur when the chain is stretched more in one region than in another region -- say the last 3 feet vs the first 3 feet. Smoothing does not help here. Also note that this smoothing is different that the instant detection of a stall in one axis that shuts down the other.

Because this smoothing of the correction is related to the expected number of steps in a move, it will not work accurately until the tool has been moved around a bit as described above.