Introduction: Stepper Motor With ESP32 Board
Stepper motors are DC motors that move in discrete steps. They have multiple coils that are organized in groups called "phases". By energizing each phase in sequence, the motor will rotate, one step at a time.
Stepper motors are very useful in making projects which require precise positioning such as 3D printers. Due to few limitations we have one more type of motor called servo motors.
Limitations are : -
1. draw power even when not doing any work at all.
2. less torque at high speed.
3. No feedback mechanism like servo motor.
Moreover, Stepper motors require Motor drivers to connect with processing boards but we can connect servo motors directly to Arduino or esp32 board.
Step 1: Components Required
1. Stepper Motor - https://amzn.to/2Hqqhab
2. Motor driver - https://amzn.to/3mLdL5i
3. ESP32 - https://amzn.to/3kEPnQN
4. Jumper wires - https://amzn.to/3iqdBxM
5. Breadboard(optional) - https://amzn.to/3kdp4Rt
6. Arduino IDE software
Setting up your Arduino IDE before uploading code in ESP32 is very important : - https://www.instructables.com/id/Setting-Up-Arduino-IDE-for-ESP32-Board/
Step 2: Circuit Connections for Stepper Motor and ESP 32.
Stepper motor works on 5v volts. therefore connect 5V of motor driver to ESP 32 Vin.
Motor driver --> ESP32 board
in1Pin --> 25
in2Pin --> 33
in3Pin --> 32
in4Pin --> 35
Vcc --> VIN
GND --> GND
Step 3: How to Upload Code in ESP 32 Board
1. Click on upload.
2. If no error. At the bottom of Arduino IDE, when we get message Connecting ...,...,
3. Press Boot button on ESP 32 board till you get the message done uploading.
4. After you code is uploaded successfully. Press enable button to restart or start code uploaded on ESP32 board.