Pan & Tilt

We used a pan & tilt stand (PTS) that we bought from amazon [1] which we thought gave us the functionality that we needed. In order to use the PTS we needed 2 servo motors as well. We felt that this combination would be strong enough to support the weight of the camera, without it toppling over, and be steady enough to allow clear pictures to be taken. An Android app was developed to control the movement of the servos remotely. A base that housed the servos was built out of Lego.

Construction
This is the assembly guide we followed for building our PTS. The construction was fairly straight forward but we found a few problems building this but they were mainly due to the lack of tools that we had at our disposal. The constructed PTS is shown below:


App
An app was developed for use on an android phone, it would connect to an Arduino through Bluetooth. Shown in the picture bellow:
The Bluetooth adapter was connected to Arduino, to test it was working a test program was developed that would show on the monitor what button had been press on the phone app. An example of this is shown bellow:
This test program was then extended so that each click of a button on the app would correspond to movement of the correct servo. Initially this was just the servos rotating through half there range of motion (for testing purposes ). The final app is detailed in the App tab above.

Arduino
The Arduino is used to control the servo that will rotate the camera. The Arduino listens out for bytes that have been sent from the android app. These bytes are then decoded and if they match a byte that moves the servo then the appropriate action is taken. The servo is restricted to only a 180 degree turn and after each button press the servo rotates by 5 degrees in the direction specified.

The servo is attached to an output pin that will send data to the servo informing it how much to rotate. Connections are detailed below:


A link to the code can be found here: [Insert Link]

Base
 The final assembly of the PTS connected to the Arduino with the Bluetooth module is shown below:
The next stage of building the base was to construct the housing for the PTS, we were going to do this with Lego. It was built up with space for the Arduino and circuit board. The built base is shown in the picture shown below:

Problems with this design
We had built our test camera shell out of Lego we found that it was larger than we expected. This meant that when it was sitting on top of the PTS it was quite high off the table. As it was only connected through a small surface to the PTS it didn't look very stable. We then tested out the movement of the servos and found that panning (left and right) was OK with the camera shell attached but tilting (up and down) caused the camera to topple over. this was due to the weak connections between the servo and mount. the picture below shows how the camera shell looked attached to the stand:

Solution
To solve the problem of the camera toppling when it was being tilted we made the decision not to have a tilt feature included. This was because it was going to be too hard to implement in the time that we had left available and that panning worked well. We had to modify the PTS so that we could still have a way of connecting the camera to the remaining servo. We did this by flipping one of the metal brackets upside down and angling its legs out a little more. The servo adapter was attached to the bracket on one side and a Lego on the other. Shown below:
This was the connected to the stand in the same way as before. 

Completed Stand
Below is a picture of our completed stand, including where the Arduino, circuit board and Bluetooth module sit:


Get the project from here:



No comments:

Post a Comment