I have an AR3 robot but wanted to explore using the new AR4 control software with my existing robot. I bought and installed a Teensy 4.1 and per Chris Annin's recommendations made the limit switch wiring changes to use 3.3V instead of 5V. I loaded the AR4_teensy41_CUI_enc_sketch in the Teensy 4.1 and got the AR4 control program running. There were some warnings in the Arduino IDE compilation (see attached file), but it still compiled. These are my observations so far in using the software:
1) After making the recommended wiring changes to provide 3.3V to the limit switches, all the limit switches and encoders tested okay using the special test programs. Nice additions to the tool chest.
2) All the limit switch calibrations worked okay (I only used the individual calibrations, not the auto)
3) Jogging on joints 2 through 6 worked fine, and was to the same direction as the AR3 ARCS control program angle, i.e., “+” and “-“ jogging moved the joints the same way as with the AR3 control program., which also agrees with the AR4 assembly manual diagram on page 263.
4) However, Joint 1 had a problem:
a) The jogging direction was opposite to the movement using the AR3 control program, i.e., “+” jogging moves joint 1 CCW looking down on the robot instead of CW. (“+” movements resulting in CCW movements is also depicted in the AR4 manual on page 263.)
b) Jogging joint 1 also results in an error message, “Collision or Motor Error – See Log.” (fixed. see next post)
c) The angle indicated on the joint 1 jogging controls is opposite to the sign of the jogging button; clicking on the “+” jogging button results in a more negative angle rather than a more positive angle. (fixed. see next post) However, in jogging fractions of a degree (e.g., to bring the angle indicator back to 0.0) the + button results in a more positive angle indication, and vice-versa.
5) The capability to jog with individual motor steps doesn’t seem to work at all. Although the labeling on the button “Incremental Jogging” doesn’t agree with the description on the “Info” tab, it seemed to be the button that turns motor step jogging on an off. With the button enabled (Degree jogging mode?) and jogging set to 1.0, I jogged Joint 2 and the angle indicator appropriately showed + or - .99 degrees (why not exactly 1.0 degree?).
However, when I unclicked the Incremental Jogging button (motor step mode?), and tried to move joint 2 with single motor steps, I got movements of roughly 1.5 to 2.0 degrees. The details are:
(1) I started with the angle indicator at 0.0 degrees, and the desired movement set to 1 (i.e., 1 step)
(2) I clicked the + button, and the angle indicator read 1.51 (degrees, I assume)
(3) I clicked the – button and the indicator went back to 0.0
(4) I clicked the – button again and it went to -2.02
(5) I clicked the + button and it went to -.5
(6) I clicked the + button again and it went to 1.01
From my reading of the AR3’s specs for joint 2 there are 20,000 motor steps per robot axis revolution (55.6 steps per degree of rotation), so these movements are obviously not single steps.
6) I haven’t read all the description in the “Info” tab, but from what I have read, about calibration and jogging, it seems that this is the documentation from the AR3 control program not the AR4 program.There are enough differences between the two control programs that it would be very helpful to have an updated Info tab for the AR4 control program.
I am using a Windows 10 PC to run the AR4 control program, and I downloaded the latest Arduino IDE and Teensy software.
As I explore the new AR4 program further, I'll share my observations.
Ray Kimber
In a reply Chris Annin made to @zuolin1977 he suggested changing the command
Encoder J1encPos(14, 15);
to: Encoder J1encPos(15, 14);
in the AR4_teensy41_CUI_enc_sketch to eliminate a “Collision or Motor Error – See Log.” error. This worked for me also; the error no longer appears. It also fixed the problem of clicking on the “+” jogging button resulting in a more negative angle and vice-versa. Now clicking on the "+" button increases the angle, as it should. There's still the problem of not being able to jog any joint with a number of motor steps instead of degrees, however. Also, an updated "Info" page is needed.