Blog Posts

AC Powerline Frequency Monitor

We see a lot of data logging projects but jp3141 created one that caught our eye, with a device that captures the slight variations that occur in AC powerline frequency.

In the US, AC power is generally accepted as being 60Hz, but in actuality, it drifts, as can be observed via the University of Tennessee’s FNET service. jp3141’s Teensy 3.2-based device uses two of the board’s FlexTimer Module interrupts (FTMs) to measure the frequency of the power line, plus calibrate the onboard 48MHz clock using an external GPS’s 1pps calibration pulse.

Data is transmitted both via the Teensy’s own USB serial, and to a Raspberry Pi Zero W where it is logged and graphed via a Python script. A 9V AC adapter powers both boards at 5V DC, as well as providing the 60Hz AC sample to be filtered and measured.

An example of drift over time can be seen in the plot below. More information, as well as the Teensy code and Python scripts can be found on GitHub.

Oscilloscope CRT Screen Clock and Games

Perhaps the first ever “video game,” William Higinbotham’s 1958 Tennis for Two used an oscilloscope was used to render the match.  More recently, Nixiebunny brought things full circle with their Teensy 3.6-powered Scope Clock.

The clock uses the Teensy’s DACs to render the display, which can take the form of an analogue or digital clock face, but can also be used, along with the device’s integrated knobs, to play Tetris, or that other famous ball-bouncing simulator: Pong.

An integrated USB port allows for the addition of a gamepad or GPS receiver. While the code is not currently available, Nixiebunny has plans to make it open-source once the device is on sale.

Unlike William Higinbotham’s 1958 Tennis for Two which simulated the physics of the titular ball on the Donner Model 30 analogue computer, requiring considerable equipment for a public showing in 1959, Nixiebunny’s compact all-in-one build uses modern electronics paired with a Cathode Ray Tube.

M8 Portable Synthesizer and Sequencer

Chiptune artist and innovator Trash80 has distilled decades of composing, performing, and hardware hacking into the form of the Teensy 4.0-powered Dirtywave M8.

M8 offers a handheld tracker experience, but with incredibly powerful capabilities.  The M8 tracker features eight stereo tracks, up to 24-bit samples, FM and 8-bit wavetable synthesis, and even a software implementation of the classic Mutable Instruments Braids Eurorack module! Global effects, onboard sample editing and song rendering, USB MIDI and audio, and a remote virtual display make the M8 a handheld workstation to rival many DAWs.

The first M8 production from Dirtywave priced at $599 was sold out by mid-2023.  You can watch a very slick promo video on YouTube and many other videos of M8 usage.  Hopefully more M8s will be made in the future.

DIY Playdate Camera

Before we all carried supercomputers in our pockets, the Game Boy Camera was a pretty unique proposition. Inexpensive, portable, digital photography — even featuring a selfie mode!  t0mg decided to create their own 1-bit camera add on for Panic’s unique Playdate portable gaming console.

t0mg took advantage of Teensy 4.1’s USB Host capabilities in order to transmit image data via serial, essentially emulating a very strange controller that sends pixels instead of button inputs. Excellent detail about the project can be found on the PD-Camera accessory’s GitHub repo, including a deep dive into how it all works, and a fun overview of its capabilities can be seen in the video below.

DIY Playdate Keyboard

T0mg created a Teensy 4.1-based keyboard adapter dock for Panic’s Playdate handheld console, along with an accompanying minimalist word processor app.

The dock uses Teensy’s USB Host capabilities to transmit keyboard inputs as if they were rotations of the Playdate’s unique analogue crank controller — and can actually be used with other USB controllers, like those from 8bitDo. Alongside the Teensy, a small USB hub is concealed in the dock, to allow connection to the keyboard/controller as well as the Playdate itself.

More detail, including firmware and STL files can be found on GitHub, and a nice build thread with videos can be found on whatever the site that used to be called Twitter is called by the time you read this.

VGA Output on Teensy 4.0 and 4.1

IBM introduced the Video Graphics Array (VGA) standard in 1987, improving on EGA’s 16-color graphics with up to 256 colors and a maximum resolution of 640×480.

