Intro: Build "The RevIO" (Arduino Clone) My Way
Updated Aug 23, 2012
Three months ago I submitted instructables into one of the challenges, and was selected to received Free 3D print. I chose to have my 3x3x3" 3D print instead of a famous 3D instructable robot.
My 3D print got delivered in the 123D box, to my door three week ago. Also included in the box are an instructables patch and stickers.
Thank you very much for the Free3D Print program and everyone behide this program, otherwise I won't be able to see my project moving forward to this point.
And also I got my prototype board made.
See picture 1, 2, and 3.
Updated May 30, 2012
Recently I got some comments (offline) from an expert who is in electronics field and owns a company for more than 40 years, aka gatech, regarding the way I described this instructables. Gatech is also helping me editing this instructables and my other instructables as well.
I looked into it. (I'm not originally speaking English as original language.) I realized that the comments are all make senses, i.e grammar, the way I phrase the sentences. So I decided to revised this instructable accordingly.
Thanks gatech, I do really appreciated your help.
Updated April 11, 2012
Added Schematic and Board Images, Top Layer, Bottom Layer and Both Layers, Bill of Materials(BOM).
There are so many different sizes and shape of Arduino and Arduino compatibles available out there. Arduino is not limited to one particular processor, the widely use micro-controller are Atmega8, Atmega168, Atmega328, Atmega1280, and Atmega2560.
Since I am familiar with Atmega328 the most, I choose Atmega328 as the brain of RevIO.
I have been used both official Arduinos (Duemianove, and Mega) and AdaFruit's Arduino clone (USB Boarduino and DC Boarduino) as well as built my own Arduino compatible for permanent task, such as TagTool Nano. I still like to use those boards, but at the same time I want to built an Arduino compatible that emphasize and group the communication pins other than on typical Arduino.
Arduino is designed to expose almost all the micro-controller's input/output pins easily allowed to connect or communicate to other circuits. There are 14 digital I/O pins, six of them are optional or selectable PWM (Pulse Width Modulation) functions and six analog inputs.
On the official Arduino (Extreme, NG, Diecimila, Duemilanove, and the latest Arduino Uno) there are four header strips located on the top of the board. One 6-pin female receptacle is for power supply, both 5V and 3.3V, ground lines, Vin and Reset. The second 6-pin female receptacle is for six Analog pins. These two 6-pin female header rails are located 0.1” apart. Other two 8-pin rails located on the other side of the board, and sat 0.15” apart. These two 8-pin female header rails are used for all 14 digital I/O pins (D0 to D13.)
ATMega328 has three type of selectable functions communication protocols (I2C, SPI, and Serial Communication), I want to separate and group these communication protocols on the same header strips. I needed to use at least nine pins, two for I2C, two for Uart Serial Comm., three for SPI , two for 5V and ground. I want to maintain the 3.3V to power the devices that require 3.3V, and an extra ground, and add the reset pin into this group too. That makes the total of 12 pins.
So I decided I to use two 14-pin connector strips on each side of the RevIO board rather than separate the connectors to two 6-pin connectors and two 8-pin connectors. It makes sense, and it is the same amount of pins on each side of Atmega328!
I want to built this Arduino compatible on a typical commercial available PC Board, without modification like trim or cut, and the size of the board should be about the same size of official Arduino board. And I want to have the board encase in the proper project case, so I could carry with me anywhere or use it in-field without fear that the board is exposed, or I would break or do harm to the exposed board while working outdoor. And I was also thinking of a way to accommodate the wireless communication, such as affordable Xbee or Bluetooth, on the board so I could easily use “The RevIO” to communicate with another devices “wirelessly.”
The most obvious physical properties of The RevIO:
Two 14-pin female receptacle are used instead of four female receptacle of 6 and 8-pin females receptacle.
Group the Communication ports (I2C, SPI, and Serial Comm. Ports) on one receptacle strip.
Allows piggy back breakout board or RevIO compatible shield to be stacked over.
Encase the board in the custom-designed project case.
Color Codes and IO pins ID are labeled on the project case.
Voltage regulators (both 5V and 3.3V) are included.
XB-Buddy, or compatible Xbee adapter kit ready.
Step 1: Schematic, and PCB Images
I decided to add the schematic and Board layout of both top and bottom layers, and BOM (Bill of Materials). Just in case, if some one want to DIY the board. So one could use these schematic, board images and BOM as the reference.
Note: There are few components that appeared on the schematic that I added on later, which are
R4, R5 - 2.2K resistor for I2C bus, so I do not have to added the resistors in case I want to connect to I2C device in the future.
JP4 - 2x3 male pin header as a standard ICSP.
Note: 3.3V Voltage Regulator shown in the schematic is L78L33ACZ (Digikey #497-7288-ND) but shown in step 10 (VR2) used MCP1700-3323 TO-92 (DigiKey #MCP1700-3302E/TO-ND) and both have different pins configuration, see datasheet for the information.
Step 2: Things You'll Need...
IC1 - Atmega328P with bootloader (Adafruit ID#123)
R1,R3 - 1K Resistor (Radio Shack #271-1321 or Digikey #PPC1.0KW-1CT-ND)
R2 - 10K Resistor (Radio Shack #271-1335 or Digikey #10KQBK-ND)
D1 - Diode 1N4001 (Radio Shack #276-1101 or Digikey #1N4001DICT-ND)
C1, C6 - 100uF/16V (Digikey #P833-ND)
C2 - 10uF/16V (Digikey #P807-ND)
VR1 – Voltage Regulator 78L05 TO-92 (DigiKey #LM78L05ACZFS-ND)
C3, C4, C5 - 0.1uF/50V (Digikey #BC1160CT-ND)
LED1 3mm LED Red (Digikey #160-1708-ND)
LED2 3mm LED Green (Digikey #160-1710-ND)
6mm Push Button (Digikey #SW400-ND)
16MHz Resonator (Digikey #X908-ND)
28-pin IC Socket (Digikey #3M5480-ND)
SW Slide DPDT Switch (Digikey #401-2000-ND)
6-pin Male header, Right angle (Digikey # S1111E-36-ND)
Power Jack 2.1mm Connector (Digikey #CP-002A-ND)
(2) 14-pin Male header, extra long pin or use shield stacking headers (Adafruit ID#85)
Multipurpose PC Board with 417 holes (Radio Shack #276-150)*
Project case (TPE Shop)*
*NOTE: The reason I used Multipurpose PC Board with 417 holes for this project is, because on my last trip to Thailand in February this year. I got a chance to visit a local electronics store and got a couple of project case that I want to use on some project And it cost me less than $1.00 per case. I had in mind. And I found out later after I got back to US that this project case fit perfectly well with Radio Shack's PC Board with 417 holes (Radio Shack #276-150). I don't think that this project case is on the products list on the website.
Step 3: Lay It Out...
Before I start to put components on the PCB, I will roughly put the large component on the PCB to see if the component fit. I noticed that on the Multipurpose PCB, the number of rows if different on each side, one has two rows of independent holes, the others has three rows. So, I pick the three rows for power jack, and 5V Regulator components. And place the processor's (ATmega328) pin 1 to 14 to be on the three rows, so I could place the resonator on the board without difficulty.
And I will place the 6-pin right angle header which will be used as the connector to FTDI cable for uploading the program to Atmega328.
For the switch, I will place it on the same side of the power jack.
Note that I also mark the placement of the 14-pin rails on the outer most of the PCB.
Step 4: Tools...
Solder iron and Soldering Work Station
Solder - Rosin Core (Radio Shack #64-013)
etc. (something else that you might want to use.)
Step 5: The Hardest Part
First of all, I made the slots on the PCB to accommodate the power jack's legs.
I use the X-ACTO knife, slowly and patiently scored the hole (be careful using the sharp object!) a little by little until I got the hole fit to the power's jack pin.
The hardest part is done!
Step 6: The Fun Part...
From this step on, I will use the illustrations together with the real photos to show you where and which component goes on to the board.
The board is exactly the same as the board I mentioned in the part list (Radio Shack #276-150). And it is easy enough to figure out where the components is located at. This will be easy for both of us, instead of using the words to explain where the component is to be located.
The way I oriented the board is to have the three individual solder holes at the lower end of the picture, and the two individual solder holes will be on the upper end of the photo. Ad I also provide the bottom view to show you how I did my solder on the bottom of the PCB, and the Layout of the PCB.
Add Resonator, Capacitors, Diode...
I added 16Mhz Resonator to the PCB.
And two 0.1uF Capacitors (C3, C4) , as seen in the following diagram. Since the capacitors do not have the polarity, we can solder them in right away. Then trim the legs with Diagonal cutter.
Then, I added the D1 - diode (1N4001) at the end of power jack (see diagram), we need to be more careful, since it have polarity.
I placed the diode vertically to save the space. On the body of the diode there is a white stripe at one end, I placed that end away from the power jack. Then, I soldered the power jack and the diode together.
Next component added was C1 - 100uF Capacitor. The C1 also have the polarity, I placed the positive (+) leg of the polarity next to the diode (D1) and the negative(-) away from the diode. Then I soldered the diode leg and the capacitor together.
Next component was the VR1 - 5V voltage regulator, notice the way I inserted it in, the face of the regulator is upward.
And I soldered the bottom of the board as in the diagram.
Then added C2 - 10uF capacitor on to the board next to the right leg of the 5V Voltage Regulator. Note that this capacitor is also have polarity. The positive (+) of the capacitor is placed next to the right most of voltage regulator. Then soldered these two legs together.
And I conected the ground (negative) end of C1, VR1, and C2 together.
And connected the forth pin of the bottom rail to this ground line as well.
Then connected all the ground and positive power line together.
Also connected the bottom most of resonator to pin 10 of the micro-controller.
Step 7: Break Point...
Yeah, we reached the break point!
I did tested on the power supply. I used the multimeter to read the value out of pin 7 (positive) and pin 8 (negative or ground) and hook the 9V battery to power jack.
The reading from the multimeter was 5.04V. I was happy. I did thing right!
Step 8: Add Visual to Power Supply, Test LED on D13, Reset Button and FTDI Connector...
After I finished the previous steps. I realized that I needed the visual for the power supply, so I could see if the PCB is connected. So I added the LED1 - 3mm red LED next to the power jack. And also added the R1 - 1K resistor next to the red LED.
Next, I connected the C3 - capacitor that sat next to FTDI header connector, to the pin 1 of the micro-controller. And added R2 - 10K resistor on to the board next to reset pin (pin 1) of micro-controller too.
It is a good idea to maintain the " test" LED similar to Arduino which has the "test" LED connected to pin D13. So I connected R3 - 1K resistor and LED2 - 3mm green LED onto the board.
After I connected all the wire of green led and resistor to pin D13, I installed the push button on the top right corner of the PCB.
Next I connected 5V pin and ground pin of FTDI to the 5V and ground line of the PCB.
Then connected the RXD and TXD of the FTDI connector header to pin 2 and 3 of the micro-controller.
Step 9: Test Again...
It’s almost done! Why? Because I want to have 3.3V available on the rail to since there are so many divices using 3.3V power. And I could use another break.
I did another test by inserted the micro-controller ATMega328 with bootloader. (I got the preloaded ATMega328P from Adafruit.) Then loaded the sketch via FTDI Cable.
Everything went well, the green LED was blinking.!! Yeah!
Step 10: Add 3.3V Power Supply...
We need three more components in order to add 3.3V power supply. The three components are:
C5 - 100uF/16V (Digikey #P807-ND)
C6 - 0.1uF/50V (Digikey #BC1160CT-ND)
VR2 – Voltage Regulator MCP1700-3323 TO-92 (DigiKey #MCP1700-3302E/TO-ND)
Note: VR2 - 3.3V Voltage Regulator shown on the schematic (IC3) is L78L33ACZ (Digikey #497-7288-ND).
I connected all the wiring between the microcontroller and the two 14-pin rails on both sides of the board. And I did installed the two 14-pin male header rails to the board.
Then I connected the pins to two 14-pin rails on the bottom of the board accordingly.
Step 11: Case...
I had a small problem with the power jack, it was too high to be in the case. So I cut out the top of the case to fit the top profile of the power jack. Then I cut out the side to make the slot for the FTDI cable. And then mark the opening for the two 14-pin rails.
It would be hard if I used the knife to cut the slot. So I used the very small drill to drill the hole along the line, the use the X-ACTO knife to score along the dotted drills.
For the pins label, I printed my layout on the Clear Sticker Project Paper (Avery #4383) available at stationaries (Office Max, Staple, etc.) and cut and paste onto the top of the box.
And the final test!
Step 12: Usage...
As I mentioned earlier in the Intro. Here is the pictures show how XBee could be installed right on top of my “RevIO”.
This is the photos shows how I used my RevIO with a Robotic Arm Edge that I modified, and added motors control board and XBee to control the Robotic Arm Edge.
- Test uploading the "blinking LED"
- with force sensors (from - http://arduino.cc/en/Tutorial/Tone3)