Blog Posts

Guitar Wizards

Ben McInnes, Adoné Kitching, Jason Sutherland, and Luc Wolthers created an amazing game – Guitar Wizards.

Guitar Wizard is a game based of the classic Guitar Hero game.  Rather than play for points, the players battle each other, head on, playing riffs on the modified Guitar Hero controllers, shooting LED notes at each other.  The opposing player blocks the notes by playing their own notes and chords.

This amazing, interactive game is powered by a Teensy 3.6, has over 2,000 WS2812B LEDs, and uses the FastLED library.

You can read more about the inspiration for the game here.

ILI9341_t3 Font Editor

Wojciech Sura (forum user spook) has made a very useful tool for creating and editing fonts for the ILI9341 display

Until now, the only way to get custom fonts in the ILI9341 display has been a converter script.  Now you can actually create & edit fonts with a beautiful graphics editor.

This useful app includes a number of features, including:

  • Create font from scratch (specify size, default offset and delta)
  • Create font from existing system TTF font
  • Easy to use editor with zoom (mouse wheel) and scroll (middle button) as well as continuous drawing
  • Preview the whole font or specific string
  • Batch glyph operations allows quick tweaks (for instance, batch offset change)
  • Quick optimization of character or the whole set (removes empty columns and rows while keeping character’s position and size)
  • Export to ILI9341_t3 format (.h + .cpp)

The editor is available in this GitLab repository.  It does require Visual Studio 2017 to build.  If you don’t have access to Visual Studio, spook has posted a build in this forum thread.


C64 SID Chip Replacement

Petros Kokotis developed a replacement for the ever popular SID chip (MOS Technology 6581/8580) using a Teensy 3.6.

The SID was a popular sound synthesizer chip from the 1980s used in the Commodore 64 computer.  Much to the dismay of many nostalgic computer enthusiasts, it hasn’t been manufactured for many years.

Petros used a Teensy 3.6 and some level shifting boards to intercept address and data lines of a SID chip.  He also used the Teensy Audio Library and the ReSID Library by Frank Bösing (from his C64 emulation).

Code for the project can be found in this GitHub repository.


Joystick Splitter

gdsports has made a joystick splitter that solves the problem of the Microsoft Xbox Adaptive Controller (XAC) ignoring the hat switch on the Logitech Extreme 3D Pro Flight Stick.

The splitter uses 2 Teensy-LC boards and an Adafruit ItstyBitsy to remap the joystick controls and maps the Logictech Flight Stick to the XAC in the following ways:

  • Joystick X,Y maps to the left thumbstick
  • Hat 8-way switch maps to the right thumbstick
  • 4 top buttons map to A, B, X, Y
  • Front trigger maps to right bumper
  • Side trigger maps to left bumper

Code for the project can be found in this Github repository.

Control Voltage to 1.2V Analog Input Pin

Often the question is asked, what is the simplest way to get modular synth control voltage (CV) into an analog input pin?

This simple circuit using only 3 resistors and 1 capacitor converts the -5V to +5V CV signal range to the 0 to 1.2V ADC input range.

For Teensy 3.2, 3.5 and 3.6, you would use analogReference(INTERNAL) to configure for the 0 to 1.2V range.  Then you can read the CV signal at any time with analogRead().

While this circuit is the simplest and easiest way, it is not necessarily the best way.  The input impedance, or load placed on the CV signal, it 31K ohms, rather than the standard 100K impedance normally used for modular synthesis systems.  This forum discussion goes into the circuit’s limitations and suggests more advanced ways using opamps.


Originally this article was published on the DorkbotPDX website.  Since that time, the DorkbotPDX blog section has vanished.  I’m reposting it here, to preserve this info.  A copy of the original can also be found at the internet archive.

PWM Tutorial by Bolder Flight

Brian Taylor of Bolder Flight has put together a great tutorial on Pulse Width Modulation (PWM).

PWM is commonly used to control servos and electronic speed controllers (ESC) and is useful for many projects.  This tutorial explains PWM and introduces how to wire up and command a servo  Part 2 of the tutorial go over reading PWM commands.

The tutorial features the PWM Backback by Bolder Flight.  This handy backbpack makes it easy to hookup RC Servo Motors to your Teensy.  It features 8 channels of 16 bit PWM output; bused ground, power, and standard servo connectors; and option SBUS communication input.

NDLR – MIDI Sequenced Apreggiator

