Servo Motor

So I have been working on a project which involves turning of servo motor to 180 degree, and back to 0 degree via wireless connection using a IR receiver, and a transmitter. Also there's a PIR sensor on the transmitter end, which is the input on which servo motor rotates.
However, for some reason the servo doesn't seem to rotate. I have servo motor powered directly from arduino's 5v, and the arduino is powered by a 9v battery pack. Now I do know that powering the servo from arduino could be the reason behind this, but just for my confirmation I did uploaded the servo code from the examples to check if the servo works properly or not, and it worked 100% right, and it was powered directly from arduino via usb.
Now my question is if it's the power then why does the servo works fine when I used the examples, but it doesn't when I connect it with my project mentioned above.
If it's the power input then what(hardware) do I need to solve this? I can't use a wall power supply as my project has to be self powered(batteries).
Thank you.

OK, so what are my options on the power supply? If I use breadboard, and resistors with an external power supply just for the servo, would that be fine?

Here's the coding, receiver/servo and the PIR/transmitter respectfully.

This platform is not letting me post the images, but I can tell you the wiring of it.

The PIR is connected to digital pin#11, and the transmitter is to digital pin# 9. And I have the VCC of PIR and GND of PIR connected to 5V, and GND. And the transmitter's VCC, and GND to 3.3V, and GND, of the same arduino.

The receiver is connected to digital pin# 11, and the servo to digital pin# 9. Also I have the VCC of the receiver, and GND connected to 3.3V, and GND. And the servo's VCC, and GND to 5V and GND, of the same arduino.

servo.ino (825 Bytes)

IR_in_and_out.ino (755 Bytes)

I'm not sure what you mean by the terms; pullup and pull down.

The servo i have is Kookye servo motor, Model: MG995-180.
Here's the link to the website, KOOKYE Servo Motor Metal Gear 180 Degree Rotation – kookye.com

OK, so at the present time I have no resistors in place. I connected the VCC, and the GND pins directly to VCC and GND of arduino. But assuming from what I have learnt, it's best if I use a breadboard in between just like I was using it.

So what do you suggest, where should I connect the pullup resistor, and the pull down one?.

OK, so what are my options on the power supply?

A great option for 1-2 servos is a 4xAA battery pack, with either alkaline or NiMH cells. Don't forget to connect the grounds.

Breadboards can't handle the current required by motors, so avoid using them for intermediate connections.

Ok so just connect it directly to the servo?, I mean do I need to have two batteries?, one for arduino, and one for servo?.

I mean do I need to have two batteries?, one for arduino, and one for servo?.

Often, yes. You cannot mix motors or servos with delicate electronic circuits without special precautions.

For input to the RAW or Vin Arduino pin, 7V minimum is recommended, but that is too much for most servos. And you MUST NOT use the 5V output to power motors or servos.

It just got obvious that you saw a word you didn't know and never once thought to go look it up. Or you would know what pullup or pulldown resistors are and where they go. Please don't be lazy. You can help us help you.
[/quote]

I actually did looked into it. But the thing is at the present moment I am not using any resistors. But rebuilding the whole circuit, I will reconsider using them. Thank you for teaching me this medium. It will indeed be helpful for me.

jremington:
For input to the RAW or Vin Arduino pin, 7V minimum is recommended, but that is too much for most servos. And you MUST NOT use the 5V output to power motors or servos.

jremington:

At the present time I have a 9V battery pack connected to arduino, I also have a PWR-12V-B38 battery pack, capable of 3500mAh 42Wh, voltage 12V. Or should I just go with the 4xAA battery pack? It will be easier with the battery pack as there is no outlet too connect the servo to the PWR-12V-B38.

I also have a 12V battery pack on me at the moment. You think that'll be good to run the servo?

No, 12V will destroy the servo. Most servos require 5 to 6V at 1 Ampere or more.

A few servos are rated for higher voltages, but check the specifications.

jremington:
No, 12V will destroy the servo. Most servos require 5 to 6V at 1 Ampere or more.

A few servos are rated for higher voltages, but check the specifications.

OK, the operating voltage is 4.8 ~ 6V.