|
arduino IDEArduino
|
Wi-Fi Controlled Stepper Motor With an ESP Microcontroller
Step 1: Get All the Required Stuff
For this project, you will need:
- An ESP8266 microcontroller
- A Stepper Motor(Unipolar or bipolar)
- A suitable stepper motor driver
- A breadboard
- Some breadboard wires(Or male jumpers)
- A 5-volt DC power source
- 2A 128x64 I2C OLED display(Optional)
A motor driver like ULN2003 can be used for unipolar stepper motors, while a driver like L298N can be used for both unipolar and bipolar stepper motors.
2The OLED display is an optional device and can be omitted if not available. The motor control will not be affected.
Step 2: Install the ESP Board in the Arduino IDE
- Start by going to File> Preferences or by pressing Ctrl+Comma.
- Copy this link: https://arduino.esp8266.com/stable/package_esp826...
- Paste the link in the 'Additional Boards Manager URLs.
- Then go to Tools> Boards> Boards Manager and type in 'ESP' in the search box.
- Install the latest release of the ESP boards.
Step 3: Install the OLED Library
Start with opening the library manager in the Arduino IDE. You can either go to Sketch> Include library> Manage libraries or press Ctrl+Shift+I. Search for SSD1306 as shown in the picture and install the latest version of the library.
You can skip this step if you are not using the OLED display in your project.
Step 4: Program the ESP Microcontroller
Depending on whether you are using an OLED display or not, you can choose which code to upload on the ESP microcontroller. You can get the Arduino codes from here.
Make sure to put the SSID(name) and password of your Wi-Fi router in the code.
Step 5: Plug on the ESP Microcontroller on the Breadboard
Step 6: Connect the OLED Display to the Microcontroller
You can skip this step if you are not using the OLED display in your setup.
Wiring connections from ESP to OLED display:
3v3 -> VCC
GND -> GND
D1 -> SCL
D2 -> SDA
Step 7: Connect the Stepper Motor to the ESP Microcontroller
Connect the stepper motor to the output pins/terminals of the driver module.
Here is how to wire up the stepper motor driver to the ESP microcontroller:
D5 -> IN1
D6 ->IN2
D7 ->IN3
D8 ->IN4
Some stepper motors, particularly unipolar ones have a different stepping sequence. So you might need to change the sequence of the input wire connections to the driver board.
Step 8: Power Up the Setup
If you have the OLED display connected to the ESP microcontroller, you can power it from any 5-volt power source. The display will show the IP address of the ESP microcontroller after it gets connected to the Wi-Fi router.
If you don't have the OLED display connected to the ESP microcontroller, then you can connect the microcontroller to your computer and open the serial monitor in the Arduino IDE, the IP address of the ESP microcontroller will be displayed after it gets connected to the Wi-Fi router.
Once you have obtained the IP address, type it in the address bar of the browser on a device that is connected to the same Wi-Fi router and you should be able to see a web page like in the above picture.
Step 9: Test the Controls
On moving the slider on the browser, the motor should move and follow the direction of the slider as shown in the video.
If the motor just vibrates in place, change the sequence of wires connected to the input pins of the motor driver.
Step 10: Share Your Creation and Do More!
If you have got your setup working, why not share a picture or two of your creation? I would love to see yours and it will inspire others to make this project. Also, try to take this project further by adding more features, perhaps a different type of screen, 2 stepper motors? There is a lot that can be done!
Wi-Fi Controlled Stepper Motor With an ESP Microcontroller
- Comments(1)
- Likes(3)
- Yashcher Yashcher Jan 21,2024
- Engineer May 13,2022
- ElectroMaker Aug 25,2021
- 2 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
-
10design
-
10usability
-
9creativity
-
10content
-
10design
-
10usability
-
10creativity
-
10content
More by KushagraK7
- Raspberry Pi Pico RC Vehicle SuppliesA Raspberry Pi Pico(Almost any microcontroller can be used here, but the Pico offers great f...
- Stepper Motor Controlled Stepper Motor Without Microcontroller! Step 1: Watch the VideoWatch the video to get a full understanding of the project and learn how to t...
- Automated Model Railroad Layout Running Two Trains I made an Automated Model Train Layout with Passing Siding a while back. Upon request from a fellow ...
- Program the Raspberry Pi Pico With the Arduino IDE The Raspberry Pi Pico is a recently launched product in the family of microcontrollers and its load ...
- Reuse an Old Laptop's Touchpad to Control a Computer! PS/2 laptop touchpads are among the coolest user interface devices to use with a microcontroller. Th...
- Automated Model Railroad Layout With Reverse Loops In one of my previous projects, I showed how to make a Simple Automated Point to Point Model Railroa...
- Use a Stepper Motor As a Rotary Encoder Rotary encoders are great for use in microcontroller projects as an input device but their performan...
- Keyboard Controlled Model Train(PS/2 Interface) Using Arduino microcontrollers, there are a lot of ways of controlling model railway layouts. A keyb...
- Stepper Motor Speed and Direction Control Without a Microcontroller In one of my previous projects, I showed you how to control a stepper motor's speed using a 555 time...
- Smartphone Controlled 4X4 Robot With ESP8266 SuppliesFor this project, you will need:An ESP8266 microcontroller(Node MCU)A dual H-bridge motor dr...
- Touchpad Controlled Digital Servo Motor Here is a quick and simple project where we control a digital servo motor with the slide of our fing...
- Smartphone Controlled Model Railroad With an ESP8266 IntroA while back, I made a project where a stepper motor's position is controlled using a smartphon...
- Simple USB Volume Controller with Arduino This project uses a rotary encoder connected to an Arduino Leonardo to control the audio volume of a...
- Motor Speed and Direction Control with a Web-Server using an ESP01 Supplies:For this project, you will need:An ESP01 microcontroller(You can use any ESP8266-based micr...
- Wi-Fi Controlled Stepper Motor With an ESP Microcontroller Step 1: Get All the Required StuffFor this project, you will need:An ESP8266 microcontrollerA Steppe...
- Simple Automated Model Railroad Loop With Yard Siding Video:Supplies: For this project, you will require:An Arduino microcontroller board compatible with ...
- Laptop Touchpad Controlled Model Railroad Supplies:For this project, you will require:An Arduino microcontroller compatible with Adafruit Moto...
- Control a Stepper Motor with a Slide of Your Finger Supplies:An Arduino microcontroller boardA PS/2 touchpad from a laptop(Try to get one with a Synapti...
-
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
124 0 0 -
DIY Laser Power Meter with Arduino
173 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
162 0 2 -