Inspired by the uVGA library for Teensy 3.X by Eric Prevoteau, PJRC forum user Jean-Marc developed the VGA_t4 library for 4.x boards. With a handful of resistors and 15-pin D-sub connector, your PSRAM’d Teensy 4.x can output 307,200 8-bit pixels of analogue goodness too — perfect for emulators and retrocomputing projects!

While the implementation differs from the original uVGA due to differences between the Teensy 3.x and 4.x hardware, the code should feel familiar to anyone familiar with the uVGA API. The library currently supports 320×240, 320×480, 640×240, and 640×480 resolutions, with experimental support for 352×240, 352×480, 512×240 and 512×480. Sketches must be compiled at 600MHz for accurate timing. The library and source can be found on GitHub, and the video below demonstrates its use to display a Mandelbrot fractal, as well as Amiga Workbench courtesy of Jean-Marc’s MCUME retro emulation project.

MiniTouch – Low-Cost Synth for Workshops

Creating a project with Teensy boards is cool, but you know what’s really cool? Creating a project that lets other people, who might not ordinarily be able to approach a microcontroller-based project, build something amazing.

This was Emmanuel Presselin’s goal with the Teensy 3.2-based MiniTouch low-cost synth, targeted for use in workshops with children ten and older.

The MiniTouch consists of two PCBs: one for the FastTouch-powered capacitive-touch keyboard, and one for the Teensy, pots, and mini class-D amp, which is connected to standard 10W TV speaker. The Teensy 3.2’s built-in DAC is used to provide 4-voice polyphony, a band-limited oscillator, ADSR, low-pass filter, filter envelope, LFO, reverb, and portamento effects.

Fifteen presets can be tweaked with a separate app based on Max/MSP. A laser-cut enclosure, batteries, and a handful of knobs give workshop participants something they can be proud of having built, then take home and enjoy further without any specialized tools or knowledge. While Emmanuel has no plans to release the source or build instructions, you can see a great demo of its capabilities in the video below.

Game Boy Emulator

We love seeing emulator projects on Teensy hardware, and reproducing the original DMG Game Boy, with its 4MHz, 8-bit CPU, is certainly well within the capabilities of the Teensy 4.1’s 600MHz Cortex-M7.

Forum member blazarious has created an elegant “breadboard Game Boy”, consisting mostly of simple through-hole components, plus a custom board for the 4-inch 480×480 pixel TFT display.

Game ROMs are loaded from the Teensy 4.1’s mSD slot — or more accurately game “ROM” since only Tetris is playable at present. Only three of the four sound channels are currently supported, though that is plenty for the classic Tetris soundtrack to be recognizable in the video below. More info can be found in the project’s GitHub repository, while the display driver library and hardware has its own separate repo, and a series of blog posts detail the project’s progress and evolution over time.

Audio Pre-Amp Module

Despite the name, not every project we see using Teensy is necessarily that diminutive.

This adorable pre-amp from Marcell Marosvolgyi shows what’s possible with the small form factor, however, using a Teensy 3.2 plus Audio Shield to provide bass and treble tone control, surround sound processing, and compression, in a gorgeous little enclosure.

Adding a stackable 20-watt amplifier using Adafruit’s MAX9744 breakout board results in world’s cutest hi-fi stack. Project details can be found on Hackaday, with firmware and a Python script that provides a PC interface on GitHub.

Adam74 Text Terminal

Just in time for #MARCHintosh, we present: John Calhoun’s Adam74 mini terminal. With form inspired by the ADM-3A video display terminal, and functionality by the Apple I’s ASCII bus, this diminutive display accepts 7-bit ASCII codes, then renders them on a 3″ LCD.

Based around the Teensy 4.0, the Adam74 incorporates a custom PCB with an ILI9341-based LCD, plus a small speaker in order to enable the BELL control code. Additional codes allow simple cursor movement, with text wrapping and scrolling handled by software on the Teensy.

The complete source, as well as Gerber files and schematic for the PCB, and even an SVG to help recreate the stand, are available on the project’s GitHub repo. An excellent recounting of the project’s genesis can be found on John’s Engineers Need Art blog, along with a number of other unique and interesting, mostly Apple-oriented projects and stories.