NodeMCU esp8266 ver 0.1 and servo sg90

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?

P.S. im not using a breadboard.

No, that's wrong..
give this a good read..

Servo Motor Basics with Arduino..

good luck.. ~q

1 Like

So, basically i should power the servo using batteries or other power sources like that ?

Yes, the board is not a power supply..
While it does generate a small excess, servos/motors tend to be power hungry..

happy coding.. ~q

1 Like

Okay, thanks a lot for the advice!!

You're very welcome..
Good luck with the project..
If you get stuck, we're here..

have fun.. ~q

1 Like

Hi,

Did you manage to oved the micro servo sg90?
What external power did you used?

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! was wondering if u got it moving and what did u do? power source? code?

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!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.