Author Topic: Smart Steppers  (Read 15857 times)

0 Members and 1 Guest are viewing this topic.

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Smart Steppers
« on: August 07, 2017, 06:44:23 pm »
I have been working on making stepper motors smart. That is adding a rotary encoder and then setting up the stepper motor as a closed loop servo.   The design is such that you can retro fit your existing stepper motors and upgrade your machine.

Many people are using the NEMA 17 units to fix their 3D printers from missing steps on long prints.  Others are using the NEMA 23 on CNC projects and industrial applications.

The way the system works is a magnet is glued (epoxy) to the back of the stepper motor shaft, then the PCB is bolted to the back of the stepper motor which senses the rotation angle of the magnet.  The Smart Stepper PCB has a motor driver, and a 48Mhz 32bit processor allowing full closed loop control. Once the PCB is attached you disconnect motor from machine and run through a calibration process. Then you interface the Smart Stepper to your existing controller using the step and direction pins (if you use step stick you can remove them from your controller).  At this point you select what microstepping you want and you are off and running. The motor should run quieter and will faster (if you increase speed on controller).   

The software allows you to select multiple modes of operation, from a simple PID mode which works for most people out of the box, or a positional PID which requires more tuning but gives better performance.  For other applications you can select velocity operational modes too.  Of course the software is all open source and you can  change it as you like. 

I have setup a website where you can get your smart stepper kit to upgrade your stepper motors here:
http://misfittech.net/smart-steppers/

Thanks
Trampas
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7022
  • Country: ca
  • Non-expert
Re: Smart Steppers
« Reply #1 on: August 09, 2017, 12:15:25 am »
Its a great project, being able to see and adjust settings on the unit is so much better than traditional method (hooking up a PC, recompiling, etc.).

I started on re-laying out the board, mostly for my own preferences (jst connectors, less wiring, etc.): https://github.com/thmjpr/nano_stepper
Will definitely donate once I get it working.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Mechatrommer

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #2 on: August 09, 2017, 12:18:38 pm »
Great it good to hear that others like the project, keep me updated on your progress.

On my list is to find a accurate optical encoder to connect to steppers and measure the magnetic encoder's performance.  If anyone has a suggestion for an encoder with around 0.01 degree or better accuracy/precision, please let me know. 


Thanks
Trampas
www.misfittech.net
 

Offline mikerj

  • Super Contributor
  • ***
  • Posts: 3312
  • Country: gb
Re: Smart Steppers
« Reply #3 on: August 09, 2017, 12:43:27 pm »
On my list is to find a accurate optical encoder to connect to steppers and measure the magnetic encoder's performance.  If anyone has a suggestion for an encoder with around 0.01 degree or better accuracy/precision, please let me know. 

http://www.renishaw.com/en/resolute-absolute-encoder-system-with-rexa-rotary-angle-ring--10852

I suspect you might need deep pockets!

http://www.gurley.com/Encoders/rotinc.htm

They list encoders that provide up to 250k quadrature cycles per rev.
 

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #4 on: August 09, 2017, 02:52:00 pm »
thm_w,

I have newer design of the board, which has not been pushed to github yet. The new design has a buck regulator on board such that the board can be powered from the motor voltage.

Trampas
www.misfittech.net
 

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #5 on: August 09, 2017, 02:54:28 pm »
I had found this encoder:

https://www.digikey.com/product-detail/en/broadcom-limited/AS38-H39E-B13S/516-3356-ND/6150753

It has 39 bits, but the accuracy is specified at +/- 80 arc/seconds (+/- 0.022 degrees).  I would like something a little better.

Trampas
www.misfittech.net
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7022
  • Country: ca
  • Non-expert
Re: Smart Steppers
« Reply #6 on: August 09, 2017, 08:21:54 pm »
http://www.gurley.com/Encoders/rotinc.htm

They list encoders that provide up to 250k quadrature cycles per rev.

