Author Topic: Grbl-Mega options with Ramps  (Read 7264 times)

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Grbl-Mega options with Ramps
« on: May 29, 2017, 09:51:08 PM »
I am on my fourth grbl-mega repository to get a high speed laser working with a ramps, there are a few caveats and I am going to document what I am finding here, others may find it useful.

Firstly, the 'official' grbl-mega does NOT with a Ramps board, see this issue ..
https://github.com/gnea/grbl-Mega/issues/11

The pull mentioned in the issue (http://github.com/minsk-hackerspace/lasercutter-grbl-Mega-RAMPS)  works out of the box, (it is a version 1.1e) however .. its SLOW. I was running the cyclone version at a feed of 10000 (steppers at 160steps/mm, actually works out to a 10kHz step rate exactly) and tested up to 15000 with no issues in software or hardware mostly, 20000 worked as well but the hardware was getting left behind and 30000 crashes grbl it appears.
This one I am dropping steps as low as feed 8000, so I think my best option is the cyclone version. No matter what I try I can not get it to scan a raster with image data at high speed without pauses when the laser fires with any version yet.
I thought it might be the serial port not keeping up with 115k gcode at such high speeds but I increased baud to 250k without noticing any change.
Laser mode is enabled, velocity mode is off, feed and fast feed set to 10000 then I limit testing speed by changing $110 and $111. Acceleration is currently 2000mm/min^2

Grbl for cyclone is the best version so far, however it is an older version of grbl (0.9) and does not have laser mode, so raster scanning at feed 10000 and the head is pausing for each laser on.
I am not quite sure whether there is a simple parameter change to set spindle acceleration to infinity, I would have thought it was adjustable somewhere but a brief search has not turned up much.
It does work out of the box with a Ramps board, at least for X and Y movement.

The third one I tried is grbl for Ramps https://sourceforge.net/projects/grblforramps14/
I only briefly tried it before grabbing the cyclone version and I forget why I looked elsewhere already. I think it was because it was several years old and looked for a newer version.

Marlin works of course, however I could not disable all home switches, besides I want grbl to work..
« Last Edit: May 29, 2017, 10:47:15 PM by Stonemull »
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #1 on: May 31, 2017, 07:42:40 AM »
Had a chance to do a bit more testing with the version mentioned above.
this one .. http://github.com/minsk-hackerspace/lasercutter-grbl-Mega-RAMPS

Annoyingly you can only have one folder conatining for example grbl.h in the arduino library folder, so I have taken to keeping alternate copys zipped into a "grbl storage" zip file.

Testing, unmodified code .. 5v TTL laser connects to the second servo port (D6 output) and functions as a spindle laser, if you want 5v also have to jumper the 2 pins in the supply marked vcc and 5v.
I am running the ramps board off 20V so I have removed diode D1 so the mega is only powered by USB, so the laser is also being USB powered .. not ideal but the one I am using is only 50mW max.

Of course if you powered with 12V then you could use the top pin of the servo connector as the ttl control pin and power a 12V laser from one of the 12v outputs and ground.

So far as I can tell, the second extruder port is not used at all in the code, this is D10 or bit B4, it could be remapped, it has no serious alternate function.
The main extruder is D9 (bit H6) and is enabled with this version of grbl as the mist output, command M7 to enable, M9 to disable.
The heatbed output is D8 (bit H5) and is enabled with this version of grbl as the flood output, command M8 to enable, M9 to disable.
Also the unbuffered override commands 0xA0 and 0xA1 can be used to toggle, not ideal.

The mega is a safe choice for space .. compiler reports

Sketch uses 30954 bytes (12%) of program storage space. Maximum is 253952 bytes.
Global variables use 3459 bytes (42%) of dynamic memory, leaving 4733 bytes for local variables. Maximum is 8192 bytes.

So lots of overhead remaining, the old plotter I am using has a bunch of buttons on it I hope to add functionality for later.


A russian site using the ramps for a CO2 laser cutter is https://hackerspace.by/projects/22 .. not sure if useful, a few links there for connectors etc. google translate helps..





A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
  • Administrator
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #2 on: May 31, 2017, 08:14:43 AM »
Keep an eye on the 12VDC power supply wires connecting to the RAMPS 1.4 board.

My RAMPS 1.4 on my 3D printer burned up those wires after about 8 months of use. It had a hot bed. I ordered a new RAMPS 1.4 from FolgerTech and after about a month it just stopped working. I don't know what caused the wire burns but most likely the hot bed.

Probably not an issue on a laser machine due to no hot bed current needed. I do like the overall concept of the RAMPS 1.4 but now I'm a bit shy of it...perhaps someday I'll tackle installing one on my laser diode and make sure my BCL program still works with it.

Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/qv1qee2vb65785t/SetupBenCutLaser3.2a.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #3 on: May 31, 2017, 08:37:36 AM »
Yeh I am aware of amateur track layouts on these. Is your printer 12 or 24v ?

Lasers only going to be a few amps and switching to 24v instead of 12v is a great method to reduce currents while improving performance, 35v caps are ok at 24v in reality with a switch modes clean input, so you just need to remove D1 so the arduino is not powered off 24v and change the LED resistors (no need for that even, they will just be bright) I changed mine to 4.7k as I hate indicator leds lighting up the room. Thats it .. commercial heatbeds often have a 12v parallel heater which can be connected as 24v series. The pololus are fine at 24v, I just cannot see a reason to ever use 12v on 3d printers anymore.

My new printer has this heatbed for example https://www.aliexpress.com/item/3D-printer-heatbed-Heat-bed-MK3-Standard-Aluminum-plate-3MM-hot-bed-reprap-PCB-Board-215x215x3mm/32762847563.html

Fans need to be 24v and I am not sure if the hotend needs changing ? repetier says my hotend is running around 50% while extruding pla at 210C.

I love it.
I did the repetier host calibration a few days ago, 3C per second, plus I added a pretty blue led so I know when its on.

My old solidoodle printer has a Sanguino (spelling?) .. after a few months I noticed the connector pins to pcb were crunchy abd dry jointed and the tracks discoloured, tested it and found it heating to over 70C, scraoed off the grren overlay, laid down a heavy copper wire (one strand of a mains cable) so it bridged the relevant high current tracks, ran cool as a cucumber after that.

I designed a fusebox raspberry pi relay board for a client that switches all the house power/solar, AC/pool and HWS with multiple 30A relays, tracks are on both sides of the board and laced with vias every few millimeters. tracks are not much wider than what these boards use, yet to test it at full load though, might need 2oz copper yet though my calculations only give a 6C temp rise.
A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
  • Administrator
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #4 on: May 31, 2017, 08:43:24 AM »
My FolgerTech 3D Printer was a 12VDC printer. It's a Z axis laser machine now!!!
Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/qv1qee2vb65785t/SetupBenCutLaser3.2a.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

wild.bill

  • Hero Member
  • *****
  • Posts: 521
  • Hey Laser Lips, Your mother was a snowblower
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #5 on: May 31, 2017, 08:55:02 AM »
The root cause of the RAMPS connectors melting is that the designed current limit of that connector is less that what the current bed heaters draw. The only safw way to avoid melting them is to use an external MOSFET, SSR, or relay to switch the power to the bed (I have done this on ALL my printers).

If you use those outputs to power a laser there is no problem the lasers draw a few amps and the bed heaters draw more than 20 amps.

Voltage does not matter if you draw 20 amps through a connector designed for 18 amps,
5V, 12V or 24V it will still melt.

Laser: was an A3 2.0w TTL L6/GRBL Z axis now 2'x3'
          OpenBuilds ACRO 510 w/ 2.0W TTL laser Cohesion Mini/Smoothie Z axis Homing switches
          K40 Cohesion Mini 60W LightObject LPS
          80W CO2 Red-Black 500x700

cool is simply a subjective state of mind

Administrator

  • Administrator
  • Hero Member
  • *****
  • Posts: 2851
  • Administrator
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #6 on: May 31, 2017, 09:03:47 AM »
Thanks for that info Bill.

So then my next project for BCL will be to me to install a RAMPS 1.4 board on my laser machine and check that BCL will work with it.

I've completed my MegaPi controller board project.
I'm 90% finished with my Smoothie board project.
RAMPS 1.4 is up next.
Admin -- Ralph -- support @ BenCutLaser dot us
https://www.dropbox.com/s/qv1qee2vb65785t/SetupBenCutLaser3.2a.zip?dl=0
BCL Paid license: $49.95
via Paypal to bclpp@primemail.com

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #7 on: May 31, 2017, 09:10:26 AM »
Depends on the heatbed.

My solidoodle is 12v and the heatbed has a single 7R resistor, it just takes a half hour to heat up .. but thats only 1.7A or something.

The spec from the 12/24V heatbed page above has it at 5.0-5.4 Ohm at 24V.i make that 4.8A at 24V and 9.6A at 12V.
Thats a 200x200 build area, go larger and the powers increase obviously.

My heatbed runs at around a 20%-30% duty cycle, so average currents are substantially less.

I think you will find the screw connector is rated for at least 10A continuous, some of those connectors the same size are rated for 15A,  track width, length and pad size are the main issues imo.

here, pulled some data from my dropbox.. IEC rating is 25A. That is going to be clamped into a substantial heatsinked board imo.




A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)

