A project log for Holst Show Controller

A Teensy based controller board to control a number of motors, plus DMX, RS232 and GPIO.

Chris RobertsChris Roberts 10/26/2016 at 22:020 Comments

Having decided that an embedded system was the way to go, we needed to decide what the brains of it was going to be. Since the turnaround time was short, a lot of it was informed by things I was familiar with that I could get up and running with, without spending too long getting a tool chain set up, or learning a new architecture. Also, something with a good ecosystem of libraries was a must to speed development up.

You know where this is going.

The Arduino environment made complete sense. It's a tool chain in a box which needs no extra setting up. So that narrows it down to boards that use that environment. That's still quite a few!

I could go for a chip on it's own, or I could go for a module. The latter means I'm not limited to things I can reasonably solder myself (at least, without excessive amounts of cursing - DAMN YOU BGAs!).

If I'm going for a module, it'd be best to be a small one to save board space (which == £££).

The Arduino Mini/micros seemed like a good (physical) fit, however, they're not exactly high powered. Working out how much SRAM I'm likely to need to hold a reasonably complicated schedule and list of sequences, I'd easily fill the 2K available on the ATmega328 or 2.5k on the ATmega32U4. Also at 16MHz, operating several serial interfaces at once, as well as processing a schedule was going to be a bit taxing.

I could have gone down the route of the xmega based boards like the Arduino MEGAs - but they're not small by any means, and if anything they're over powered, and quite pricey.

One of the things that I obviously was going to need was an RTC - didn't need to keep time really well - but can't loose more than a minute or two over a month. Of course, I could put one on the board myself, but the less I have to integrate the better.

And then I remembered the Teensy 3.1, based on the 32-bit NXP MK20DX256VLH7. It's about $20, has 64k of RAM (plenty), has 3 hardware serial ports, a built in RTC, and with Teensyduino can be programmed using the Arduino environment, and is compatible with many Arduino libraries (providing no AVR specific assembly is used inside them), or versions of them have been ported to the Teensy. Also, it's got a USB controller built into it, which'll be handy for diagnostics. Also it runs at 72 MHz! Seventy. Two. That's way more power than we'll ever need, so we can do loads of things at once without worries we'll overload ourselves.

That'll do nicely.