---------------Getting along in the 21st Century with half the baggage you carried in the last.------------ /*************************Low cost electronic solutions for a low impact lifestyle.************************/

Sunday, August 08, 2010

DIY Arduinos

The stripboard Arduino - a simple design for about £5 in parts!

With a recent flurry of Arduino activity, I have now realised that I can never have too many Arduinos!

I'm now using them for all sorts of tasks, and it's a shame to strip down a project just to borrow the Arduino from it to try something new. So I decided it was time to start to make some cheap DIY Arduinos on stripboard and use them for the various tasks.

The Arduino is really not much more than an Atmel ATmega328, a clock oscillator circuit, a voltage regulator and a serial interface. However it is the Arduino community and the hundreds of thousands of hours (possibly millions of hours) of open source development work that makes it so much more than the sum of its parts.

Such is the demand for Arduino ICs that some suppliers are running short of ATmega328 devices! (Microchip must be reeling that it is an Atmel AVR that has been so widely adopted by the hobbyist community!).

Last night I came across the fizzPop Hackerspace in Birmingham, who are going to run a workshop to build some DIY Arduinos. They believe that a stripboard DIY "Arduino" could be built for about £4.50 in parts.

The simplicity of the design, and the fact that you can use an FTDI USB/serial cable to program it convinced me that my days of buying Freeduinos and Nanos (at £16.50 each) were coming to an end. The Nano is certainly neat with it's microUSB connector and two additional ADC channels, but the standard Arduino with its "blighted" pin-out doesn't make economic sense - especially if you are not intending using standard shields.

The 28pin DIL version of the ATmega328 is clearly the preferred choice for prototyping and breadboarding. Atmel in their wisdom, put the power and ground pins in the middle, close to the clock oscillator, which makes for a very neat and tidy clock crystal and decoupling arrangement on stripboard.

The great thing about the stripboard 'duino, is that with the right stackable header pins, you can make it plug into a standard breadboard, yet only 50mm x 25mm wide.

Using the MOSI, MISO, SCLK, power and ground pins connected directly from the "master" to the board being programmed means that copying from one board to the other would be as simple as stacking them such that these pins stack together. However, stacked Arduinos get a bit ungainly, so the thought arose of having a right angle male header on one side of the board, and a right angle female socket on the other side of the board such that two boards could be connected by placing them next to each other and mating up the SPI bus connectors.

Having a dedicated SPI connector would also allow SPI devices - such as the ENC28J60 ethernet controller to be plugged into this bus, and pick up power and ground and a chip select line too. Extending the SPI connector to 8 pins would allow three separate chip select lines for daisy chained SPI devices.

If you use 20 way stackable headers, it allows access to every pin of the ATmega328 and gives you 6 spare pins on each header for connecting a USB to serial FTDI cable and also a unique ISP "jump starter" connection - so that one boarduino could be stacked on top of another for initial copying of the bootloader - or for a complete cloning operation - as describes in this self-replicating sketch

Arduino and Internet

For a couple of years Tuxgraphics have been promoting the use of the ATmega328 with the Microchip ENC28J60 ethernet controller. Now this may be a bit heretical, when the "official"Arduino ethernet shield uses the Wiznet W5100 based shield. Indeed the official version does have better software library support, but costs a lot more. The W5100 is an 80 pin device, with both SPI and conventional address and data buses. It's available from Sparkfun Electronics for about $6 but still leaves you with the problem of putting it onto a board. Sparkfun do have a range of ethernet breakout boards but they are all close to $40 - a price that really does not reflect the value of the components on them.

The chip solution chosen by Tuxgraphics offers the lowest cost and is readily prototyped. They offer a pcb kit for about 18 Euros to which you add your own ATmega and ENC28J60. However if you are prepared to build it yourself on stripboard it offers a means to get a web-enabled Arduino clone for about £10 -£15 - which is a step closer to getting lots of AVR based smart sensors onto the 'net.

So it's clear that the next step is to put together some stripboard clones, and start working on some real applications.

About Me

I am an electronics engineer working with embedded microcontrollers within instrumentation, telecoms and low power wireless.
Applications include energy saving, renewable energy, automation for CHP and open hardware
I'm interested in renewable energy, suburban repurposing/transition and gasification for domestic heat and power.
You can find me @monsonite on Twitter