Darryl McGee and Steve Barile of Conductive Labs have developed the NDLR (pronounced Noodler), a 4-part poly sequenced arpeggiator, chord and drone player based on the Teensy 3.2.

The guys at Conductive Labs came with a unique solution to break down music theory into knobs and controls. The NDLR has four parts that can play up to 8 synths.  The PAD part is a chord player.  Press one of the 7 chord buttons and all the other parts change notes to match.  There are also 2 “Motifs” which are sequenced arpeggiators.  The Drone part can play a single continuous note like a traditional drone does… or choose from various retrigging options, such as having the note retrigger on a chord change, the down beat, every beat, up beat, etc.

Among the many advanced features packed into the NDLR is a pattern and rhythm editor that lets you create custom arpeggios.  You can also save your patches and settings for later recall with the 8 global slave slots, 20 user patter slots, and 20 user rhythm slots.

You can get a NDLR through their IndiGoGo campaign

This video is of a performance by Graig Anthony Perkins using the NDLR.

Light Table For Web White Background Photos

Years ago, in my slow quest for better photography of electronic projects, I built a light table to eliminate shadows.  Most of the white background photos you see on the PJRC site are shot with this light table.

This is how it turned out.

The build used boards from OSH Park (then “Laen’s PCB group order”), materials from TAP Plastics, 15 white LEDs and parts I mostly had laying around.

This view is inside a cheap 2 foot sized light tent I purchased from some ebay vendor, and a couple bright lights outside the tent on both side.

The LEDs are Cree CLM3C-WKW-CWBYA453, which are supposedly the same 5500K color temperature as the CFL lights outside the tent. Maybe that matters, maybe not, but it seemed like a good idea.

The Cree LED is a surface mount part, but fortunately Lean’s PCB group order made it very easy to convert to something I can solder wires onto. All the PCBs mount with double sticky mounting tape.

As you can see in this LED photo, there’s a bit of shadow. It’s a soft shadow due to the light tent casting light from many directions, but it’s still very present.  This is the type of shadow I’m hoping just a little bit of under side lighting will eliminate.

This little board is a constant current regulator. It takes a 0 to 5 volt input and regulates a 0 to 20 mA output current to a string of 5 LEDs. I wanted to make sure the current was perfectly constant since the camera might choose a quick shutter time.

Here’s the schematic for that circuit. At the time, it seemed like a good idea to sense the current using a resistor between the NPN transistor’s collector and the LEDs. The idea was any small change in ground potential between the board 0-5V control signal wouldn’t matter, if I ran separate signal and power ground lines.

But I didn’t consider the current draw though those resistors around the upper opamp. As you can see in the schematic, I change the values to about as high as I reasonably could. It still have a tiny bit of the lowest part of the range where the LEDs won’t completely turn off.

The 0 to 5 volt signal just comes from this potentiometer on the front panel.  Because it’s driving only the inputs to opamps, it doesn’t have any substantial load.  I still used a 1K pot anyways, though a higher value would have consumed a little less current.  I guess I didn’t care about an extra 5 mA.

The power for everything comes from this simple little power supply, which is just (approx) 24 volts unregulated, and a 5 volt regulated output from the pot, which is from a 7805 regulator.  Simple.

Of course, the opamp circuit isn’t perfect. After putting this together, I decided to try a different approach, sensing on the emitter side, and no current sensing path to add to the LED current! I also included 4.7K resistors on the feedback looks, and the positive inputs see about a 1K impedance. Any errors from the opamp’s input (PNP) bias currents should be small, and should be more on the negative than positive, so hopefully any tiny error will tend to reduce the LED current, not increase.

Then again, the original boards might work out ok, but Laen’s PCB group order makes it so very easy to just quickly draw up a (small) board.  Because the cost is so low, it’s easy to just send it off without all the worry the goes into a normal board order.

I still haven’t actually put this thing to use… the top plastic cover turned out to be just a bit too small, so I need to go shave it down to size on my table saw (which currently has a bunch of other project stuff piled on top of it). But soon, with a little luck, I’ll be able to take pictures of electronic stuff and adjust the light table to null out or at least soften away most of the little shadows that I still get, even with the light tent.


Originally this article was published on the DorkbotPDX website.  Since that time, the DorkbotPDX blog section has vanished.  I’m reposting it here, to preserve this info.  A copy of the original can also be found at the internet archive.