In this instructable I will try to show you how to control Dagu 6 servo Robot Arm using arduino and 1 Sheeled board and use android mobile phone application as game-pad to control the arm motion
Step 1: Step 1: Building the Arm
I started by buying an already made robotic arm( Link is here ), then use the circuit board that came with it to control the 6 servo in the arm, which would be more efficient as I could control it with a wireless WiFi-module.
Step 2: Step 2 : Connection of the Circuit
Firstly,the motor circuit connection was good illustrated in the Arm Datasheet mentioned above, so I connect the +ve and -ve terminals of the servos to the motor circuit
Then, I used 1sheeled board to be able to use their application to control the robot, and connect it with ardiuno board.
Finally, connect the PWM(control) terminal to 1sheeled board connected to arduino.
Note: I used only four motor due to problem with the other 2 motors. So when you buy it, just add the connection of 2 other motor control terminal to arduino.
Note: Try to group wires of the same servo and number them to be easily identified.
Step 3: Step 3: Programming and Using 1Sheeld App
In this Part I'll illustrate how to download 1sheeld app, use one of Gamepad Shield and the arduino code for that:
1) Download 1Sheeld Application onto your smart phone. The app is available on the Google play store at http://1sheeld.com/app.
2) Download 1Sheeld library to your computer through this here.
3) Extract the folder, copy it, and paste it in your Arduino libraries directory.
4) Open the this Sketch on your Arduino IDE.
5) According to 1Sheeld tutorial : Upload your sketch Here comes the most important part of the whole tutorial, switch 1Sheeld to the Uploading-mode (this is the switch labeled UART Switch on the board) before you upload your sketch to the Arduino board to avoid serial conflicts between 1Sheeld and Arduino, then press the Upload button in the IDE.
Note: Upload mode is turned on when the UART switch is pushed away from the 1Sheeld logo. Once you have completed your upload you need to switch 1Sheeld back to the operating mode. Don’t forget! If you don’t switch the UART Switch back to the operating mode your project will not work properly as you will have no communication between 1Sheeld and the Arduino board. Operating mode is turned on when the UART switch is pushed closest to the 1Sheeld logo.
6) Open 1Sheeld application on your phone, if promote to update firmware let it update, then press scan, find the number attached on the board and pairing will happen with the 2 devices (the default pairing code is 1234), then your 1Sheeld is now connected through Bluetooth with your phone
7) Now Select the GamePad from the shields list and press on the multiple shields icon at the top right of the app.
8) Start Playing !
Step 4: Step 4 : Completing the Arm and Circuit Design
I uploaded a schematic and breadboard circuit if anyone needed them.
Finally, we have come to the end of this tutorial. Thanks for reading this instructable and don't hesitate to ask me for more information.
Note : Proteus circuit I used it in Debugging my code.
1) you could Debug if you want but first You need to change DEBUG define to #define DEBUG 1
2) if you don't want to debug just leave the debug define as it is #define DEBUG 0