Pan/tilt servos go crazy with arduino

Added by Bruno Carbonneau 6 months ago

My new pixy and pan/tilt kit work perfectly when connected to USB, but when I connect it to an Arduino (empty or programmed), the pan/tilt start moving to full up/right position and sounds like it's trying to go further. Pixy is reporting detected objects to the Arduino but it doesn't respond to servo positioning commands.
So the communication is working but something is wrong.


Replies (5)

RE: Pan/tilt servos go crazy with arduino - Added by JP B. 6 months ago

i am on raspberry usb, not on arduino,not yet, it can be a problem of power and consumption cable/servo

i got an issue like that when i connect directly on usb raspbbery my pixy, i must use usb hub with extern power supply

http://cmucam.org/projects/cmucam5/wiki/My_pantilt_is_acting_sort_of_crazy

http://cmucam.org/projects/cmucam5/wiki/Powering_Pixy

RE: Pan/tilt servos go crazy with arduino - Added by Jesse French 6 months ago

Hey Bruno,

apologies for the delay. JP is right, this sounds like a power issue. If you connect only one servo, does this change anything? If so, it would indicate that the servos are drawing too much current for the USB connection to handle. To fix, use a shorter / fatter USB cable, a powered hub, or try a different USB port.

Also, when connecting to Arduino, the recommended way to power Pixy is via USB, and give power to Arduino thru the ICSP cable included with Pixy (not the other way around).

Hope this helps!

Best,
Jesse

RE: Pan/tilt servos go crazy with arduino - Added by Bruno Carbonneau 6 months ago

It was effectively a power issue. When I power the Arduino with a battery, the Pixy works perfectly on ICSP cable only. So thanks for helping. As soon as I disconnect the battery from the Arduino, the pan/tilt servos move fully up and left and don't respond anymore. I can't use it from USB the way you explained because I won't have USB in my application.

RE: Pan/tilt servos go crazy with arduino - Added by Edward Getz 5 months ago

Hi Bruno,
Here is some information that you might find useful:

http://cmucam.org/projects/cmucam5/wiki/Powering_Pixy

Using Pixy to power your Arduino might be an option.

Hope this helps.

Edward

RE: Pan/tilt servos go crazy with arduino - Added by Bruno Carbonneau 5 months ago

Thanks Edward for this link. I didn't know this 2-pin socket was for raw power. That's a very good option when using with an Arduino, USB or not.

(1-5/5)