I just wanted to share the project I am currently working on as I know a number of people have been curious to see it.
Sorry for the long post!
The project started off around September of last year and has progressively developed into what it is now.
Ill start of saying this project is NOT complete. All of my boards are printed locally at a printer who cannot do plated through holes, or a raft of other standard things most board houses do these days. That said, each 80x80mm board only cost a few dollars (NZ), so perfect for prototyping.
The initial design was to make a controller suitable for use on a number of my friends projects. He is a mechanical engineer and has an amazing home workshop. He always has projects on the go, and I have done a number with him and made custom PCB's to do a particular task.
As I thought more about this 'controller' I decided to attempt to make something modular, more like an industrial PLC.
The very first design was 100x80mm in size, and featured a Atmega644P main processor board, which talked over I2C via cables to a Relay Board with a MCP23017 IO expander on it, and an Opto Isolated input board with a MCP23017 on it also.
It then progressed into stackable boards with headers top and bottom, and standoffs - which is where we are now. This is the 3rd revision of the design, but still far from where I ideally want it to end up.
99% of the components are Through Hole - as SMT are not really that ideal for hobby projects however are possible to use obviously. Some components are SMT however as they are the only package some chips come in, however I went for the largest size ones I could in those cases.
Anyway, onto the detail.
I have 10 PCB's current, each measuring 80mm x 80mm in size, and stack together. Each PCB has a certain function, just like an industrial PLC module.
Most of the boards are smart boards, and talk to the main processor board over I2C, via Adum1250ARZ I2C isolation/hot swap chips. Each board has isolated DC/DC power supplies, which isolates them from each other and the power supply board, so if one board goes pop - it hopefully will not effect the rest. I also have a chip on most of the boards which isolates the reset line, so a reset from the processor board will reset all the other modules. Boards can be added and removed while power is applied too - a nice to have.
Onto the pictures and the detail of each board.
The headers you will see in the pics... The large 18 pin header which runs up the spine of the 'tower' delivers power to the boards. It carries the Raw source voltage for boards which may require that, and 2 independant 5V lines, and ground. The small 6 pin header next to this is the I2C backbone (not on PSU or Comms board). There is also additional 6 pin headers on the PSU, Comms Board and Processor Boards, which do seperate things, detailed soon.
Power Supply Board. This board features 2x 5V Switch Mode power supplies, each capable of delivering a max of 3A. Whether my design is good enough to handle this, I am not sure, however I doubt I will require that much power. This board supplies power to the main bus, and each board taps off this supply via a DC/DC converter (or 2). This board has current sensors which feed an analog signal back to the Processor Board, so I can attempt to see how much current is being drawn from each supply.
Comms Board. This board has headers to plug in a Wiznet 812MJ Ethernet module, and a Sena ESD110 V2 Bluetooth Module. The Wiznet communicates to the Processor Board via SPI, and the Bluetooth Module communicates to the Processor board via Serial. This board features dual 3.3V DC/DC's, which are powered off the 5V supplies from the PSU board. This board is effectively an extension of the Processor Board, and is isolated from the main power bus, however is not isolated from the processor board.
Processor Board. This board features a Atmega1284P AVR, DS1307 RTC (I2C), 256k EEPROM (I2C), FTDI programming, ISCP programming, and a MAX232 for RS232 comms. This is obviously the powerhouse of the design, and talks to each of the modules over the I2C bus, and talks to Serial LCD's, Bluetooth, Ethernet etc. I have not yet had success making the Ethernet work with the 1284P, however I have had it working fine with a standard 328P or Arduino - so not sure what the problem is at this stage. Either a core or a library issue, but not sure which. This will be solved in time im sure.
Opto Isolated Input Board. This board features 8 opto isolated inputs, which feed into a Atmega328P. It is capable of taking 5V inputs, or each input can be toggled to take 24V too if required, so it can handle more 'industrial stuff'.
Relay Output Board. This board features 4 relays, capable of switching 250VAC @ 10A, or 30VDC @ 10A. It features a MCP23017 IO Expander.
Analog Input Board. This board uses a MAX127 which is an awesome chip. It is a 12bit ADC that has software configurable input ranges, 0-5V, 0-10V, +/-5V and +/-10V, and talks over I2C. It has buffered Op Amp inputs, which I have added resistor spaces to so the op amps can be used as amplifiers if required, for situations where you have a 0-1V input source or something like that.
Analog Output Board. This board has a 328P on it, and simply outputs 4 PWM's into an op amp, which has a 12V power source, so 0-10V analog outputs can be achieved. This board hasnt been tested yet as I forgot to order the 12V DC/DC.
High Speed Counter Board. This board features a 328P, and takes up to 4 inputs. 2 of these are hardware interrupts and 2 are Pin Change interrupts. I have a software design which accurately allows me to count very fast input pulse trains accurately. I have tested this design on an existing PCB which is being used, and it works well. I ran out of wire-to-board headers, hence the unpopulated bits. The inputs are opto isolated too, and are switchable from lower voltage inputs to higher voltage. It seems to work from about 3v to 24v or so, so quite handy.
Sensor Board. This board features a 328P, and has a port for a SCP1000 Barometric Pressure Sensor, and a port for a SHT15 or similar Temp/Humidity Sensor. It also has another port which could be used for another SHT15, or can be used for a Serial device of some kind, as its on the hardware UART.
General IO Board. This board was made (or not yet made, as is the case) to allow the 'tower' to have 16 general purpose IO. It has a Atmega644P on it, and can be used to interface to LCD's, or for testing, or push buttons etc etc. The board could even be used by itself (well, with the PSU board) as just a general 'arduino' like microcontroller.
Encoder Board. This board is in progress, and will be similar to the high speed counter, but will have a couple of encoder inputs for directly interfacing to quadrature encoders etc.
Here are some other photos, and of the tower being assembled with the standoff's. The first one is the bottom of one of the boards, showing the Samtec headers that are on the bottom. Samtec rule for free samples!
All the boards run on standard 16Mhz crystals except the Processor Board, which I have running on 18.432Mhz.
So yeah, thats it so far.
Each board has its own program obviously, and then the main processor has the main code which interfaces to the modules to do stuff/receive info etc.
Since its on I2C you can just keep stacking the boards until you run out of addresses or run out of power. Most boards have processors so the addresses can be changed easily, however some boards are MAX127's or MCP23017's, so have limited addresses, so their type is more limited in terms of quantity of those boards in 1 design.
At this stage, I only have 4 bit DIP's for addresses on the boards with processors, which obviously means the addresses will run out sooner rather than later. This will be changed in the next revision, as will a number of things. This is all just proof of concept at this stage.
But that is where I am at, hopefully someone has enjoyed the read and the pictures at least
I have 5 projects lined up which will use this concept, so very exciting times to come.
Let me know any comments, critique etc - Im here to learn too.