Why You Should Use a Teensy 4.0 or 4.1
By Artie Beavis
Before we get into the why, let’s first explore what we’re talking about. The Teensy 4.0 and 4.1 are development boards designed by Paul Stoffregen and sold at SparkFun . At first glance, these devices appear similar to a wide range of other dev boards — a microcontroller surrounded by IO pins, plus supporting electronics and a USB port for programming/power. Its breadboard-friendly form factor is reminiscent of the Arduino Nano or the Pro Micro . However, the Teensy 4.0 and 4.1 have some key differences from many of their competitors that make the line stand out. Both feature a default 600 MHz Arm Cortex-M7 microcontroller, which can be overclocked for more computing power as needed. Yes, 600 MHz , an absolutely staggering speed compared to other similar devices, which often operate in the low double-digit MHz range. Teensy memory, GPIO, and peripheral stats are similarly impressive, and a partial list of their features are outlined below. See the resources section at the end of this article for even more info and specifications. Teensy 4.0/4.1 common features: * 600 MHz Arm Cortex-M7 processor
* 1024K RAM
* Dynamic clock scaling (adjust processor speed during runtime)
* Built-in RTC support via battery input
* Overclocking possible up to 1.008 GHz (with cooling)
* Lockable versions available
* USB host port Teensy 4.0 specific features: * 1984K flash
* 24 breadboard-friendly I/O, 40 total I/O
* Compact form factor (1.4in x 0.7in) Teensy 4.1 specific features: * 7936K flash
* 42 breadboard-friendly I/O, 55 total I/O
* Elongated form factor (2.4in x 0.7in)
* 10/100 Mbit Ethernet PHY (physical layer — pins, no jack) But WHY all this p ower? At list prices of $23.80 and $31.50 as of this writing for the Teensy 4.0 and 4.1 respectively, there are less expensive dev boards available — which work well for many tasks. And while there is a robust community around the Teensy, if you’re just getting started, few (if any) boards have been documented as thoroughly as the Arduino UNO for “getting to blinky.” However, sometimes you need more resources than a typical microcontroller provides, and you don’t always know if this will be the case when a build starts. In comparison to similar devices, the Teensy’s computing power is practically unlimited — more in line with a (rather dated) PC than a typical dev board. Implementing a ridiculously capable Teensy dev board at the start of a project can be cheap insurance against having to re-engineer things later due to a lack of computing power. A time I needed MORE POWER! Some time after building my mini-strandbeest walking robot — that ran well on its Arduino Nano-based controller — I wanted to enable more audio capabilities, perhaps allowing it to talk to bystanders. This should be possible with add-on hardware, or by swapping the Nano out for a Teensy, but I never quite got that part of the project done. The thing is, if I already had a Teensy running things, perhaps my ‘beest would be walking and talking today. Sometimes it’s better to give yourself that option when you start a project, and if I could go back, I would gladly fork over another $25 or so for more powerful hardware to facilitate later expansion. On the other hand, I would have had to adapt or find a substitute for the carrier board that I used with the Nano, and potentially implement other hardware and software substitutions to suit the build. There are always tradeoffs. Notably, SparkFun sells the upgraded Arduino Nano Every , which should be a drop-in replacement if a bit more computing horsepower in this classic form factor is preferable. But sometimes you do know that you need a massive amount of computing power. Here the decision to use a Teensy may be obvious. Below are a few examples of projects I really like that would have likely been difficult and/or impossible without the Teensy’s significant capabilities and its surrounding ecosystem. Fantastic Teensy projects OH! Geodesic Dome Lighting Control The OH! sculpture is a 1:60 scale model of the geodesic dome on top of the Telus World of Science in Vancouver, British Columbia in Canada. It’s covered with 240 embedded sensors that detect human touch on the surface. As passerby slide their hands over the mini-dome, a Teensy processes this information and sends it to the science center, allowing users to control the full-sized dome’s lighting. As seen on PJRC.com and discussed on the PJRC forum . Note that this uses the discontinued, but still powerful, Teensy 3.5. MiniTouch 2.0 The MiniTouch 2.0 uses a Teensy 4.0 microcontroller to make music, taking input from 18 capacitive-touch buttons, 16 potentiometers, and a series of pushbuttons and switches. This interface allows for a wide range of control and fun music creation via its built-in speaker. It can also take MIDI signals or act as a MIDI controller itself. As seen on PJRC.com . dRehmFlight VTOL Flight Controller Nicholas Rehm’s dRehmFlight VTOL flight controller and stabilization package works with VTOL aircraft, multi-rotors, and even simple fixed-wing remote-controlled aircraft. Its Arduino-style code is meant to be easy to understand and modify for experimental aircraft designs, and runs on a Teensy 4.0. As Rehm notes in the video below, the Teensy’s massive computing power was required to properly process this advanced flight control code. More information on drehmflight.com. Additional Teensy board o ptions and accessories While the Teensy 4.0 and 4.1 are perhaps the most well-known devices in this family, as seen on the product family page , SparkFun sells a number of variations and accessories that may be appropriate for your particular build. For example, the Teensy 4.0/4.1 are available in lockable versions, which prevent unauthorized reading, cloning, or modification of the device’s code. MicroMod boards that use a Teensy processor are also available in both standard and lockable (i.e., copy-protected) versions. The rev D audio shield, Qwiic shields (for easy I2C accessory connection), a wired Ethernet kit (which provides a plug-in jack for the 4.1’s PHY), and headers round out the Teensy lineup. Powerful pinout, lots of ports In addition to a lightning-fast clock speed and ample memory, Teensy boards feature significant IO capabilities. The 4.0/4.1 have 40/55 digital pins, every one of which is interrupt capable. Each has 2 SPI, 3 I2C, and 3 CAN bus ports, though to use CAN, you’ll need to add a transceiver chip to physically interface with the bus. Consider that if you need to use multiple devices with nominally the same address (e.g., a temperature sensor or display), you can apply them to different Teensy ports/busses to avoid conflict. The built-in micro USB port is the primary means for programming the Teensy 4.0/4.1, which can also be set up to act as a MIDI, keyboard, mouse, joystick, and more. A second USB port, which operates in host mode, is also available via pads on both versions. Easy to get started While the Teensy 4.0 and 4.1 are extremely powerful, they can still be programmed using the Arduino IDE via a helper program that is automatically installed with the board definition . If you’re looking to create an audio-visual system, PJRC’s Audio System Design Tool provides a graphical interface that generates Arduino code for sound-based applications. Of course, perhaps the best part about getting started with a Teensy is that they come pre-programmed with a blink sketch. Just plug one in to a USB port, and when power is supplied you have instant confirmation that you’re getting somewhere. From there, you’re limited only by your imagination — rarely will you run into the ceiling on computing power! Teensy resources: * PJRC/Teensy items on SparkFun
* PJRC/Teensy home page/resources
* Teensy device specs comparison
* Teensy 4.0 listing SparkFun
* Teensy 4.0 listing PJRC
* Teensy 4.1 listing SparkFun
* Teensy 4.1 listing PJRC Teensy 4.0 (left), Teensy 4.1 (right) (📷: Jeremy Cook) Teensy 4.0 (📷: SparkFun) Tensy 4.1 (📷: SparkFun) Teensy 4.0 (lockable), Teensy 4.1 among other board options (📷: Jeremy Cook) Mini-strandbeest (📷: Jeremy Cook) (📷: SparkFun)
↑ Back to top
Originally published by
Hackster News ↗
· rebuilt here from its own full-text RSS feed · all rights
remain with the publisher, please read and support them there.