For CNC controller, we have two choices, PC or dedicated controller card. Most DIY designs use Mach-3 or LinuxCNC. They use LPT port for interfacing and PC side software take care of everything. The problem is that LPT port is not an option today PC even for a bit outdated one. I searched for opensource CNC controller with simple, cheap, DIY friendly building solution 🙂 . Most are not meet up for me.
Finally, I keep my eye on Grbl.
– It is opensource, Arduino base, quoted from Grbl wiki
“Makers who do milling and need a nice, simple controller for their system that will run the ubiquitous Arduino Uno. People who loathe to clutter their space with legacy PC-towers just for the parallel-port. Tinkerers who need a controller written in tidy, modular C as a basis for their project.”
I am a PIC guy but the simplicity and rich full featured lib and software support of Arduino swayed my mind. Every programming language and platform has it’s learning curve but Arduino is not. If you have experience on any microcontroller paltform, you can build it up Arduino within a few hours.
In short, I built my own Arduino board (based on UNO core). I don’t want to scarified my Arduino board in CNC project and want to save a few bucks and also wanna to have fun.
1# Started using a perfboard, a ATMEGA328P, crystal, some capacitor and resistor, headers, pin base and some jumper wires and also FTDI FT232 board.
Started with basic design, I omitted power supply parts. Here is my basic sketch schematic.
2# Soldered headers, LED at PIN-13 and Reset switch. Also a header for FTDI board, external power connector, jumper for USB power, Power LED, pulled up resistors for SDA and SCL are soldered. Dont forget FTDI-DTR pin to connect RESET pin of ATMEGA328. If not, you cannot program Arduino.
3# The back side or perfboard PCB.
After building the board, I have to program the ATMEGA328 with bootloader. The procedure is simple but I need a programmer for this. There are some alternative methods for burning bootloader to Arduino.
I picked my buspirate and follow the procedure from this blog. Thanks, BP support as AVR programmer.
1# Connected the Arduino board and Buspirate .
2# Download “optiboot-master” from Arduino source. Installed WinAVR for AVRdude programmer support for Windows.
According to Eric’s blog post, I created a .bat file for easy programming.
PAUSE avrdude -c buspirate -p m328p -P COM7 -U lock:w:0x3f:m avrdude -c buspirate -p m328p -P COM7 -U efuse:w:0x05:m -U hfuse:w:0xD2:m -U lfuse:w:0xFF:m -U flash:w:optiboot_atmega328.hex -U lock:w:0x0F:m PAUSE
3# Then, simply run in command line, waited for 10 mins (yes, it is a bit slow) and the job was done.
4# Plug USB cable, just build a “blink” sketch and successfully upload and run. LED at PIN-13 is blinking successfully 😀 .
Finished DIY Arduino board.
5# Side by side with original Arduino.
Last job is need to attach all and make the first run.