Unable to flash board with Grbl after file modification

Okay I have a cnc 3018 Pro and have added limit switches just to the X and Y axis. I have downloaded the latest build, altered Config.h and tried to reflash my board using the Arduino IDE.
I keep getting ‘Grbl.h not found’ and the compile stalls.

I can’t find a solution on the 'net, or at least one I can understand.

Could someone walk me through this please otherwise I get an expensive doorstop.

many thanks, Laurence.

What part of these instructions failed?

Also, I recommend you get it to compile before changing anything to customize it for your machine. It gives you a verified starting point.

1 Like

Hi Doug thanks for the reply. Once I got my old brain round the process then it went smoothly - ish.
The Sainsmart 3018 board is identified as a Duemilanove 328p and uploaded successfully, however since the upload I can’t connect to the board through Lightburn or Candle.
I’ve tried re-booting everything, changed com ports and nothings happening so if you have any suggestions that would be great thanks.
Laurence.

Laurence, so you can now upload firmware with no errors from the Arduino IDE?

Have you tried opening up the Arduino Serial Monitor( found under the Tools menu )?

IIRC you should see output from GRBL once it’s uploaded and restarts. If you do then we know it’s more of a USB port issue than a firmware issue.

Hi Doug. The status board at the bottom of the screen simply states ‘Done Uploading’.
I opened the Arduino Serial Monitor but nothing is displayed, do I need to do something with it?

Solved the immediate issue. Downloaded Grbl 1.1f from Sainsmart site and used Xloader to flash the board. Disabled the limit switch GRBL settings, pulled the switches and we’re back to where we started.

Thanks Doug for your help, appreciated.

So you downloaded a pre-compiled version of GRBL from the maker of your machine and then went and disabled end-stops as a GRBL command so you’re back to working without end-stops? And you are fine with that and don’t want to use endstops?

To be honest I just wanted to get the damned thing working again, and now I’ve done that then yes I’d like to ideally get it working using end stops.
I’ve just literally used Arduine IDE to flash with Grbl having correctly identified, at last, the board as a Arduino Nano according to the machine maker which failed through the IDE, yet changing the board type to Duemilanove 328p and retrying through IDE the sketch uploaded completely.
And once again I can’t connect to the machine!
Any suggestions?

it’s going to be very helpful figuring out what Arduino type is being used and what clock speed and bootloader. When it’s not an official Arduino, there’s lots of things vendors can mix and match which then give customers headaches trying to figure it out.

I don’t know if there’s an easy way to get the vendors firmware back on the unit and then probe it to see if you can find out what’s going on with bootloader, board type and clock speed. it would take hours trying to walk you through all the itterations of using command line tools like and the Arduino IDE. Does the vendor provide the source code with PlatformIO setup? Sometimes they put more effort into setting that up and so it becomes more of a point/click type of thing. PlatformIO has a settup file for each device which gets all requirements and stuff and creates the build setup on your machine just like the developer would have had. I would use it more myself but they’ve sold out to Microsfot and are forcing a Microsoft editor on users if you want to use a GUI. Therefore I only use commandline of PlatformIO.

1 Like

Hi Doug thanks for the reply. I have asked the salient questions of Sainsmart tech support and will have to wait for them to reply.
of course a simple ‘fix’ would be to just fit limit switches to the Z axis, which is a pain, but it would work.
Prefer to understand what’s going wrong though.

Just out of curiosity is this the correct work flow for the update:
Download grbl master.
Extract the folder called grbl.
Upload it to the library.
Find the folder in the IDE file section in Documents>Arduino>Libraries>grbl and edit Config file.
Go into IDE, connect to board using best guess on type, click ‘Upload’ and wait?

Hi Doug, basically the board, a Woodpecker 3.4 will only run the HEX file produced by Sainsmart. Don’t know what they’ve concocted but in a few places this has been confirmed so I’ve got to take the easy way out and fit Z axis switches.
Nevermind, and thanks for all your help, much appreciated.

2 Likes

most likely they put a custom bootloader on their arduino 328 part so it will only boot properly their own firmware file. The adventurous might try to load a stock arduino bootloader and go with stock GRBL. But if it failed, it would then require an ISP interface or maybe never work again.

Boo on them for using open source GRBL but close up the bootloader.

1 Like