DIY csCNC Controller – 3 (DIY Arduino Board and Programming with BusPirate)

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.


DIY-Arduino-Hardware (1) DIY-Arduino-Hardware (2)

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.

DIY-Arduino-Hardware (5)

DIY-Arduino-Hardware (6)

3# The back side or perfboard PCB.

DIY-Arduino-Hardware (7)

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.

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

3# Then, simply run in command line, waited for 10 mins (yes, it is a bit slow) and the job was done.

DIY-Arduino-Firmware (8) DIY-Arduino-Firmware (9)

DIY-Arduino-Firmware (1)

4# Plug USB cable, just build¬†a “blink” sketch and successfully upload and run. LED at PIN-13 is blinking successfully ūüėÄ .

DIY-Arduino-Hardware (15)

Finished DIY Arduino board.

DIY-Arduino-Hardware (16)

5# Side by side with original Arduino.

DIY-Arduino-Hardware (17)

Last job is need to attach all and make the first run.

By Oakkar7

Protostack ATmega168A development kit and USBasp programmer arrived

I won an ATmega 168a development kit form DP days ago. The kit is provided by Protostack.

Today, I got the the board, accessories. Not only development board and also a  USBsap programmer.  How amazing support for developer.

Thanks to DP and Protostack. As promised, I will construct a DDS signal generator (+ more optional features).

A through, brief review for kit,

  • ¬†Well designed and good quality PCB
  • Doubled side PCB but for through hole components ( as a developer, I love to solder through hole although SMD parts are¬† fun for me)
  • Plenty of spaces for prototyping area
  • Two area, controller, power, ISCP, ICD and development area
  • development area is breadboard friendly
  • Boards are stack-able style
  • Can be power with CR2032 battery clip or USB (optional)
  • Well documented

For programmer;

For interested, closed up photo from