Icon-YouTube(250x93px).png
Icon-LinkedIn(250x93px).png

© 2017 Ian Watts

Icon Projects(48x49px).png

AVR SDK

I started to program AVRs when I began the 2nd generation of the Nav-Trax project.

At that time I had never really considered it a requirement but the first generation of Nav-Trax products pretty much used off-the-shelf products 'bolted together' and put into one big Leica case. It proved the concept and was functionally correct... if a little on the large side.

For the 2nd generation product it became obvious that if I was to down-size and add additional functionality I would have to create my own Nav-Trax 'brain'; at its heart an AVR ATMega2561V - a low voltage, 100pin, TQFP package. Although daunting at the outset it soon became like home and I spent many months designing, building and programming it and then adding additional functionality by way of logic level shifters, real-time clocks, various board-level sensors and additional comm. ports for Wi-Fi and BlueTooth functionality.

More recently, I found myself veering toward a BeagleBone Black / Raspberry Pi so that a robo I'm building (R2D2) can have the required functionality. Whilst that released me from needing to 'play' with large TQFP packages I did find myself needing additional interfaces by way of I2C and SPI. I dug out an old STK200 board from Kanda for the purpose but quickly found it unwieldy for daily and portable use - I spend quite a lot of time away from my office, travelling, and to be able to continue programming / testing whenever time permits - being able to so would be a huge boon. So...

I designed this little 'test kit' box to house the STK (and any onboard AVR I'm playing with at the time), an internal Li-Ion battery pack, a USB charger, on/off switch, the programmer and cable and a I2C OLED display. The box also has room for some 'bits and bobs' that I may be interfacing to at the time.

I've found it to be very versatile and, being Li-ion powered, enables me to work on a project pretty much wherever I am and whatever the time (like an airport cafe or a ferry !).

Anyways, here it is...

Battery, charger, socket and switch

I wanted the 'box' to be 'power independent' so fitted it with some Li-Ion batteries I had left over' from an earlier project and a suitable charger / BMS. This way it isn't absolutely necessary to be tied to a power / USB cord although once a USB cord is connected it powers the SDK and charges the battery pack. I used a standard micro USB connector.

The battery pouches provide me with about 5 hours run-time + or - a couple of hours depending upon what I'm running...

Space for the USB Programmer

I quite often find myself switching AVRs, mostly before starting a project but, sometimes, during a project (like when I add an additional feature and find I need some other hardware-specific functionality like more memory or an additional interrupt). Anyways, until an IC is on a proto-board (usually made with the CDC2 isolation router) I use the Kanda SDK200 or 300 to enable initial programming. The Kanda though needs a programmer between the onboard AVR and my computer. I tried the Kanda programmer but prefer the 'MySmartUSB' programmer. It fits really neatly in the box, one end connected to the SDK and the other presenting a female USB socket to the exterior. Simple and effective.

Simple SSD1306 OLED I2C Display

Coming from high-level programming I like to SEE what's going on in my code. I can make an LED flash (or a buzzer beep) a certain number of times based upon what I'm expecting but there's no substitute for a display !I

The simple OLED SSD1306 is just great for this and as long as I keep the look-up table tight the overhead is pretty minimal for some basic output.

I built one into the unit and connected it via the I2C but. Whilst I was at it, I added a simple I2C expansion header to the side of the OLED panel.

A place for everything . . .

Given the irregular shape of batteries, charger, BMS, On/Off switch, display and programmer etc, there was some space left over and it didn't seem necessary to 'cram' everything into the smallest space possible... Now, there's space enough for the programming and some interconnect cables...

The 'windowed' lid keeps the SDK's LEDs visible and is kept shut with some really small magnets (visible on the corners of the box and lid).

The whole thing comes in at 21cm long,16.5cm deep 5.5cm high and weighs in at under a kilo.