Hi All, long time lurker, first time poster.
I completed the mechanical construction of my AR3 a few months ago. I'm sure you've seen enough pictures of that process so I will spare you any more. Where my project differs from standard is mostly in the program. I'll start with the functions that are currently operational.
All motion control processing done in micro controller. (forward/reverse kinematics and motion profiling).
Code is non-blocking. There are no delay() calls or loops waiting for something to complete. This allows the micro controller to be processing other functions even while the arm is moving.
All motions are programmed in engineering units. So joint positions are degrees with speed using degrees/s and acceleration using degrees/s/s. Likewise for linear moves but using mm.
Synchronized joint motions require each joint to report the amount of time to reach destination then all joints adjust to match the longest time duration (all joints complete motion at the same time).
Converted to Teensy4.1 for higher speed and USB host capabilities. Reverse kinematics takes 22 microseconds on the Teensy4.1.
Connect PS3 controller directly to Teensy 4.1 for manual control.
Can use the PS3 analog sticks to control joints with velocity control so you can adjust the speed continually while moving each joint (and move multiple joints at once). There are enough controls on the PS3 controller to control all 6 joints without changing modes. Also using the controller "rumble" feature when a joint position limit is reached.
Use the PS3 analog sticks to control the robot in XYZ coordinate space. The left analog stick allows you to freely move around the XY plane while holding a constant Z position. The left/right analog triggers allow increasing and decreasing the Z position. The right analog stick adjusts the wrist orientation. All of these motions can occur at the same time which makes it fun to drive the robot around.
That's about all that has been done so far.
To do:
Create a way to set and store waypoints so the robot can complete a useful task without modifying the arduino code. This could be done over USB serial or maybe it could be web based over Wifi? undecided so far.
I'll try and update this thread as the program gets improved and maybe post some videos if there's any interest.
Thanks for stopping by,
Redlunn
a few recent updates...
I was having a problem with J5 accuracy due to deflection of the lead screw guide rods. In an attempt to improve this I replaced the guide rods with a THK linear rail fixed to the aluminum housing. It definitely stiffened up that area. Next on the list is an outboard support bearing for the J6 housing but that project is waiting on parts.
Picked up a cheap wire feed welder and dismantled it for use on the AR. There's still a lot of work to get it integrated and minimizing the affects from dragging the welding cables around. Hope to have some welding videos up after the holidays.
Redlunn
Now that the weather is getting cold, it's time to get back in the shop and work on the AR3. Recent updates include reworking the spline logic to use a Bezier curve and smoothly transition between different end effector orientations while travelling the spline. The video below shows a simulated weld profile with an elliptical weave and continuous spline all the way around the tube. This spline consists of 8 teach points. Someday I'll get an actual welder on there but the pencil pointer will do for now..,
Redlunn
Please upload your project to free github account to make it easy to review and comment on your code.
I was looking at making some of the improvements you had listed, as well as a smooth ramp up and down in speed for accel/deccel. Excellent work so far! I figured I would check in first to see if you plan to release what you have so far.
Just for fun I ran the same spline profile as the last video but much slower and added a 4 mm elliptical weave, as if it was running a mig welder. It looks like it could actually work. This is one advantage to running the reverse kinematics in real time on the Teensy 4.1. Hopefully I'll get a change to turn it loose welding for real, maybe this winter.
Redlunn
My robot arm has been dormant for a few months but recently revived to test some new spline interpolation programming. I wanted a way to smoothly navigate through a series of points and a spline seemed like the easiest way to handle the route planning. The points get entered similar to how an arc is entered, with a beginning point, mid point, and end point, but with the spline you can enter many mid points. The speed at the gripper is constant along the path so I'm hoping it will work for some welding applications I have in mind for future projects.
I tweaked some of the core motion profile logic without proper testing and the J4 encoder paid the ultimate price. On the bright side, I did manage to find and fix the issue I was working on.
The reverse kinematics on my robot seem to have a hiccup when moving across X=0.0 during a linear move. When solving for J1 angle, I think it should be using X/Y from center of spherical wrist instead of end of tool. Doing this and using atan2 seems give the expected results.
Redlunn
Edit: Added image showing how Quadrant is based off X/Y, which affects the J1 angle.
Hi Redlunn,
After seeing how the 212D worked internally and after reading the datasheet I somewhat expected it already that it couldn't work the way we want it to work... That's quite a bummer to be honest but somewhat expected.
So the only way to get it working reliable/as expected(i.e. not using endstop switches) is to use them on the joints. But that requires redesigning quite a lot of parts. I think I'll stick to the AMT102/103 for now and just order one 212 for testing purposes until I get the time to redesign the required parts.
But that doesn't mean I lost interest in it so if you make any progress please let us know!
Hi Redlunn,
I'm looking into ordering the encoders for my AR3. I think I will follow the same path as you did and start with 6x AMT102 or 103 and also 1 AMT212D or AMT213D. Have you also considered using a single turn version (AMT212B) and directly mount it to the joint as another user is trying? Although after looking at the prices for both versions it doesn't make a world of difference.
Can you tell me which transceiver you used for RS485? I'm not very familiar with RS485 to be honest.
Over the weekend I managed to get 5 of the 6 encoders wired and communicating. Just a little more wiring time and if all looks well I can begin the process of integrating the absolute encoders into the full robot program.
Attached is my current program for testing the encoders, which I've been running on a teensy4.0.
Edit: removed file and replaced with link to google drive so the latest version is available.
http://bit.ly/3pmM7MM
Sounds great. I'd love to hear about your progress.
I hope I'm receiving my kit this/next week so I can start building. I have ordered the stepper kit but didn't order encoders yet. I also have a couple of nice beefy Clearpath servo's around which I'm going to experiment with (if I can fit them properly).
Hi Redlunn, I was looking into a similar solution with an absolute encoder before I noticed this post. Please keep us updated on your progression!
Have you already tested the new sprocket size?
that makes for a clean wiring box ! Great job !
Well, I'm committed now. All
encoder and home switch wiring has been removed. Also finished the J3 sprocket ratio change.
I've now added a second RS485 multi-turn encoder and can read both at over 1000 Hz so 4 more have been ordered to complete the project. The wiring on these encoders is unfortunately tedious (and small) but I think it will pay off in the end. The code is fairly simple and the wiring savings is significant. I'll post an update once all 6 encoders are active.
Redlunn
It took awhile but I now have one multi turn encoder communicating on an rs485 bus with a spare teensy 4.0 I had handy. The encoders are half duplex so the transmit and receive takes place on the same wires. At 2mhz there isn't much time to switch between transmit and receive. I was unable to find any sample code or libraries for this task so it had to be developed from the data sheet and experimentation. Next step is to add more encoders to the bus. Once that works then the encoders and code can get moved into the robot program.
Redlunn
I have 2 updates planned for the next few days, now that my parts have arrived...
First, I will be testing 2 multiturn absolute encoders (CUI AMT212D) which communicate on an RS485 bus at 2 MHz. If it works as expected it should allow removing the encoder and home switch wiring and replacing it with a 2 wire bus which will daisy chain to all encoders.
The second task involves some mechanical rework. The J3 joint seems to be the weak point for load capacity and the easiest solution I see is to change the upper chain sprocket to a part with more teeth. I have found a 20 tooth sprocket will fit in the 3D printed housing and should allow for 53% more torque at the joint. A side benefit is the reduction of apparent backlash from the J3 stepper gearbox. I will update with results but I won't get much testing until the encoder experiment is complete.
Redlunn
Very impressive work - I join the chorus of people interested in your program !!!
The current status of my project uses a modified version of the ARCs software to send move commands (rather than axis positions) to the teensy. From there the teensy plans out the axis positions. I suppose the move commands could come from anywhere, including the SD card on the teensy if you wanted to run without a PC. The code is in the middle of a major update right now with switching to multiturn absolute encoders on RS485. No more home switches, yay!!