Monday, June 24, 2013

PaintDuino: A first attempt at Open Source Hardware

In my peripheral vision I have been watching the Open Source Hardware movement grow via Sparkfun and Adafruit and have become increasingly interested in being a part of this transformation. For my first OSH project, I picked designing an Arduino Leonardo compatible paintball control board I call the PaintDuino.

While I have several years of experience designing paintball control boards using Microchip (PIC) microcontrollers, the Arduino platform is all new to me. I am pleased to see that all the reference designs are published, the IDE is based on C++ and there is a vast support network available for when you hit a bump in the road.

First step in any electronics project is to do some basic research. The better you do this, the fewer unpleasant surprises you run into later. With so many Arduino and compatible designs available to study, I needed to nail down the requirements of the project a little better to get some direction. In particular, I wanted to enable the user of this board the ability to reprogram it, supply some examples of state machine based software design and make it a fun learning experience. In addition, the board size is constrained since it needs to fit into the grip frame of a paintball marker.

The options I came up with were make an Uno compatible or a Leonardo compatible. If I went with the Uno, I would need to also design a FTDI based USB interface board to enable programming it since there wouldn't be enough room on the board to have it integrated in. This would drive up the total cost of the solution and make it less convenient to use. If I went with the Leonardo, then I am confronted with the issue of obtaining a vendor ID for the USB bootloader.

Looking into what is involved with getting my own VID, I was shocked at the staggering cost on the site ($5000!). It would almost seem their intent is to prevent small scale manufacturers from entering the USB device market. Microchip has enlightened attitude toward this issue and will provide a PID to use under their VID for small sized projects (< 10,000 units). At this time, Atmel is not offering this solution. Thinking I had likely hit a hard stop on the Leonardo path, I waffled back and forth for a couple of weeks on what to do. It turns out, giving myself some time to resolve this was the right thing to do. I stumbled upon the Openmoko site and they are offering a PID to use under their VID free of charge as long as your project is published under an open source license. I have only recently published my design files on Github and sent a request for a PID from Openmoko. Problem solved: I received my PID after only a few days!

Having finally finished the design of my first Arduino Leonardo compatible board, I needed to get a prototype built for testing and I wanted to do it on the cheap. I have always used PCB Pool to get my boards built for my previous commercial projects as they have customer service that is beyond compare, but cost a little more than some other options. I decided to try OSH Park out of Portland Oregon, submitted my Eagle board file and crossed my fingers.

My design flew through the automated design rule check and popped up a nice rendering of what my board will look like, purple solder mask and all. I was excited about getting my first OSH project launched until I noticed that I had made a mistake on the footprint for a RGB LED and would have to scrape off the misplaced solder mask to expose the pads. I quickly fixed the bug in my parts library and sent a hopeful email to OSH Park. I received a same day response from them and they graciously agreed to accept my updated file. I was so relieved and very impressed with the customer service. I should be receiving my boards in a couple of weeks and will report back on the quality and workmanship.

You can find the design files at