wild.bill

  • Hero Member
  • *****
  • Posts: 521
  • Hey Laser Lips, Your mother was a snowblower
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #8 on: May 31, 2017, 10:54:19 AM »
Depends on the heatbed.

My solidoodle is 12v and the heatbed has a single 7R resistor, it just takes a half hour to heat up .. but thats only 1.7A or something.

The spec from the 12/24V heatbed page above has it at 5.0-5.4 Ohm at 24V.i make that 4.8A at 24V and 9.6A at 12V.
Thats a 200x200 build area, go larger and the powers increase obviously.

My heatbed runs at around a 20%-30% duty cycle, so average currents are substantially less.

I think you will find the screw connector is rated for at least 10A continuous, some of those connectors the same size are rated for 15A,  track width, length and pad size are the main issues imo.

here, pulled some data from my dropbox.. IEC rating is 25A. That is going to be clamped into a substantial heatsinked board imo.

To each their own, there have been enough failures I will only use a ramps board with an external bed controller. I would rather spend and extra $5 for a relay than take a chance of starting a fire in the house.

Laser: was an A3 2.0w TTL L6/GRBL Z axis now 2'x3'
          OpenBuilds ACRO 510 w/ 2.0W TTL laser Cohesion Mini/Smoothie Z axis Homing switches
          K40 Cohesion Mini 60W LightObject LPS
          80W CO2 Red-Black 500x700

cool is simply a subjective state of mind

Stonemull

  • Hero Member
  • *****
  • Posts: 951
    • View Profile
Re: Grbl-Mega options with Ramps
« Reply #9 on: May 31, 2017, 11:07:39 AM »
Fair enough, I would not use one unmodified, just upgrading the track should be sufficient. At 10A I would certainly take it off board, there are a lot of 'external mosfet mod' around for Ramps and other controllers.

5A should be fine though. To be clear, I am not running and am not considering running, a heatbed on a ramps controller.

By the way my current heatbed runs PWM, it cycles on and off but it is PID controlled, so there is a slowish ramp up and down etc. Have you modifed the merlin code to be on/off ?

The bottom graph there is the heatbed ..

A3 Eleksmaker 2500mW
Solidoodle V2 Pro
Wanhao I3+ touch
Hacked Roland DXY-880
CNC3018 engraver
CNC Plasma (work in progress)