Skip to content
JamesNewton edited this page Oct 28, 2020 · 25 revisions

Dexter's hardware has 5 joints in the base model, and the v2 Tool Interface adds 2 more for a total of 7. Joints 1 to 5 use a stepper motor, transmission, and then an encoder after the gearing, directly on the joint. The FPGA measures the encoder position and adjusts the stepped angle of the motor to correct for any error. The difference between the stepped motor shaft position and the actual joint position accommodates any springiness in the drive, but the joint position always returns back to the exact commanded location. Also: Kinematics, Dynamics

# FPGA Connector Human / Description Slots Eye Rotation* Spacing on pos move
1 1 Base Roll. Shoulder rotate (vertical) 200 Counter even?
2 31 Pivot Pitch. Shoulder lift 180 Counter odd3
3 2 End Pitch. Elbow. Pwr set R65/66 157 Counter even3, 4
4 4 Angle Pitch. DiffA1 Differential with 5 115 Counter even?3
5 5 Rotate Yaw. DiffA2. J4 and 5 make the wrist 100 Clockwise
Counter2
even?
6 6 External (not an arm joint, can be used via w 57)
6 n/a J20 bottom pin Rotate Dynamixel n/a n/a
7 n/a J20 bottom pin Gripper Dynamixel n/a n/a

1 Development of the FPGA code started in the middle and so the numbering of the joints is not consistent. Specifically, when reading (or writing) the AdcCenters.txt file from the share folder, the 2nd and 4th, and 3rd and 5th, lines must be swapped

2 The direction of the rotation of the eye for Joint 5 was the opposite of the others because the phase was reversed. This was corrected for consistency on the HD.

3 The code disks for joints 2, 3, and 4 are designed from the opposite side shown in the diagram below. From the CAD point of view, the direction is CW from home for those joints.

4 On Joint 2, the sensor block moves and the code disk is fixed. This reverses the order of the pulses.

AxisCal.txt

Because joints may (do) have different gearing and drive systems, the conversion between one step of the motor and 1 degree of motion for the joint requires a factor. These also account for microstepping and the conversion from degrees to arc seconds. There is also an compensation factor required for joints 4 and 5 when joint 3 is moved (ANGLE_END_RATIO). All of this information is stored in the AxisCal.txt file on the share. Anytime an angle value is sent or recieved by the Firmware, it is multiplied by the conversion factor for that joint (JointsCal array). The following Javascript (for use in DDE) calculates the correct values given the gear ratios, stepper motor steps per revolution, and stepper driver microstepping setting. The gear_ratios shown are for the Dexter 1 and Dexter HD, with the 52:1 Harmonic Drive hardware.

var motor_steps = 400
var micro_step = 16
var gear_ratios = [
    52 / 1,  //Joint 1. 52:1 Harmonic drive (change for cycloidal, worm, etc...)
    52 / 1,  //Joint 2
    52 / 1,  //Joint 3
    90 / 16, //Joint 4: Pulley on Joint 3 / Pulley on motor shaft
    90 / 16  //Joint 5: Pulley on Joint 3 / Pulley on motor shaft
]

var AxisCal_string = ""
for(let i = 0; i < 5; i++){
	AxisCal_string += -(gear_ratios[i]*micro_step*motor_steps) / (3600*360) + "\n"
}
AxisCal_string += -Math.round(gear_ratios[3] / gear_ratios[2] * Math.pow(2, 24))
// gear_ratios is a zero index array so [3] is joint 4 and [2] is joint 3.

new Job({
    name: "Write_AxisCal",
    inter_do_item_dur: 0,
    show_instructions: false,
    do_list: [
        function(){
	    let my_file_content = AxisCal_string
            let filename = "AxisCal.txt"
            out("Writing '" + filename + "' to Dexter's /srv/samba/share/" + filename + "...")
            return Dexter.write_to_robot(my_file_content, "/srv/samba/share/" + filename)
	},
        function(){
            out("Writing Complete. Power cycle Dexter or restart DexRun to re-load AxisCal.txt")
        }
    ]
})

The axis 5 line in the file, second line from the end, may need it's sign swapped. If you do a move_to([x,y,z], [-1,0,-1]) the end effector should be pointing in the negative x direction. That is, if the [x,y,z] values are all positive, and you are standing behind the robot (robots point of view), then the end effector should be pointing to your left at 45' with a direction of [-1,0,-1]. If this is wrong, the position of the tip of the end effector will change when going to a point from different directions. E.g. move_to([0,0.5,0.075], [-1,0,-1]) with place the end effector at a different point than move_to([0,0.5,0.075], [1,0,-1])

Status

Status data for each of the joints is returned via the 'g' command oplet and automatically after most commands.

Clone this wiki locally