Technology insights

The firmware is an adapted version of Grbl 1.1e which runs on an Arduino fitted with a new enhanced 328pb processor instead of the familiar 328p processor that everyone knows who uses an UNO. It is a more powerful sibling processor because of the extended features (additional ports, two additional 16bit timers, 2 USART’s see the list below). This improved version allows 10-16bit engraving instead of 8bits. Since the 8bit covers a zero to max power range and engraving just happens at a very small range, 8 bits actually only produced 5-16 useable grey values in the K40 laser cutter/engraver. The engraving on the legacy M2Nano controller only did B/W engraving when I got a machine.

The modifications in software and hardware are quite complex to achieve. It requires a significant amount of knowledge of the extended 328PB processor’s features and instruction set, GRBL itself (the concept and construction of the firmware) and an upgrade of the Arduino IDE programmer suite to allow compiling of this extended code. The basic Arduino IDE suite does not allow you to program these chips unless you extend the compiler and wire IDE libraries. Further the port assignments of the Arduino in GRBL are mapped to different ports to gain access to the additional 16 bits Timer/PWM ports. This resulted is the need of moving the serial USB port to free up the pins occupied by the original USB port. Lucky for you, I have managed to achieve all of those rearrangements so you can enjoy the fruits of this labor.

Differences between R3 and R4 UNO processors: (extract from Hackaday)

  • Two more 16-bit timer/counters. The 16 bits allows you to achieve higher resolution for example when doing laser engraving
  • Two of each USART, SPI, and I2C serial instead of one of each. We used the second serial port to free up a PWM channel since the AVR processor uses multi functions per hardware pin to save space and cost which makes it hard to use all features
  • Ten PWM channels instead of six. This (along with the extra 16-bit timers) is good news for anyone who uses PWM
  • Onboard capacitive sensing hardware: Peripheral Touch Controller. This is for running capacitive sense buttons without the need for any additional ICs/controllers. However I have not used this feature for our Laser application