In this project I will introduce to you a pan-tilt controlled by cell phone.
All movements of the cell phone are reproduced in the pan-tilt device via Bluetooth. The assembly is very simple using an Arduino R3 (or similar) and two shields over it.
I started this project thinking about a device to support newbies in home astronomy giving them an easy way to indicate the right position for the telescope to find out in the sky any planet, star or constellation.
You just need use this device as a sky pointer together with apps like Sky Map.
Very easy and fun!
All you need is on the following list:
- Arduino Uno R3 (or similar)
- 1Sheeld - Android version (shield for connection to cell phone - Android)
- Motor Driver Shield (for servo motors)
- 02 x Micro Servo Motors SG90 (or similar)
- Pan-Tilt SG90 kit
- Power supply (9V x 1A) with plug P4
- USB cable (connection between Arduino and your Computer)
The assembly is very simple with no soldering and few wirings.
Follow the next steps:
- Put 1Sheeld board over the Arduino board.
- Put the Motor Driver Shield over the 1Sheeld board.
- Connect the cable of Tilt axis in the Motor Shield plug (Servo 1).
- Connect the cable of Pan axis in the Motor Shield plug (Servo 2).
According with their developers, "1Sheeld turns your smartphone into 40 different Arduino shields".
This shield is very interesting because you can connect an Arduino board via Bluetooth to a cellular phone and use all its available sensors. The connection is simple and you have all necessary libraries available for Arduino. In this way you can reduce the time you need for your prototypes and decide if you want go ahead or if you need to update something.
After final results you can convert the prototype on a final product applying traditional components and sensors.
For the first use of 1Sheeld you need to download its library to the folder where the Arduino IDE is installed in your computer and in your cell phone you need to install the 1Sheeld App (for Android) or 1Sheeld App (for iPhone).
- 1Sheeld can run in background and then you can run also another app simultaneously.
- If you want more information about this shield, visit the 1Sheeld site.
The program is very simple.
With the library of Orientation of 1Sheeld, the Arduino program will read the axis X and Y of your cell phone and translate them to the angular position of each servo motor.
One important detail is each cell phone can have a different origin/reference for the axles X, Y, Z.
Due to this I have put an statement on setup routine of Arduino to make the "zero" reference according with the positioning of you cell phone.
At start, you need to put the cell phone on horizontal position aligned with the Pan-Tilt device and then press the reset button of Arduino (you also can press the reset button of the Motor Shield because it is on the top with an easier access).
After this step the Pan-Tilt is already referenced to follow the position of your cell phone!
Move the phone and see the corresponding movements into the servos.