I watched this a long time ago.
Recently I've decided to design and build myself a new camera slider for my new Panasonic G7. yes influenced by Tom again, but I've checked the closest competition is the Sony A6300 which has a serve overheating issue so it is a big no-no for me.
I thought it was a simple project both coding and design-wise, but man... I was wrong, I spent days iterating the designs and I still feel unsatisfied with it. Coding wise, I am a programmer/software engineer but this is my first time playing with Arduino/programming an MCU. I found out that driving a stepper motor with Arduino library is a FPITA, there are so many issues with it.
Arduino built-in stepper class is too slow to do anything useful and worse of all, it is blocking the entire program when it is stepping, other than I also ran into a weird quad-stepping issue, where I need 4 times the steps to complete a full revolution. Even my math told me that I was right 360/1.8 * 16 = 3200, I ended up needing 12800 microsteps on an A4988 with 1/16 microstep enabled. The quad-stepping issue was fixed with another 3rd party library called AccelStepper but it is still way too slow.
I've ended up taking a glance at Tom's code, he was right about he is not a programmer but I found a gem with his code and realized what he was talking about regarding the needs to drive the touchscreen and stepper motor fast enough... While I get a rough idea of Tom's code working, I don't quite understand some of the parts due to the messy structure of the code. I ended up driving the stepper with Timer1 interrupt, with some simple condition statements in the callback, the STEP signal is continuously generated until there are no steps left. I managed to achieve about 130mm/s with the new code with a fixed period/interval compared with like 20mm/s with previous attempts... That being said, I am still trying to play with it to find a more elegant solution.
It makes you appreciate how amazing the Marlin/GRBL optimizing is.
It will be great if Tom is willing to provide some inputs.
Videos, Guides, Drama
1 post • Page 1 of 1
Who is online
Users browsing this forum: No registered users and 2 guests