Blog Posts

Video Output over USB

jmarsh has added support for Fresco Logic 2000 USB video adapters to their teensy4_usbhost library.

Typically available for less than $20, these devices can add up to 800×600 pixel SVGA-class video output (limited by USB 2.0 bandwidth) via the Teensy 4.1 USB Host Cable (or Teensy 4.0 USB Host pads). The adapters are available in VGA or HDMI form, although the implementation uses DVI-compatible mode for HDMI, meaning no audio. They can also be used to generate radio signals.

Examples in the repo include Mandelbrot fractal generation, a circle-based spectrogram, circular framebuffer “piano roll”, and waterfall display of incoming USB audio. A driver for Xbox 360 gamepads, found in the same repo, opens up interesting possibilities for game emulation, when combined with the video out functionality. The ever-evolving USB Host library can be found on GitHub.

Cyberpunk-2077-Inspired Guitar

Piotr Zapart has built an absolutely stunning Teensy-powered Cyberpunk-2077-inspired guitar with built-in effects and more.

Representing more than a year’s work, the DIY Fender Jazzmaster-style silhouette hides astonishing functionality inside. The humble pickguard is in fact a PCB, with built-in capacitive touch buttons and X-Y pad. Hidden deeper inside is the analog effect section, built around an Analog Devices SSM2164 Quad Voltage Controlled Amplifier, which combines all of the audio and processing into the guitar’s mono output.

Around back, a Teensy 4.1-powered DSP and power module is housed in a 3d-printed enclosure. The Teensy provides MIDI and power management, plus extensive digital effects, including a drone synth, looper, and sample player. Eight keyboard switches, a button gamepad joystick, and a repurposed smartwatch display provide control.

Among the many fascinating details of this project are the LED-illuminated P90 pickups, which indicate their status via colour, and required their own pickup winder to be developed, in addition to transparent 3d-printed resin covers.

More details (and pictures!) from this incredible build can be found in the original forum thread, and in the video below!

FFT Musical Light Show

Most audio spectrum analyzers feature a number of vertical bars, which grow based on the amplitude of a given frequency band. Evan Rust wanted to take this concept and make it linear, and more colourful, which he accomplished in his Teensy 4 Musical Lightshow.

Powered by a Teensy 4.0, the light show uses 240 WS2812 LEDs to represent the frequency bins. A Teensy 4 Audio Shield is used with the Audio System Design Tool to amplify audio from a WAV file on the SD card, then uses a 1024-bin Fast Fourier transform (FFT) analyzer to isolate frequencies and sort their amplitudes into the appropriate bin. These are reduced to 16 bins, with more weight given to lower frequencies, while the peak of the current waveform is read in order to determine the LEDs’ brightness. The WS2812Serial library leverages DMA for fast response, with 15 LEDs per bin, and colours assigned randomly. See it in action in the video below, and check out the Hackster project for more info and code.

Mini Electronic Saxophone

Nigel Weiss has created the Circuit Sax, a mini electronic saxophone, made with mechanical switches, custom 3D-printed keycaps, and featuring breath input for a realistic saxophone feel.

A 3.5mm audio jack provides audio output, with MIDI available via USB. Motion detection enables vibrato, and a custom neck allows the use of any alto saxophone mouthpiece. A Teensy 4.1 and Audio Shield along with the Teensy Audio Library and Audio System Design Tool generate synthesized output, as well as applying filters and effects to create the desired sound, with pitch determined by keypress, and expression via the breath pressure sensor.

Extensive details, including source code, STL files for the 3D-printed parts, and demonstration videos, are available on the project’s GitHub repo.

Motorized-Fader PC Volume Mixer

YouTuber Computer Hardware Tips and Tutorials (CHWTT) wanted a device that could control individual app volumes on their PC. Inspired by the deej project, they created a Teensy 4.1-based five-channel mixer that would look at home in any professional studio.

Mimicking expensive broadcast mixers like the GoXLR, the device features five motorized faders with OLED scribble strips above each. Additional buttons allow mixes to be stored and recalled, as well as channels to be instantly muted. Teensy’s USB MIDI functionality is combined with MIDI Mixer software to allow control over individual PC app volumes via dedicated faders, as well as represent any adjustments made via software, thanks to their motorization.

A wonderfully detailed build guide is available on Instructables, including STEP files for the custom CNC’d faceplates, STL files for the 3D-printed parts, full bill of materials, and source code. Learn more and see it in action in the video below!

High-Speed Pulse Counter

Yongsup Park has created a high-speed Teensy-based pulse counter with reliability down to a pulse width of 20ns or less — performance which typically requires equipment costing hundreds, or even thousands of dollars.

Using the FreqCount function, Yongsup iteratively reduced the pulse width until behavior became erratic. The Teensy 4.1’s 600MHz clock gives a theoretical resolution of 1.67ns, and was observed counting as little as 9ns pulse widths at 50MHz. The Rigol DG912 Pro waveform generator being used to test it has a rise/fall of 3ns, so reducing further would have been hard to measure anyway.

