this video is so good man. i will be attempting to recreate this (probably just on a breadboard and with a raspberry pi pico). thank you so much for the work
The PID algorithm tries to maintain the setpoint, no matter what. So if I move the shaft by force, the algorithm notices that the position of the shaft is outside the setpoint, and it drives the motor to return it to the setpoint.
Have you done any experiments with the "openflexure" microscope stage? Or given any thought to a diy scanning laser microscope? your videos are always so thorough and bring fresh ideas to the table. I enjoy your projects because you bring a very polished and professional look to diy lab stuff.
Hi! The Diy scanning electron microscope is on my to-do list, but not the laser one. 😄 Or not yet, perhaps. Funnily enough, I just saw a few videos popping up in my feed on the laser scanning microscope lately. I will probably look at it and might implement my approach, however first I need to implement a few other things that are already in the production pipeline. Thanks for the compliments. It is really nice to hear such feedback! I try to come up with something decent, as much as my tools and resources allow it.
@@CuriousScientist your content really stands above most because of your professional approach. And the amount of polish you put on your projects. Reminds me of "les's lab" channel and his impressive projects
Hi! You said many times that there is no really a point of closed loop stepper. But what if im creating a simple robot arm on steppers, dont i need closed loop for keeping positions while holding something?
Hi! If you can make sure that the motors are strong enough so they don't lose steps, you only need to know the initial position of the motor. Then, you can just keep track of the steps.
@@CuriousScientist i have tried for few days to make stm32 work with as5600, tmc2209 and nema17. I have no clue how to make as5600 work with those things. Is there any chance you can help me? Everything is wired properly. I dont know how to program it. Internet didnt help. Please help 👏
I implemented similar solution in my project but I use arduino nano to controll stepper mottor. Problem show when i try to read values from i2c bus (from encoder) and in the same time controll stepper via (curentTime-prevTime > period). This solution works with a huge lag. Should i change encoder or mC for stm or there is some other soluton?
Hi! Without seeing the whole setup and the code, it is hard to say anything... But if I assume that you toggle the step pin to move the motor, then it is pretty possible that the i2c introduces a delay which makes the motor to stutter. Also, the MCU I use has a 4x faster clock speed than the Arduino.
How can i do the model identification for the stepper motor in base of the data of the encoder? I mean, i want the transfer function of the stepper motor (input: voltage (PWM), output: speed of the rotor) to desing a close loop control for muy self balancing robot
Hi! Can I use arduino nano and 2209 or 2208 with stepper tmc library? I want to perform simple motor control using buttons and a simple "lcd(0x27,16,2)" display. I haven't seen anyone do it with this library yet.
@@CuriousScientist Bad development. If I become a Patreon every time just to get one interesting project, I will become poor. It used to be better when people did it out of idealism and didn't think they could get paid for everything through TH-cam.
Yeah, I invested weeks, if not months of my free time to develop this thing, designed a PCB, bought all parts myself, paid for the customs fees, wrote all the code, made the documentation, recorded a video about it and uploaded it to TH-cam purely out of idealism. :) I think I invested nearly $500 in this project, if not more. If you think I don't deserve $5-10 for this, then you can still follow the video and type in the project line by line.
@@Thomas-ij7ki Who says TH-cam content shouldn't cost anything? Why should developers work for free? You get paid for your work, don't you? Sneak away and do it yourself,
@@Jim_One-wl4ke I honestly don't see the advantage of a closed-loop stepper motor. If the system is well-designed, it should not lose steps, even at high speeds and accelerations. If you look at fancier 3D printers, they still have an open-loop stepper motor. These motors (steppers in general) are specifically designed for precision.
What if u use a dc motor instead will it go exact? I know steppers per step is 1.8°, but for TMC2209 u may go 256 µsteps 51200pulse Vs 4096 will it get there exact?
You can use a DC motor with an encoder. It is called servo. :) However, if you want to do it on this board, it won't work because the circuit and the program were specifically made for steppers.
It seems that you haven't watched the video. :) I specifically mention the "benefit" of having a PID controller. Maybe if you want to build a stepper motor-based force-feedback mechanism, you can benefit from it. But PID is not really for stepper motors in my opinion. I just made this video, because I had a lot of questions related to this topic, and I also wanted to showcase my stepper motor platform and its capabilities more.
pid controller is giving an option when stepper motor makes positioning error. pid reduces position error and stabilizes the machine working. if error not going to zero system stops working to minimize the machine failure and loss. we use pid everywhere in daily life. thermostat of fridge is a pid controller starts and stops the motor for cooling and it have a optimised range.
@@CuriousScientist I totally understand and agree about the benefits of PID. I just can't see any benefit of using it on a stepper motor versus a DC motor, and that was the intent of my question. Thanks.
This looks awesome. Do you have a spare PCB which you could donate to me? I would love to replicate this project, having every conponent but the PCB, a sensor and round magnet . Maybe you would like to make me the happiest guy on earth by helping me out with these 3 things? I would allways love you for this... ❤
this video is so good man. i will be attempting to recreate this (probably just on a breadboard and with a raspberry pi pico). thank you so much for the work
Thanks! Go for it! It is a fun project! I also made it on a breadboard first and then made this PCB.
wonderfull project. I was looking for someting like this for a camera controler for making time lapses.
Thanks! You don't need a sophisticated PID (I mean, no PID at all) for that. I already made such a project: th-cam.com/video/Yd5qOyM1EHs/w-d-xo.html
amazing. just control with PID ? because I see you react to the stepper motor but the motor returns to the set point position at 16:28 minutes
The PID algorithm tries to maintain the setpoint, no matter what. So if I move the shaft by force, the algorithm notices that the position of the shaft is outside the setpoint, and it drives the motor to return it to the setpoint.
Have you done any experiments with the "openflexure" microscope stage? Or given any thought to a diy scanning laser microscope?
your videos are always so thorough and bring fresh ideas to the table. I enjoy your projects because you bring a very polished and professional look to diy lab stuff.
Hi! The Diy scanning electron microscope is on my to-do list, but not the laser one. 😄 Or not yet, perhaps. Funnily enough, I just saw a few videos popping up in my feed on the laser scanning microscope lately. I will probably look at it and might implement my approach, however first I need to implement a few other things that are already in the production pipeline.
Thanks for the compliments. It is really nice to hear such feedback! I try to come up with something decent, as much as my tools and resources allow it.
@@CuriousScientist your content really stands above most because of your professional approach. And the amount of polish you put on your projects. Reminds me of "les's lab" channel and his impressive projects
Thank you very much! I hope you'll keep following this year's projects because I will publish some very interesting ones.
Hi!
You said many times that there is no really a point of closed loop stepper. But what if im creating a simple robot arm on steppers, dont i need closed loop for keeping positions while holding something?
Hi! If you can make sure that the motors are strong enough so they don't lose steps, you only need to know the initial position of the motor. Then, you can just keep track of the steps.
@@CuriousScientist wow, thanks for response! And do you think parts like stm or tmc are good from alie?
Absolutely. I also buy the from there.
@@CuriousScientist i have tried for few days to make stm32 work with as5600, tmc2209 and nema17.
I have no clue how to make as5600 work with those things. Is there any chance you can help me? Everything is wired properly. I dont know how to program it. Internet didnt help. Please help 👏
Everything can be found in this video and the corresponding article. What's missing then?
Do you have any source code, or file that i can download please ?
Sure, it is on my Patreon.
Bayar tong 😂 lu kira gratis.. Enak aja main minta2 kode, masuk sono di patreonnya dia lalu bayar..
@@ngnerd5392 ya iyalah bayar, siapa yang bilang gratis ?, kamu biasanya download gratisan ya ?
I implemented similar solution in my project but I use arduino nano to controll stepper mottor. Problem show when i try to read values from i2c bus (from encoder) and in the same time controll stepper via (curentTime-prevTime > period). This solution works with a huge lag. Should i change encoder or mC for stm or there is some other soluton?
Hi! Without seeing the whole setup and the code, it is hard to say anything...
But if I assume that you toggle the step pin to move the motor, then it is pretty possible that the i2c introduces a delay which makes the motor to stutter. Also, the MCU I use has a 4x faster clock speed than the Arduino.
Thank you . Where can I see all the code?
Hi! It is on my Patreon page.
Can you share the code and diagram linking the ESP32 and TMC2209?
Hi! There's no ESP in this circuit. The code is on my Patreon.
How can i do the model identification for the stepper motor in base of the data of the encoder? I mean, i want the transfer function of the stepper motor (input: voltage (PWM), output: speed of the rotor) to desing a close loop control for muy self balancing robot
Sorry, but I have no idea about what you're asking. The stepper motor is not PWM driven.
Hi! Can I use arduino nano and 2209 or 2208 with stepper tmc library? I want to perform simple motor control using buttons and a simple "lcd(0x27,16,2)" display. I haven't seen anyone do it with this library yet.
Hi! I think it should work.
wonderful wonderfull wonderfull. thank you so much
I'm glad you liked it!
Very nice video. Have you thought about using FOC to control a stepper motor?
Thank you! No, I haven't thought about it.
Can you do stall guard on this setup?
Sure, the driver can do it, so you just need to enable it in the code.
Nice project! Could you provide the code on your website or do I have to type it from the screen?
It's provided on my Patreon.
@@CuriousScientist Bad development. If I become a Patreon every time just to get one interesting project, I will become poor. It used to be better when people did it out of idealism and didn't think they could get paid for everything through TH-cam.
Yeah, I invested weeks, if not months of my free time to develop this thing, designed a PCB, bought all parts myself, paid for the customs fees, wrote all the code, made the documentation, recorded a video about it and uploaded it to TH-cam purely out of idealism. :) I think I invested nearly $500 in this project, if not more. If you think I don't deserve $5-10 for this, then you can still follow the video and type in the project line by line.
@@Thomas-ij7ki Who says TH-cam content shouldn't cost anything? Why should developers work for free? You get paid for your work, don't you? Sneak away and do it yourself,
Thank you! Finally, someone who understands!
Good job 👍. It’s a close loop system then.
Thanks! Yes, it is a closed loop!
@@CuriousScientist so is there an advantage accuracy & speed if used in 3D printer for example? Thanks for making this video & sharing ❤️
@@Jim_One-wl4ke I honestly don't see the advantage of a closed-loop stepper motor. If the system is well-designed, it should not lose steps, even at high speeds and accelerations. If you look at fancier 3D printers, they still have an open-loop stepper motor. These motors (steppers in general) are specifically designed for precision.
What if u use a dc motor instead will it go exact? I know steppers per step is 1.8°, but for TMC2209 u may go 256 µsteps 51200pulse Vs 4096 will it get there exact?
You can use a DC motor with an encoder. It is called servo. :) However, if you want to do it on this board, it won't work because the circuit and the program were specifically made for steppers.
If you use PID in your control, what is the benefit of using a stepper motor instead of a DC motor?
It seems that you haven't watched the video. :) I specifically mention the "benefit" of having a PID controller. Maybe if you want to build a stepper motor-based force-feedback mechanism, you can benefit from it. But PID is not really for stepper motors in my opinion. I just made this video, because I had a lot of questions related to this topic, and I also wanted to showcase my stepper motor platform and its capabilities more.
pid controller is giving an option when stepper motor makes positioning error. pid reduces position error and stabilizes the machine working. if error not going to zero system stops working to minimize the machine failure and loss. we use pid everywhere in daily life. thermostat of fridge is a pid controller starts and stops the motor for cooling and it have a optimised range.
The thermostat in a fridge is actually NOT PID-controlled. It is a simple On-Off regulator.
@@CuriousScientist I totally understand and agree about the benefits of PID. I just can't see any benefit of using it on a stepper motor versus a DC motor, and that was the intent of my question. Thanks.
@@CuriousScientistdepends on the fridge
This looks awesome. Do you have a spare PCB which you could donate to me? I would love to replicate this project, having every conponent but the PCB, a sensor and round magnet . Maybe you would like to make me the happiest guy on earth by helping me out with these 3 things? I would allways love you for this...
❤
Drop me an email. 😎
Nice first one here
Welcome-welcome!