Blog Posts

3D Rendering

The PJRC forums are a great place to collaborate, share, and learn. It’s incredible to watch projects evolve and members learn from each other, and often even we are blown away with some of the things folks do with Teensy.

Case in point: JarkkoL’s port of their tiled software rasterizer. JarkkoL’s initial port targeted the ILI9341 LCD driver at 320x240x16 bits per pixel (bpp) via SPI, with 16bpp frame and depth buffers. Running on a Teensy 3.6, the rasterizer uses just 27kb of RAM, with 4,000 triangles stored in flash. As the thread unfolds over a little under two months, more and more enhancements are added, including asynchronous DMA transfer, cluster visibility culling, and texture support.

A port to Teensy LC was accomplished in just 8kb, and the Teensy 4.0 port pushed 16bpp updates at 49 frames per second. We hope to see these examples developed into a full library soon!

Constructive Synthesis Book

We have a lot of Teensy enthusiasts, especially in areas like audio synthesis, some with such passion and knowledge, you might say they could write a book on it. In the case of Ken Wessen, this is literally the case, in the form of the web-based book Constructive Synthesis.

In addition to comprehensive coverage of subtractive synthesis topics, the site also includes over 30 web apps that allow the reader to experience concepts first hand, as well as ten projects for the Teensy 4.0 + Audio Adaptor Board. The projects culminate in the creation of Mentor, a 16-voice polyphonic Teensy-based synth, optimized for learning subtractive synthesis and patch creation. Start learning how to make your own Teensy-based synth today, and be sure to let Ken know if you have feedback or suggestions!

ProtoTracer – 3D Rendering Engine

When games like Wolfenstein 3D debuted in the early 90s, their raycasted 3D graphics seemed like a dramatic leap forward compared to most side-scrolling games of the time.

Fast forward three decades, and most mobile phones have powerful 3D accelerators that make games from even a few years ago look unsophisticated. But PJRC forum member coelacant1 has brought back this classic software rendering technique with a custom rendering engine for the Teensy 4.0. Rather than rendering 3D objects on a monitor, coelacant1’s ProtoTracer is designed for use with LED matrices, such as those found in their own line of LED masks. Converters for 3D FBX and OBJ files, as well as 2D PNGs, BMPs, JPEGs and more allow the rendering and animation of numerous assets on arbitrary LED hardware. Source code and instructions, as well as links to the aforementioned conversion tools can all be found in the project’s GitHub repo.

Magic Dice Box

The annual YouTube Makers Secret Santa has resulted in all manner of creative and exciting projects being created as gifts between its high-profile participants, and 2024’s was no exception.

DJ Harrigan, aka Mr. Volt drew Crescent Shay, which was a fortuitous pick given that they are already friends who play Dungeons & Dragons together. This lead to the idea of a dice box, to hold and display Shay’s dice collection, but with an added Teensy 3.5-powered twist.

In addition to the “analog” dice tower to facilitate rolls, Harrigan incorporated a digital dice roller via an LCD screen and two rotary encoders. Sound effects are also played via a DAC and the Teensy’s mSD card. Lastly, the Teensy illuminates the analog dice storage area with LEDs for a little extra pizazz. See it all in action in the video below!

8×14 1U MIDI and Audio Interface

DeftAudio, aka Andrei Kudryavtsev has created an 8×14 1U MIDI and Audio Interface based on the Teensy 4.1.

With 8×8 5-pin MIDI DIN in/out, plus six MIDI TRS outs (which can also be configured as 5V Trigger out or Sync out for controlling Eurorack modular gear, drum machines, or analog synthesizers), as well as USB MIDI and a 2×2 audio interface, which seems almost absurd for a kit that starts at $25 for the main PCB. An OLED display and two rotary encoders provide the interface.

Best of all the project is completely open-source, with schematics, firmware, and even the enclosure available on GitHub. The “Complete Electronics” kit (bring your own Teensy and front panel) is just $40, while the fully assembled model will set you back $225 — still a steal for this level of functionality. Check out the video below, then head over to Tindie to pick up a kit!

Reverse-Engineered Seat Heater Switches

