Page 1 of 4

G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Sun Apr 09, 2017 10:56 pm
by yewys
Hi guys, i'm currently trying on the g15 servo motors borrowed from my lecturer (along with the GD02 driver). I've tried them using the Arduino example coding from cytron's website but none of them are working on those g15 motors. The LED on the UNO board blinks following the delay set for 'other errors' in the example coding, but the led of the g15 servo motor didn't light up at all. I've even tried to display the 'error' using the serial monitor, and what i got was a weird number '3584' , or in hexadecimal 'E00'. I don't see any match of this kinda error to the data-sheet of the motor. Can someone please guide me on this problem? :( :(

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Mon Apr 10, 2017 11:53 am
by A380
Hi,

When power up your system, does G15 LED light up for 1s? Did you supply external power to GD02?
Image

Possible to capture a photo of your whole circuit connection?

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Mon Apr 10, 2017 4:46 pm
by yewys
Hi A380,

Thanks for your reply. The motor driver i'm using is GD02 version 1.0, different from the 1 in your picture. The power adapter connected to the motor driver supplies DC voltage of 12V with 2A current.
The LED on the servo motor does light up for just 1 second when it is initially powered up.

The example code i used is to factory reset the servo.

/*
This example shows how to do factory reset on G15. It will reset your G15
to default ID (0x01) and baudrate (19200 bps). If succeed, G15 LED will blink,
else LED on CT UNO will blink. Note: Please connect one servo at a time.

Function:
factoryReset(G15_ID); // Do factory reset to the selected ID

Product page:
Cytron G15 Shield:
http://www.cytron.com.my/p-shield-g15
G15 Cube Servo: http://www.cytron.com.my/p-g15
CT-UNO: http://www.cytron.com.my/p-ct-uno

Original written by:
Ing Hui, Cytron Technologies

Modified:
26/01/16 Idris, Cytron Technologies
*/

#include <SoftwareSerial.h>
#include <Cytron_G15Shield.h>

Cytron_G15Shield g15(2, 3, 8); // SoftwareSerial: Rx, Tx and Control pin
//Cytron_G15Shield g15(8); // HardwareSerial: Control pin

#define DEFAULT_ID 0x01
#define BROADCAST 0xFE
#define LED 13

word error = 0;
byte data[10];
int baudrateMode = 0;

void setup()
{
pinMode(LED, OUTPUT);
Serial.begin(19200); //added myself
}

void loop()
{
switch(baudrateMode)
{
case 0:
g15.begin(1200);
break;

case 1:
g15.begin(2400);
break;

case 2:
g15.begin(4800);
break;

case 3:
g15.begin(9600);
break;

case 4:
g15.begin(19200);
break;

case 5:
g15.begin(38400);
break;

case 6:
g15.begin(57600);
break;

case 7:
g15.begin(115200);
break;

default:
break;
}

g15.factoryReset(BROADCAST);
delay(100);
error = g15.ping(BROADCAST, data);

if(error == 0 || error == 0x0400) // Ignore ID mistmatch since broadcast ID is used to ping the servo
{
if(data[0] == DEFAULT_ID) // Success
{
g15.setBaudRate(DEFAULT_ID, 19200); // Change to default baudrate
delay(100);
g15.end();
delay(100);
g15.begin(19200);
delay(100);

while(1)
{
g15.setLED(DEFAULT_ID, ON);
delay(500);
g15.setLED(DEFAULT_ID, OFF);
delay(500);
}
}
else // Fail, new ID is different
{
g15.end();
if(baudrateMode < 8) {
baudrateMode++;
}
else {
while(1)
{
digitalWrite(LED, LOW);
delay(1000);
digitalWrite(LED, HIGH);
delay(1000);
}
}
}
}
else // Fail, other error occur
{
g15.end();
if(baudrateMode < 8) {
baudrateMode++;
}
else {
while(1)
{
digitalWrite(LED, LOW);
delay(200);
digitalWrite(LED, HIGH);
delay(200);
Serial.print(error); // added myself
Serial.print(" "); //added myself
}
}
}
delay(100);
}

-----------------------------------------------------------------------------------------------------------------------------
I've added the commend 'Serial.print(error); ' in the bottom most 'else' case to perhaps display the error information on the serial monitor and i got this '3584' number.
After the code is fetched into the Arduino, the LED on the servo motor doesn't light up even once.

*color wire connection
- red ------- 3.3V
- black ---- Ground
- orange --- CTRL <--> pin 8
- white ----- Tx <--> pin 3
- brown ----- Rx <--> pin 2

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Mon Apr 10, 2017 5:29 pm
by A380
Can you try use 5V from UNO to GD02 instead of 3.3V (red cable)?

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Mon Apr 10, 2017 7:31 pm
by yewys
I've tried that too, but still the same :( :(

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Tue Apr 11, 2017 9:00 am
by bengchet
Hi,

May be you should swap your RX and TX cables?

GD02 RX <--> Arduino TX(pin3)
GD02 TX <--> Arduino RX(pin2)

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Tue Apr 11, 2017 2:03 pm
by yewys
Hi bengchet,

In that case, i got the error of value '4065'.
How high is the possibility that the signal doesnt actually send to the servo motor?
What type of servo driver did you use? GD-02 R1.0 too?

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Wed Apr 12, 2017 9:39 am
by yonghui
Hi yewys,

Pls try with the arduino library given under GD02 product page.
G15 Shield has different definition of the control pin logic polarity compared to GD02.

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Wed Apr 12, 2017 10:05 am
by yonghui
Hi Yewys,

Pleas try this first using the current library that you use now,
in Cytron_G15Shield.h

change the definition of the polarity of ctrl

#define TxMode LOW // Master transmit to G15
#define RxMode HIGH // Master receive from G15

change to

#define TxMode HIGH // Master transmit to G15
#define RxMode LOW // Master receive from G15

Re: G15 : Error 'E00' in hex or '3584' in decimal

PostPosted: Wed Apr 12, 2017 5:12 pm
by yewys
Hi yonghui,

Appreciate for your reply.
I'm still getting the same result. (The digitalWrite LED is blinking instead of the g15 LED).
Do you know at which line in the 'void loop()' should I write the 'Serial.print(ERROR)' to read the ping results? If follows back the coding I post here previously, i'm still getting '3584'.

Or do i need to external power up the UNO? I dont think so tho, since there is already 12V powering up the Vmo at the GD02 driver.