Bank - Project and Downloads
Introduction
Searching on the net on Arduino and Arduino web-sites you will find a lot of projects and ideas about the use of EEProm devices as a non-volatile storage method to save data. Arduino is equipped with its own - very small - EEProm memory to save configuration parameters and much more. Arduino boards have about 32 Kb - or even less - storage area and users experience the need to expand it in an affordable and robust way.
The development of a memory bank based on I2C bus EEProm relates to the creation of some kind of software in order to offer at least the possibility to access every memory location regardless of the number and kind of physical devices actually used. Following this way, we developed this memory Bank, aka EEProm 128x8 in respect of these requirements. After having carried out tests and made changes to the first hardware prototype, we are now releasing hardware version 2.1, part of the Bank project 1.2
A good explanation on how I2C protocol works with Arduino can be found on Keith's Electronics Blog.
Electrical Diagram
The diagram is downloadable in pdf format.

As you can see in the diagram above, there are 8 devices stacked with a two-wire connection. As a matter of fact, I2C bus EEprom devices of AT24Cxx series can be stacked up to eight more different devices (in some case only 4 devices can be stacked, but it doesn't matter). All the eight device address on pins A0, A1, A2 are configured to hardwire the binary values from 000 (all pins low) to 111 (all pins up). The same circuit can work with less than eight devices, as described in the datasheet.
To have a complete explanation of all the kind of devices you can buy, refer to a list of I2C EEProm on sites like rs-online.com, digi-key and more.
The logical addressing and configuration of the software library AT24C must be coherent with the phisycal number of devices you connect on the board and their binary addressing. For more information on device control and addressing via the I2C bus, read the knowledge base documentation about this project.
Bank 2.1 Part List
Note: IC AT24CP can be one of the AT24Cxx series such as AT24C128B, AT24C1024 etc.
Part Value Device Package Library
C2 0.1 mF C2.5/2 C2.5-2 capacitor
C3 0.1 mF C2.5/2 C2.5-2 capacitor
C4 0.1 mF C2.5/2 C2.5-2 capacitor
C5 0.1 mF C2.5/2 C2.5-2 capacitor
C6 0.1 mF C2.5/2 C2.5-2 capacitor
C7 0.1 mF C2.5/2 C2.5-2 capacitor
IC1 AT24CP AT24CP DIL08 atmel
IC2 AT24CP AT24CP DIL08 atmel
IC3 AT24CP AT24CP DIL08 atmel
IC4 AT24CP AT24CP DIL08 atmel
IC5 AT24CP AT24CP DIL08 atmel
IC6 AT24CP AT24CP DIL08 atmel
IC7 AT24CP AT24CP DIL08 atmel
IC8 AT24CP AT24CP DIL08 atmel
J1 I2C Bus MTA02-100 10X02MTA con-amp
J2 PWR MTA02-100 10X02MTA con-amp
R1 10k R-EU_0204/7 0204/7 resistor
R2 10k R-EU_0204/7 0204/7 resistor
R3 10k R-EU_0204/7 0204/7 resistor
R4 10k R-EU_0204/7 0204/7 resistor
R5 10k R-EU_0204/7 0204/7 resistor
R6 10k R-EU_0204/7 0204/7 resistor
R7 10k R-EU_0204/7 0204/7 resistor
R8 10k R-EU_0204/7 0204/7 resistor
R10 1k R-EU_0204/7 0204/7 resistor
R11 1k R-EU_0204/7 0204/7 resistor
R12 1k R-EU_0204/7 0204/7 resistor
R13 1k R-EU_0204/7 0204/7 resistor
R15 1k R-EU_0204/7 0204/7 resistor
R16 1k R-EU_0204/7 0204/7 resistor
R18 1k R-EU_0204/7 0204/7 resistor
R19 1k R-EU_0204/7 0204/7 resistor
R20 1k R-EU_0204/7 0204/7 resistor
R21 1k R-EU_0204/7 0204/7 resistor
R23 1k R-EU_0204/7 0204/7 resistor
R24 1k R-EU_0204/7 0204/7 resistor
R25 1k R-EU_0204/7 0204/7 resistor
R26 1k R-EU_0204/7 0204/7 resistor
R27 1k R-EU_0204/7 0204/7 resistor
R28 1k R-EU_0204/7 0204/7 resistor
Board layout
Eagle board layout and electric diagram can be downloaded in zip format here.
Following the diagram, you can solder on the PCB board eight different devices (of the same type).
The best way to get a more versatile board is to solder DIL sockets, so you can use the same board with different devices. For example, it is possibile to work with 8 low-cost AT24C128B able of a total storage of 16,384 x 8 = 131,072 bytes. Substituting the devices on the socket , you can work with more storage space adopting AT24C1024 devices.
During our testing and experiments, we worked a lot with this kind of board in very different conditions with optimum results in terms of robustness and usage.
The importance of a good PCB
Due to the fact that I2C is a syncronized data bus and that we are working with storage components, to obtain the best results the right way is to work with a PCB as small as possible, with good soldering and using the listed components.
Components and circuitry
Initially I done a very simple circuit design, as shown in a lot of examples, but all working fine with ONLY ONE DEVICE. Trying to replicate the same circuit block for two or more identical devices, the only set of address that was working was those corresponding to the first phisycal EEProm, regardless if it was 128k or 256K size. Arduino users knows that usually pull-up resistors are not needed using pins 4 and 5 of the analog port on Arduino for I2C bus. When you declare the use of these pins through the wire library in fact the two lines are automatically set with their internal pull resistors. It's right, but it happens without problems when you work with ONE device. Thus to obatin the same results with eight the song is not the same. As shown in the electrical diagram, every device has al lthe needed components to grant the right addressing and stable cycles of read/write without problems.
EEProm devices
The choice of the kind of eeprom devices is essentially free for the user. Anyway, the following aspects mus be considered:
- Bank 1.2 works fine with AT24Cxxx devices and 24LCxx. The difference is that while Atmel devices has some limitations in the number of units that can be stacked (1024B and 256B types can only be stacked in four device per I2C bus) while all 24LC models support up to eight devices at a time.
- There are no particular limitations to use other kind of devices, but before plug then in the sockets you must check on the datasheet the pinout correspondance and current operating values to avoid any problem. Bank 1.2 work at 5 V, but you can use also 3.3 V components changing the power connection to the board.
- If you plan to use your project in a battery-operated environment, take care of the power needed to work wth EEProm you plan to use, before to decide what kind of devices you want to use. As you can read in detail in the knowledge base, software will work without problems on all devices you want to use.
SMD
A version of the same board was also developed using SMD components and the results obatined with this downsized version are the same with some limitations.
Using SMD devices, the PCB layout is smaller but you shoud have clearly in mind what kind of devices and how many units you want to use before starting to build the circuit. Then, you should to remove all the devices you don't plan to use with special attention to the addressing pins. I.e. if you plan to use two devices only, you should remove from the circuit all devices having the hardware addressing bits (A0, A1, A2) from 010 to 111 and lonly eave the first two (addresses 000 and 001).
Modifying the Diagram
Eagle diagram (the .sch file) must be changed in two steps:
- Substitute on the electrical scheme all the components replacing the devices with the same SMD version (see part list), including resistors and connectors, that must be resized accorging with the new component dimensions.
- Remove from the diagram the unused blocks (AT24C device, resistors, capacitor and connections) leaving only the desired number of devices paying attention to the hardware addressing pins A0-A2.
Now, re-check the diagram and voilà: create a new board and reposition the components.
Arduino Environment
Due to the position of the four connectors - two wires for Vcc/GND and two wires fo I2C bus - this board is breadboardable and works best with Arduino and Arduino- compatible boards.
You'll find some facilities developing applications on Arduino, using the example software and AT24C library were developed using the Arduino IDE.
As a matter of fact, there are no limitations to work with different microcontroller boards: all the processors we know support I2C bus and the sources are easily adaptable.
Software Library
The Bank board works with the AT24C library. The software was initially inspired to AT24C1024B library for Arduino with some enhancements. You can found other information on I2C EEPROM protocol with Arduino at the following link: http://arduino.cc/en/Reference/EEPROM
Installing the Library
To install the library, download the zip file AT24C to your computer and unzip the folder in the library folder of the Arduino IDE. Then, start or restart the IDE.
For more information about software applications and library use see the Knowledge Base. The code itself is auto-explanatory and fully documented, but it is a good idea if you read the addtional informations provided here.