Alex Lorman had two things: a 2006 4Runner and a desire for year-round posterior comfort. So he picked up some OEM switches. And some commodity seat heaters. And a whole bunch of knowledge along the way!

The project culminated in a custom PCB, primarily as a home for the MOSFETs required to drive 10A per channel to the heaters. And to manage state and the MOSFETs, a Teensy 3.2 was employed.

One interesting aspect of the project was the employment of low-rate PWM to allow the MOSFETs to avalanche while capitalizing on the high resistance of the heated heaters to enable self-regulation. A GitHub repository serves as a clearing house for information and resources related to the product, with two further repos for the PCB and code.

CB Desk Mic

Jigglypuff works in a noisy office, and wanted to avoid the complaints that their built-in laptop mic was garnering during Teams meetings.

Instead of juggling muting in the software itself, they converted a vintage Turner CB desk mic into a digital USB microphone using Teensy 4.0.

After an initial prototype proved unsatisfactory, Jigglypuff switched to the Teensy Audio Shield and a PUI AOM-5024 series electret condenser mic. Unfortunately, the Teensy Audio Shield would not fit inside the Turner, leading to the creation of a custom shield without unwanted features like the mSD slot and line in/out. The final device features push-to-talk with an LED if the mic is active, a pot for mic gain adjustment, a 125Hz high-pass filter, and the all-important ability to present itself as a microphone, not a full-duplex sound card (since it has no output capabilities). Pretty impressive for someone who claims “EE and software is not my primary background.” Learn more and follow the journey in the PJRC forum thread.

Drone 2.0 Eurorack Synth Module

Long-time PJRC forum contributor ghostintranslation is back with a new version of the Drone Eurorack module, dubbed Drone 2.0 for its basis on the updated Motherboard 2.0 platform.

The module features four voices with sine and resonant noise oscillators, FM control voltage (CV), individual volts per octave, and a TRS MIDI.

The Motherboard platform underpinning all this was designed to facilitate the creation of new modules, without having to start from scratch every time, and itself features 16 inputs and outputs, MIDI in/out, 10-pin Eurorack power, and Teensy 4.0-based firmware and examples.

Drone 2.0 is available as a PCB/panel kit with SMD components prepopulated. The required BOM, as well as firmware and schematics, can be found in the project’s GitHub repo. Listen to example sounds below!

Audio Keyword Recognition

In addition to our standard form-factor boards, Teensy is available as a member of SparkFun’s MicroMod range of M.2 mix-and-match processors. Maker Evan Rust selected this board to pair with SparkFun’s MicroMod Machine Learning Carrier for a simple yet powerful keyword recognition project.

Using publicly available datasets, Evan uploaded clips of half a dozen keywords to Edge Impulse, along with “noise” samples, and trained a Keras neural network with 92.7% recognition accuracy. Combining the resultant Arduino library generated by Edge Impulse with Teensy’s Audio Library, then downsampling from 44.1KHz to 16KHz in order to match the dataset’s samples, the inference results are displayed on an ILI9341-driven TFT in real time as a bar graph of sorts reflecting the model’s confidence. A detailed walk-through of how to recreate the project can be found on Hackster.

Quad Channel Audio Adapter for Teensy 4.x

Members of the Teensy community will be familiar with our Audio Adaptor Board, which adds CD-quality sound to your Teensy 4.x projects.

It uses the low-power SGTL5000 stereo codec from NXP, but forum user Bob Larkin performed a detailed exploration of this chip’s performance vs. TI’s PCM1808, resulting in the creation of his own audio adapter board based on the TI ADC.

One of the challenges Bob encountered was keeping the same footprint as the original, so they can be used interchangeably. The resulting board lacks microphone hardware, an SD card socket, or the original’s pads for adding optional RAM, but offers dual stereo audio inputs and outputs instead of single, and based on Bob’s analysis, the dynamic range of the ADC is significantly improved. Example code is provided, since the hardware functionality differs significantly, and in addition to Kicad files being available on Bob’s site, the unpopulated PCB can be conveniently purchased directly from OSH Park. Find out more and join the conversation in the Audio Adaptor PCM1808/5102A thread on the PJRC forums!