Author Topic: firmware for core-xy  (Read 867 times)

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
firmware for core-xy
« on: May 21, 2020, 03:19:59 PM »
Hey @zax, I've rebuilt one of my eleks a3 frames as a core-xy machine.  Do any of the firmware options built into T2 operate as a core-xy?  I tried the 1.1f CNC Z-XY firmware, but x directionals go diagonal and Y & diagonal seem to have the two steppers fighting against each other.  I've also tried the 0.9i as mentioned on one of the other posts and tried a bunch of the options in configuring the eleks mana, but no dice...
A3 2.5w with longer rails making it ~85cm x 40cm

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #1 on: May 21, 2020, 04:13:42 PM »
Nevermnid, managed to get it working using 0.9i with eleckscam software setting grbl params.  For anybody else who looks for this in the future, here's my grbl settings:

Connected COM3 115200
Grbl Ready
Origin Set (Home)
$$
$0=10 (step pulse, usec)
$1=25 (step idle delay, msec)
$2=0 (step port invert mask:00000000)
$3=1 (dir port invert mask:00000001)
$4=0 (step enable invert, bool)
$5=0 (limit pins invert, bool)
$6=0 (probe pin invert, bool)
$10=3 (status report mask:00000011)
$11=0.010 (junction deviation, mm)
$12=0.002 (arc tolerance, mm)
$13=0 (report inches, bool)
$20=0 (soft limits, bool)
$21=0 (hard limits, bool)
$22=0 (homing cycle, bool)
$23=0 (homing dir invert mask:00000000)
$24=25.000 (homing feed, mm/min)
$25=500.000 (homing seek, mm/min)
$26=250 (homing debounce, msec)
$27=1.000 (homing pull-off, mm)
$100=100.000 (x, step/mm)
$101=100.000 (y, step/mm)
$102=400.000 (z, step/mm)
$110=5000.000 (x max rate, mm/min)
$111=5000.000 (y max rate, mm/min)
$112=5000.000 (z max rate, mm/min)
$120=200.000 (x accel, mm/sec^2)
$121=200.000 (y accel, mm/sec^2)
$122=200.000 (z accel, mm/sec^2)
$130=5000.000 (x max travel, mm)
$131=5000.000 (y max travel, mm)
$132=5000.000 (z max travel, mm)
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7233
    • View Profile
    • T2Laser
Re: firmware for core-xy
« Reply #2 on: May 21, 2020, 05:11:27 PM »
Yes, the Eleks Mana firmware is the easiest option (Grbl 0.9i). It's included in T2Laser and there's also a menu to configure it, you can switch it between CoreXY and Cartesian coordinates and also use either servo or laser mode.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #3 on: May 21, 2020, 07:42:34 PM »
I've been using grbl-1.1f for some time now with core-xy etchers. Need to build with the core-xy feature enabled.
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #4 on: May 21, 2020, 10:52:03 PM »
I've been using grbl-1.1f for some time now with core-xy etchers. Need to build with the core-xy feature enabled.

Would you be willing to share the hex file so I don't have to figure out how to compile it?   ;D
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7233
    • View Profile
    • T2Laser
Re: firmware for core-xy
« Reply #5 on: May 22, 2020, 03:57:01 AM »
All you need to do is enable it (by uncommenting) and then compile:

#define COREXY // Default disabled

I would also recommend to disable homing, although ggallant571 may be able to help with.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #6 on: May 22, 2020, 06:31:23 AM »
Homing was a little challenge. I have the X limit switch on the lower left and the Y limit switch on the lower right. Perform the Y first and then the X. This also required entries in the parameters section. No problem sharing the hex. Will do a dump of parameters and post both and the config file.
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #7 on: May 25, 2020, 05:44:20 PM »
Homing was a little challenge. I have the X limit switch on the lower left and the Y limit switch on the lower right. Perform the Y first and then the X. This also required entries in the parameters section. No problem sharing the hex. Will do a dump of parameters and post both and the config file.

Thanks @ggallant571

