Smart Stepper Controller - Page 1
Forum section: electronics / general

author: trampas
author_rank: Regular Contributor
timestamp: December 06, 2016, 07:16:51 pm
content: I have been working on some feedback controllers which can be attached to existing stepper motors, seewww.misfittech.net. I was wondering what other features (hardware and firmware) that people would be interested in?The main application was to preven missing steps on my 3D printer. Next I am working on using force feedback to replace limit switches and do bed leveling. I would love to add some self tuning of the PID parameters if anyone knows how to do this please contact me.ThanksTrampaswww.misfittech.net

author: Harvs
author_rank: Super Contributor
timestamp: December 06, 2016, 11:14:38 pm
content: Quote from: trampas on December 06, 2016, 07:16:51 pmI had a look at your page (the shop and blog) but I can't see any details?The first question that comes up when you're talking closed loop steppers is resolution. The most common Chinese hybrid steppers use 1000 pulses per rev, which means you can only tell when you're out by several micro steps. So I guess that would be a bare minimum target.What you're trying to compete with is the likes of:https://www.aliexpress.com/item/NEW-Integrate-Closed-Loop-Stepper-Motor-Drive-1NM-Position-Encoder-36V-57mm-NEMA23-IHSS57-36-10/32506472088.htmlFor $80 USD + Postage you can buy off the shelf a closed loop stepper, plug it in and go. So the first thing I'd want to know is can your system meet and/or better this in every way?The other thing I find important about closed loop steppers from someone running a CNC is the ability for them to E-stop the machine if they can't maintain track. This is usually because something really bad is happening, or it's been driven so fast that it's loosing step. Either way it often means you can save the part.

author: trampas
author_rank: Regular Contributor
timestamp: December 07, 2016, 01:14:46 pm
content: As far as the details what are you looking for that was not on the website?The unit can support up to 256x microstepping, however I usually run at only 16x microstepping. At 16x microstepping a 1.8 degree per step motor with 200 steps per revolution would end up with 3200 steps per revolution.At 3200 steps per revolution you get an angle resolution of 0.1125 degrees. However the accuracy of motor with the smart stepper controller and motor can be better than this.There are a lot of hybrid stepper motors and controllers out there, and for some problems they are best solution. However using a smart stepper controller can add other advantages.1. You could set an error limit to toggle an error flag/pin - For example if error is more than 0.9 degrees toggle error pin such that machine can stop until error is fixed.2. Error pin controlling multiple axis - The error pin can be connected to all axis such that if one motor has error all stop until that motor catches up. You could modify host controller to make sure it stops sending command when this happens as well.3. Variable torque - You can control the torque (current) to the motor such that you can eliminate the limit switches. That is turn torque down run machine to rails limits until error pin toggles to detect home/axis limits.4. DRO and controlling angle - For non CNC applications (like maybe telescope control) you can tell the smart stepper controller what angle to move to and it will move there and hold position.5. Increased Speed - often with increased microstepping motor RPM is slower, the smart steppers can run at full step speed even with 16x microstepping.6. Decrease heat and noise - the smart steppers can use higher motor currents during move and lower currents during hold to reduce heat and noise, often this increases torque as people set current to steppers lower to reduce noise7. Open Source - The firmware is open source, so if it does not do what you want you can change it.8. make dynamic cutting speed system - set the torque on the motors for milling a part, then if mill hits a hard part the controller will flag a position error such that host can slow down the cut speed.For example one person I have talked to wants to control the rotational speed of a stepper. Therefore they want a PID loop controlling speed as the load on the motor changes. This can be done with the smart stepper.For myself I am using on a PNP design and using the error feedback to know when head reaches board/part. I also plan on upgrading my CNC mill and using this feature to detect work piece height. For example when I put a mill bit in the CNC I will reduce torque on Z axis motor and then move bit down until it touches the work piece to zero the bit height to work piece. Then increase current back up for cutting part. I plan on doing the same thing for zeroing a 3D printer head and leveling the bed.Some people are wanting to use this to get better accuracy from their stepper motors. For example a DRV8825 has a large error with 16x microstepping.The smart stepper with feedback can improve the microstepping accuracy of a motor.The smart stepper board is not for everyone, some people just want an off the shelf closed position stepper motor, for them the best solution would be a $80 motor from aliexpress depending on their need. The smart stepper is not turn key closed loop stepper motor, it is an open source project that allows you to dream and create a solutions of your own.

author: trampas
author_rank: Regular Contributor
timestamp: December 07, 2016, 03:28:57 pm
content: Another application of the smart stepper is to use with a robotic arm. You could set the torque low and then by hand move the arm while recording the encoder position. Then you can increase the torque and have the arm play back the motion you "trained" it to do.

author: Harvs
author_rank: Super Contributor
timestamp: December 07, 2016, 09:46:15 pm
content: I had another look at your blog, and I can see most of what I was looking for was dispersed through the text.Most of the advantages you've listed are certainly available on the more expensive close loop systems. I'm sure you've heard of the Clearpath servos.But having said that, it looks like a nice project and that AS5047 sensor has enough resolution for the job.I see the advantage of this really being the Open Source nature, with the ability to mod the firmware.So this is going to be open firmware, and closed hardware?

author: xack
author_rank: Newbie
timestamp: December 07, 2016, 11:33:18 pm
content: looks similar to the mechaduino.But nice anyway, the more people work on a solution that betterSorry if that sounds a bit skeptical, but where can I find the source to your project?

author: trampas
author_rank: Regular Contributor
timestamp: December 08, 2016, 08:53:24 pm
content: Yes it is similar to the Mechaduino, Joe did a great job on Mechaduino! I have even ported my firmware to the Mechaduino such that as a community we can all work on one code base moving forward. For example with the NZS firmware you don't need to recompile to calibrate the system.The hardware and firmware is open source, everything should be on github if you need something that is not there let me know.https://github.com/Misfittech/nano_stepper.The following are the features under development for the next firmware release.FW 0.06 wish list as of 12-8-2016- Improve LCD menu to allow access to menu any time and break out as own source file/module- Add motor parameters to flash (step size, wiring direction, desired rotation direction for dir pin polarity, etc)- Allow LCD to change motor parameters.- Add test for motor power before checking step size and rotation direction- Add error time out where if motor can not move for xxx seconds (motor/axis hitting mechanical limit of machine) it will stop trying and/or reduce current.- Add protocol between host (Marlin/smoothie) and Smart Stepper such that host can update parameters of controller (allows limit switch emulation)- Allow the Error/Enable pin as bidirectional open collector type of signaling system.- Add the velocity PID control loop- Review option for a speed limit system- Continue work on the relay tuning and auto tune features (low priority)- As always if you have any feature requests or comments email me or post a commentTrampas

author: trampas
author_rank: Regular Contributor
timestamp: December 10, 2016, 12:26:29 pm
content: Marlin has not been update to see missing steps that I know of.Right now I am focused on the NZS firmware, after the next release I will start looking into Marlin and getting some features added there. Of course don't wait for me if you want to update Marlin firmware.Trampaswww.misfittech.net

author: trampas
author_rank: Regular Contributor
timestamp: December 14, 2016, 04:27:05 am
content: Is around 800RPM fast enough for a stepper motor running at 16x microstepping?

author: Aigor
author_rank: Contributor
timestamp: January 25, 2017, 07:54:26 pm
content: Cool project! have you checked Trinamic chips for driving stepper?