Diy Offline Grbl Controller V2
by soufiane ikherbane in Workshop > CNC
71 Views, 2 Favorites, 0 Comments
Diy Offline Grbl Controller V2


this is basically a remix of David T660 project on the offline controller, i added an sd card reader to process Gcode files directly through the controller if you want to keep your computer away from dust or you want to keep it in a seperate place
the project is not yet complete , i did a simulation and it works , i still have to make a case for it out of plexiglass (acrylic sheets), i'll share the final results whhen the project is finally done
Supplies
- Arduino Nano (ATmega328)
- I²C 20×4 LCD with I²C backpack (address 0x27/0x3F)
- 4×4 membrane keypad (8-pin)
- microSD module (SPI)
- 3018 Pro CNC controller board (running GRBL)
- Dupont male-female / male-male jumpers
- Breadboard, 5V power supply, small enclosure, soldering iron
Step-by-step Assembly (prototype / Bench)
- Power off everything.
- Mount the Arduino Nano on the breadboard so VIN/5V/GND and digital pins are accessible.
- Connect the I²C LCD: SDA→A4, SCL→A5, VCC→5V, GND→GND. Tighten the contrast pot on the backpack if characters are faint.
- Wire the keypad according to the keypad table above (D2..D9). Secure keypad on panel or tape it to the board.
- Wire the SD module: CS→D10, MOSI→D11, MISO→D12, SCK→D13, 5V→5V, GND→GND.
- Double-check all grounds: the Arduino, SD module, LCD and (later) CNC board must share the same GND.
- Upload the sketch to the Nano via USB. (Do not connect GRBL RX/TX yet.)
- Test LCD & keypad: open Serial Monitor (if desired) while Nano is USB-connected. On power-up the LCD should show XY step / Z step / Feedrate and SD Ready/Failed message. Press keys and watch values change on LCD.
- Prepare SD card (see next section) and insert into module. Press B on keypad — first 3 file names should appear on LCD.
- Connect TX/RX to GRBL only after code uploaded and SD testing finished: Arduino D1 → GRBL RX, Arduino D0 → GRBL TX. Also connect Arduino GND ↔ GRBL GND.
- Power the CNC (motors power supply) and ensure the controller board is ready. With everything connected, press A to stream test.gcode (or chosen file) to GRBL. Start with small safe moves.
SD Card Prep & Sample Test.gcode
- Format the SD card as FAT32 (for cards >2GB choose FAT32).
- Place a file named exactly test.gcode at the SD root.
- Use plain text, unix line endings (LF) or CRLF — the sketch trims lines so CR is removed.
- Sample safe test.gcode (incremental mode to be safe):
Put that file on the SD card, insert it into module and press A to run (the code runs test.gcode).
Downloads
How to Test Safely
- With Arduino connected by USB, confirm LCD displays values and that pressing digits updates values (XY step, Z step, Feedrate).
- Insert SD card and press B to list files (if SD Ready was displayed).
- With SD OK, power down USB debug connection if you plan to connect Arduino TX/RX to GRBL.
- Connect Arduino TX/RX to GRBL RX/TX and CNC GND common.
- Power CNC motors and controller. Keep hands clear of moving parts.
- Press A to start streaming test.gcode. Watch the CNC do small moves. Be ready to cut power if anything is wrong.
Important Safety Notes
Always start with very small moves and low feedrates when testing.
Keep a physical emergency-stop or kill-switch accessible.
Never rely solely on the software for safety — power off if motion is unexpected.
If your SD module is a bare microSD breakout (no regulator/level-shift), do not feed it 5V — use 3.3V only.