need help..... with arduino mega 2560

i have uploaded a sketch to control a servo via bluetooth (HC-06)

It works fine when conneted to usb... bt never works when connected to any other power supply
...
i use windows 7

bluetooth_servo.ino (281 Bytes)

Is the servo connected to the Arduino 5V pin? If so, USE AN EXTERNAL POWER SUPPLY. 4 AA batteries will work great.
And connect the grounds.