Hi all. New to the forum and I apologize ahead of time if I've posted this in the wrong section.
I am trying to have my servo perform a sweep. I'm using the sweep example code that is 100% unedited, my board is a genuine uno R3 and I have the servo (Hobby Fans HF-2225MG) powered by a benchtop power supply at 7 volts.
Instead of my servo sweeping, it justs moves to random positions. Tried using a different servo, same model and same results. Also tried running the same sketch on a micro servo (S90..I think) and it works perfectly fine.
Are there any issues trying to run a digital servo or am I missing something? This is the servo I'm using.
Is your 7V supply ground connected to Arduino GND, or is there only one wire to the servo from the Arduino? That's the most probable cause for what you're describing. If the connection is there, then it's also possible one of the two wires is flaky.
wire the power to the servo, both + and - . ADD a wire from Arduino GND to Servo GND.
That connection 'references' the pulse going from the Arduino to the Servo, otherwise, the servo just sees glitches.
This is all GREAT info!! I tried searching for posts from people experiencing the same problem but I was running into problems searching. I was using my phone to search through the forums and I found that the navigation of the forums via the mobile version of the forums wasn’t very intuitive (for me anyways) and anytime I thought I was at the correct location for searching, all I would get back for search results was “no results found”. It obviously didn’t help that this was my first time visiting the forums and I was lost / unfamiliar. Using the PC version is better, but is still different from what I’m used to (from decades ago lol) and took a while to get familiar.
As far as the circuiting. I know that electrical circuits need to be complete to work. Totally familiar with ohms law and have built a handful of circuits with LED’s and resistors with no problems and that was when the ground went back to the board. I’ve also operated the micro servos with no issue, again having the ground go back to the board. This was the first time I was using an external power supply for the larger servo and thought the ground from the power supply was sufficient and completed the circuit. I didn’t know that the signal ALSO needed a ground or, a complete circuit. I just figured that a data signal was simply a one-way pulse communicating requirements to the servo motor. After reading your post and seeing the diagrams it makes total sense. A data signal is still a circuit and needs the return to ground….very valuable info!!
Thanks again for the help and the patience! Invaluable!!