Shouldn't the GND of servo be connected to GND alongside with the other components?

Can u pls briefly define what the problem u are facing and what Do u want from servo motor to do
The servo motor has to rotates 180 when the distance is less than 50 and goes to zero when the condition is not true.
U should be aware of programming for servo motor.
Try taking tutorials for the same and learn the basic how sevo works and then u will easily able to do so
But my problem is not the programming part anymore, it is the circuit itself. I don't know what is wrong in my circuit.
As I have seen your circuit I am not sure
Kindly share Tinkercad link only a sharable link
So that I can go more briefer
Oh. The irony.
What do u mean by this
The words you are struggling with are "you" and "please"
OO I see
Post Edited ![]()
Yes, but in the diagram you have the servo power (I marked it red) and ground (marked black) connected together which is clearly not correct.

I know it, but isn't the servo meant to be connect to the GND?
Yes, but only the ground of the servo goes to the common ground of all the other parts. The servo power needs to go to 5V, as shown in the diagram you posted from the tutorial***. BUT the tutorial is wrong to show the servo getting its 5V from the Arduino, it should get it from a separate 5V supply.
***edit... which you seem to have spirited away meantime?
Except unless I'm missing it, the sensor and the leds have their grounds joined up together but I don't see them then being joined to the Ardunio/servo ground which I added below:

No good! You need training on basic electronics!!
Thank you so much for your loads of replies to my questions! You indeed has a lot of pacience!
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.