Paul de Groot I'm about to fit my gerbil shield to my modified k40

@Paul_de_Groot I’m about to fit my gerbil shield to my modified k40 but do I need to enable the endstop terminal on there because I have mechanical endstops? The X is still on the ribbon but Y is a seperate cable.

Thanks for the lens by the way much appreciated :wink:

Hi Andy, the x ribbon cable has the x and y limit endstops. Alternatively you can wire them to the 5 breakout pins on the gerbil shield. Let me know how you go. You can use the ? Command to check/read out the endstops activation when moving the gantry towards the end.

@Paul_de_Groot thank you. I’ll be attacking it later today if all goes well, I have the standard reprap style endstops on the red pcb with three wires which of the 5 breakout pins correspond to the Y axis or is that printed on the board?

@Andy_Shilling hi Andy yes you can use that kind of reprap end stops. i have used them for my trotec conversion. You need gnd (ground), signal (middle)x/y, +5v. Those three goto the breakout pins which match ground, x or y and 5v. You might have to invert the limit pin config on gerbil (normally closed - signal is low/gnd. The signal goes to high 5v when the end stop engages or is being hit) i recall $5. You can set the $ settings via any gcode sender. $$ give you a list of all config settings.

@Paul_De_Groot1 I’m all connected up now but I think I have no supported firmware at least thats what LW is telling me. Should this have a firmware on it or do I need to flash them myself?

@Andy_Shilling the firmware is Grbl with a higher definition of PWM (16 bits instead of 8) which does not impact the g-code or other software. The controller has been personally tested by me and there is no need to re-flash it. I suggest to try out the controller set up via a g-code sender and or Inkscape to confirm its proper functioning. After that is confirmed we can see what’s not working in LW (laser web?). I have used laser web and the laser power range is 0 to 1 which needs to be reconfigured in LW into 0 to 1000 or more otherwise the laser is not working. Let me know what you have observed so far so I can help you a bit more.

I think I found my answer late last night after I had messaged you, I don’t have a +5 supply to the shield. I presumed the R4 would take power from the usb connection.

I will correct this tonight when I’m home from work and update you. Thanks for your patience.

@Andy_Shilling the laser power supply should have a 5V output that you can use. Using a separate 5V power supply has the risk of creating ground loops. Please let me know how you go with it!

@Paul_de_Groot Sorry it’s taken a while to get back to you, I now get connection to LW (yay) but it seems my motion is backwards I managed to figure this out when I had the cohesion running GRBL so I’m sure i can do that again.
My biggest hurdle at the moment is if I have the ribbon plugged in I can not use the optional pins for the Y endstop as though they are disabled but when I unplug the ribbon the Y endstop works.

So my question is can I use both the ribbon and pins at the same time or do I need to rethink my wiring to get this all working in harmony?

@Andy_Shilling yes you should be able to use both in parallel. Worst case you need to disconnect the x end stop at the gantry x end stop. But I am pretty sure you can leave it in place.

@Paul_de_Groot ok I have been playing today for a little bit, it seems I can not use the pins for the Y axis and the ribbon connection at the same time and to top it off it also seems my new laser psu can’t give enough 5v power for the R4, Pot and digital amp display.

I might look into a 24-5v dropper to power the Gerbil sheild from my main board psu and see how that goes. I am wondering if the lack of 5v power is the reason I am having troublewith the Y axis mechanical end stop, any thoughts?

@Andy_Shilling The mainboard and stepper logic uses less than 50mA so it seems odds that the 5V cannot deliver that. The laser PSU generates 24VDC and uses a simple 7805 regulator to create 5V. You can use seperate power supplies as long they have a common ground and nothing else (makes sure when you do that, that you don’t use the 5v from the laser power supply, it’s logical but double check). Maybe your 24V DC is too weak. I replaced the scotty output diodes on mine to give it a bit more oompf.
The mechanical end switches are normally closed (NC) to ground. So you should be able to use the breakout pins unless you have two NC switches in parallel which would never work (you need to put then in series). Note the X and Y axis do have separate limit switches. You can extend the end switches in both ends of the axis as long they are in series.

