Can i control 1 nema 17 stepper motor and 2 dc motors using the arduino?

Hello, I'm new to Arduino and using it for a school project. I wonder if I can control a Nema 17 stepper motor and 2 DC motors with only 1 Arduino Uno. I've done a little research. Will an L293D driver work for this task, and how should I connect them, if it is even possible to do so? The project will be due in 2 weeks, so I need answers ASAP if I should even continue.

The ancient L293D will inefficiently control two very small toy motors.

Use a suitable current limiting stepper driver to control the stepper motor.

Separate power supplies are required for the Arduino, DC motors and the stepper motor.

Most likely, the two weeks you have to complete your assignment is not enough time to acquire all the equipment you will need, then get much done.

3 Likes

Now that's rude. If you pay good, then start talk ASAP

1 Like

Yes!

I am not taking the course but I will help if I can. We need some effort from you. What course is it and when was it assigned.
That assignment sounds like it could be an interesting project that was intended to teach you something. It could be a lot of fun! However, please keep in mind that we are not a free design or code-writing service. We’re more than happy to help with your design or code, but we need you to make an initial attempt. Please design and write your code, then post it along with an explanation of what’s not working properly.
1. Show Your Work First: Before asking for assistance, make an attempt to design or write the code yourself. Share your work along with details about what isn’t working. Only you know what you want!
2. Provide Clear Documentation: Since we can’t see your project, share an annotated schematic (best) or a clear drawing of your setup. Pictures are welcome, but avoid using Fritzing diagrams as they are wiring diagrams, not schematics, and are not ideal for troubleshooting.
3. Include Technical Details: If there is specific hardware involved, include links to technical information. There are often many versions of similar components, so precise details are essential. What version of sensors and a processor are we looking at.
4. Reference Resources: For additional help, check out useful links and tutorials: Useful Links on Arduino Forum. Post links to your sensors and the processors technical information.
5. Obtain a copy: of the Arduino Cookbook and complete several of the projects. Many of them will help you achieve parts of your goals.
6. Course Electronics For Beginners (eBook)
7. Electronics For Beginners (eBook)
8. Arduino Step-by-step Projects Course | Build 25 Projects

1 Like

Hello thank you for answering, Yes i have experimented with the small stepper motor and driver within the kit i bought it says on the box it is an Arduino R3 it comes with a bread board and jumper wires , i was able to watch tutorials on how to connect it, but i have only been able to only run 1 motor for now, it is a group project given out last week the parts only arrived yesterday so i have only started today, i dont know what materials i will need to connect the 3 motors and make them run im really new to electronics so i dont know much about where to connect what, im in senior high-school and it is our research subject you may be asking why we chose to make something so complicated for beginners, honestly i dont know why, i was only given this task, but what i need help with the most is what driver do i use to control the motors/ how do i connect them all to an arduino and how do i control them individually with code? the motors im currently using is a nema 17 stepper motor and 2 12v dc motors ill try to upload pictures as soon i get home.

Here are some links that may help:

https://docs.arduino.cc/learn/electronics/stepper-motors/

1 Like

Which stepper motor? NEMA 17 only describes the mounting dimensions, nothing about the electrical parameters.

1 Like

Depends on the motors you have, their voltage and current ratings.

1 Like


this is the one I'm using, these are the specifications on the website I bought it from
Technical Specification:
Form Factor Nema 17
Step Angle 1.8 degrees
Motor Length 48 mm
Rated Voltage 3.6 V
Rated Current 1.2 A
Phase Resistance 3 Ω
Phase Inductance 5 mH
Holding Torque 4500 g-cm
No. of Lead Wires 4
Rotor Interia 68 g-cm²
Detent Torque 280 g-cm
Motor Weight 0.36 kg

Thank you so much for the help!! how about my dc motors do I connect them to the Arduino itself?

No. You can use the L293d for the 2 motors if they are small hobby type motors.
However you will need another driver for the stepper.

Here are some guidelines/rules that should help.
Gil's Crispy Critter Rules for Processor Hardware:

  1. Rule #1: An Arduino is NOT a Power Supply!
  2. Rule #2: Never connect anything inductive (motors, speakers) directly to an Arduino!
  3. Rule #3: Avoid connecting or disconnecting wires while the power is on.
  4. Rule #4: Do not apply power to any pin unless you are certain of what you're doing.
  5. Rule #5: Do not exceed the maximum voltage ratings.
  6. Rule #6: Many Arduinos cannot power transmitters directly.
  7. Rule #7: Before powering your project, take a break and double-check the wiring.

LaryD’s Corollaries:

  1. Coro #1: When starting out, add a 220Ω resistor in series with both input and output pins to protect against shorts.
  2. Coro #2: Invest in a Digital Multi-Meter (DMM) to measure voltages, currents, and resistance.

Note: Violating these rules can turn your Arduinos into crispy critters. For optimal performance, keep your wires under 25 cm (10 inches).

Additional Tips:

  • The L293 motor driver, though common, is inefficient as it can lose around 3V as heat when driving both legs of a motor. Consider using a motor driver with MOSFET outputs to reduce heat loss and conserve battery power.
  • For more on powering Arduino boards, explore this guide: Powering Alternatives for Arduino Boards.
1 Like

Why not ask the instructor? I wouldn't do it just like you did here, because you will probably be removed from the class, but hey, this is the internet, and nobody is watching over you.

Still need help?
...

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.