Skip to content

Control dual axis FPV camera cradle with Joystick module

 

Hello everyone,

Today we gonna see the full tutorial on how to control the 2-Axis FPV camera cradle with joystick module, the camera cradle comes in a little package containing some acrylic supports and pieces, some screws and two servo motors.

Standard servomotor used SG90
FPV camera cradle that uses 2 servomotors

Requirement: Please before you proceed, if you’re not familiar with the joystick or the servo motors, here are two tutorials for you:

  1. How to simply interface the Joystick module with Arduino board
  2. Use servo motors with Arduino

Here we’ll use two methods to control the servos: the first one where the servos follow the position of the joystick and they move while we move our stick, the second one the servos start moving toward the direction where the joystick is pointing and they stay there until we move the stick again or change direction.

This is a demo of what we gonna have at the end:

 

 

Wiring:

In the tutorial video I went step by step while wiring or calibrating also step by step while coding, but here I’ll give you the whole wiring which is not a problem because no module or servo is affecting the others.

1

To not be confused by the joystick axis my joystick has (X axis on top then Y axis) here in the picture they are inverted and named otherwise but I let the wiring as I used you can change it as you like (servo pins, joystick inputs, directions …)

 

Codes:

So not to confuse you because I’ve actually used a lot of codes in the video, but they are very basic (servo positioning, reading analog value from joystick…) I’ve did this before you can check my other tutorials, so here I’ve only uploaded the two codes for the two final versions as seen in the video.

You can also check the “demo video” to know the difference between the two codes.

Here are the “.ino” versions to download: Download here

Code 1: version 1 as in video

 

Code 2: version 2 as in video

Yassine View All

Automation and Electrical Engineer, Electronics amateur trying to share my little projects.

5 thoughts on “Control dual axis FPV camera cradle with Joystick module Leave a comment

  1. Hi great video can this code be modified to run 4 and 6 dof robot arms I what the servos to stay in the postion when I let go of the joystick thanks

    • Hey, as I told you, you can control every 2 servos with a joystick, you can use the same code I used just add elements, it’s the same way, and later when you’re familiar with the system you can make the controls more smooth and associate two servos with one joystick for some cases, like keeping the same level of the arm…

Leave a Reply

%d bloggers like this: