Servo not moving

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Servo not moving

Post by insert_generic_username_here »

I recently bought a TowerPro SG-5010 servo and when I send it a signal, it doesn't move and it makes a faint clicking/ticking noise. I'm using a 5v power source and a Trinket m0 for the signal, and I had no problem controlling a micro servo I bought with exactly the same setup. I'm pretty new to microcontrollers so it's possible I'm missing something obvious, but as far as I can tell the motor is defective. Anyone have any ideas?

Thanks

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

Hobby servos are generally 5V, so using with 3V can be hit or miss. Do you have a 5V device you could test with? Like an Arduino UNO?

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

adafruit_support_carter wrote:Hobby servos are generally 5V, so using with 3V can be hit or miss. Do you have a 5V device you could test with? Like an Arduino UNO?
I'm only using 3V for the signal, the power is connected to a separate 5V source (and the ground of the Trinket is connected to the ground of the 5v source). That should be okay, shouldn't it?

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

That should be okay, shouldn't it?
That's the hit or miss part. With the control signal level only being 3V, the servo might not be getting the info it needs.

There's a chance this could be a software or other hardware issue. Post a photo of your setup showing all connections and the full code your are using.

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

adafruit_support_carter wrote:
Post a photo of your setup showing all connections and the full code your are using.
Here's a photo (obviously, the Pi and battery pack are actually connected when in use): http://imgur.com/a/X0pl9
The code is just wiringpi typed into the Pi's bash:

Code: Select all

gpio -g mode 18 pwm
gpio pwm-ms
gpio pwmc 192
gpio pwmr 2000
gpio -g pwm 18 100 (or whatever)
[EDIT: inlining image for reference]
cu47LTh.jpg
cu47LTh.jpg (972.45 KiB) Viewed 1248 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

I thought you were working with a Trinket? Did you get the servo to work on the Trinket before moving to the Pi? Or are you just trying the Pi as a second option?

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

Sorry I forgot to mention that part, but I tried a RPi and got the exact same result--the micro servo worked fine but the larger one just makes a faint ticking noise. I don't have a 5v board on hand but I have an Arduino Nano coming in the mail tomorrow, so I'll give that a try and report back. There's nothing obviously wrong with my current setup, though, is there?

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

Nothing obvious, no. Let's see what you get with the Arduino Nano.

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

Okay, so I tried it out with a 5v Arduino Nano, and I got the exact same results: small servo works fine, big servo doesn't move.

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

OK. This should be a good test setup. Still not sure why the one servo isn't working though. Post a photo of your setup showing all connections.

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

Here: https://imgur.com/a/TldbM. I'm pretty sure the setup is okay because, like I said, my other servo works fine.

[EDIT: inlining image for reference]
9038GcV.jpg
9038GcV.jpg (744.93 KiB) Viewed 1247 times

User avatar
adafruit_support_carter
 
Posts: 29168
Joined: Tue Nov 29, 2016 2:45 pm

Re: Servo not moving

Post by adafruit_support_carter »

OK, now that we are in Arduino land, what sketch are you using to run the servo?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo not moving

Post by adafruit_support_bill »

Also, if you un-plug the servo, are you able to turn it by hand (there will be some resistance, but you should be able to turn it by hand)

User avatar
insert_generic_username_here
 
Posts: 8
Joined: Mon Oct 16, 2017 5:05 pm

Re: Servo not moving

Post by insert_generic_username_here »

Yeah, I can turn the motor by hand.

I tried both of the example servo sketches that come in the IDE.

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: Servo not moving

Post by adafruit_support_bill »

Sounds like probably a bad connection or defective board in the servo. If you contact [email protected] with a link to this thread we can send a replacement.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”