G-code parser and firmware

Hi from Norway!

I just got a Arduino for my kids - best present I ever bought!
I get to lend it when they sleep - and my quest is to usew it to run a 3D router.

Can anyone please save me - I really don't want to use time to try and invent the gunpowder again - I know it's out there! :slight_smile: :slight_smile:

Arduino UNO and stepper motors that run otherwise - (28BYJ-48) and Luxorparts interfaces -

I pray for links to working versions of "firmware" and g-code parsers.

Actually I'm a blacksmith - a new forged nail to the one who first can help!


I use bCNC as my Gcode sender and an Uno running Grbl on my mini-router (CNC Dremel). Not sure what you mean by Gcode parser unless you mean the function of Grbl to translate Gcode to motor movement.

Tx -
I load this on my UNO:

#include <grblmain.h>

void setup(){

void loop(){}

and run

Universal GcodeSender (Version 1.06) -
it appares to work while showing positions change (coordinates in x-y) but the engines don’t respond …

I cannot debug as I am not able to find the scource for startGrbl …

Hardware is ok tested with other scripts.

Lost in the jungle in the scource you sent me links to - and running on Windows 10 ( :frowning: :frowning: :frowning: )

Any suggestions still?

The grblmain.h file just calls the grbl program. I have used grbl on a couple of machines with great success and this is the first that I have seen grblmain.h or heard of startGrbl(), I don't use those files at all.

The first thing is to install the grbl firmware onto the Uno. Download the firmware from this site. This site has instructions on how to install grbl to the Uno via the Arduino IDE. Once installed on the Uno, grbl should start and connect with UGS when the Uno is powered up.

This page shows the pin mapping that grbl expects and some options for motor drivers and wiring. If your machine is not wired like that you will need to change the machine wiring or the grbl pin mapping.

This page explains what you need to set in grbl to make grbl work with your particular setup. I know that the new version is 1.1, but the configuration has not changed much between 0.9 and 1.1.

bCNC and Universal gcode Sender perform similar functions. Having tried both I settled on bCNC because I just like it better. It is a matter of personal choice which to use.

I can't be of much more help until I know the specs of your machine and how things are wired. A schematic would help a lot. What motor drivers are you using? grbl works with step/dir type drivers like the A4988, DRV6625, etc. grbl will not work with h-bridge drivers like the one based on L293 or L298.

Building and setting up a DIY CNC machine is a bit of a complicated process. Don't let it overwhelm you. A step at a time will get you there.

Thank you ever so much -

I have the ULN2003 drivers ... I read elswhere that GRBL use step and direction and that this driver may not comply ..

So I appear to have a hardware issue - would that be correct? No way to wire this so it works??

(However I installed pyton and was able to compile bCNC - it starts and terminates without messages ..)

So I understand I need to get oher drivers to begin with ....

Anyway - as you say - step by step ( :smiley: :smiley: :smiley: ) will do the trick!

I would recommend that you get better motors and drivers. The 28BYJ-48 steppers are not very powerful, have a low step per revolution, and it will be very hard to find drivers that run with any current firmware. They are OK for learning about steppers, but not as useful for real work. Modern NEMA17 steppers are more efficient, powerful, have (usually) 200 steps per revolution and drivers are readily available at low cost. I used these motors on my project. I would recommend that you look at a CNC (grbl) shield. The shield plugs onto the Uno and provides convenient connections for 4 stepper drivers, limit switches and and some other auxiliary functions. You can get the CNC shield with drivers (A4988 or DRV8825) and bundled with a clone Uno or even kits with shield, drivers, motors and Uno.

Like I have said, my router is a mini version using a Dremel for the cutter. If you are using a larger router you will need to size the steppers and drivers accordingly.