Arduino works only when plugged into laptop

Hello! I am new to Arduino and am running into what seems to be a very simple problem that I just can not figure out. It will only work when my Arduino is plugged into my laptop! I have tried numerous different power supplies to provide power to the Arduino but none of them will work.

I am running a program on a Raspberry Pi which, depending on what is chosen by the user, will send a signal to the Arduino which will control one of four servo motors. I know I can just run my Servos from the Raspberry Pi and get rid of the Arduino but I thought it would be fun to use the Arduino as it provides a great learning opportunity for me.

The outputted signals from the Raspberry Pi are connected to the Analog Pins on the Arduino and the Servos are connected to the Digital Pins as outputs. The four servos, the external power supply powering the servos, the Arduino, and the Raspberry Pi are all connected to the same ground. The Raspberry Pi is powered separately from another power supply.

When plugged into my laptop, the servos only move when I tell them to from the Raspberry Pi. But when the Arduino is plugged into an external power supply, the servos move randomly on their own. The Arduino code is just set to read the incoming signal on the Analog Pins and if it above 650 then it outputs to the servo and moves it.

Please Help!!!

Power Supply powering servos: 5V 2.0A
Power Supply for Raspberry Pi: 5.3V 2.0A
Power Supplies tried to power Arduino: The above power supplies, 9V 1A Barrel Power Supply, 5V 2.1A, 5.25V 1A (When using this power supply my servos would not even move...)

P.S. This is my first forum post on here so I apologize if some of it does not make sense or I am posting it in the wrong location!

Hello!

The first thing I think when I hear that the servos are moving randomly is that the input pin to the servos is floating. Make sure the pin is plugged in tight.

It could also be a problem in your code.

Come to think of it, your raspberry pi is probably outputing a 3.3V output signal value. This is being received by the arduino's 5V input pin. That could be a problem.

Have you tried to connect the arduino to the raspberry pi usb ports?

The arduino will not turn on through the barrel power plug unless the voltage is is over 7V if I remember rightly. You could try feeding 5V from your raspberry pi from the pi 5V pin to the arduino's 5V pin.

But overall, I still think it's a floating input pin. Floating just means it not connected to anything.

Hope it works out!

-Englishscone

I still think that it's a Gnd issue. Check all supply voltages and the Arduino 5V when all components are connected, with the PC disconnected. If you power the Arduino from the 9V supply, it should do no harm to connect it also to the PC - does that make a difference? Avoid to connect PC/USB and a 5V supply to the Arduino at the same time, then two power supplies will work against each other.

DrDiettrich:
I still think that it's a Gnd issue. Check all supply voltages and the Arduino 5V when all components are connected, with the PC disconnected. If you power the Arduino from the 9V supply, it should do no harm to connect it also to the PC - does that make a difference? Avoid to connect PC/USB and a 5V supply to the Arduino at the same time, then two power supplies will work against each other.

Good to know! Thank you

Not much to say without clear schematics how everything is connected. Especially the power supply (>6.5V to the Vin/barrel jack; 5V goes to the 5V pin).