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.

cheers,

Comments

author
james kells (author)2015-09-27

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

author
amberrayh (author)2015-03-03

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

author
Droxz (author)amberrayh2015-03-04

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

About This Instructable

2,016views

74favorites

License:

Bio: 24yrs / Christian / plays drums, writes, hopes, smiles, enjoys simple things / loves: being maried with Evelien, music, VANS, wireless stuff, pc games, concerts, having creative moments ... More »
More by mars_crash:Servos pan and tilt with joystick
Add instructable to: