Тёмный
No video :(

Stepper motor PID control using a TMC2209 and AS5600 

Curious Scientist
Подписаться 33 тыс.
Просмотров 11 тыс.
50% 1

Check out PCBWay's website for rapid prototyping of printed circuit boards, CNC and 3D printing services and many more! pcbway.com/g/m...
In this video, I show you how to implement a rudimentary PID control for stepper motors using a TMC2209 stepper motor driver and an AS5600 magnetic encoder. Thanks to the PID algorithm, the motor can find its way to the target and it can maintain its position, even if the shaft of the motor is rotated by an external force.
Please consider supporting me on Patreon: / tmc2209-stepper-97046230
Check my website for more information: curiousscienti...
Get the PCB from PCBWay: www.pcbway.com...
Get the relevant parts and tools: curiousscienti...

Опубликовано:

 

23 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 46   
@Helio___
@Helio___ 7 месяцев назад
wonderfull project. I was looking for someting like this for a camera controler for making time lapses.
@CuriousScientist
@CuriousScientist 7 месяцев назад
Thanks! You don't need a sophisticated PID (I mean, no PID at all) for that. I already made such a project: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Yd5qOyM1EHs.html
@hullinstruments
@hullinstruments 6 месяцев назад
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.
@CuriousScientist
@CuriousScientist 6 месяцев назад
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.
@hullinstruments
@hullinstruments 6 месяцев назад
@@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
@CuriousScientist
@CuriousScientist 6 месяцев назад
Thank you very much! I hope you'll keep following this year's projects because I will publish some very interesting ones.
@annaoaulinovna
@annaoaulinovna 7 месяцев назад
wonderful wonderfull wonderfull. thank you so much
@CuriousScientist
@CuriousScientist 7 месяцев назад
I'm glad you liked it!
@Jim_One-wl4ke
@Jim_One-wl4ke 4 месяца назад
Good job 👍. It’s a close loop system then.
@CuriousScientist
@CuriousScientist 4 месяца назад
Thanks! Yes, it is a closed loop!
@Jim_One-wl4ke
@Jim_One-wl4ke 4 месяца назад
@@CuriousScientist so is there an advantage accuracy & speed if used in 3D printer for example? Thanks for making this video & sharing ❤️
@CuriousScientist
@CuriousScientist 4 месяца назад
@@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.
@waynepetrevan
@waynepetrevan 7 месяцев назад
If you use PID in your control, what is the benefit of using a stepper motor instead of a DC motor?
@CuriousScientist
@CuriousScientist 7 месяцев назад
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.
@annaoaulinovna
@annaoaulinovna 7 месяцев назад
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
@CuriousScientist 7 месяцев назад
The thermostat in a fridge is actually NOT PID-controlled. It is a simple On-Off regulator.
@waynepetrevan
@waynepetrevan 7 месяцев назад
@@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.
@danielmclellan7762
@danielmclellan7762 2 месяца назад
​@@CuriousScientistdepends on the fridge
@odhie_r
@odhie_r 7 месяцев назад
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
@CuriousScientist
@CuriousScientist 7 месяцев назад
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.
@medienmond
@medienmond 7 месяцев назад
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... ❤
@CuriousScientist
@CuriousScientist 7 месяцев назад
Drop me an email. 😎
@callerdosaphor3690
@callerdosaphor3690 7 месяцев назад
Very nice video. Have you thought about using FOC to control a stepper motor?
@CuriousScientist
@CuriousScientist 7 месяцев назад
Thank you! No, I haven't thought about it.
@javierespejo73
@javierespejo73 3 месяца назад
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
@CuriousScientist
@CuriousScientist 3 месяца назад
Sorry, but I have no idea about what you're asking. The stepper motor is not PWM driven.
@TheKoreshshok
@TheKoreshshok 2 месяца назад
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
@CuriousScientist 2 месяца назад
Hi! I think it should work.
@rocksolo6788
@rocksolo6788 6 месяцев назад
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?
@CuriousScientist
@CuriousScientist 6 месяцев назад
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.
@NIKOLAY_PSHONIA
@NIKOLAY_PSHONIA 4 месяца назад
Thank you . Where can I see all the code?
@CuriousScientist
@CuriousScientist 4 месяца назад
Hi! It is on my Patreon page.
@Thomas-ij7ki
@Thomas-ij7ki 7 месяцев назад
Nice project! Could you provide the code on your website or do I have to type it from the screen?
@CuriousScientist
@CuriousScientist 7 месяцев назад
It's provided on my Patreon.
@Thomas-ij7ki
@Thomas-ij7ki 7 месяцев назад
@@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 RU-vid.
@CuriousScientist
@CuriousScientist 7 месяцев назад
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 RU-vid 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.
@ReinholdStattelmann
@ReinholdStattelmann 2 месяца назад
​@@Thomas-ij7ki Who says RU-vid 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,
@CuriousScientist
@CuriousScientist 2 месяца назад
Thank you! Finally, someone who understands!
@TriWahyu45
@TriWahyu45 6 месяцев назад
Do you have any source code, or file that i can download please ?
@CuriousScientist
@CuriousScientist 6 месяцев назад
Sure, it is on my Patreon.
@atbuen
@atbuen 7 месяцев назад
Nice first one here
@CuriousScientist
@CuriousScientist 7 месяцев назад
Welcome-welcome!
@Need_more_free_time
@Need_more_free_time 7 месяцев назад
Can you do stall guard on this setup?
@CuriousScientist
@CuriousScientist 7 месяцев назад
Sure, the driver can do it, so you just need to enable it in the code.
Далее
УГАДАЙ ЕДУ ПО ЭМОДЗИ! #shorts
00:57
Просмотров 120 тыс.
💀СЛОМАЛ Айфон за 5 СЕКУНД😱
00:26
Magnetic rotary encoder vs stepper motor accuracy
5:41
Damascus Steel From Stick Welding Electrodes
14:15
Просмотров 602 тыс.
I took Taser Chess to Open Sauce
12:40
Просмотров 348 тыс.
FOC Driver + Feedback Magnetic Sensor - Arduino
14:34
Hacking a weird TV censoring device
20:59
Просмотров 3 млн
What Makes TMC2208 Stepper Motor Drivers Silent?
9:07
Просмотров 299 тыс.
Turn any DC Motor into a Servo Motor
25:24
Просмотров 285 тыс.