Servos Pan and Tilt With Joystick





Introduction: Servos Pan and Tilt With Joystick

Basically I wrote a small code to control servo's with an analog joystick.

I wrote it because I couldn't any or any explanation how to do it (or I didn't search right), and that's also why I'm uploading it.

This is my first upload ever here so bare with me.

I wanted to move a camera on the top of the stand towards something that moves,

While that project is on halt right now, I had this as prove of concept I guess so I knew how to hook up the servo's and test movement and strength.

In my schematic I used two power sources because if you move a servo it sometimes drains to much power and shuts down the arduino. But you can also use a capacitor and there are some examples out there on Google. the servo's I used use 9v anyway so I chose that, but some run fine on 5v that the arduino delivers.

I used a different joystick in the schematic but this was the most similar I could find. it basicly works the same. you got a 5v + a - and Y and X, the Y is for tilting up and down and X for panning left and right.

Well I hope this helps I don't know what else to say about it.

Ask any questions and I'll try to respond as fast I can.




    • Epilog Challenge 9

      Epilog Challenge 9
    • Pocket-Sized Contest

      Pocket-Sized Contest
    • Science of Cooking

      Science of Cooking

    We have a be nice policy.
    Please be positive and constructive.




    hi i need to run a stepper motor and servo on a ps2 joystick any ideas for assembly and coding for arduino

    Thanks for sharing! Good luck on making your camera follow motion. I hope you'll continue to share your process here!

    thanks for sharing!
    I'm building something like this but on a raspberry pi :)