Today, I will share how to control a servo motor using Blynk web or apps via the internet. The project controls the position of a servo motor using Blynk apps. I'm using an SG90 180-degree micro servo. Nodemcu board can drive this servo motor without an additional power supply.
Related Post:
References:
Steps:
- Prepare 3 jumpers, servo motor, and Nodemcu module.
- Connect servo motor GND (brown wire), VCC (red wire), and DATA (orange wire) pins to the GROUND, 3V/5V, and D2 (GPIO 4) of the Nodemcu.
- Connect micro USB to Nodemcu module.
- Create New Template > Type NAME "Servor Control" > Select HARDWARE "ESP8266" > Select CONNECTION TYPE "WiFi" > Done.
- Go to Datastreams Tab> New Datastream > Virtual Pin > Type NAME "SERVO" > Select PIN "V0" > Select DATA TYPE "Integer" > Set MIN 0 > Set MAX 180 > Set DEFAULT VALUE 0 > Click Create.
- Select Slider widget setting > Type TITLE "SERVO" > Select Datastream SERVO (V0) > Save. Then, save the Web Dashboard.
- Go to Info Tab > Copy FIRMWARE CONFIGURATION.
- Open the Servo Control coding project and paste the FIRMWARE CONFIGURATION. Click HERE to download the project code.
- Verify and upload the project.
- Download and Log In Blynk IoT app on Google Playstore.
- Click Add new device > Connect to Wi-Fi > Start > Continue > Connect Blynk Servo Control-57CBF.
- Click Ready > Choose your Wi-Fi network > type Wi-Fi password > Continue > Finish.
- Click Spanner symbol 🔧 > Click + > Choose Slider widget.
- Click Slider Widget > Type Title "SERVO" > Select Datastream "SERVO" > Change SHOW VALUE "ON" > Click back arrow "←".
- Lastly, exit the canvas by clicking the back arrow "←".
- To test from the website, go to the 🔍 icon at Tab > Click Servo Control 57CBF.
- Slide the slider widget to the left or right (Minimum value 0 degrees, Maximum Value 180 degrees).
The tools/components I used in this post are listed below:
Shopee:
Lazada:
Aliexpress:
Video:
If you have any suggestions, please write in the comment section. Thank you for your time 👷.
No comments:
Post a Comment