Saturday, January 18, 2014

Creating an Atmel Xplained Pro to Arduino Adapter

It's always interesting the try to create something based on someone's specifications. This often because there is always a small element of doubt if the specification is correct, typos could have sneaked in, new revisions of the spec may exist and so on. But it's a very satisfying feeling when you get the design back from the fab solder it up and it actually fits.


Arduino Xplained Pro
 This Xplained Pro to Arduino adapter project was absolutely one of these projects. I've never made a Atmel Xplained Pro extension before, so that was the first obstacle, finding the specification to the header location and pin functions. After some poking around on Atmel.com I found the specs on this page: https://gallery.atmel.com/Partner. Next I had to tackle the Arduino specification, this was a much easier as there are loads of available Arduino projects for Eagle out there, and Arduino post the Eagle files themselves so grabbing the specifications from there was easy.
SAM D20 Xplained Pro with Arduino Xplained Pro


The Arduino specification I moved into a part in my Eagle library, so now for future Arduino shields or MCU boards I can simply add the Arduino board part, which will add the board outline and all connectors.

One thing that was a bit difficult when making the adapter was to deside which pins on the Xplained Pro header should be connected to which pin on the Arduino. And also the issue with the Xplained Pro header did not contain enough signals to fill all the signals on the Arduino. Especially the analog pins as the Xplained Pro header only specifies two analog pins per header, so the signal A2-A5 are not connected. Other than that most functions are kept, like the UART/USART, SPI, I2C are fully operational. I used the Arduino Ethernet shield as guide for which pins could be omitted without any impact on the function on that particular shield, as one of the main driving forces behind this project was to create an Atmel SAM D20 web server.

I ended up having to omit signals RST, VIN, A2-A5, AREF, 8 and 9. So all in all most of the Arduino functions are kept. The nice thing with this adapter is that it fits to the entire range of Atmel Xplained Pro boards, and opens up for using Arduino shields with the Atmel MCU's which is not officially supported by their own Arduino MCU board.

When the design was done I sent the project off to the fab, OSH Park, and waited patiently for my first adapter PCB project. I got the PCB back and things looked promising, so I sent off a few pictures to one of the people waiting for the result and I got the very fitting comment: "Now populate that sucker and let's see if it catches fire." And luckily no fires was observed once assembled and connected to the Xplained Pro board. And within a few days the Arduino Ethernet shield was up an running on the SAM D20 using Arduino C++ code.

The finished design with Eagle project, schematic, board and gerber files are available here: https://github.com/ivarho/ArduinoXplainedPro.

Or one could go directly to the OSH Park and order the design: http://www.oshpark.com/shared_projects/X7ivSLb0.

For the Eagle library: https://github.com/ivarho/eagle_library


Edit:
I found an issue with version 1.0 where the SDA and SCL pins was interchanged, this has now been fixed in the version 1.1 of the board, the repos (both library and project) and the OSHPark shared project link has been updated.