@Paul_de_Groot Found the problem, my daughter board had a wiring problem that I didn’t pick up on, for some reason it was killing the 5v power, I’m presuming sending it to ground.

I have now worked out the motion direction also. I will be giving this a good test later when I have time and will update you once I do.

Ok not as far as I thought lol.
I have correct motion but my endstops are now not stopping the motion.
I have inverted the endstops and that doesn’t seem to make a difference. what else can I do as I seem to be at my limit of knowledge with grbl.

@Andy_Shilling this wiki page gives you all the information about the settings
https://github.com/paulusjacobus/grbl/wiki/Configuring-Gerbil-Grbl-v1.1e

The best way to test is to set the laser head in its start position so the limit switches are engaged. Use the “?” command to read out the switches via a gcode sender (CNCjs seems very easy to use). You should see a message “pos xy; xyz” if the limit switches are working or “pos xy” if not.
$3 can be used to invert the motion direction (or swap the Y plug around) and $5 for the limit switches. Please let me know how you are going, hopefully we get it working soon. I am curious to see you cutting and engraving some art. :slight_smile:

@Paul_de_Groot thanks I didn’t know about the status option I’ll check that tomorrow. I now have everything else going the correct way so hopefully this will be the last hurdle before I really get to play.

@Paul_de_Groot All I get from CNCj is the following when sending ?
Idle|MPos:0.000,0.000,0.000|Bf:15,127|FS:0,0> when $5=1

<Idle|MPos:0.000,0.000,0.000|Bf:15,127|FS:0,0|Pn:XYZ> when $5=0 does this mean anything to you?

This is my settings as they stand

$0=10 (Step pulse time, microseconds)
$1=255 (Step idle delay, milliseconds)
$2=0 (Step pulse invert, mask)
$3=3 (Step direction invert, mask)
$4=0 (Invert step enable pin, boolean)
$5=0 (Invert limit pins, boolean)
$6=0 (Invert probe pin, boolean)
$10=31 (Status report options, mask)
$11=0.010 (Junction deviation, millimeters)
$12=0.002 (Arc tolerance, millimeters)
$13=0 (Report in inches, boolean)
$20=0 (Soft limits enable, boolean)
$21=0 (Hard limits enable, boolean)
$22=1 (Homing cycle enable, boolean)
$23=3 (Homing direction invert, mask)
$24=600.000 (Homing locate feed rate, mm/min)
$25=1000.000 (Homing search seek rate, mm/min)
$26=250 (Homing switch debounce delay, milliseconds)
$27=2.500 (Homing switch pull-off distance, millimeters)
$28=0.000
$30=2048 (Maximum spindle speed, RPM)
$31=5 (Minimum spindle speed, RPM)
$32=1 (Laser-mode enable, boolean)
$100=160.000 (X-axis travel resolution, step/mm)
$101=160.000 (Y-axis travel resolution, step/mm)
$102=250.000 (Z-axis travel resolution, step/mm)
$110=10000.000 (X-axis maximum rate, mm/min)
$111=10000.000 (Y-axis maximum rate, mm/min)
$112=500.000 (Z-axis maximum rate, mm/min)
$120=3000.000 (X-axis acceleration, mm/sec^2)
$121=3000.000 (Y-axis acceleration, mm/sec^2)
$122=10.000 (Z-axis acceleration, mm/sec^2)
$130=320.000 (X-axis maximum travel, millimeters)
$131=230.000 (Y-axis maximum travel, millimeters)
$132=200.000 (Z-axis maximum travel, millimeters)
ok

I have just realised grbl is not saving my settings when I change them, do I need to do something specific for this because with my old cohesion board I could just put the $3=3 in the command line and execute it and it would save that setting.

Yes same here. Just enter $=value and that should save your new value. If you follow that with $$ then you should see a new value unless that value is not allowed e.g. enable disable 1 or 0. $5 is such a parm.