K40 peripheral control with Mini Gerbil

Mini Gerbil is a cheap (but awesome) controller to replace your K40 laser’s stock NanoM2 controller, and it can also manage so-called K40 peripheral. Now, Mini Gerbil has plenty of connectors and you might be wondering what they’re for, and whether you need them?

To run Mini Gerbil successfully, you need just 5 connections: Ribbon (or if you don’t have a ribbon: X-axis/Limit switch connectors) , power, PWM, Y-axis and USB. We’ve posted detailed instructions (and a video!) on rigging up the Mini Gerbil, but let’s spell them out again. Working clockwise from left side in the above photo:

  • USB is a familiar socket for a Mini B plug. The other end goes into your computer.
  • PWM stands for Pulse Width Modulation, which is just a way of controlling the laser beam to provide different output strength, such as during gray scale engraving.
  • Power comes from the K40’s own power supply. The energy efficient Mini Gerbil doesn’t need a separate dedicated supply.
  • Ribbon is a very thin connector that drives the X axis motor. It’s the ‘different’ looking connector in the top-middle of the above photo. X axis is the left to right direction of your K40’s movement. The connector also covers the limit switches (x and y axes) which stop the laser carriage going beyond the physical size of the K40.
  • Y axis drives your K40’s Y axis motor, which is the front to back direction.

Extra goodies – the K40 peripherals

You want more than basic control? Here’s five handy K40 peripheral features that you get ‘for free’ with the Mini Gerbil. The two PWM connectors have tiny subscripts J1 and J2. On the J1 connector:

  • Reset or Abort: this pin facilitates an emergency stop button. Just connect a momentary push button between this pin and ground.
  • Feed/hold: this pin allows you to pause the operation of your laser to adjust the work piece. Just connect a momentary push button between this pin and ground.
  • Resume: as pin allows you to add a momentary push button to continue after pausing.

On the J2 connector, you also get:

  • Safety Door: Works identically to the pause button. Wire it to a microswitch positioned on the door, and you have a ‘safety interlock’, ie. the machine can’t operate while the door is open.
  • Fault: alerts the user to a system fault. If you hook it up to an indicator (lamp, LED+dropper resistor) and ground, you’ll clearly see if the system’s in fault mode.

The J2 connector also includes a ground line (GND), which is the common electrical path for all the above features.

Are you an advanced user ? If so, check out the ‘Flood port’, which is named according for CNC milling, where it floods a workpiece with cooling/lubrication liquid. As such, it’s not directly relevant for laser cutting, so we can use this a general purpose k40 peripheral port. I’ll outline how to use this feature in a future blog, but if you just can’t wait, comment below!

14 thoughts on “K40 peripheral control with Mini Gerbil”

  1. This addition to the already AWESOME Mini Gerbil REALLY sets it apart in the price per performance category! I have a stock case K40 but that is about where it stops. Once I dropped in the Mini Gerbil board, my China blue wanted MORE, so I fed it! I am currently running an additional 12v power supply (When adding ANYTHING extra to your stock setup, you will NEED THIS!), Air Assist, LED strip, LightBurn Software (If you don’t have this yet, GET IT!!), Live Work Area Cam, High Flow Exhaust, Light Object Motorized Z (Still working on how to control it with Mini Gerbil).

    My point here? Get this board! You will be happy you did. The STM32 chip is MUCH faster than other cheaper boards on the market and you will waste your $ when you get a cheaper one and try to do any detailed engraving/raster/cutting, your machine will choke. On the other hand, why spends hundreds more for a board that isn’t optimized for it’s capabilities? Other boards throw stuff together to say that theirs is faster, more options, it can do this or that, but all of that is NOT needed and overkill for what the K40 (China Blue) is capable of. So don’t waste your $ on the others when you can have all you need right here… Awesome.Tech is where you need to shop!

  2. Is there any further details on the Flood port? Just installing this in my K40 now and I would love to be able to get this hooked up to trigger the air-assist.

  3. I’m interested in adding Z table support for the Mini Gerbil. Here’s my thought… In order to move the Z table, I only need two signals – direction and Step. I’m wondering if there are 2 available outputs on the mini gerbil that I could re-purpose to make something like this work. The Fault pin could be one… what about the flood port or is there some other pin that I could utilize?

  4. Grounding the J2 pin marked ‘Safety Door Switch’ completely disables the controller until power-cycled. Is the board incorrectly marked or am I misunderstanding the intent?

    1. Hi Joel,

      that is intended behavior for the door switch. Once you open the lid of the laser, the machine stops the gantry and laser until you close the lid again and hit the resume button (physical button or the one in the LightBurnsoftware application).

      1. Got it. In the event the unit is powered on with the pin grounded, a physical reset switch would be needed then or open the switch and life-cycle then? I have one of the older layouts with screw terminals on the PS, an analog power indicator and only laser and test buttons.

        1. Yes the switch has to be open and then you can use resume in the Gcode application e.g lightburn or you can use a resume switch on the mini gerbil ( of course you need to wire one in)

          1. Any possibility I need to wire in a rest switch after my tests to reset the board in some way? Moved the machine to the garage to cut some acrylic for my mini metal lathe control panel and cant get through the whole cut without the board stopping response. Stops with various responses in the console using lightburn but none are consistent. Only way to recover is a power off. And by stopping, I mean even the basic 50mm x 75mm outline will not complete when run by itself. Even running with no exhaust, no cooling and no laser.

          2. Hi, you can wire in a reset (abort) switch next to the optional pause, resume and safety door switches. Not sure while the board is stopping? Did you try another PC and or cable? You can power the controller via the USB by setting the jumper from 5vExt to 5vUSB. Maybe that helps? If not, let me know and we replace the board.

          3. Did not try a new PC as I am using a tablet PC that just completed 22, 4″x4″ slate coasters without issue. Only changes since that run were an upgraded 2nd mirror mount and mirror, and a smoother board on the y-axis (which was disconnected in debugging). MIni b usb connectors are few-and-far-between here so I’ll see if that can be replaced (pin outs for J6 standard USB?). Looks like the board accepts a number of steps and then freezes. Tried saving the code and then running from it with the same results. Perplexing as the board was running very well until this issue.

  5. Just about to add a door switch and noticed that MG 1.1 RevB J2 pinout is labeled, G-Door-Fault-Reset but the MG install instructions has a diagram showing the Door Switch and Fault Light swapped, G-Fault-Door-reset.

Leave a Reply