Hi everyone, i'm a creating a project using nodeMCU esp8266 0.1 to control a servo motor (sg90). And i'm trying to figure out the proper wiring in order a achieve a smooth 24/7 usage. Online i've seen a huge variety of wiring methods and i'm kinda lost. What i have right now works, but i'm a little bit cautious because i lack knoledge on the matter. So here is what i did. Because the sg90 needs around 4.8-6 V if im not mistaken i used and arduino uno as a power supply for the servo, other than that the signal pin of the servo is connected to the nodeMCU (I haven't grounded the nodeMCU at all) and both the nodeMCU and the arduino are connected to my computer via USB. Is that stable for all day usage ? Should i not use the arduino and just power the servo with the 3V3 of the nodeMCU ? Should i ground the nodeMCU?
Hi, not yet unfortunetly. I got rid of the arduino entirely and i power the servo throught the nodeMCU...it works fine, but its a temporary setup until i get a battery box!!
Hi, I just took out the Uno from the circuit, i plugged in the servo straight to the esp ( GND to GND, Vcc to 3.3V and the signal pin to one of the digital pins of the esp, in my case that was D1). The circuit was working completely fine all day, every day with the esp connected to my pc via usb, so i didn't need to purchase a battery of some shorts. In terms of code, i programmed the esp using Arduino IDE, i downloaded esp's drivers, i chose esp generic module as the board of choice, i used the wifi library for internet connection and the servo library for controlling the servo. Keep in mind you have to declare the specific esp pin that you connected the servo's digital pin. If you have more specific code questions let me know!