Why use a motor controller?

Hello everyone. First post, beginner to Arduino here.

So I have a Nema 17, an L298n driver and the arduino.

I’ve seen videos/tutorials of people using a motor controller with the Nema 17 and sometimes they don’t. Why is this?

What I don’t understand is why controllers are necessary when the Arduino can control the motor.

Also, I’ve seen videos of people using a bigger Nema with a controller. Is there some sort of limit where the big motors require a motor controller and others don’t?

Thanks for the help

shazhazel:
What I don’t understand is why controllers are necessary when the Arduino can control the motor.

Unless the motor is very very small, Arduino is not designed as a motor driver. It sends signals to other devices with power handling capability, filtering, etc., to the heavy lifting. Part of the reason is motors, and any inductive load, are quite different beasts than LEDs or inputs to other electronic components.

Thanks for the quick reply buddy. I’m using the l298 as the motor driver.. or have I got something wrong?

The l298 is old and inefficient.

Do yourself a favour and avoid that and the LN2003 .
You will be glad you did.

So which driver do you recommend? Or would a motor controller replace the need for a driver?

Pololu has great offerings.

Thank you! What is so bad about the l298 that makes some others better?

You can compare things like efficiency, circuit protection, power capabilities, current limiting, temperature shutdown, and built in shut down circuitry.

This is like entering a new world.. I had no idea drivers do all that!

So, would a controller remove the need for a driver?

A NEMA17 stepper motor these days is usually low impedance (0.3 to 5 ohms or thereabouts),
and requires current drive. This means using a DRV8825, A4988 or other chopper-style
constant current driver (this basically acts as a dynamic buck-converter with current output).

If you have a high impedance stepper of about 20 to 50 ohms, you may be able to drive it
from a constant-voltage motor driver like an L298, but you will get very poor performance,
perhaps 120rpm max.

Stepper motors are inherently current driven motors. To move fast its required that
the supply voltage is much higher than the winding resistance might suggest, as the winding
inductance is totally dominant.

For instance a 1.7A 1.5ohm stepper is normally driven constant current, from 12V, 24V, 36V or
even higher. If you tried to drive it using an L298 from 12V the L298 and the motor would
rapidly cook and fail as there's no current control...

So I have a Nema 17

This is ALL NEMA 17 tells us:
nema-17-stepper-motors-dimension.jpg
What is your motor's voltage rating, current rating, winding resistance, number of leads, step angle, etc. ?

nema-17-stepper-motors-dimension.jpg

As I’m new to electronics, motors and the Arduino in general, I was given these specs. No idea what they mean though

Step accuracy: ±5%(synchronizing, no-load)
Temperature rise: 80℃Max
Ambient temperature: -10℃—+50℃
Insulation resistance: 100MΩmin.500VDC
Voltage resistance: 500VAC for one minute
Radial runout: 0.06Max.(450g-load)
Axial runout: 0.08Max.(450g-load)

Product Model 42A02C (42A02C-Dupont, 3)
Step Angle 1.8°±5% (full step, no-load)
Rated Current 1.5A
Phase 2
Number of Lead 4
Holding Torque 0.42Nm
Phase Resistance 2.4Ohm ± 10%
Phase Inductance 3.7mH ± 20%
Rotor Inertia 57.3g.cm²
Motor Size 42x42x38mm
Shaft Diameter 4.5mm

shazhazel:
Rated Current 1.5A

Use a DRV8825 stepper motor driver. They are widely available. The Pololu DRV8825 web page has a huge amount of useful information.

...R
Stepper Motor Basics
Simple Stepper Code

Got you. Thanks!

I’m making an exoskeleton for disabled/paralysed people. Right now, I’m starting with a small scale to test. for the final I’ll need a motor that can withstand around 80kg

Edit: I think the nema will be okay for testing purposes for a small scale (what do you all think?)

And if everything works fine, I’ll grab the DRV8825 stepper motor driver for the actual exoskeleton. Are there any motors you guys would recommend that can withstand up to 100kg?

Presumably the 80 and 100kg you mention is the mass of the user? It's not about the mass as such, it's about how it's applied and what the torques are. Someone once said something about moving the planets given a fulcrum and a long enough stick.

You need to design the skeleton. That means sketch it out as you think it might be, then analyse the movements and their associated forces and lever arms to arrive at the forces and torques applied to the joints and members of the structure. Then you check the vendors' catalogs for motors that provide enough torque at whatever speeds are required. Then you hope the motor fits :wink: and if not, it's literally back to the drawing board.

Motors don't "withstand up to x kg", they provide torque of y Nm.

That’s right, it’s the mass. Say a max of 100kg.

My dad is a mechanical design engineer, he’s helping me design it all.

Also, me saying “withstand 100kg” is just me explain it simply, is there a formula that I can use to figure out the torque required?

My background is actually in computer games development and artificial intelligence, I program in C++/C#/Java, I’m very knowledgable in 3D designing and i work as a Model (totally opposite fields haha)

shazhazel:
My dad is a mechanical design engineer, he’s helping me design it all.

Also, me saying “withstand 100kg” is just me explain it simply, is there a formula that I can use to figure out the torque required?

In engineering we try to describe things correctly, not simply if that means wrongly too.

As to the formula, of course there is (or are, plural) but it's not just about knowing a formula, it's about understanding first principles and applying them. If your Dad's already helping you with the design, ask him to explain those principles to you. It's exactly this kind of work, after all, that folk go to uni for and become engineers. I think we covered this in first year applied maths, and I'm pretty sure calculating moments and stuff was even done at high school, but that was long ago.

Oh, my dad (and engineers in general) is always extremely specific which is why everyone finds engineers to be very annoying and OCD

Spent the day going through ohms law and how to figure out torque. Came to the conclusion that I need about 20. Could someone confirm this?

Force = mass x acceleration
Torque = force x distance

981 = 100kg x 9.81
19.62 = 981 x 0.02 (2cm from motor to mass)

OCD? I am an engineer, and I know many engineers, and while I do appreciate things being technically correct, being OCD is not something I've observed to be demonstrated by us in general.

shazhazel:
everyone finds engineers to be very annoying and OCD

That's one way to get further help from engineers.

Yes, a mass of 100kg on an arm of 2cm is a moment of 20Nm. Whether or not that's the right calculation to be doing in the first place is impossible to say.