Driver for NEMA 17 stepper motor ?

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
RajaRamesh
Posts: 51
Joined: Wed May 08, 2019 10:54 am

Driver for NEMA 17 stepper motor ?

Post by RajaRamesh » Wed Jun 26, 2019 8:15 am

Hi All,
After watching few videos on stepper motors in youtube , i am interested in developing small project with Nema 17 stepper motor(Assuming this motor will fit to my project) with ESP8266. My basic idea is to move an object from one end to other end with the help of rope(which will hold the object) or similar material connected to stepper motors and controlling these stepper motors with esp8266. Now, i am confused in choosing stepper motor driver. i come across few drivers like L9110,L298N, A4988, PCA9685 DC Motor & stepper motor Driver and PCA9685 PWM & servo Driver.so, can someone please suggest me which driver is good for this kind of projects. it would be more helpful to me if i have any sample links of similar kind of projects.

pidou46
Posts: 101
Joined: Sat May 28, 2016 7:01 pm

Re: Driver for NEMA 17 stepper motor ?

Post by pidou46 » Wed Jun 26, 2019 12:07 pm

Assuming the NEMA 17 stepper motor you targeted is a bi-polar type (4 wires). In that case, I would advice a "drv8825" driver.
It's a cheap and clever to use, you need a pin to choose direction and another one to send pulses.
So the code is straightforward. You can use the PWM module to generate the pulses and a timers to start and stop the pulses.
This way, during the mouvement your ESP can do something else.
nodemcu V2 (amica)
micropython firmware Daily build 05/31/2016

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: Driver for NEMA 17 stepper motor ?

Post by OutoftheBOTS_ » Wed Jun 26, 2019 8:52 pm

I play a bit with steppers.

I find the "DRV885" you buy on ebay and aliexpress are clones and not the real Mccoy. In the Data sheet they should handle up to 2.5amps but I find if I use the cheap DRV8825 getting around the absolute max they will run at is 1.5amps before they start to miss steps due to thermal shutdown and this is with a heat sink and fan.

Nema 17 is the size of the face with mounting holes to be a standard size for mounting. It doesn't tell you the power, torque or needed amps to get this torque. I have Nema 17 here that use 1.2 amps and I have Nema 17 that use 2amps. The same Nema 17 runs really nice on a DRV8825 but the large Nema 17 won't run on it and I use a TB6600 for it instead as it will handle much higher amps :)

You will need a ramp up and ramp down on your stepper or you will skip steps. This is my class https://github.com/OutOfTheBots/5x5x5_c ... stepper.py fro controlling stepper motors on my 5x5x5 cube solving robot. You can just modify it a bit to suit your needs of only 1 stepper motor. See the 5x5x5 cube solving robot here https://www.youtube.com/watch?v=sD4bG8hPYLQ there is 3 steppers to do the turning of the cube and 3 servos to open and shut the grabs

RajaRamesh
Posts: 51
Joined: Wed May 08, 2019 10:54 am

Re: Driver for NEMA 17 stepper motor ?

Post by RajaRamesh » Thu Jun 27, 2019 9:23 am

Thank you both for sharing the details. i am going to buy below mentioned items. please let me know if i am choosing wrong once.

stepper motor:-
https://www.amazon.in/BestPriceEver-Bip ... way&sr=8-7

DRV8825:-
https://www.amazon.in/Robodo-M39-Drv882 ... 266&sr=8-3

OutoftheBOTS_
Posts: 847
Joined: Mon Nov 20, 2017 10:18 am

Re: Driver for NEMA 17 stepper motor ?

Post by OutoftheBOTS_ » Thu Jun 27, 2019 9:18 pm

You need to choose a stepper motor that will provide enough torque for the job that you will be using it for :)

The link for the stepper motor didn't provide the max amps the motor is rated for so I googled the product number in the pic and found other sellers with more info like this 1 https://www.ebay.com/itm/Minebea-17PM-H ... 4226951053 You can see in the details it has a max current of 2.0amps.

You don't have to run a stepper at max amps but anytime you reduce the amps you reduce the torque the motor puts out. All these stepper motor drivers are chopper drivers where you can set the amps that the driver will chop the current at.

