- Is the stuttering due to varying loop execution time? You could correct this to some extent by fixing the interval between executions using a timer interrupt or with a non-blocking wait. - You could speed up the code by pre-calculating all of the required angles for your work space and resolution, then putting the results in a look up table. The Arduino doesn't have to do most of the trigonometry on the fly and just look up the required results. - Thirdly, i've developed a commercial product that does something that we call a bump and home because we didn't want to include a limit switch on the product. We tell the motor to move slowly towards the limit. We know we've reached the limit when the following error gets too high - this is now our home position.
@AJMansfield12 жыл бұрын
I might be tempted to try implementing the IK as a coarse LUT on a 1cm grid, mapping (x,y) to entries not just (a,b) but also the d(x,y)/d(a,b) jacobian to use to take two or three Newton-Raphson steps on the interpolated LUT to get the error down to almost nothing.
@ferazelt2 жыл бұрын
Came here to suggest precomputation, glad to see it's one of the top comments.
@1islam12 жыл бұрын
@@AJMansfield1 ⚠️ God has said in the Quran: 🔵 { O mankind, worship your Lord, who created you and those before you, that you may become righteous - ( 2:21 ) 🔴 [He] who made for you the earth a bed [spread out] and the sky a ceiling and sent down from the sky, rain and brought forth thereby fruits as provision for you. So do not attribute to Allah equals while you know [that there is nothing similar to Him]. ( 2:22 ) 🔵 And if you are in doubt about what We have sent down upon Our Servant [Muhammad], then produce a surah the like thereof and call upon your witnesses other than Allah, if you should be truthful. ( 2:23 ) 🔴 But if you do not - and you will never be able to - then fear the Fire, whose fuel is men and stones, prepared for the disbelievers.( 2:24 ) 🔵 And give good tidings to those who believe and do righteous deeds that they will have gardens [in Paradise] beneath which rivers flow. Whenever they are provided with a provision of fruit therefrom, they will say, "This is what we were provided with before." And it is given to them in likeness. And they will have therein purified spouses, and they will abide therein eternally. ( 2:25 ) ⚠️ Quran
@42468 Жыл бұрын
Alternatively, build a lookup table for the trig functions and do some tricky float cheating with that power/sqrt function (i.e. bitshifting the exponent of the float over one bit to the left, doubling the exponent and therefore squaring the float, or a right bitshift of the exponent with extra logic to approximate square root)
@AJMansfield1 Жыл бұрын
@@42468 perhaps, but if you're on the sorts of small microcontrollers where precomputed function LUTs are relevant, you probably don't have a hardware floating point unit. In which case, integers and fixed point arithmetic are supreme.
@ahmedkamel8212 жыл бұрын
Great job on the video! As a robotics engineer with experience designing and deploying industrial robotic arms, I have a few recommendations for improving the performance and reliability of this project. First, I recommend using stepper motors with pre-installed gearboxes. Stepper motors offer precise control and high torque at low speeds, making them ideal for robotics applications. Gearboxes can help reduce the required torque and increase the achievable speed, but they also introduce backlash and hysteresis, which can affect the accuracy of the system. Pre-installed gearboxes offer better tolerances and lower backlash than those that are 3D printed, which can be difficult to manufacture with sufficient precision due to machine errors and limited material options. Second, consider using closed loop stepper motors for professional use cases. Closed loop control allows the system to detect and correct errors in real-time, improving the accuracy and reliability of the system. It also enables additional features such as homing, which can be useful for calibrating the system or returning to a known position. The additional cost of an encoder - around $20 per motor - is generally worth it for professional applications. Third, consider using a more powerful microcontroller. The Arduino Portenta is a good option, as it offers high performance and a range of connectivity options. Alternatively, an RP2040-based board can also provide good performance at a lower cost. The microcontroller plays a crucial role in the control and communication of the system, so it is important to choose one that can handle the required workload and has sufficient memory and processing power. Finally, if you plan to add an end effector to your setup, make sure to consider the weight and the required torque and speed at the joints. The selection of bearings will depend on the load and the required stiffness and accuracy of the system. Proper sizing and lubrication of the bearings can help improve the performance and lifespan of the system. I hope these suggestions are helpful, and I look forward to seeing more of your work on the channel!
@MrFujinko10 ай бұрын
Why recommend these mcu's? Portenta is way overkill and the 2040 does not have a single timer/counter with decent functionality for motor control. Closed loop for steppers is irrelevant if the system is designed correctly (e.g. loads are within spec).
@escain2 жыл бұрын
Long time! I am happy to see you back, with this amazing content. I really enjoy it :-)
@harrisonlow2 жыл бұрын
If you're spending a lot of time in CAD, I strongly recommend picking up a SpaceMouse. I have the Pro version with buttons around the sides and I can say with confidence that it has saved me countless hours in CAD and has made using the software so much more pleasant. Cannot recommend enough if you use CAD a lot. Great project as always, and I'm glad to see that you're back!
@PlanB-3751 Жыл бұрын
GitHub?😳
@kesor62 жыл бұрын
No idea why I was not subscribed yet ... where have you been all my life? Please continue, don't let me interrupt.
@jcr7232 жыл бұрын
Onshape rocks! Really cool project. Looking forward to your future projects
@Clark-Mills2 жыл бұрын
Just passing by, nice work, have a coffee! ;) Cheers... Clark
@3Dprining.I Жыл бұрын
Nice project. Onshape is a good offer thank you.
@R.N.M- Жыл бұрын
Buyer here 🤏If you make it go upp and down too.
@John-gw3mj2 жыл бұрын
Great to see you back. Hope college is going well and congratulations on the internship!
@rectorsquid2 жыл бұрын
At 10:40, if you have the circle intersection point for where the two links will meet, you can ignore the second (outer) link and final end point and just calculate the angle of the intersection point from your horizontal line using an arctangent function (rotating the angles if needed to account for the motor orientation). Calculating two angles and adding them is extra and unnecessary math work, in my humble opinion. But I've only done this sort of kinematics work on a laptop, not a microcontroller so I could be wrong about "just" being able to call an atan() function using the x,y offset of that intersection point.
@TheEngineerC2 жыл бұрын
I heard the teensy 4.1 has an actual FPU and performs as fast as integer math. That plus the higher clock speed might make it a good candidate for replacing the arduino nano.
@PCBWay2 жыл бұрын
That's really something! Levi! BTW, a big Merry Xmas to you and your family!🎄🎄🎄
@BryanLindaVB Жыл бұрын
I haven't tried this myself, but I think you might want to look at Jacobian matrices. The control loop could take the difference between the desired position and the current position to get a desired velocity vector in global coordinates. Then use the Jacobian to get required joint velocities. The resulting motion should follow something of a straight line. Also, you could look at equations for a four bar linkage to calculate joint angles and possibly use those to arrive at a Jacobian. Whether that could be implemented on a small microcontroller or not is another issue.
@jwl423 Жыл бұрын
Try moving to an esp32 . Two cores . So you can move the calculations to the second core in order to always move with the first
@SchwaAlien2 жыл бұрын
This is a great explanation of some of the inner workings of a delta 3D printer too, and it’s easy to understand why they work so much better with a 32bit processor controlling them vs. the cheap 8bit micro controller the budget one came with.
@DanBowkley2 жыл бұрын
For some beefier processing check out the esp32 dev boards. They can be programmed with the same Arduino IDE and code but are single or dual core, 32 bits, and up to 240MHz. Oh and like four bucks a pop.
@DavidPaauwe Жыл бұрын
CAD software is great and all, but we all know the most important tool in the engineer's toolbox is McMaster-Carr
@bblmd80012 жыл бұрын
It is not really a SCARA robot but a 5-bar one used on agravity plane.
@47lokeshkumar742 жыл бұрын
Love this bro
@jimturpin2 жыл бұрын
I agree, looks totally cool, and for a first time project like this, I feel you knocked the ball out of the park! I look forward to seeing more of your videos and projects you bring to life.
@theunheardlamb2 жыл бұрын
Your freehand circle drawings are impressively good
@verybignw Жыл бұрын
could prob throw some rubber bands or attach some springs to smooth out that backlash a bit... those motors should be able to handle that easily
@Dylise Жыл бұрын
This was interesting. What i really liked, is this smart guy actually explained the problems and solutions for people like me. I'm so sick of watching people make awesome stuff, but they don't explain a single thing. I mean great, I love seeing the videos, but I am more interested in how it was done. Especially since I wasn't serious about education when I had the opportunity in school, and I work full time now, but now I am serious and constantly learning. Anyways, great video, very interesting, and excellent job explaining it. I hope to see more!
@you_just2 жыл бұрын
the mechanical design looks so pretty!
@RexusKing2 жыл бұрын
Congrats on working in JPL!!!
@marco_gallone2 жыл бұрын
I would use theta= atan2(y,x) instead of inverse sine and inverse cosine. It’s more stable and keeps track of the quadrant. As for zeroing, I would put a single limit switch in the frame right in the middle where a “wrist” feature can touch. The homing would be really simple with that.
@vintyprod2 жыл бұрын
What are the disadvantages of cycloidal drives? Many talk about their love for cycloidal drives and their compactness but no one talks about when one might chose a more traditional gearbox design.
@EdgedPixie Жыл бұрын
Are the timesteps small enough to approximate cos(x)=x and sin(x)=0 - using relative angle adjustments and only reconvening with a global position once every second (or few seconds)? that would massively improve your responsiveness without making you do inverse trig calculations on every timestep.
@xxportalxx.2 жыл бұрын
I work with a similar arm at work, except only one motor drives the two arms in opposite directions (basically acting as the r control) and then the second spins that mechanism around (giving you theta), so it can cover nearly 360° out to the full arm extension with just 2 motors in the same relatively simple construction.
@ernestgalvan9037 Жыл бұрын
Can you provide a link to the laser-cutting shop you used?
@upereye34232 жыл бұрын
Great ...so I this design four and more voice coil accurater can attach to print different colours 3d printer felament?
@caydenwootton72932 жыл бұрын
We're happy to see you back. 😀
@benparr98312 жыл бұрын
he kinda sounds like charlie and i’m all here for it
@JonPrevost2 жыл бұрын
Those steppers look plenty strong to directly drive the arms when unloaded.
@boxsterpontus Жыл бұрын
I built a 3D printing parallel scara arm a few years ago. The main challenges were the gearbox backlash and how to home/zero the machine with good enough precision. I ended up using belts and pulleys as a gear box, a harmonic drive would be ideal but they are way too expensive/hard to build. The zeroing was also very important to get done with very high precision. If the angle the software thinks you have is even very slightly off from the real angle, straight lines will not be straight anymore. The parallel scara is very strong and can move at very highs speeds and accelerations. In the end the 3D printer actually performed pretty well. The zeroing was never properly solved so all prints were a little bit crooked, the prints looked good though.
@jbrownson2 жыл бұрын
Wow congrats on your internship, great video love the editing and cool project.
@leloctai2 жыл бұрын
If you're doing simple linear stepping, the instantaneous velocity change may cause a lot of jerkiness, which is further exacerbated by the large backlash. The linearization will also likely cause angular velocity to change very often.
@mafiosomax7423 Жыл бұрын
What is the max efficiency (Power_out / Power_in) that can be achieved with a cycloidal drive?
@michaelcampbell1471 Жыл бұрын
Really awesome Levi…every part of this build. Your explanations are executed very well, and the end result is outstanding!
@gcmlrd12 Жыл бұрын
Don’t stop. You are the future.
@dominictaylor67592 жыл бұрын
oooh that's super neat I keep imagining a 3dpriter with a u shaped bed. but truly amazing great work man
@trash_aly2 жыл бұрын
Which stepper motors did you end up using specifically? I'm looking for a similar closed-loop stepper and these look really sleek!
@jedale2 жыл бұрын
I’m also interested since these have the IC board mounted directly to the back. Also, Have you thought about hooking this up to a HMI for more robust control interface?
@Chris-io2cs2 жыл бұрын
Have you considered adding one or more off-cycles between heavier calculations where you use a bit of interpolation to smooth things out before correcting the position in future cycles?
@Chris-io2cs2 жыл бұрын
Sidenote each trig op takes much longer than a digital write I believe, but youre doing a lot of them and they add up so you might also want to look into direct port manipulation. For every set of digital writes you could basically have a single register store and it would be something on the order of 10-20 times faster. I also realize you are using a lot of delays which I'm not sure aren't just as significant than whatever math the arduino has to do. So if those are necessary - and it looks like they are - then nothing with port manipulation will improve efficiency much and you probably already knew that. Expect the asin operation to take something like 100 micros although you also do some math inside the sin but lets say no more than 200. Some people have made their own look up table implementations plus some interpolation to combat the slow trig functions but I would start here first and before doing anything too fancy you would probably just get a different micro which is completely reasonable.
@cooperised2 жыл бұрын
Highly recommend Mbed as a superior Arduino replacement if you're running into performance problems. Simple things are almost as simple, and more complex things are vastly simpler, than using Arduino. Performance is off the charts in comparison because the libraries are much better written. The full Mbed build includes a real-time operating system so you can even run multiple threads concurrently with little effort. There are hundreds of Mbed compatible boards around too, most very low cost. Hope this helps!
@pseudo_goose Жыл бұрын
For the linearization, I think it would also be inteeesting to re-frame the problem in terms of the discrete steps that you take along the path. At each step, you need to determine which motor you want to step to remain as close as possible to the target line. (If you care about a constant movement speed, you would also need to solve for the individual delays in between those steps). That would involve just a bit of forward kinematics to simulate the outcome of each option, and then pick the one that is closer to the line. I feel like this could be done on-the-fly pretty easily.
@jensheeiversen91922 жыл бұрын
Awesome video 🔥 just found this channel a couple of days ago and binged almost all the videos instantly, and what is the chances that you uploaded a video just after. Can’t wait for the next one, keep it up
@JoergMaederCH2 жыл бұрын
Nice project. An idea from my side: You have both arms on the same vertical level. Therefor they collide quite fast, and you have only a little more than a 180° of working area (as you have shown). But if one is above the other, you may increase this to close to 360°. Best regards from Switzerland.
@professortrog77422 жыл бұрын
Motors are affected by acceleration constraints too; that could be the source of the “cruncyness”
@cleanpowerelectric2 жыл бұрын
That is one hellava cup holder for your car! 😉 Awesome build.
@irkedoff Жыл бұрын
Nice build. I wish you the best with college.
@paulmeynell88662 жыл бұрын
Excellent work ,very interesting
@MishTheMash2 жыл бұрын
You should be proud of your work here, ~25% of 'robotization tasks' are just a simple pick and place (and real world dynamics is more than sufficient distortion). You should also research how to linearize the motion using state space and discretization techniques (if not for your own edification). If you use induction motors (due to their power) for a project you don't have that position control as with stepper motors, so it means more control computations. .....oh and encoders....don't forget the encoders.
@adammontgomery79802 жыл бұрын
Cool deal. You can pre-compute your inverse trig functions at some resolution (say every 1 degree), and put them in a lookup table. That way the robot's top speed will be much faster.
@lloydrmc Жыл бұрын
Lighting of white board was suboptimal. Maybe get some k8nd of ring light?
@AttilaAsztalos2 жыл бұрын
Fun fact: GRBL running on the same Arduino can control real-world milling machines straight from g-code with no stutter whatsoever.
@CarstenBe Жыл бұрын
Is the Arduino code available on your Patreon? (or somewhere elese)
@vmened2 жыл бұрын
Great project, but you can improove arm. You can preload robot arms by weak springs and use ceramic bearings in arm joints (due to lower weight). In addition you can install IMU sensor into the end of robot arm for more precise movements control. Best regards
@Koodie22 жыл бұрын
Im not sure if the Arduino does cause this wobble; if it is not capable of keeping up with the pulse speed then it would jitter but not wobble like that? Is the ouput of these reductions linears???
@hankb77258 ай бұрын
very cool. Where did you order the metal plates from?
@TheKaos902 жыл бұрын
Maybe use a worm gear to eliminate backlash ? Interesting idea nonetheless
@etihwcs Жыл бұрын
Have you seen arcdroid? Belts and pulleys. Very smooth. Also have you looked at core xy 3d printers firmware? I would think it would work great for this type of setup. Cool project!
@marcus_w02 жыл бұрын
Thanks! I actually was searching for the actually "SCARA" mechanic, but I didn't know what it was called. You made my day :) Also you gained a subscriber
@jimmyjr977 Жыл бұрын
I literaly just started on this exact project like 2 weeks ago lol. sadly I don't have any super fancy equipment or parts, besides a 3d printer, just some skateboard berings and some screws. ( I am using an arduino uno with a CNC sheld to control the nema 17 stepper motors) I was able to make the lines fairly consistant and not vary stuttery when going in stratgh lines and 45 deg angles. but they get more sloppy and "stairstepy" when going at steep angles. I found that you need vary little to no backlash and a whole lot of points for it to make a good line. I split it up so there is a point every millimeter. I hope this can help
@AndrewTSq Жыл бұрын
Maybe the motors are working against eachother. The scara i've seen only have one arm also, so I guess that could be next version of the arm :) nice anyway
@FirstLast-kv1iq2 жыл бұрын
Fantastic video
@steveg22772 жыл бұрын
Who did you use for the aluminum part outsourcing? Did you send them part files? STL’s? Thanks in advance.
@conantur98972 жыл бұрын
Dr. Levi Lightning back at it again, showing off a JPL shirt.
@zvisger2 жыл бұрын
I'm curious what benefit it brings to have two arms working together, instead of just one arm with full 360° motion? Is it just for stability, or to make it able to hold heavier objects? Just curious, lazy game programmer nobody here so idk much about this other than the little I've played with Arduinos and RPIs.
@LuisElectronico2 жыл бұрын
Try using a raspberry Pi Pico for your next prototype, it's much faster while being pretty cheap, great video, and amazing inverse kinematics explanation
@810mb3Rg2 жыл бұрын
Nice video! Good explanation of the IK. A large difference between scara and this 5 bar is that this is a parallel manipulator while scara is serial. How did you decide link lengths? I read a paper awhile ago about optimization of workspace to determine the geometry. Nice work again!
@Mysda_2 жыл бұрын
Wait, 1 year later he's back, great!
@c.harris78232 жыл бұрын
Just discovered your channel! Outstanding video! Keep up the great work! 👍🏼👍🏼
@gentiligiuliano7882 Жыл бұрын
Really interested in this project. I'm trying since forever to buy a scara 3d printer. And I'm finally realizing I will have to build one myself if I want one
@wither82 жыл бұрын
Slick. For the cycloidal drive 3d printed inaccuracy issue, maybe use send-cut-send for them also? Can you see what sort of back EMF you're getting (you can make directional loop antenna with copper, place it near each stepper, and then hook it into your Rigol's chan 1 and2) The cogging (or "stuttering" as other people have said) could probably be fixed with a look-up table? I don't know arduinononono but I know that division in general is 20x cycles more than any other math operation. I'm guessing any sinusoidal operation is moving into the 500ish territory unless youre using a DSP/FPGA. What steppers are you using? They look pretty slick. If you replace the flat-base with 4 bearings, I bet you could turn this into a "Shaper Origin" DIY and out-perform most Bridgeports since you can get balanced BLDCs or PMSMs are in the sub-500$ range, and they're running at the ideal 30krpm that CBN and sintered-carbide inserts like. Or at the very least, low hanging fruit would be to just throw a plasma cutter head in there.
@Blowjin Жыл бұрын
Cool! Subscribed! If you place motors widely you can work on both sides: ahead and behind motors.
@johan_m_o2 жыл бұрын
Great video and explanations. You've got some great pedagogical skills as well as the engineering. I can definitely see myself borrowing that explanation of inverse kinematics in the future (soon to be teacher of math and technology here).
@bruce7mail1222 жыл бұрын
Its good to see you're back developing your interest, cycloidal drive.
@el3ctros2 жыл бұрын
Thank you for giving parallel sacra some of the attention it deserves. I have a lot of interest in implementing this design in modern 3d printing. I think there is a lot of potential in your design, I hope you keep improving it!
@gregoryrajala93352 жыл бұрын
Great Job, keep up the good work!
@aaro_n2 жыл бұрын
You should give an esp32 a try. Then it could probably be controlled wirelessly also
@solosailorsv80652 жыл бұрын
Very well spoken and correct terminology; SUBBED !!
@walterhynson28986 ай бұрын
if you remove the gear drive and use micro stepping ,then place the motors and arms at right angles then you should have a X and Y then grbl should work and 0/0 would be page center and gcode should drive the arms to any position within the limits.
@nocknock48322 жыл бұрын
I really liked this project. I feel like this is a project that really brings together concepts learned throughout the engineering curriculum. Great job
@DeepRafterGaming2 жыл бұрын
so why is the motion so jerky? is it code or hw related?
@dter706 Жыл бұрын
You only used 1 solution for the motor angles and therefore it is working in 1 single mode. This setup of robots has 4 working modes. The hardest challenge for the robot is the control algorithm, since there are regions where the robot can’t get with one working mode. Writing the program for trajectory planning will therefore not just include inverse kinematics, but also the algorithm that decides what working mode is best to reach the next destination from where it currently is.
@dter706 Жыл бұрын
I also recommend using matlab to write the control algorithm with trajectory planning. It will do all the heavy stuff and you can hook up your arduino to matlab to execute the commands.
@marcelpost40522 жыл бұрын
at 0:39 your screen briefly zoomed in which is really annoying to watch. You may wish to look into your video setup.
@kristenstone76382 жыл бұрын
yay Levi is back!!!
@korpijeesus2 жыл бұрын
I think this was worth the wait.
@JaredLucas2 жыл бұрын
Who wants to do the fatigue analysis for every possible point spacing distance? Haha. Very fun build and design
@ekaggrat2 жыл бұрын
any place you have shared the arduino code? great work.
@RunningDwarf2 жыл бұрын
Good work. I built a scara arm myself too now working as a sandtable. For the compute issue you could Upgrade to an esp32 or esp8266. This would also enable you to Programm a simple Web ui to control your robot.
@TUDORMARCU162 жыл бұрын
Very cool project. I see a lot of people suggesting using a more powerful controller. I wonder if a simple lookup table for the inverse trig functions wouldn't work in this case...
@gwenndolynnmecklenburg64572 жыл бұрын
Janssen,..sound pretty Dutch 🙋🏼♀️
@RemusTL2 жыл бұрын
great job!
@noenernet2 жыл бұрын
I played around with double polar drawbot concept, with very similar kinematics to scara kinematics. I precomputed the gcode for the linear movement and transmitted them over serial. I then stumbled across a project which inspired me to use gcode arcs rather than interpolating all the points, which was easily handled by the Nano.
@MikeHammer12 жыл бұрын
Where did you order the laser cut aluminum from? I need a reliable source for some projects I have in mind.
@GabeSullice2 жыл бұрын
Congrats on the internship!
@bukszpryt_ Жыл бұрын
Couldn't you zero the steppers separatelly? Zero of each motor would be the position where it colides with the round part of the other arm. These positions should be reliably repeatable and you wouldn't need any limit switch if your sterpper motor drivers can detect the colision. Sensorless homing is pretty popular in 3d printers.