November 28, 2010

Minimal Arduino on a (small) stripboard

This is the schematics of a minimal version of an Arduino on a (very small 10x16) stripboard. It uses the main components from the official Arduino schematics to replicate a project on a separate board (does not include power supply circuitry and USB serial communication).


Note: with respect to the previous posts in this blog on other minimal versions, this one uses a more correct wiring of the analog section (as in the official board, and according to ATMEGA328 datasheet).

UPDATED: here's a picture of a physical realization:


November 14, 2010

Very Easy Project Box

I was looking for an easy project box to host projects based on Arduino (in a minimal realization like this one).

I came across some old VHS tapes and the plastic case seems really easy to manage (make holes etc.).


It's also very easy to remove the transparent sheet: simply rip it off:


The resulting case is really nice:



There is also plenty of space inside:



Moreover it closes quite firmly but is easy to open whenever it's needed.

November 13, 2010

Arduino Ethernet Shield modification to solve Wiznet chip SPI bug



Using my "old version" - Wiznet chip based - Arduino Ethernet shield, I run across the well documented Buggy Wiznet SPI, but I did want a solution that was hardware, and not software as the solution proposed in the Playground. This solution is sacrificing one precious pin on my Arduino board and requires library code changes; moreover, as you will see in a moment, I'll need a pin on the Arduino board to have control on the Ethernet shield reset.

So I've decided to follow the suggentions very well described in this post on the Arduino Forum.

I've used an MC14069 Hex Inverter, following this connection schema:



This is the schema I've used to realize the modification on a stripboard to be plugged on top of the Ethernet shield:


And here's the steps, starting desoldering the SD card holder (unusable on this shield) to be used in future projects:


Here's the SD card holder (will fit nice on the copper side of a stripboard):


I've then added two female pin headers on the PROG pad on the shield:


This is the back of the stripboard, with the pin bended to fit the pin on the PROG pad:


The MC14069 chip socket:


The small patch-board sitting on top of the shield:


The reset pin of the Ethernet shield bended, because it will not be used anymore. Why? I've taken another suggestion from the forum and will implement the shield reset via software ('cause I believe I'll have more control and flexibility):


Here's the wired and completed harware patch. You can see the white cable that can be put in any free pin of the Arduino board to control the reset of the Ethernet shield (in this case it is digital pin 2):


The reset is done with some code like this:


void init_ethernet()
{
 
pinMode(2, OUTPUT);    // sets the digital pin as output
 
digitalWrite(2, LOW);
 delay(1000);           // wait for ethernet chip to reset
 
digitalWrite(2, HIGH);
 delay(1000);           // wait for ethernet chip to reset
 
pinMode(2, INPUT);     // sets the digital pin input
 delay(1000);           // wait for ethernet chip to settle down

 Ethernet.begin(mac,ip,gateway,subnet);
 //etc...



November 6, 2010

RTC (Real Time Clock) for Arduino

This is a Real Time Clock (RTC) realization for Arduino, based on Dallas DS1307 common and affordable chip.

References for this implementation are this excellent tutorial from Adafruit, and this excellent DS1307 library.

This is the schematic of the circuit realization on a stripboard:


This is another schema for a minimal realization on a stripboard:


It takes into account the recommendations in the DS1307 datasheet for crystal layout:


And here is the realization sequence on the stripboard:














My battery holder is for CR2016 or CR2032 batteries:


Here's the finished stripboard with the battery in place:


This is how it is intended to be connected directly to the Arduino board (powered directly from Arduino analog pins as suggested by Adafruit tutorial):


Here's the board snapped into the Arduino one:


And here's a detail of the connection:


To configure the RTC board, I've used the following sketch, derived from an example from the RealTimeClockDS1307 library by David H. Brown modified to be compatible with the layout suggested by Adafruit to power the RTC directly from the Arduino Analog pins. Through this example it's easy to configure all RTC values and parameters and to see how it works:
RealTimeClockDS1307_Test_SETRTC_v1.pde
(compiled with Arduino IDE 0022)

This is a test on the SQW/OUT pin of the RTC board, powering the board and connecting a LED+resistor to that pin (it will flash following DS1307 configuration, in my case once per second):


it could be a useful trigger for some project...

UPDATED: here's another (smaller) realization moving the battery holder: