Servo not spinning clockwise?

SOLVED

Hi, i’ve just started using arduino and for some reason my servos won’t run clockwiseI have two of these servos: http://www.robotshop.com/ca/en/hitec-hs422-servo-motor.html

I have power and ground connected to a 6v supply (4 AA batteries), and the control connected to pin 9 (which is specified in the ‘Sweep’ demo code) but the servo only rotates counter-clockwise.

i threw a Serial.println(pos); into the for() loop and it looks exactly as you would expect: 1 to 180 then down back to 1. This isn’t being reflected in the servos, however. Did i somehow buy a one direction servo? How can i fix this?

Thanks.

Is the servo / power ground connected to the Arduino ground? (Although lack of that wouldn’t seem to explain the uni-directional operation…)

servo power.png

JimboZA:
Is the servo / power ground connected to the Arduino ground? (Although lack of that wouldn’t seem to explain the uni-directional operation…)

Do you mean the control pin? I’m using an external power source so I don’t know if that would be necessary. I should mention I’m not powering the arduino with the batteries, just the servo, as the arduino is being powered by the usb-b cable.

so I don't know if that would be necessary

I added a pic to previous post: the servo / power -ve MUST be connected to the Arduino ground, otherwise the Arduino signal has no 0 to measure against. Bit like one hand clapping.....

JimboZA:

so I don't know if that would be necessary

I added a pic to previous post: the servo / power -ve MUST be conected to the Arduino ground, otherwise the Arduino signal has no 0 to measure against. Bit like one hand clapping.....

Sorry, I feel a bit daft. Just hooked up the servo power to the arduino itself, plugged into the ground and set pin 13 to HIGH and everything is working smoothly. Thanks for the help!

You're welcome.

But you can have the Arduino powered from the USB and the servo from its own power, nowt wrong with that: the proviso is the grounds must be common.

And i'm not sure what the LED 0n 13 has to do with this?

JimboZA: You're welcome.

But you can have the Arduino powered from the USB and the servo from its own power, nowt wrong with that: the proviso is the grounds must be common.

And i'm not sure what the LED 0n 13 has to do with this?

pin 13 is just where i connected the positive wire of the servo. Forgot there was an LED there. :P

That doesn’t make sense: you said the servo has its own power. Actually you didn’t say that, I read it into what you said here: “I have power and ground connected to a 6v supply” which I took to be the servo’s power and ground.

You mustn’t put the servo +ve on an i/o pin, they can only provide about 40mA and you’re going to pop something.

Please post a photo of a handdrawn schematic, I’m confused.

The external power must be hooked up a la my previous pic.

JimboZA: That doesn't make sense: you said the servo has its own power. Actually you didn't say that, I read it into what you said here: "I have power and ground connected to a 6v supply" which I took to be the servo's power and ground.

You mustn't put the servo +ve on an i/o pin, they can only provide about 40mA and you're going to pop something.

Please post a photo of a handdrawn schematic, I'm confused.

The external power must be hooked up a la my previous pic.

I think I've got it now. I'll post a schematic but i don't make these often so pardon my lack of skill.

Your pic just appeared as a blob- rather attach in Additional Options than try inline.

Meantime, disconnect the servo red wire from the i/o pin…

JimboZA: Your pic just appeared as a blob- rather attach in Additional Options than try inline.

Meantime, disconnect the servo red wire from the i/o pin.....

I've been a web and java dev for two years now and i feel like a three year old at the moment. Oh well.

I'll give you a link. They've never caused me problems. http://postimg.org/image/iip691iab/

And don't worry, the positive has been taken out of the socket.

Geez louise, all that for one servo ?

raschemmel:
Geez louise, all that for one servo ?

What can I say, I’m a software guy and hardware scares me.

superslimeboy: I'll give you a link. They've never caused me problems. http://postimg.org/image/iip691iab/

And don't worry, the positive has been taken out of the socket.

Well I'm not going there, but if it's wired like my pic earlier, then that's cool.

I' m a hardware guy and software scares me...