Teensy 4.0 Dev Board

We fell in love with the powerful and cheap Teensy platform after using the Teensy 3.6 for a client project. Shortly after our purchase of the Teensy 3.6, the Teensy 4.0 was released. We just had to check it out.

We are quite impressed by the capabilities of this tiny little development board. It is extremely affordable, the processor is one of the fastest microcontrollers that is currently available, and it provides USB host support. This board is also accessible to beginner embedded developers thanks to the Teensyduino effort. The Teensy 4.0 is a great intermediate-level development board, especially if you are interested in transitioning away from the Arduino ecosystem. Due to the processing speed and RAM size, this is a great option for those of you looking to play around with ML on embedded systems.

Table of Contents:

  1. The Teensy Lineup
  2. Teensy 4.0 Specs
  3. Programming the Board
  4. Teensyduino
  5. Libraries
  6. Documentation and Tutorials
  7. Purchasing
  8. Further Reading

The Teensy Lineup

The Teensy 4.0 development board is merely one in a family of Teensy boards produced by PJRC, including the Teensy 3.6 we previously reviewed. Their development kits feature both 8-bit AVR and 32-bit ARM Cortex-M processors. Each Teensy version differs in size, performance level, and whether or not an SD slot is included.

When we purchased the development kit, the Teensy 4.0 was the highest performing board in the family. They’ve since released Teensy 4.1, which uses the same processor but provides an SD card slot, Ethernet support, additional I/O, and space to solder two additional memory chips onto the board.

Teensy 4.0 Specs

The Teensy 4.0 sports impressive specs in a small package (1.4″ x 0.7″) and at a low cost ($19.95 at the time of purchase). This board is cheaper than both the Arduino Uno and Arduino Mega, while providing much higher performance than both platforms.

  • 600 MHz Cortex-M7 processor (NXP iMXRT1062)
    • PJRC notes that the Teensy 4.0’s processor can be overclocked beyond 600 MHz
    • FPU
    • 32 general purpose DMA channels
    • 31 PWM pins
    • 40 digital pins, all interrupt capable
    • 14 analog pins, 2 ADCs on chip
    • Peripherals for: USB, SDIO, Serial, S/PDIF digital audio, I2S digital audio, I2C, SPI, cryptographic acceleration, RNG, RTC, CAN (One bus with CAN FD)
    • Pixel processing pipeline
    • Peripheral cross-triggering
    • Power management support for peripherals
    • Dynamic clock scaling
  • 2048 kB flash memory (64 kB reserved for recovery & EEPROM emulation)
  • 1024 kB RAM
  • 2 USB ports (1 soldered)
  • 24 breadboard friendly I/O
  • Provides power shut-off feature
    • Solder a push button to the On/Off pin
    • The 3.3V power supply can be disabled by holding the button for 5 seconds
    • The 3.3V power supply can be turned on with a brief press
    • If a coin cell is connected to VBAT, the RTC will continue to keep track of date and time while power is off
  • All pins are rated to 3.3 V

Note: Teensy 4.0 is the same size and shape as Teensy 3.2, and retains compatibility with most of the pin functions on Teensy 3.2. Both boards are smaller than the Teensy 3.6.

The pinout for the Teensy 4.0 is available on the PJRC website. The board also ships with a handy printed reference card detailing the pinout of the board.

Teensy boards can be purchased both with and without header pins. When header pins are supplied, you can use the Teensy with a solderless breadboard. PJRC also sells sockets and headers, so you can always rework a pin-less Teensy dev board.

Programming the Board

All programming is done with the USB port – no need for in-circuit programming tools with this board. PJRC provides a tool called Teensy Loader which is used to program new software. A simple GUI is available for Mac, Linux, and Windows. Command line tools are also available for advanced users looking to integrate it with a continuous integration and testing system.

If you are using the Arduino IDE, the Teensy family can be flashed using the Arduino’s program button.

Teensyduino

PJRC’s Teensyduino software enables the Teensy family to be used with the Arduino environment. This makes the board an interesting starting point for beginners, while giving them the possibility to transition off of the Arduino platform without changing development hardware.

Teensyduino implements support for all standard Arduino SDK functions. PJRC states that most Arduino programs will work on the Teensy, and many Arduino libraries are also compatible. They maintain a list of compatible libraries.

The Teensy provides the same built-in peripherals that the Arduino does: analog inputs, SPI, I2C, PWM, and serial ports. The Teensyduino platform also supports multiple USB device types. You can change the Teensy’s USB type using the Tools -> USB Type menu in the Arduino IDE.

Documentation and Tutorials

PJRC provides a getting started guide, a Teensy tutorial, and reference documentation on their website. Reference documentation includes a schematic and all relevant datasheets.

For intermediate users, they also have a How-To section full of useful tips for interacting with the hardware. There is also a Code Library featuring source code for different USB device drivers.

If you need additional support, PJRC runs a forum where you can ask questions.

Purchasing

We like to support creators directly when possible, so we purchased the Teensy 4.0 directly from the PJRC web store for $19.95.

You can also find the boards at other popular electronics stores, such as SparkFun, Adafruit, and Digi-Key.

Further Reading

4 Replies to “Teensy 4.0 Dev Board”

  1. Seems one link is invalid: file:///Users/pjohnston/Desktop/%5Bhttps://www.pjrc.com/store/teensy40.html%5D(https://www.pjrc.com/store/teensy36.html) – the PJRC web store for $19.95.

  2. Awesome write up. Under peripherals you forgot the 3 CAN Bus (1 with CAN FD). For some, including the company I work for CAN bus is a must on any development board we look at. Currently using the Particle Photon but the Teensy 4.0 looks like a worthy competitor.

Share Your Thoughts

This site uses Akismet to reduce spam. Learn how your comment data is processed.