While brainstorming ideas the other night. I found a few threads online saying how the default behavior of Optiboot to flash the led residing on Arduino pin D13 could cause things to act randomly when using this pin as a output to control something like a relay.
Now let us look at GRBL… The standard installation has this pin used as “Spindle Direction” however it can also be used as “Spindle Enable” with a quick edit of the config.h file and recompiling the source.
When you are using a Arduino pin to control a mains voltage item; you do not do so directly. Most often this is done with the use of a item called a relay. ( My next post will go into wiring and using a relay if you are not familiar )
Relays can be used to switch a mains voltage item on/off using a dc voltage signal. This signal can be active low or active high depending what you want to achieve. In either case flashing this led on power up or reset can cause your item to be triggered prior to being told to do so via code / software.
To fix this possible problem all we must do is download the Optiboot source files from “Here” then compile optiboot 6.2 Using the command..
“make LED_START_FLASHES=0 atmega328”
This will recompile the bootloader into our needed .hex file that we can use to reburn the Arduino bootloader using the Arduino IDE. If you do not want to compile your own Bootloader (recommended) Please find below the .zip file with .hex provided for your Atmega328p based board.