SD card which is at the core of the project comes as a bit of a challenge here, because at 5V most SD/MicroSD cards will fry after some time. SD breakout boards from reputed manufacturers are equipped with adequate logic level shifting (5V to 3.3V), but cheaper ones gathered some bad reputations in this respect. I have thought of two solutions - (1) using logic level shifter IC, or (2) powering my ATmega at 3.3V. By experimenting I have discovered that 3.3V powered ATmega outputs 3.3V when a pin is set to HIGH (quite reasonably, where will it get 5V?). But then again, there are some sensors which require 5V; at 3.3V they don't quite wake up. So, I built a dual voltage power circuit for Arduino (please see my previous Instructable here). This Arduino project is built on top of that power circuit.
I have made some unusual adjustments in this project which I am going explain in later sections.
Step 1: Bill of Materials
2) Male and Female headers clipped into different sized
3) Connecting wires
4) PC jumper - 1
5) Dual-voltage power circuit already built on strip board (from my previous Instructable)
Step 2: Design
Step 3: Power Rail
Step 4: Microcontroller
Step 5: Ports - Exposing Pins
1. ISP port: ATmega pins 16, 17 & 18 (digital pin 11, 12 & 13) in combination with pin 0 (Reset) will be used to download sketches using a proper Arduino. Digital pins 11, 12 & 13 will be connected to Arduino's 11, 12 & 13 respectively, and the RESET will be connected to Arduino's digital pin 10. Since I am using a 8MHz ATmega configuration, I don't need a capacitor at the RESET pin (I don't know why, but I do use this often). This port allows me to program my board without removing the IC.
2. At the top left, I have exposed two analog pins (A4 & A5), and a 5V power. I can use this port for attaching LM35 temperature sensor, DHT11 Humidity & temperature sensor, or 18BS20 digital temperature sensor. In fact I can attach anything which needs only one data pin and 5V power. One analog pin will be designated as GND, a 'software ground' if you like. To achieve 'software ground' I will write the following code in the sketch-
pinMode(sensorGnd, OUTPUT); //must be OUTPUT, not INPUT
digitalWrite(sensorGnd, LOW) //ready to sink return current, <25mA
3. At the top right side is an 8 pin header for attaching a MicroSD breakout board. This breakout board does not have any additional circuit, it just exposed the 8 pins of the MicroSD card through 8 breadboard friendly pins (see photograph). Since ATmega is powered at 3.3V, SD card will get only this much voltage at any time, and I assume, I don't need a logic level shifter.
4. A 4 pin port at the upper-middle and another at the lower-right will be used to connect LCD character display. These two ports are compatible with my earlier design - LCD character display breakout (please see this Instructable for details). To use LCD display using these ports I will include the following lines of code-
static const int RS=14, EN=15, DB4=5, DB5=6, DB6=7, DB7=8;
LiquidCrystal lcd(RS, EN, DB4, DB5, DB6, DB7);
6. Next to RESET pin Tx/Rx pins exposed for connecting to serial in/out.