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.

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.

49 thoughts on “Meet the Teensy 3.1

  1. Cool – Teensy 3.1 – gotta get me one of them :-)
    “As a long-time vi user” – Oh, never mind then ;-(
    [/religiouswar]

    (I jest – sounds like a massive step up in terms of capabilities and I wish I’d already started using them over buying cheaply-priced dev boards from the more main-stream asic suppliers. It’s just a shame postage is so costly – I really need to find a supplier in the UK)

          1. Hi Mike,
            Thanks; I saw it appear on the main page and was about to come back to say, not knowing you’d popped in.
            Now, where did I leave my list to Santa? :-)

        1. The only thing you need to remember about vi is to type :q! (and no, that’s not some strange smiley ;-)

          I work in an engineering company where everyone has their own preferred text editor but the only thing that emacs and vi users can agree on is looking down at nedit users! :^)
          (I know enough to do basic work in vi but do most day-to-day editing in emacs but stop short of setting it up for everything that it can do)

  2. Sounds good, that are some real improvements on something that was already pretty capable. And with compatibility too it leaves little to say but praise.

  3. Does it work with Windows 7? USB drivers are a PIA and the Trinket just won’t communicate on Windows 7 regardless of USB host type or intermediate hub. OTOH oSepp stuff seems to work OK.

    1. Yes. Teensy 3.1 works great with Windows 7.

      Trinket uses bigbang USB, which isn’t fully USB compliant.

      Teensy 3.1 (and all versions of Teensy) has a real hardware USB port for fully USB compliant signals.

      Teensyduino 1.17 will be released later today, with signed drivers for Windows, which isn’t a big deal on Windows 7, but it makes things much simpler to install for Windows 8.

  4. It looks like the teeny 3.1 still has the power-sucking MINI54TAN on the board. What was the purpose of that again, assuming the M4 is running some kind of USB bootloader already?

      1. You didn’t explain what that chip is for, though. Even if it only draws 3 times the current of the M4 in sleep mode, it still adds to the BOM and uses up board space.

        1. The other comments here are the Mini54 are correct, it implements the bootloader function. These particular ARM chips don’t have built-in hardware bootloader support similar enough to AVR for great compatibility with Arduino. The Mini54 solves that issue, and as a side benefit, your program can use the entire memory of the main chip without needing an external programmer. Your program also gets to run immediately at powerup, rather than a bootloader running first for several seconds, as is done on some official Arduino boards.

          From the tone of your messages, it sounds like you may be unhappy or even angry about this design. Like most engineering choices, there are many trade-offs. Teensy 3.0 & 3.1 were designed first and foremost for Arduino compatibility and ease of use. Those choices may not be optimal for every application. If Teensy 3.1 isn’t right for your needs, rather than pressing hard to sell you a product, I’d much rather see you make an informed choice and find whatever solution will work best for your needs, even if that’s not a PJRC product.

  5. We love the Teensy, Paul and Robin!

    They were very kind and donated some Teensy 3.0’s to our local makerspace (they contacted us!!!). It was a very kind thing to do and we will definitely be purchasing more (now 3.1!) and recommending them for more projects!

  6. Does anyone else smell a new product pitch? Jk, im sure part of keeping HAD profitable requires product plugs, and I dont really mind as long as they are still useful to hackers like this one :)

    1. I don’t think Paul makes enough off of his hobby work to bribe HAD, but I could be completely wrong. He does produce products for an incredible niche audience, and surprisingly his mark-up is marginal and fair, so low in fact he cannot even offer free shipping.

    1. This is teensy though. You should see it, it is tiny. And arduino compatible.

      And incidentally, I have yet to see a damn raspi for less than 35 euros in europe, that is 48 bucks. But the teensy is actually available for a more normal price in the EU too.

    2. It’s pointless to compare something like the Pi to something like the Teensy. Sure the Pi has quite a lot more processing power but you won’t be able to get the GPIO speed of even an 8 Bit AVR with it, let alone the GPIO speed of an ARM Cortex-M4 at 72MHz.

      And like Whatnot said, it’s tiny, considerably smaller than my thumb. I haven’t seen any PIC32 boards that small yet.

      1. I just want to second this.

        I still can’t see how/why this sort of comparison continues to happen. Two different beasts. I’ve put a dozen ‘duinos and a few teensy 3.0’s to use, but my Pi just collects dust… It’s too slow to do most of what I need out of a network-connected linux box, and it can’t keep up with a bog-standard arduino (let alone a teensy) for fast/precise IO.

  7. Looks like it has a Freescale Kinetis chip. I can’t quite tell from the picture but if there is a chip also installed for OpenSDA, then it looks possible to use Freescale CodeWarrior to program for this as well. Could be an alternative for those who want a more powerful IDE than Arduino. It is ridiculously easy to configure and use peripherals with CodeWarrior.

  8. There are some M4 parts out there (STM?) that go to like 170MHz. Which one is this and why is it stuck at 70-something MHz? Is the bootloader source available or is it locked up tight?

  9. Really great news!
    I originally didn’t care for Arduino – they were after all just 8-Bit AVR’s and I had already been working with those for quite a while – but when the Teensy 3.0 appeared on Kickstarter I backed the project. It was just too appealing to finally get a 32Bit ARM Microcontroller that didn’t require a substantial investment of time (and possibly money) to get operational.
    I’ve since then used the Teensy 3.0 in numerous little projects and have started modifying the C-libraries as well as using the Arduino IDE.
    So thank you @Paul for making a true beginner friendly ARM board, that is also very affordable.
    So the next time I’ll have to restock on Teensy boards I’ll make sure to upgrade to Teensy 3.1

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s