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

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #15 on: May 26, 2020, 03:55:33 PM »
I did this one:  https://www.thingiverse.com/thing:3016513

Modified a couple of the plates to add mounts for drag chain.  It started as a standard a3 frame, then I swapped out the Y rails for 1m rails.  I've got two of these exactly the same.  One I have no issues, the other I've spent a LOT of time trying to figure out various issues, I think it boils down to the two Y steppers not staying in sync.  It works great for small items, but when I get further up the Y axis it starts to distort.  I figured if I was redoing things anyway I'd try the core-xy setup that eliminates a stepper.  Obviously don't have it running yet to have any results...
A3 2.5w with longer rails making it ~85cm x 40cm

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #16 on: May 26, 2020, 04:57:13 PM »
Ok, fingers crossed, I *think* I may have it working!  At least it is jogging around and pulse/power on-power off.

@zax - please let me know if anything I've commented out needs to be put back in for t2 to work correctly.  I don't plan on doing any flashing of firmware from t2 on this one now.

From the default grbl 1.1h I had to do the following:

enable core-xy (uncomment the #define)

Comment out the following to free up enough space:

//#define REPORT_FIELD_BUFFER_STATE // Default enabled. Comment to disable.
//#define REPORT_FIELD_PIN_STATE // Default enabled. Comment to disable.
//#define REPORT_FIELD_OVERRIDES // Default enabled. Comment to disable.
//#define REPORT_FIELD_LINE_NUMBERS // Default enabled. Comment to disable.

//#define ENABLE_RESTORE_EEPROM_WIPE_ALL         // '$RST=*' Default enabled. Comment to disable.
//#define ENABLE_RESTORE_EEPROM_DEFAULT_SETTINGS // '$RST=$' Default enabled. Comment to disable.
//#define ENABLE_RESTORE_EEPROM_CLEAR_PARAMETERS // '$RST=#' Default enabled. Comment to disable.
//#define ENABLE_BUILD_INFO_WRITE_COMMAND // '$I=' Default enabled. Comment to disable.
//#define FORCE_BUFFER_SYNC_DURING_EEPROM_WRITE // Default enabled. Comment to disable.
//#define FORCE_BUFFER_SYNC_DURING_WCO_CHANGE // Default enabled. Comment to disable.


@ggallant571 - I do plan on picking up another few arduinos so I can make an ISP to flash a 'modern' bootloader to hopefully gain space back and not have to disable all the above.  When you said speed was off, was that in the physical speed it was running at, estimated time remaining it t2, ?  Was it higher or lower?


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 #17 on: May 26, 2020, 05:20:22 PM »
The physical speed is way off. Created a square in gcode with 200mm per side, speed of 800mm/min, and very weak laser. Expected it to take one minute. That was over 2 years ago so will repeat experiment prior to quoting actual number. Should probably try with triangle and circle to see if error is predictable.

If you look at the grbl code where the core-xy motion is calculated it is only a few lines for distance but no compensation for speed.
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #18 on: May 27, 2020, 01:04:59 AM »
Success!  First test, a coaster for a friend, is attached.

Speed is definitely off.  @ggallant571, I think you're right, looks close to square root of 2 off.  I'll look at the code tomorrow and see if I can make a simple fix.
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 #19 on: May 27, 2020, 03:50:27 AM »
Looks impressive. Nice job!

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #20 on: May 27, 2020, 07:06:10 AM »
If it is a constant I will put the correction factor in my host application. I currently have a separate application for etching wine glasses on a rotary table where the speed is adjusted based on the diameter of the glass. Thinking that a checkbox with machine type (aartesian, core-xy, rotary) would make life easier. Also add diameter if rotary. Am currently reworking this code to fit on a 3.5 inch Raspberrry Pi display.

Brain cell just triggered - could the core-xy adjustment be better handled by the host!!!!

SARCASM - Just one more service we offer here.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7233
    • View Profile
    • T2Laser
Re: firmware for core-xy
« Reply #21 on: May 27, 2020, 07:58:54 AM »
It could, but that's a poor way to do it.

ggallant571

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3194
    • View Profile
Re: firmware for core-xy
« Reply #22 on: May 27, 2020, 01:03:41 PM »
Already working on rotary table fixture.

Attached is a simple gcode program to etch a square. Each side is 200mm and the speed is set 4800 mm/min. 4800 mm/min is 80 mm/sec and the elaped rime should be 10 seconds. It takes 15 seconds. Tried at 2400 and 1200 and the time were 29 and 54 secs.

My bed is approx 350x350. Edit as needed if your bed is less than 200x200.
SARCASM - Just one more service we offer here.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #23 on: June 01, 2020, 03:22:47 PM »
Alright guys, getting back to attempting to update the bootloader on the two  non working nanos.  Got a borrowed nano flashed with the ISP code, then realized none of the nanos on my eleksmaker controllers have the iscp pinouts.  How do you program these, or is it time to toss these and pick up some new ones with iscp pins?
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 #24 on: June 01, 2020, 04:08:36 PM »
The signals on the ISP header are the MOSI, MISO, SCK, PWR, GND, & RESET. All are available on the standard I/O headers. Makes it difficult to update while in fixture but perhaps makes it easier if you have a generic breadboard. 
SARCASM - Just one more service we offer here.

Zax

  • T2Laser
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 7233
    • View Profile
    • T2Laser
Re: firmware for core-xy
« Reply #25 on: June 02, 2020, 04:13:54 AM »
It's very easy, just connect:

Programmer --> Target
5V to Vin
GND to GND
10 to RST
11 to 11
12 to 12
13 to 13
« Last Edit: June 02, 2020, 04:15:56 AM by Zax »

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #26 on: June 16, 2020, 01:26:47 PM »
Hey Zax, got another question.  Haven't been able to screw with the firmware & arduinos for a while, life got in the way.  I do have a new oddity.  Now, on the core-xy machine any time I bring up the laser control screen it auto sets current position to x:0, y:15, z:0.  It used to set all three to 0, so obviously something happened along the way, but I can't figure out what.  How do I set this back so it auto sets current position to 0:0:0?  This has screwed me up several times because I started the engraving where it was at and Y was off by 15...

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 #27 on: June 16, 2020, 02:13:46 PM »
You've set an offset in Grbl, click Clear Grbl Positions in the Machine menu and it will remove them.

mattm58

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: firmware for core-xy
« Reply #28 on: June 16, 2020, 02:25:43 PM »
Thanks, knew it was probably a simple fix, just couldn't figure out where...  :)
A3 2.5w with longer rails making it ~85cm x 40cm