-
Notifications
You must be signed in to change notification settings - Fork 91
Encoder Calibration
When Dexter starts, it does not know where it is. And it does not have it's normal precision in detecting movements. The encoders send signals back to the FPGA, but the FPGA doesn't know what those signals mean, because it hasn't seen the sequence of signals for each slot. Because of small variations in the printing of the slots, each slot is unique. So the signals are different for each slot.
So, before the encoders can work, each joint must be moved through it's entire range of motion and the signals for each slot recorded into the FPGAs memory. We call that "startup calibration" or just "calibration" or just "cal". This can be done in several ways:
- DDE has a "Calibrate Dexter..." dialog on the "Jobs" menu. There are 3 sections, first to select which robot to talk to, then a middle part for each joint to help adjust the "eye" pattern for each set of sensors and to mark the center. The last part, at the bottom, "Calibrate optical encoders", starts the calibration.
- The file "cal.make_ins" can be run from the robot via the "S RunFile cal.make_ins" SetParameter oplet. That file contains all the instructions required to move the joints through every position, and then turns on the necessary parts of the FPGA.
- Those same instructions (as sent from DDE or cal.make_ins) can be sent from some other program.
In any case, the data collected allows the FPGA to monitor joint position with extreme precision.
Actually, all that data is recorded, in a file called HiMem.dta, and that file is loaded back into RAM on startup. The problem is, there is no way to match the current position of a joint with a position in the data file. If the arm is calibrated, and the file saved, then turned off, and the arm is moved, then turned back on again, the position is unknown.
Not knowing where the arm is when it powers up would seem to be a simple problem to solve, but it is not. Limit switches require another set of wires to each joint, and extra wires are amazingly difficult to run. It is possible to create an index pulse of sorts on the encoder disk by partly filling in one slot; not enough to affect operation, but still detectable. Another possibility is to always start the arm in the same position, and that is the approach we have most often used. Small knob / arrows on each motor shaft can be aligned to a know position and that gets us close enough to then find our place in a slot.
Even better, with a "garage" or "dock" where the tool interface is placed before powerup, we can know where the arm is on power up. Then we can set the position into the data from the HiMem.dta file, and know exactly where we are. Some changes required to make this possible were made in the 2018/12/10 released (off the Master branch)
To search the Wiki, use the main search box in the black bar at the top, then select WiKi to filter the results or go to https://github.com/HaddingtonDynamics/Dexter/search?type=Wikis&q= and then add your search terms to the end of the URL.
To report errors, or request additional data, please chat with us on discord and/or raise a new issue