Meet the Teensy 3.1

[Paul Stoffregen] just released an updated version of his Teensy 3.0, meet the oddly named Teensy 3.1. For our readers that don’t recall, the Teensy 3.0 is a 32 bit ARM Cortex-M4 based development platform supported by the Arduino IDE (using the Teensyduino add-on). The newest version has the same size, shape & pinout, is compatible with code written for the Teensy 3.0 and provides several new features as well.
Meet the Teensy 3.1
The Flash has doubled, the RAM has quadrupled (from 16K to 64K) allowing much more advanced applications. The Cortex-M4 core frequency is 72MHz (48MHz on the Teensy 3.0) and the digital inputs are 5V volts compatible. Pins 3 and 4 gained CAN bus functions. The new microcontroller used even has a 12 bits Digital to Analog Converter (DAC) so you could create a simple signal generator like the one shown in the picture above. Programming is done through the USB port, which can later behave as host or slave once your application is launched. Finally, the price tag ($19.80) is in our opinion very reasonable.
Embedded below is an interview with its creator [Paul Stroffregen].

[Mathieu] Hi Paul, I’d like to first thank you for giving us some of your time for this interview. Could you tell us what are your motivations behind the Teensy project?

[Paul] I’ve been publishing electronic hobbyist resources since 1991, starting with the 8051 chip. Teensy 3.0 & 3.1 are my attempt to bring powerful ARM microcontrollers to hobbyists. They run code faster, but optimized native libraries are what really facilitates projects. Earlier this year I wrote OctoWS2811, for controlling thousands of RGB LEDs at video speeds. Many awesome builds have used it, like the Disorient Pyramid. Recently I’ve been working on an advanced audio library. Developing these platforms that enable so many people use to build such awesome projects really is my passion.

To be honest, a secondary motivation is business related. PJRC’s main focus is developing technology for hobbyists, which is distinctly different, and not nearly as profitable, as selling as many products as possible at good margins. This market is quite competitive, with many microcontroller boards and even new software initiatives appearing regularly. PJRC can’t rest on its laurels. Teensy 3.1 is meant to really step up the technical capability a hobbyist can buy for under $20 and utilize easily with excellent Arduino compatibility. I’m also pretty motivated to build projects myself, or contribute to big projects, especially for Burning Man.

[Mathieu] What kind of projects are done with Teensy?

[Paul] Scrolling through the Teensy Projects page can give you great visual idea of what people have made. My personal favorite is the motion sensor that wakes your computer up before you sit down in your chair. Why didn’t I think of that?! MIDI controllers, specialized USB peripherals, and LED projects have been popular themes.

[Mathieu] What do you think of Arduino now that Teensy is compatible with it?

[Paul] Arduino is awesome. We have the same goals. They focus more on absolute beginners and I cater moreso to ambitious creative types, but we’re both about building a platform to enable people to make projects. I’ve contributed regularly to Arduino over the last 4 years while developing Teensy. I’m happy to say my relations with Arduino have greatly improved in the last year or so. I believe we’re going to collaborate more in the coming years. Here’s some of my past contributions to Arduino.\

Regarding Arduino compatibility itself, doing it well on anything other than 8-bit AVR is far more challenging than most people realize. Implementing a few dozen functions like digitalWrite() is only the beginning. For example, this afternoon I built special test hardware I’m sending to a developer of the host shield library (that library is already compatible… this is new speed-optimized development). This morning I worked on a null pointer bug in a wifi library, and yesterday I submitted a patch for a specialized graphical LCD library. Features no Arduino boards have, like Teensy’s Tools > USB Type menu for non-Serial options, really compound the required effort. I personally love doing this technical work, but the point is [that] excellent Arduino compatibility isn’t a destination, but a continuing journey.

I know some regular Hack-a-Day readers don’t love Arduino. As a long-time vi user, I activate Arduino’s “external editor” feature. But it’s undeniable how well Arduino has enabled novices to build projects. However, I am planning to start publishing a non-Arduino package next year, which includes all this effort for libraries and features that “just work”. Today you have to install Arduino and then find a makefile the Teensyduino installer buries within the core library, without much in the way of documentation or help. Many people have indeed done exactly that, but I could do much better for more advanced users who don’t want to touch Arduino or use an installer.

[Mathieu] What have you learned in all your experiences?

[Paul] I’ve learned a lot about making technology easier for people, but quite frankly, much of what I’ve learned is that I still have a lot more to learn! I hope to do much more, and do it much better, in the coming months and years.

Switching to a 32 bit microcontroller, and especially writing a DMA-based USB stack and libraries that leverage the DMA controller, has also been quite a learning experience. Over the course of 22 years programming 8 bit MCUs with fairly simple peripherals, I’ve developed paradigms based on such limited hardware. Many of those techniques still apply, but this more powerful hardware, especially the DMA controller, really opens up a lot of possibilities I had never really considered before. In fact, that’s one of the Teensy 3.1 improvements I’m really excited about, going from only 4 to 16 DMA channels.

0 comments:

Post a Comment