I've tried flashing your firmware twice with avrdude, but both times I get to 97% writing and then get a "programmer is not responding" error.  At this point I've only got one working nano left and don't want to hose it. 

The working nano is running 0.9i.  All axis movements are correct, but if I try to pulse the laser or turn on/off via the laser control screen the laser comes on but I can't turn it off.  the off button doesn't do anything, and the pulse turns it on and it stays on.  Any ideas?
A3 2.5w with longer rails making it ~85cm x 40cm

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #8 on: May 25, 2020, 06:16:35 PM »
I prefer low level tools for debugging hardware which for grbl devices is a terminal emulator such as teraterm for Windows for gtkterm for Linux. From the command line you can type/execute the basic commands. The list is not very long and can be found with a Google search.

We have:
 G00, G01                      basic X,Y motion
 Fxxx                              motor speed
 M03, M04, & M05          laser enable mode
 Sxxx                               laser power

With the 1.x firmware there is a parameter which disables the laser when there is no motion.

Do you have a spare generic Arduino? If so, you can turn it into a ISP burner. I had similar problem with Nano until I reloaded the boot loader with the "modern" version. The older uses 57600 baud and occupies about 2K code space. The newer is at 115200 baud and uses about 1K. That 1K is likely causing your problem as the 1.f firmware is about 31K.
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #9 on: May 25, 2020, 10:06:58 PM »
Alright, I'm new to all this arduino programming/flashing/etc.  The most I've done is flash the grbl version using T2.

I've got three nanos now that won't flash.  One good one, but I don't want to pull it from the other, working, laser and bork it too.

That being said, what do I need to do to get a working core-xy firmware flashed to a nano?  The 0.9i doesn't seem to work for me, as mentioned above once I turn the laser on it doesn't turn off.  All core-xy movements are good though.  It sounds like I need to move to 1.1, but that doesn't fit with the old bootloader?

Buy more nanos?  Buy a programmer?  I really have no idea what I'm doing here, as you can probably tell...

If the simplest option is to buy a programmer, any suggestions?  It looks like programming using arduino isp requres an uno and not a nano?

Thanks for all your help guys!
A3 2.5w with longer rails making it ~85cm x 40cm

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7233
    • View Profile
    • T2Laser
Re: firmware for core-xy
« Reply #10 on: May 26, 2020, 04:00:07 AM »
You can use a Nano as a programmer (search "arduino nano to nano bootloader") or get an AVR programmer (USBASP/USBISP with 6-pin cable or use jumper wires to connect).

If they won't flash then you either have the settings wrong (use XLoader) or there's a problem with the bootloader, like the hex doesn't have one.

You would be better to use Arduino IDE and compile your own firmware, the changes are very simple (search for CoreXY in config and uncomment). You will need to use this to repair the Nano bootloaders anyway.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #11 on: May 26, 2020, 12:54:04 PM »
Ok, managed to get arduino ide installed, downloaded grbl, was able to compile and upload the example grblUpload.  If I enable core-xy the sketch is too big.  What should I comment out in the config.h file to get it back under size to fit on the nano?
A3 2.5w with longer rails making it ~85cm x 40cm

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #12 on: May 26, 2020, 02:47:50 PM »
Did you ever determine which bootloader you have?
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #13 on: May 26, 2020, 03:02:01 PM »
Old bootloader, it's the only one I can get an upload to work with.

Through screwing around I've managed to get everything working except for resetting the home position the t2 laser control screen.  I'm sure it probably uses one of the optional report fields I commented out to get it small enough. 
A3 2.5w with longer rails making it ~85cm x 40cm

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #14 on: May 26, 2020, 03:36:58 PM »
I think the newer bootloader is a positive step up. You need a ISP loader to install it which can be made from an Arduino Uno or Nano using feature built into the Arduino IDE. You need 6 wires. 5 of the 6 go from programmer to target 6-pin ISP headers. The 6th is a little different.

Did you make the core-xy from scratch?

I have observed that the speeds are typically off by quite a lot (probably the square root of 2). I maintain a log of laser, speed, & PWM for various media.
SARCASM - Just one more service we offer here.