The pulse counter is part of a larger data acquisition app that runs in the browser without the need for a computer, using a Teensy 4.1 as a web server, USB device controller, and pulse counter. Testing results, code, and more can be found in the original forum thread.

Robot Arm Controller

alnwlsn has used a pair of Teensy boards to take control of a robot arm that they recovered from surplus.

The 70lb lab-grade arm came with no software, but was still in running order. Instead of an FPGA, alnwlsn choose the powerful Teensy 4.1 to replace the embedded 486, FPGAs, and DSP chips that controlled the original. The main control loop is handled via IntervalTimer, which runs PID controllers, reads encoders, and writes to motors.

A custom PCB provides DACs for the ±10V analog signals required by the motor amps. A surplus control box refitted with a Teensy 3.2 provides manual control, and a mini reproduction of the main arm enables mimicry of its manipulation by the larger unit. 16MB of PSRAM allows several minutes of motion recording and playback, and the SD card stores encoder positions between reboots, to prevent the need for calibration each time. alnwlsn says that almost every pin on the Teensy is used for something, and you can see them in use in the video below!

MIDI to Hardware Interface

MikeSound has created the midiGPIO MIDI to arbitrary hardware I/O interface.

Often in music or art projects, sensors are used to trigger audio or other events via MIDI, and sometimes in the other direction too. For example, a sound effect of a door creaking that triggers when as it opens on stage, or turning on lights in response to the playing of a particular note. The self-contained unit provides four 3.3V inputs and four 3.3V outputs, and supports USB and serial MIDI. When a rising edge is detected on an input, a MIDI Note-On message is sent; similarly, a Note-Off is sent on a falling edge. The input edge detection can also be used to trigger a MIDI program change. Outputs are controlled via MIDI Note-On and -Off as well.

Check out the GitHub repo for source code, schematics, and more detail.

Original Engelbart Keyset

Ken Shirriff retrofitted Douglas Engelbar’s 1960s era keyset from his famous “Mother of All Demos” to connect to USB so that it can be used with today’s computers.

We love Ken Shirriff projects, and Ken Shirriff seems to love Teensy too, if the number of our boards we’ve seen used in his various retrocomputing restoration projects are anything to go by. Ken apparently managed to get a loan of one of the original “keyset” devices from Douglas Engelbart’s famous “Mother of All Demos,” during which the concept of a computer mouse and GUI were introduced to the public for the first time. That the keyset was also introduced to the public for the first time at the event is perhaps less worthy of mention, since it didn’t catch on in the same way as some of the other demonstrated tech which we now take for granted. While chorded keyboards are still a thing (particularly among stenographers), and we’ve even shared a Teensy 4.1-powered recreation of Engelbart’s chording keyset on the blog before, it’s certainly a niche device, and Ken even concludes his blog post by saying that he found it hard to use, both physically and mentally. But the cool thing is that he made it work, so let’s focus on that!

Ken’s project is based around the Teensy 3.6’s ability to act as both USB device (connecting to the host PC) and USB host (for connecting a standard USB mouse, required to get the full range of outputs, by being pressed in conjunction with the keyset keys). The Teensy is connected to the keyset’s standard DB-25 connector, with a 1kOhm pull-up resistor on one of the lines, in addition to the Teensy’s own onboard pull-ups on each. Code was added to pass through mouse input, except when used in conjunction with the keyset, as well as output the resultant characters as if it were a normal keyboard. Ken goes into glorious detail on the background of the device and its famous demo on his blog, and has shared the code on GitHub. While he may not have fallen in love with the keyset workflow, we are enamoured with the incredible journey he took to reach that conclusion.

Guitar Amp Modeler/Multi-FX

HexeFX, whose Jaws-themed guitar effects pedal we’ve featured in the past, is back with the fully open-source TGX4 amp modeler and multi-FX pedal.

The project consists of both software and hardware. The software is designed to be compatible with a range of Teensy-based platforms beyond the dedicated TGX4 hardware, including a simple Teensy 4.0 with the Audio Adaptor board installed. The project’s hardware design encapsulates a high-quality audio DSP designed specifically for use with guitar and bass instruments in a pedal-form device. Combined, they feature eight amplifier models, ten cabinet impulse responses for sound reproduction, a stereo enhancer for double track emulation, a compressor, wah, noise gate, three-band EQ with high-pass filter, three types of reverb, and more. Assignable expression pedal input, three assignable potentiometers, and a 3.5″ touch screen provide the interface to all of this. An SD card allows storage of 128 presets, and MIDI control, including via web page, enables interaction with other devices.

More information on the software development can be found on the PJRC Forum

Firmware, hardware, and many more details can be found on GitHub, and a demonstration of the pedal’s capabilities can be enjoyed in the video below.