Introduction: SERVO MOTOR CONTROL USING WIFI
In this instructable , let us learn how to control movement of a servo motor through WiFi using Node MCU and Blynk App.
Step 1: Components Required
- Node MCU
- SG 90 Micro Servo Motor
- Male-Female Jumper Wires
- 5v power supply (9v Battery will be good)
- Bread Board
Step 2: Connections
- Use a 9v Battery in the Place of 5v mentioned in the circuit diagram.
- Connect the Signal Pin of the servo to the D8 PIN of the Node MCU.
- Connect the GND of the Servo Motor, Battery and the Node MCU together.
SERVO MOTOR PIN CONFIGURATION
- SIGNAL -- ORANGE pin
- VCC / +ve terminal -- RED pin
- GND / -ve terminal -- BROWN pin
Step 3: Code
Upload the Following Code in your Node MCU.
Before that, if you don't have NODE MCU and Blynk Libraries.
Follow these steps to add them first.
Click the links separately ->
https://github.com/blynkkk/blynk-library/releases/... For Blynk
zip files will be downloaded.
(For the Node MCU click on Clone or download button and download zip file)
Step 2: open Sketch ->Libraries ->Add zip library -> a new window will popup
Step 3:search for the downloaded libraries and click open. The library will be added.
Step 4: Blynk App
Download Blynk App from Playstore
- Login with Facebook/Gmail
- Click create new project
- Type a project name and Select node MCU board
- Author token will be sent to your Gmail.
- Click on the + icon in the new window and Select Slider button
- Click on the Slider button , Set pin as V3 (Virtual pin)
- Click on the back button and your Blynk App will be ready.
- Switch ON your Mobile Hot spot.
- Keep the Data (Internet) ON in your mobile.
- Click on the Play button on the Project widow
- Now, Click on the Board icon on the top.
- Your Node MCU will be connected to your Phone.
Step 5: It Works!
After the Node MCU is connected to the Blynk App,
Slide the Slider button and release it to move the servo motor.
Refer to my previous INSTRUCTABLES to know more about Node MCU.