In the datasheet from TI the DRV8825 should handle up to 2.5amps with a heat sink but it is my experience that all the cheap DRV8825 step sticks getting around are clones and my experience is even with a heat sink and a fan you will get a max of 1.5 amps before the DRV8825 get thermal shut down and misses a few steps then cools slightly the starts to step again then thermal shut down and misses a few steps the starts up again and steps again so becomes totally unreliable.

Also do beware the step stick is a copy of the step stick developed by pololu but most of the clones use a different resistor value for the FB pin so setting the chopping amps is different from most tutorials you will find online. The pololu step stick you set vref to half the needed amps but most of these clones you need to set vref to equal the amps. To test you will need to put a ammeter on the driver to see what the output current is :)

I would suggest using a TB6600 https://www.amazon.in/s?k=tb6600&crid=F ... b_ss_i_1_4 as it will definitely handle the amps and it is also easier to saet the amps as it has dip switches for that. The TB6600 also has a dip switch to set half amps for holding if you want and this is super handy as it halfs the amps going to the motor when it is still and not moving and this lets the motor cool when not turning :)

RajaRamesh
Posts: 51
Joined: Wed May 08, 2019 10:54 am

Re: Driver for NEMA 17 stepper motor ?

Post by RajaRamesh » Fri Jun 28, 2019 8:54 am

OutoftheBOTS_ wrote:
Thu Jun 27, 2019 9:18 pm
You need to choose a stepper motor that will provide enough torque for the job that you will be using it for :)
Hi OutoftheBOTS, i have less knowledge on stepper motors. so, which stepper motor is suitable to hold an object (weights arround 1.5kg and less) and move from one end to other end.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Driver for NEMA 17 stepper motor ?

Post by jimmo » Fri Jun 28, 2019 9:29 am

As OutOfTheBOTS_ has mentioned, motors provide torque, so to answer your question you need to reformulate it in terms of the torque that the motor must provide.

i.e. if you're verrically lifting 1.5kg (~15 N) using a rope wrapped around a 50mm diameter drum/spool, then the holding torque is 0.025 x 15 = 0.375 N.m.

Then to lift it, you need to calculate the additional torque to accelerate it at your desired rate.

But remember that torque is force times distance. So same force less distance means less torque. i.e. if you had a smaller spool. So it all depends on how everything is built.

RajaRamesh
Posts: 51
Joined: Wed May 08, 2019 10:54 am

Re: Driver for NEMA 17 stepper motor ?

Post by RajaRamesh » Fri Jun 28, 2019 9:41 am

jimmo wrote:
Fri Jun 28, 2019 9:29 am
As OutOfTheBOTS_ has mentioned, motors provide torque, so to answer your question you need to reformulate it in terms of the torque that the motor must provide.

i.e. if you're verrically lifting 1.5kg (~15 N) using a rope wrapped around a 50mm diameter drum/spool, then the holding torque is 0.025 x 15 = 0.375 N.m.

Then to lift it, you need to calculate the additional torque to accelerate it at your desired rate.

But remember that torque is force times distance. So same force less distance means less torque. i.e. if you had a smaller spool. So it all depends on how everything is built.
Hi Jimmo, my idea is to move the object horizontal from one end to other end(i.e 500 to 1000 meters or above) in this scenario how to calculate .

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: Driver for NEMA 17 stepper motor ?

Post by jimmo » Fri Jun 28, 2019 9:59 am

Then you need to calculate static and dynamic friction of your system. And then whatever acceleration you want to provide to the object.

But 1000 metres?? You've got a bunch of other practical considerations to worry about. Like 1000m of rope probably weighs more than your object!

RajaRamesh
Posts: 51
Joined: Wed May 08, 2019 10:54 am

Re: Driver for NEMA 17 stepper motor ?

Post by RajaRamesh » Fri Jun 28, 2019 12:02 pm

jimmo wrote:
Fri Jun 28, 2019 9:59 am
Then you need to calculate static and dynamic friction of your system. And then whatever acceleration you want to provide to the object.

But 1000 metres?? You've got a bunch of other practical considerations to worry about. Like 1000m of rope probably weighs more than your object!
Hi Jimmo, it will be less then 1000 meters. below is my idea to move the object forward and backward with NEMA stepper motor. Now i am confused with choosing the stepper motor and drivers.
Capture.PNG
Capture.PNG (3.84 KiB) Viewed 7954 times

Post Reply