XY Plotter GRemote not Working


#1

Hello,

So I am having some challenges here and I hope someone can shed some light on some issues I am having with getting my XY Plotter up and running. My version of the Plotter came with an Orion base board that is based on the Arduino Uno, not the Leonardo that was in the online setup documentation. I figured this out through trial and error. At first I thought it was a faulty board. Once I got the GCodeParser firmware uploaded to the board and launched the GRemote software I received a message in the GCode screen

> init
<$1 X8 Y12 ZXX.

The Z values were not XX, but they were some number I changed in trouble shooting. After looking at the code in both the GCodeParser firmware and the GRemote I determined that those numbers were the STEP_PIN settings. I wondered what the differences between the Leonardo Based and Uno based boards would be and if that would have been the source of the problem. Based off of what I saw on this page it made me wonder if the issue was the digital Leonardo pins being addressed differently than the Uno pins. From what I understand the Uno Pins A0-A5 are 14-19 on the Leonardo.

[http://www.doctormonk.com/2012/10/arduino-leonardo-vs-arduino-uno.html][1]

I looked into the firmware and the pins were correctly delineated in the GCodeParser firmware for Uno(Orion). When I launch GRemote and look at the pins that were configured there, they were the 14-19 pin values. I went ahead and tweak the default pin values in GRemote to reflect the Uno(Orion) pinout, but it had no effect. So I am stumped.

I saw somewhere someone mentioned that the stepper motor drivers lights are green. Mine are all red, yet they seem to be holding their position well. Is there something obvious that I am over looking? I did re-wire all of the connectors based off of GCodeParser expectations.

Any help would be greatly apprecaited.

Steve


#2

Hi @Steve,

Iā€™m very sorry for the problem. Could upload a screenshot of your Gremote? And I think the board is not an issue, the Baseboard Leonardo is just an old version. We have updated it to Orion(UNO) and change the code.

And the Z axis is use to control the little blue servo. The value should be 0-180.


#3

Hi Johnny,

Thanks for your help. The website is telling me that ā€œnew users cannot upload imagesā€. The X Y Plotter is wired just as is described in the PDF ā€œXY Plotter v2.0 Assembly Instructionā€. I have your email address somewhere. I will go ahead and email the pictures to you for your review. Once Iā€™m approved for the system I will update the images here for future use as well.

Thanks
Steve


#4

Here are the pictures!


#5

So I am still having problems with the GRemote not working. I saw a post on YouTube where there was another customer that had his XY Plotter 2.0 working, albeit not perfectly. What he did have working was the jog functionality with the arrow keys. I tried this with my GRemote and the arrow keys had no functionality at all.

I dived back into the Arduino code and confirmed that the Pinouts that are specified in the GCodeParser sketch are for the Leonardo and not for the Uno/Orion. I reordered them so they matched GRemoteā€™s order and added comments to specify which ports the pins tie to. Here is what I documented.

/*
// Leonardo Pinout

// Port 1 Leonardo
int X_DIR_PIN = 11;
int X_STEP_PIN = 8;

// Port 8 Leonardo
int X_MIN_PIN = A4;
int X_MAX_PIN = A5;

// Port 2 Leonardo
int Y_DIR_PIN = 13;
int Y_STEP_PIN = 12;

// Port 6 Leonardo
int Y_MIN_PIN = A1;
int Y_MAX_PIN =

// Port 7 Leonardo?
// Z_DIR_PIN Not used for mini servo in XY Plotter
int Z_DIR_PIN = 9; (This pin belongs to Port 3 not 7
int Z_STEP_PIN = A3;

// Port 6 Leonardo (Duplicate Y_MIN_PIN and Y_MAX_PIN)
int Z_MIN_PIN = A1;
int Z_MAX_PIN = A0;
*/

// Orion Pinout

// Port 1 Uno/Orion
int X_DIR_PIN = 10;
int X_STEP_PIN = 11;

//Port 8 Uno/Orion
int X_MIN_PIN = A0;
int X_MAX_PIN = A7;

// Port 6 Uno/Orion
int Y_DIR_PIN = 3;
int Y_STEP_PIN = 9;

// Port 6 Uno/Orion
int Y_MIN_PIN = A3;
int Y_MAX_PIN = A2;

// Port 7 Uno
// Z_DIR_PIN Not used for mini servo. The pin specified belongs to Port 3 for some reason.
int Z_DIR_PIN = 13;
int Z_STEP_PIN = A1;

// Port 6 Uno/Orion (Duplicate Y_MIN_PIN and Y_MAX_PIN)
int Z_MIN_PIN = A3;
int Z_MAX_PIN = A2;

int X_ENABLE_PIN = 4;
int Y_ENABLE_PIN = 4;
int Z_ENABLE_PIN = 4;
int Z_ENABLE_SERVO = 1;

I uploaded this revised code to the Orion and it still does not function. The X Stepper does move on itā€™s own 4 steps every second clockwise for some reason. Why? no clue. I have double and triple checked the cabling and everything seems to be in order.

I could certainly use any ideas on things to try.

All the best,
Steve


#6

EDIT: OK, I found out what rabbit hole I jumped down. Most of my confusion was that on the Wiki Page there is an out dated link.

When you click on the XY-Plotter Kit 2.0 link it takes you here.

Which contains and old version of the GCodeParser sketch and old Instructions. Super confusing. I have left my original rant because there are other elements (such as code documentation) that are still relevant. I do have a new issue now, but I will post that in a new topic.

Steve


Just doing my due diligence, I downloaded code for the XY Plotter 2.0 off Github again and have confirmed that GCodeParser is still indeed only coded for the Leonardo and not the Orion/Uno.

According to the documentation on this page ā€“

http://wiki.makeblock.cc/index.php?title=Me-Baseboard

ā€“ the Leonardoā€™s Port 1 has the pins D8/A8 and D11. The Orion/Unoā€™s Port 1 pins are 10~ 11~ respectively. So the first issue is that the code available on GitHub is still only for the Leonardo. The second issue is that the pins in the GCodeParser code still donā€™t correlate to the instructions in the PDF ā€œXY Plotter V2.0 Assembly Instructionā€. In looking at the date for the PDF on GitHub it appears that the instructions havenā€™t been updated in 9 months. So anyone that downloads the code will not be able to run the machine without a Leonardo board, and troubleshooting the incorrect pins in the GCodeParser file.

If we have an Orion/Uno board like I do and get to the step of updating the correct pins in the GCodeParser code, it still wonā€™t work. Why? I donā€™t know. Pretty frustrated here.

Do you have an updated GCodeParser file and PDF? If not when can we expect them? Please put (for Leonardo ā€“ do this, for Orion ā€“ do this. The GCodeParser can be written to have both boards supported. It would also be helpful to document the GCodeParser file better so we can figure out what pins correlate to which ports like in the documentation above.

I truly want your product to be as awesome as the potential it has. Otherwise, I wouldnā€™t go to the effort of writing all of this. :smile:

Steve


#7

Hiļ¼Œ@Grasshorse
Thank you for your support and advice, we are constantly improving our products.
We are updating the software in order to provide better service.
Updated manual and the software you can download from here.
http://learn.makeblock.cc/xy2/

Note:Makeblock keeps updating XY Plotter 2.0, and the latest version is XY Plotter V2.02 now. The difference between V2.0 and V2.02 is that the X-axis limit switches (3&4) are plugged into Port_6 in V2.02. The original V2.0 is plugged into Port_8. Electronics and software are updated as well, V2.0 is compatible with V2.02.

Another option 1ļ¼šBenbox_2.12.45 & Simple Instructions
Another option 2ļ¼šmDrawļ¼ˆBeing tested.ļ¼‰
Have any questions, please contact me.
Email:albert@makeblock.cc
Best Regardsļ¼
Albert


#8

Thanks for response Albert. I had figured out most of that, but it is certainly good to have it here for documentation sake!
All the best,
Steve


#9

Hello Albert, I have been looking for the correct firmware for the XY Plotter. I have recently bought the plotter but cannot get the GRemote working. Looking at the thread above I might be using the outdated firmware.
This is the place I got the firmware from: https://github.com/Makeblock-official/XY-Plotter-2.0
It seems documentation was updated, but I cannot find it.
Were can I find the correct firmware for the XY Plotter with Orion board?
(Source code)


#10

I havenā€™t been able to find a good answer to these questions either. GRemote in particular I havenā€™t been able to get working at all.

Here are some other threads that might help:



and I just wrote up some stuff about how I got it working here:


#11

Hi KIaas,

Please try the Gcode in this link: https://transfer.pcloud.com/download.html?code=5ZRmxnZU4V6wrs6dspZMmv0ZI0I2xNq4v3bSq96lkyF5A0XDXSX0


#12

I have tried the code, but still no luck. There seems to be a problem with the GCodeParser.
I downloaded the GCodeParser from Jason Dorie, he wrote this specifically for the Laser, so no real use for me. But I was able to move the X and Y with GRemote.

I did validate the PIN settings, they all look good.

Any suggestions?


#13

Hi Klaas,

Please refer to this link for the explanation about two kind of wire connections: http://forum.makeblock.cc/t/how-to-setup-the-plotter-for-g-code-use/5663


#14

Dear tec_support,

The wire connections are correct, I even wrote a small validation program to check the all components:

 #include <Servo.h>

// Test routine for the X-Y plotter.
// The limit switched are used to active the X & Y steppen motors.
// The servo is toggled when ever the status of the limit switched changes.

Servo penservo;  // Pen Servo

//PIN Settings for ORION Board
int X_STEP_PIN = 10;
int X_DIR_PIN = 11;
int X_MIN_PIN = A3; // Limit switch on the left
int X_MAX_PIN = A2; // Limit switch on the right

int Y_STEP_PIN = 9;
int Y_DIR_PIN = 3;
int Y_MIN_PIN = 13; // Limit switch on the bottom
int Y_MAX_PIN = 12; // Limit switch on the top

int SERVO_PIN = A1;

// Default routine to to a step, taken from "GCodeParser\stepper_control.ino"
void do_step(byte STEP_PIN, byte DIR_PIN, byte dir) {
  switch (dir << 2 | digitalRead(STEP_PIN) << 1 | digitalRead(DIR_PIN)) {
    case 0: /* 0 00 -> 10 */
    case 5: /* 1 01 -> 11 */
      digitalWrite(STEP_PIN, HIGH);
      break;
    case 1: /* 0 01 -> 00 */
    case 7: /* 1 11 -> 10 */
      digitalWrite(DIR_PIN, LOW);
      break;
    case 2: /* 0 10 -> 11 */
    case 4: /* 1 00 -> 01 */
      digitalWrite(DIR_PIN, HIGH);
      break;
    case 3: /* 0 11 -> 01 */
    case 6: /* 1 10 -> 00 */
      digitalWrite(STEP_PIN, LOW);
      break;
  }
  delayMicroseconds(5);
}

void setup() {
  Serial.begin(115200);
  penservo.attach(SERVO_PIN);

  pinMode(X_STEP_PIN, OUTPUT);
  pinMode(X_DIR_PIN, OUTPUT);
  pinMode(X_MIN_PIN, INPUT_PULLUP);
  pinMode(X_MAX_PIN, INPUT_PULLUP);

  pinMode(Y_STEP_PIN, OUTPUT);
  pinMode(Y_DIR_PIN, OUTPUT);
  pinMode(Y_MIN_PIN, INPUT_PULLUP);
  pinMode(Y_MAX_PIN, INPUT_PULLUP);
  Serial.println("Start test: Press the limit switches activate the steppen motors X & Y.");
}

int iPrefXmin = 0 ;
int iPrefXmax = 0 ;
int iPrefYmin = 0 ;
int iPrefYmax = 0 ;
int idegs = 70;

void loop() {

  // Read limit switches
  int iCurXmin = digitalRead (X_MIN_PIN) ;
  int iCurXmax = digitalRead (X_MAX_PIN) ;
  int iCurYmin = digitalRead (Y_MIN_PIN) ;
  int iCurYmax = digitalRead (Y_MAX_PIN) ;

  // When left limit switch is pressed move right, also takes in account the right limit switch (will not move to far).
  if (iCurXmin == 0 && iCurXmax == 1) do_step(X_STEP_PIN, X_DIR_PIN, 1);

  // When right limit switch is pressed move left, also takes in account the left limit switch (will not move to far).
  if (iCurXmax == 0 && iCurXmin == 1) do_step(X_STEP_PIN, X_DIR_PIN, 0);

  // When bottom limit switch is pressed move up, also takes in account the top limit switch (will not move to far).
  if (iCurYmin == 0 && iCurYmax == 1) do_step(Y_STEP_PIN, Y_DIR_PIN, 1);

  // When top limit switch is pressed down up, also takes in account the bottom limit switch (will not move to far).
  if (iCurYmax == 0 && iCurYmin == 1) do_step(Y_STEP_PIN, Y_DIR_PIN, 0);

  // If there is a status change on any of the switches print the current status.
  if ((iCurXmin != iPrefXmin) || (iCurXmax != iPrefXmax || iCurYmin != iPrefYmin) || (iCurYmax != iPrefYmax)) {
    Serial.print("Limit Switches: X-Min=");
    Serial.print(iCurXmin);
    Serial.print(", X-Max=");
    Serial.print(iCurXmax);
    Serial.print(" / Y-Min=");
    Serial.print(iCurYmin);
    Serial.print(", Y-Max=");
    Serial.println(iCurYmax);

    //Change the servo a bit
    idegs = (idegs==70) ? 110 : 70; // Set either to 70 or 110 degrees
    penservo.write(idegs);          // Sets the servo position in degrees
    
    //Store current status as previous state
    iPrefXmin = iCurXmin ;
    iPrefXmax = iCurXmax ;
    iPrefYmin = iCurYmin ;
    iPrefYmax = iCurYmax ;
  }

}

I used the same software you provided earlier, copied sections from it to validate my plotter. All is working well and as expected but not with the firmware you provided. It seems something is wrong with the GCodeParser you provided.
I have tested the GRemote also with the Benbox firmware, this works. But I would really like to have the GCodeParser working.


#15

Hi Klaas,

From the picture, the program you pasted looks like different with the one I sent.

What is the issue when you use the GCodeParser (firmware of the XY plotter)? Is there any compile issue or something else?
Besides, you may take a picture for the wires connection on your XY Plotter.


#16

Perhaps you can also try not using GRemote. I found it quite helpful to use the Arduino serial monitor to send simple command to the plotter to verify that it at least works.

GRemote sends some extra commands to the plotter after init and, for my setup at least, causing it to stop responding to g-code commands at all.


#17

(Scrapped my initial response after realising the Processing code is not the same as the java source.)

On startup, GRemote (java) reads a setting.ini file giving pin assignments, step directions, steps per mm and so forth and sends that to the motherboard when the serial port is successfully opened. It looks for this file in "ā€œGRemote.app/Contents/setting.iniā€. The file contents may not be correct for your build, therefore amending this file to put in the correct pins should help.

Until you save the settings you know work, each time the java app is started, it will re-assert whatever is in the setting.ini file or whatever is in the code as default.

The supplied file for my build when I first made the plotter had wrong pin settings in, but after changing the pins as per the Makeblock build instructions, I got it working.


#18