Looking at R112 (http://www.gpi-encoders.com/PDF/R112.pdf), +/-5 arcmin  = 0.08 degrees. Then they have quadrature and interpolation error on top of that.
R158 (http://www.gpi-encoders.com/R158.pdf) is 30 arc seconds so that would do it (0.008 degrees).

I would be scared to ask the cost though.

Oddly BEI sensors encoders don't list any accuracy specifications at all, I wonder if the interpolated resolution is useful or just a marketing number.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #7 on: August 09, 2017, 10:31:24 pm »
If it this hard to find and encoder that is better than  +/- 0.022, it might be the type of thing where if the Smart Steppers meet this spec it would be exceptional for the price point.

Trampas
www.misfittech.net
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: se
Re: Smart Steppers
« Reply #8 on: August 10, 2017, 06:47:52 am »
USDigital EM2 is available with up to 10000CPR. The "readhead" costs $40 and the disc another $30, not too bad I don't think.
 

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #9 on: August 10, 2017, 10:56:56 am »
The Smart Steppers include a AS5047D magnetic encoder.  The magnet is glued to back of motor and the AS5047D senses the rotation of the magnet with 14 bits.  Since the magnet is not perfectly placed on axis the firmware calibrates the encoder by using 200 full steps of the stepper motor and assuming that each step is 1.8 degrees. Between steps the firmware linearly interpolates the finer angle resolution.  see here for installation instructions:
http://misfittech.net/blog/installing-the-nano-zero-stepper/

Typically in feedback mode the system can maintain the same position using this setup to better than +/-0.05 degrees, I usually recommend people planning on 0.1 degree repeatablity.  If you tune PID you can often get better results.  The boards current work great and are $49.95 for each board including the magnetic encoder.  So yes for 4 units it would be $200 to retro fit your existing steppers to become closed loop servos, so it is not for everyone. However if you have lost days of a print and created spaghetti mess a few times or if use your printer for production it might be worth it.  However the applications as not limited to printers.

Additionally for most people the missed step on printers is usually only the X and Y axis  (depending on printer design) so many only put on X/Y motors.  Also most people tune down the speed of their printers to try and keep from missing steps, so after installing the smart steppers you can often turn up the speed of printing.

Here is an example of use:
https://www.nanodlp.com/forum/viewtopic.php?id=441

The question on the optical encoder,  is that I would like to make the product better, that is currently the assumption in calibration is that each full step is 1.8 degrees. If I can get a good optical encoder then I could at production time connect a stepper motor to the optical encoder calibrate the magnetic encoder more accurately. This of course would mean selling the controller mounted to a stepper motor. So the optical encoder is not for each unit sold, but rather for production use, so price is less of a concern.


Trampas
www.misfittech.net   

 
The following users thanked this post: Mechatrommer

Offline alexo

  • Contributor
  • Posts: 41
  • Country: za
Re: Smart Steppers
« Reply #10 on: August 10, 2017, 10:34:45 pm »
The cheapest option for an accurate encoder is to purchase a small Mitsubishi servo motor off eBay. Some come with a 1 million line encoder. Cheap as chips compared with buying the encoder by itself and already nicely mounted in a precision enclosure. Works a charm.
 

Online thm_w

  • Super Contributor
  • ***
  • Posts: 7022
  • Country: ca
  • Non-expert
Re: Smart Steppers
« Reply #11 on: August 11, 2017, 01:07:33 am »
The cheapest option for an accurate encoder is to purchase a small Mitsubishi servo motor off eBay. Some come with a 1 million line encoder. Cheap as chips compared with buying the encoder by itself and already nicely mounted in a precision enclosure. Works a charm.

Good idea.

I see some HC-KFS which are 17-bit (131,072 pulses per rev) for $80: http://www.ebay.ca/itm/Used-1Pcs-Mitsubishi-Plc-Servo-Motor-Hc-Kfs13b-Plc-Module-K-/262953091749
http://164.54.212.3/control_systems_manuals/SH_NA_3181-F.pdf

HF-KP053 or HF-MP053 is 18-bit, for $1-200: http://www.ebay.ca/itm/MITSUBISHI-HF-MP053-50W-0-05kW-HFMP053-AC-MOTOR-/292064638198

HG-KR053/HG-MR053 is 22-bit (4mil pulse per rev!) for only $2-300.
« Last Edit: August 11, 2017, 01:13:49 am by thm_w »
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline H.O

  • Frequent Contributor
  • **
  • Posts: 848
  • Country: se
Re: Smart Steppers
« Reply #12 on: August 11, 2017, 09:03:53 am »
That IS a good idea if you know how to read the data out (it's usually not your normal A/B quadrature signals but some serial protocol like SSI or ENDAT).

Also, I'm fairly certain the native resolution of the encoder is much less than for example 22bits and that it does interpolation between actual lines on the disc so you can't neccessarily rely on each "count" being 360/4M (or whatever).

Still a very good idea!
 

Offline donotdespisethesnake

  • Super Contributor
  • ***
  • Posts: 1093
  • Country: gb
  • Embedded stuff
Re: Smart Steppers
« Reply #13 on: August 11, 2017, 11:06:57 am »
Seems like there were no cheap closed loop steppers then several arrive at once... I am wondering how this product differs to http://tropical-labs.com/index.php/mechaduino or http://www.ustepper.com/index/?

I'm not sure adding $100 to a cheap 3d printer is very cost effective, but I have a skipping Y axis so I want to try a closed loop stepper.
Bob
"All you said is just a bunch of opinions."
 

Offline senso

  • Frequent Contributor
  • **
  • Posts: 951
  • Country: pt
    • My AVR tutorials
Re: Smart Steppers
« Reply #14 on: August 11, 2017, 01:28:46 pm »
I know that steppers have some strong magnetic fields, but could you try a Magnetic encoder from AMS, they use radial magnets, and with some calibration you might get some 10-11 bits out of the 12 bits units, they have a couple compensation registers, you might be able to use them if the axle is not flush with the stepper case.
 

Offline trampasTopic starter

  • Contributor
  • Posts: 44
  • Country: us
Re: Smart Steppers
« Reply #15 on: August 11, 2017, 03:04:36 pm »
The Smart Steppers use the AMS AS5047D with 14bit resolution.

The Smart Steppers and Mechaduino are very similar in design with a few exceptions:

Smart Stepper exposes an error pin
Smart Steppers includes a buck converter to power board off the motor voltage
Smart Steppers have an LCD option, such that they can be configured without use of PC
Smart Steppers do not require recompiling source code to calibrate motors or change parameters.
Smart Steppers firmware has a lot more features an options.
Smart Steppers hardware has diodes and TVS for ESD issues.
Smart Steppers come with screw cage connectors for easier connection to machine.
Smart Steppers parameters are easy to change through USB serial port using a command line interface.

The ustepper does not control the current to motor like the Smart Steppers and Mechaduino. The ustepper basically uses a step stick to step forward or back to correct errors. The Smart Steppers and Mechaduino will change the current to the motor based on the error, this reduces noise and heat on motor. 

With the Smart Stepper when you connect to machine and try to move the head out of position the current control on the motor makes it feel like strong springs are attached to the head pulling it back into position. Since you have control over the current you can change the "stiffness" of these virtual springs.

I have ported my firmware to the Mechaduino in case people want to upgrade their Mechaduino.

Trampas
www.misfittech.net
 

Offline alexo

  • Contributor
  • Posts: 41
  • Country: za
Re: Smart Steppers
« Reply #16 on: August 11, 2017, 09:03:51 pm »
That IS a good idea if you know how to read the data out (it's usually not your normal A/B quadrature signals but some serial protocol like SSI or ENDAT).

Also, I'm fairly certain the native resolution of the encoder is much less than for example 22bits and that it does interpolation between actual lines on the disc so you can't neccessarily rely on each "count" being 360/4M (or whatever).

Still a very good idea!

Data out for that particular series is A/B, no interpolation for 1 mill counts. The 400W pops up on eBay from time to time pretty cheap. There is an excellent magnetic alternative from Renishaw but then mounting becomes if not a chore at least a "project".
 

Offline raptor1956

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: Smart Steppers
« Reply #17 on: August 12, 2017, 03:17:33 am »
The cheapest option for an accurate encoder is to purchase a small Mitsubishi servo motor off eBay. Some come with a 1 million line encoder. Cheap as chips compared with buying the encoder by itself and already nicely mounted in a precision enclosure. Works a charm.


Yeah, for the most part stepper are open loop units and if you're going to need closed loop servo's are a better choice for a number of reasons.  Servos do not need the holding torque as they have the encoder to know if it moved -- a stepper needs to have a fairly high holding torque so it knows it hasn't moved else it loses counts.  Holding torque requires more power and produces more heat.  Servo's are much smoother and quieter as well.

For position critical applications you might have two encoders: one on the motor to close the velocity loop and one on the load to close the position loop.


Brian
« Last Edit: August 12, 2017, 07:12:33 pm by raptor1956 »
 

Offline Doctorandus_P

  • Super Contributor
  • ***
  • Posts: 3796
  • Country: nl
Re: Smart Steppers
« Reply #18 on: August 12, 2017, 11:12:25 am »
You can easily put a flywheel on the stepper and give it a wank.
Not good for absolute position measurements, but you can use it for lineairity measurments and such.

Have you considered potentiometers?
These have "infinite" resolution.
https://www.aliexpress.com/wholesale?SearchText=conductive+plastic+potentiometer
 

Offline alexo

  • Contributor
  • Posts: 41
  • Country: za
Re: Smart Steppers
« Reply #19 on: August 12, 2017, 01:23:12 pm »
Actually not. The resolution of pots is pretty poor.
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11705
  • Country: my
  • reassessing directives...
Re: Smart Steppers
« Reply #20 on: August 12, 2017, 01:33:47 pm »
not the pot, the adc... 1024 steps per revolution only (maximum with hard work tuning), and its slow. plus contact mechanism wears out..
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline alexo

  • Contributor
  • Posts: 41
  • Country: za
Re: Smart Steppers
« Reply #21 on: August 12, 2017, 01:44:05 pm »
The cheapest option for an accurate encoder is to purchase a small Mitsubishi servo motor off eBay. Some come with a 1 million line encoder. Cheap as chips compared with buying the encoder by itself and already nicely mounted in a precision enclosure. Works a charm.


Yeah, for the most part stepper are open loop units and if you're going to need closed loop servo's are a better choice for a number of reasons.  Servos do not need the holding torque as they have the encoder to know if it moved -- a stepper needs to have a fairly high holding torque so it knows it hasn't moved else it loses counts.  Holding torque requires more power and produces more heat.  Servo's are much smoother and quieter as well.

For position critical applications you might have two encoders: one on the motor to close the velocity loop and one on the load to close the position loop.


Brian


Brian

Stepper systems are superior to servos but for the case of highly variable heavy loads.
 

Offline alexo

  • Contributor
  • Posts: 41
  • Country: za
Re: Smart Steppers
« Reply #22 on: August 12, 2017, 01:45:40 pm »
not the pot, the adc... 1024 steps per revolution only (maximum with hard work tuning), and its slow. plus contact mechanism wears out..

Could you please re-phrase ? I do not understand.
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11705
  • Country: my
  • reassessing directives...
Re: Smart Steppers
« Reply #23 on: August 12, 2017, 03:29:32 pm »
not the pot, the adc... 1024 steps per revolution only (maximum with hard work tuning), and its slow. plus contact mechanism wears out..
Could you please re-phrase ? I do not understand.
lets try again, non-native to non-native ;D... potentiometer has infinite (analog) resolution, but the problem with the method is how to detect the resolution when converted to digital ie using adc of the mcu, most jelly bean mcu has 10 bits of resolution, that is 1024 steps maximum for one revolution, and adc conversion is alot slower than digital input quadrature state pooling/interrupt detection, can be problematic in high speed rev application. and in high durable (expensive) application, the brushed potentiometer will wear out in time, so brushless or contact-less system is more favourable, hope it helps... what i havent mentioned is the potentiometer need to be circularly contiguous because the motor in infinitely rotating, the adc/mcu/system wont like a discontinuous resistance at both the extreme end of the potentiometer... its ok for limited angle servos, but not in this case... fwiw...
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline raptor1956

  • Frequent Contributor
  • **
  • Posts: 869
  • Country: us
Re: Smart Steppers
« Reply #24 on: August 12, 2017, 07:11:51 pm »
The cheapest option for an accurate encoder is to purchase a small Mitsubishi servo motor off eBay. Some come with a 1 million line encoder. Cheap as chips compared with buying the encoder by itself and already nicely mounted in a precision enclosure. Works a charm.


Yeah, for the most part stepper are open loop units and if you're going to need closed loop servo's are a better choice for a number of reasons.  Servos do not need the holding torque as they have the encoder to know if it moved -- a stepper needs to have a fairly high holding torque so it knows it hasn't moved else it loses counts.  Holding torque requires more power and produces more heat.  Servo's are much smoother and quieter as well.

For position critical applications you might have two encoders: one on the motor to close the velocity loop and one on the load to close the position loop.


Brian


Brian

Stepper systems are superior to servos but for the case of highly variable heavy loads.


Yeah, no..

Show me any commercial robot that uses steppers versus AC or DC servos.  Steppers require more power on average and produce more heat and are noisier.  It what ways do you view steppers as superior?


Brian
« Last Edit: August 13, 2017, 03:51:47 am by raptor1956 »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf