Arduino + Relay Puzzle

I have searched without locating my breaking point and now hope for a little guidance from this forum:

DIY-CNC controlled by Arduino UNO
GRBL 1.1f
Easel 0.3.10
Automatic Spindle enabled in Machine Setup.

Arduino Pin12 (Spindle Enable)

Wether I have spindle ON/OFF, during Machine Setup test or at Easel Carve I read 4,8V at Pin12.
I can command Coolant Enable through M8/M9 and measure 5.0V at A3, pin Pin12 is at 4,8V regardless.

What am I missing or where should I take a look?

Also, the relay I have trigger when pin go low (0V), is there a software get around to that or do I need to flip the signal through hardware?
Relay in question below.

You are looking at a version 0.8 connection diagram. After version 0.9 the Z limit switch was moved to D12 and then D11 was assigned as the PWM output for variable spindle speed motors (also used for IoT hook ups).

You could also repurpose “Spindle Direction” to be a 'Spindle Enbable" function by changing config.h, but D13 is a shared resource so you have to be careful if you want to use it as “Spindle Enable”.

You can flip the logic of the A3 pin with a #define parameter in config.h and recompile grbl to get that functionality.

// Inverts the selected coolant pin from low-disabled/high-enabled to low-enabled/high-disabled. Useful
// for some pre-built electronic boards.
// #define INVERT_COOLANT_FLOOD_PIN // Default disabled. Uncomment to enable.
// #define INVERT_COOLANT_MIST_PIN // Default disabled. Note: Enable M7 mist coolant in config.h


Thank you @LarryM

I get the broad strokes and will look into this shortly.

D11 worked just as you said it would, diving into config.h to invert Spindle Enable and recompile :slight_smile:


Pardon my ignorance but in order to compile a custom config.h is it a requirement to recompile into a hex-file or is it enough to alter the config.h located in Arduino Library, load the grbl library into Arduino IDE and Verify/upload directly to the UNO?

You can upload directly from the Arduino IDE with a modified config.h

Thank you @JustinBusby