G15 Arduino DIY Control Panel

DSC05892

Introduction 

Just buy G15 cube servo but do not know how to use it? Or you bought a cube servo a few weeks ago and just open it, programmed it and the cube servo does not response? Connect it to a new circuit board that you had soldered and cube servo does not response? Do not know the cube servo ID? We would like to guide you how to test your cube servo using just your cube servo, Arduino Uno, Cytron G15 shield, and LCD keypad shield.

Requirements

Main Hardware list:

Main Software list:

Methodologies 

PART 1: Hardware Setup

1. Prepare the hardware as figure below.

cc

2. Make sure the G15 shield is using internal power and the control connectors are set to D3 and D2.

fsd

3. Stack all shields on Arduino Uno as shown figure below and connect the power supply and USB B type cable to Arduino Uno and to computer.

DSC05892

4. After load the example program, make sure to disconnect the USB B type cable and power supply to reset the G15. It seems that after loading program, sometimes the shield or the cube servo stop responding. Reconnect the power and it is ready to control your G15.

PART 2: Set up the Arduino IDE

1. Copy the G15 arduino library into Arduino IDE directory. G15 arduino library can be download here.

2. Download full code for testing your cube servo. Here is the file, G15_Test. This program has 7 selections to test G15 cube servo. Compile this program and burn it into your arduino Uno by pressing the upload button in the Arduino IDE.

Untitled

PART 3: Test the Cube Servo 

Main Menu:

Button indicator: “UP” = Selection Up , “DOWN” = Selection Down

DSC05901

Selection 1, G15 Auto Test:

Button indicator:

“SELECT” = Enter selection

This selection is to test whether G15 cube servo is response or not. When you press “SELECT” button in this selection, G15 cube servo will automatically enter servo mode by rotating to 0 degree and rotating back to 360 degree. It will further enter wheel mode by rotating the motor to full speed and back to low speed.

Selection 2, Torque VS Load:

Button indicator:

“SELECT” = Enter selection/Exit selection , “UP” = Increase Torque , “DOWN” = Decrease Torque

This selection is to demonstrate cube servo torque and its load reading.

Selection 3, Servo Mode:

Button indicator:

“SELECT” = Enter selection/Exit selection , “UP” = Increase CW limit , “DOWN” = Decrease CCW limit ,

“RIGHT” = Increase Servo Position , “DOWN” = Decrease Servo Position

This selection is to demonstrate cube servo in its Servo Mode. You can set up the servo motor angle limit and observe that G15 servo motor can only operate in its angle limit. If anything goes wrong, just press “RESET” button.

Selection 4, Wheel Mode:

Button indicator:

“SELECT” = Enter selection/Exit selection , “UP” = Increase motor speed , “DOWN” = Decrease motor speed ,

This selection is to demonstrate cube servo in its wheel mode. You can play with the cube servo speed in this selection.

Selection 5, Encoder Mode:

Button indicator:

“SELECT” = Enter selection/Exit selection , “UP” = Increase Full Rotation Movement, “DOWN” = Decrease Full Rotation Movement ,

“RIGHT” = Increase Small Rotation Movement , “DOWN” = Decrease Small Rotation movement

This selection is to demonstrate G15 cube servo act as wheel with encoder feedback. Set up the full rotation , how much times it will take to make 360 degree ± 10 degree turn and how it will make small rotation which is less than 360 degree represent by 1087 scale.

Selection 6, Factory Reset:

Button indicator:

“SELECT” = Enter selection,  “RESET” = Exit Selection

Once you push the “SELECT” button, the program will enter the factory reset and reset the cube servo to its factory condition. After push the “RESET” button, you will see the the ID of the cube servo reset to 1.

Selection 0, G15 ID Set:

Button indicator:

“SELECT” = Enter selection/Set Up new ID , “UP” = Increase ID to be set, “DOWN” = Decrease ID to be set ,

“RIGHT” = Exit selection

This selection is to set up new ID and see the current ID of the cube servo connected. By pressing the “SELECT” button, you will set the new ID for the cube servo.

Attachments

To download the completed sample source code, please click G15_Test.

Buy

, , , ,

Related Post

Getting Started with IR Distance Click

ESPresso Lite V2 with AT Firmware

Attendance Record System

Arduino + 2A motor + Encoder

Arduino + 2A Motor Shield + Encoder Motor

Leave a Reply

Your email address will not be published. Required fields are marked *