|
ULN2003ANTexas Instruments
|
x 2 | |
|
Arduino Nano V3.0 ATMEGA328P |
x 1 |
|
arduino IDEArduino
|
|
|
Soldering Iron Kit |
Multiple Stepper Motor Controller Board
I will show you how to turn such a complex Arduino multi-step motor circuit into a professional prototype in this video. You can easily turn your complex breadboard circuit into a great PCB. First, let's look at the printed circuit board part, and then we will see how to control the dual-step motor with three different Arduino codes.
The design of a printed circuit board starts with creating and drawing a schematic. The components required in the circuit are added and the connection points are wired. Once the schematic is complete, it is converted to a PCB and the printed circuit board design process begins, followed by the generation of the design file. This design file is uploaded to the homepage of PCBWay, a manufacturer of high-quality printed circuit boards, and the PCB order is easily completed. My projects are open source and you can use them as you like.
Now let's take a closer look at the design. The board is based on two stepper motor drivers and a plug-in Arduino Nano. Analog and power pins, servo motor input, and digital pins in the circuit are included to make the board more useful. There is also a jumper pin that disconnects the Arduino Nano from the external power supply. In this section, I will place the required components on the board and start the soldering process. I chose easy-to-find components, I added the bill of materials list to the project page.
Soldering is complete, let's attach the Arduino board and stepper motors to the circuit, then open the shared source code. In the first code, we’ll use the Arduino Stepper Library, which comes with the Arduino IDE. Here is a simple sketch that turns the motor slowly in one direction, then rapidly in the opposite direction.
The sketch starts by including the built-in stepper library. Next, a constant is defined, which contains the number of ‘steps’ the motor takes to complete one revolution. The motor has two different working modes, full-step mode and half-step mode. For now, we will use the full-step mode.
Enter the step sequence of the stepper motor. This also defines the pins to which the stepper motor is connected. Make sure you enter the step sequence correctly; otherwise the motor will not run properly.
In the loop function, we use the Set Speed function to specify the speed at which the stepper motor should move and the Step function to specify how many steps to take.
Passing a negative number to the Step function causes the motor to spin in the opposite direction.
The first code snippet causes the motor to spin very slowly clockwise, while the second causes it to spin very quickly counter-clockwise.
After uploading the code, we feed the board with external five volt power. Make sure you connect the positive and negative pole correctly, for now the Arduino is powered via USB and the board works and executes the code without any problem.
For our next code, we will use an advanced stepper motor library the Accel Stepper library. It outperforms the standard Arduino Stepper library. It supports acceleration and deceleration. It supports half-step driving and multiple steppers at once, with independent concurrent stepping on each stepper. This library is not included with the Arduino Editor, so you’ll need to install it first.
This is a simple sketch that accelerates the stepper motor in one direction and then decelerates to come to rest. After one revolution, the motor reverses its spinning direction and repeats the process.
We will be driving a four-wire stepper motor in full-step mode, so we set the Motor Interface Type constant to four. If you want to run the motor in half-step mode, set the constant to eight. Next, we enter the step sequence of the stepper motor.
In the setup function, the maximum permitted speed of the motor is set to one thousand (the motor will accelerate up to this speed when we run it). The acceleration/deceleration rate is then set to add acceleration and deceleration to the stepper motor’s movements. The constant speed is set to two hundred.
In the loop function, an if statement is used to determine how far the motor needs to travel before reaching the target position. When the Distance To Go reaches zero, the motor is rotated in the opposite direction by setting the Move To position to negative of its current position.
At the bottom of the loop, you’ll notice that the Run function is called. This is the most important function, as the stepper will not move if it is not executed.
The code containing the Accel Stepper library works fine, take some time and observe how the stepper motors move and then let's take a look at the next code.
Finally, let's plug in the power jumper to feed the Arduino from external power, so both the motors and the Arduino will run on external five volts. As you can see, our board is working smoothly.
We have come to the end of another project, I hope this project was helpful for you. Don't forget to like the project.
Multiple Stepper Motor Controller Board
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(1)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by MERT KILIC
- Build a simple 3D printed CNC plotter machine Hi friends, do you remember this Mini CNC Plotter machine that uses hobby stepper motors and a few 3...
- Circuit Activity Board - Educational Electronics Circuit Activity Board – A Hands-On Project to Learn Basic ElectronicsIn this project, we're going t...
- Build a Simple 3D Wall Lighting Hi friends, this project shows how to make and control 3D hexagonal LED lighting panels. The project...
- Robot Sumo Board Robot-sumo, or pepe-sumo, is a sport in which two robots attempt to push each other out of a circle ...
- ESP32 Mecanum Wheels Robot and Bluetooth Gamepad Controller In this project we will see how to make an ESP32 Mecanum Wheels Robot which is capable of moving in ...
- DIY Motorized WiFi Roller Blind - ESP8266 & Blynk In this project we will see how to control a roller blind via a smartphone application. The reason w...
- Pet Feeder Controlled Via WiFi - ESP8266 How It Works?As you can see, a 3D design was used for the pet feeder. ESP8266-based Wemos D1 Mini bo...
- ESP8266 Two Wheel Robot (NodeMCU and Stepper Motor) Generally, robot cars are built on a chassis with 2 DC motor wheels and a bovine wheel. While surfin...
- 3D Printed Rotating Table Board with Arduino Nano and 28BYJ-48 Stepper Motor This project shows how to make a 3D printed Rotating Table using Arduino and a hobby stepper motor. ...
- Hand Gesture Controller for Robotic Hand Gesture Controller for RoboticThe hand gesture controller makes it possible to control applicat...
- How To Make DIY Remote Control Hoverboat at Home In this video, I showed you how to make your own hoverboat from materials available at home and chea...
- How to Make DIY Arduino Gesture Control Robot at Home Parts Required for Receiver (Tank):1) Robot Tank Chassis - https://bit.ly/3j8y2Q52) Arduino Nano V3 ...
- DIY Circuit Activty Board with Paperclips | MAKER | STEM You can be creative and design your own circuit and add different sensors (other LEDs...). The idea ...
- ATtiny85 Wearable Activity Tracking Watch How to make the wearable activity tracking watch? This is a wearable gadget designed to vibrate when...
- Face With Animatronic Eyes, Motion Detection and Voice Are you ready to create something both eerie and captivating? This project combines 3D printing, ser...
- Build a simple 3D Arduino Mini CNC Plotter Hi friends, we will see how to make a simple and awesome mini CNC plotter machine in this project. I...
- Build a simple 3D Sphere Drawing Robot (SphereBot - EggBot - EggDuino) Hi friends in this video we will see how to make a simple and awesome sphere drawing robot. Actually...
- Multiple Stepper Motor Controller Board I will show you how to turn such a complex Arduino multi-step motor circuit into a professional prot...
-
-
-
-
-
-
3D printed Enclosure Backplate for Riden RD60xx power supplies
153 1 1 -
-