PCM1802 Breakout Board Needs Small Hack

PCM1802 is an impressive audio A/D converter, specified for 105 dB signal to noise (A weighted).  But people have reported problems using very cheap PCM1802 breakout boards.  Today I made it work.

The cheap PCM1802 boards are sold my many Chinese companies, usually for just a few dollars.

Update: since this article was written, new PCM1802 breakout boards have appeared on the market which may have another design problem with the configuration pins.  PJRC has not yet tested any new PCM1802 with this issue.

The PCM1802 tested in this article came from this AliExpress vendor.

The main issue with these PCM1802 boards involves configuring the data format.  Teensy and most microcontrollers use I2S format.  The board comes with no documentation, but the PCM1802 datasheet shows how to configure the chip in table 6.

On the bottom side of the PCM1802 breakout are little solder pads with names that match up with the datasheet.

If you power the board, the FMT0 and FMT1 pads measure 0 volts.  Without power, the also measure about 9K ohms to GND.

To configure for I2S, you would expect to just solder the 2 pads next to FTM0 together.  But there is a problem…

These 5 pads labeled “+” connect to each other, but they do NOT connect to 3.3V or anything else on the circuit board!  Soldering the FTM0 pads together has no effect.

To make this work, I soldered a wire to those pads.

There is no location on the bottom of the board to access 3.3V power.  I considered using the OSR pad.  But the pullup resistor is only 10K.  The PCM1802 has 50K pulldown resistors, according to the datasheet.  Indeed with power applied, I measured 2.8 volts at the OSR pad.

So to get 3.3V, I ran the wire to the top side and soldered it to the 3.3V pin.

The SOT23 part in the lower left corner of this photo is a 3.3V regulator.  This 3.3V pin is an output, not an input, which I also verified with my voltmeter.

Fortunately, all of the other pins in this PCM1802 board are wired correctly for use with Teensy’s I2S.  In its default mode, only DOUT is an output.  All of the other signals are inputs.

These are the required connections between Teensy 3.6 and the PCM1802 breakout board.

PCM1802 Teensy 3.6
   +5V               VIN
   3.3V
   GND              GND
   DOUT            DIN (13)
   BCK               BCLK (9)
   FSY               3.3V
   LRCK             LRCLK (23)
   POW              3.3V
   SCK               MCLK (11)

The POW pin is the only name which doesn’t match up with the PCM1802 datasheet.  I used my ohmmeter to verify it really is connected to the PDWM pin.

The FSY pin (connected to FSYNC) is also a bit unusual.  PCM1802 expects it to be logic high while you transmit data, so just connect to 3.3V.  In the other modes, it sends a signal on this pin which is high during data bits and low during the zero padding bits.  But it does not require that signal as input.  FSYNC just connects to 3.3V to use PCM1802 with Teensy.

For a simple test, I programmed Teensy 3.6 with minimal code to just route the I2S input data to the two DAC pins.

#include <Audio.h>

AudioInputI2S i2s1; //xy=152,100
AudioOutputAnalogStereo dacs1; //xy=316,117
AudioConnection patchCord1(i2s1, 0, dacs1, 0);
AudioConnection patchCord2(i2s1, 1, dacs1, 1);

void setup() {
 AudioMemory(10);
}

void loop() {
}

With FMT0 correctly configured using a mod wire, and those connections, PCM1802 works great with Teensy.  Here are closer photos of the wiring.

 

If you need a high quality audio A/D and you can find these cheap PCM1802 breakout boards, hopefully this tip about the FTM0 hack and known-good wiring can save you from some frustration and get your project up and running quickly.

1 Bit Video on Sharp Memory LCD

Nic Magnier created this 1 bit dithered video player using a Sharp Memory LCD.

Normally memory displays aren’t known for speed.  Nic explains that the display actually allow you to update only specific lines.  His approach uses a conversion of video with blue noise dithering and some forward diffusion to avoid pixel moving too much between frame.  Then the video is encoded to a custom format, with only the lines which change between frames.

Nic’s video conversion tool, written in Lua using Dear Imgui for the user interface, was designed to quickly experiment with dithering and tweaking values with side-by-side comparison of results.

 

 

Nic started with Adafruit’s library and added optimizations for good performance when running on Teensy 3.5.  Using this dithering technique and crafty optimizations results in impressive looking video on these displays not normally considered capable of such feats.  Awesome work Nic!

 

The Maccabeam – Automatic Laser Menorah

Embedded technology is revolutionizing the way we engage with objects of importance in our lives.

An inspiring example of this is the Maccabeam, an automated light up Menorah designed by Samuel Goldstein that offers a modern take on the seven-branched candelabra that is traditionally illuminated over the course of Hanukkah.

Thoroughly documented on his blog, Samuel’s invention uses a GPS module connected to a Teensy 3.2 to deduce the time and location and calculate the Hebrew date.

If it’s determined that it’s time to do so, the WS2812 RGB LEDs in the menorah will illuminate stars cut in the menorah’s laser cut wooden structure in colorful animations along the branches, resulting in the corresponding “lamps” (miniature jars of olive oil) at the tip of each branch to be lit up by the laser diodes below. The Maccabeam also includes an LCD display noting details like the time for sun up and sun set as well as sound effects played through a piezo speaker.

Custom Keypad with Display

Finding commercially available keyboards to be lacking, forum user smarrocco decided to create the custom keypad of their user-specific dreams as well as a corresponding TFT display.

On their blog, smarrocco discusses their design process in detail from identifying problems in existing commercial (including custom and gaming) keyboards to designing and developing his own vertical keypad to meet personal requirements. In the final design, the keys are grouped vertically placed in two sections according to their utility and an extra “thumb section” is added in consideration of left-handed artists like himself. Instead of printing labels on the keys themselves, he elected to use a TFT display in order to identify the buttons in order to allow the keys to be remapped in software without the user needing to move the physical components.

To drive the display and process the switches below the keys, he uses a Teensy 4.0 connected to an SD card reader that stores the settings. The project is an interesting study in producing custom interfaces as well as human-centered design approaches that consider how we can reinvent our electronics to be better suited for our needs.

Tactlets – Tactile Feedback On 3D Objects

A team of researchers from Saarland University and the University of Sydney have designed Tactlets, an approach that allows makers to easily add tactile feedback and control using printable inputs to everyday 3D objects.

The projectcalled Tactletsintroduces a new digital fabrication method of custom printing elecro-tactile elements using either conductive inkjet printed traces or FDM 3D printing using filament embedded with conductive material. The resulting tactlets can be arranged on everyday objects to form buttons, sliders, and other input systems providing a wide range of control. The touch sensing itself, which includes distinguishing between types of touches such as a hold, swipe, etc. is all programmed using a Teensy 3.2, making use of its built-in capacitive touch pins and touch sensing library.

Tactlet: a hand grasps a controller with printed traces.

The team highlights that tactlets could be extremely useful for product designers and engineers for rapid prototyping and user interface testing as they can easily be rearranged and quickly produced to test various designs for user interaction. For those who are curious to learn more about the project, the developers have posted a paper on the subject that includes the history of the project, its findings, and implications.

Electronic String Instrument

Peter Wiessenthaner has created an Electronic String Instrument in collaboration with Thomas Perizonius and Ulf Schaedla.

Peter uses a  Teensy 3.6 and a PJRC library for the PWM control, which allows a great amount of fine adjustment.  There are two pickups on the right and left of the string, allow composition to represent different overtone curves over the speakers. The fast movements of the motors can lead to highly rhythmic patterns. Peter posted about the project as well as uploading a demonstration to his YouTube channel.

Hal9000 Self-Balancing Robot

In his latest robotics project, Youtube-renown maker and engineer James Burton revisits the question of how to design a robot which can successfully balance on a large ball.

This is Burton’s second version of the project which he started in 2015 with the invention of the robot BB-8. In lieu of brushed motors, this new version uses brushless motors and ODrive controllers granting the robot speed, agility, and accuracy. It also includes an MPU6050 inertial measurement unit module as well as a nRF2401 module for radio control, all driven by a Teensy 4.1.

Not only does the new version of the ball-balancing robot perform its task with great ease, but the robot’s appearance has also seen a striking upgrade. This current version is built to resemble Hal 9000 the sinister computer from 2001 A Space Odyssey featuring a glowing red light positioned in the center (it does not, however, address the user as “Dave”). In the hilarious video above Burton describes the making of the project and also demonstrates the robot balancing on an oversized disco ball.

Pierre-Loup’s Replica Minimoog Synthesizer

Paris-based maker and musician Pierre-Loup M. has recreated the iconic 1970s Minimoog synthesizer to stunning detail using a Teensy 4.0 and the Teensy audio library.

In his project released on Hackaday, Pierre-Loup shares all the details behind the manufacturing of this DIY version of the Minimoog including laser cutting the modulation and pitch bend wheels to cutting the body out of a retired walnut dining room table. The keyboard itself is taken from an old Bontempi electric piano.

For those who would like to try their hand at making their own Minimoog, he has released the source code on Github for the Minimoog as well as the Minimoog Mega (versions 1 and 2). In an interview with Hackster, he mentions that his version of the synth “implements the same functions as the real one, plus or minus a few ones.” You can hear the Minimoog in action in a version of popcorn Pierre-Loupe posted to SoundCloud where all sounds are made by the synth aside from the drum effects.

Robot Missions Bowie Brain Kit

If you’re an intermediate maker hoping to take your hands-on robotics skills to the next level but aren’t exactly sure how to get started, the Bowie Brain Kit might be just the thing.

Built by Robot Missions the Bowie Brain Kit comes with everything you’ll need to assemble your own “robot brain” including sensors, motor drivers, coin cell battery, speaker, enclosure and a Teensy 3.6 among other smaller but necessary parts like diodes and resistors. Most importantly, the kit comes with full instructions that will walk you through how to assemble the brain including soldering and attaching components to the board.

In the video below, a couple members of the Robot Missions team perform brain surgery on a weather-sensing environmental robot to show how each of the components work together.

Robot Missions⁠—whose self-declared mission is to build low-cost robotics systems for environmental applications⁠—has, among other interesting projects, deployed rover-style versions of robots that use the Bowie brain to clean up public beaches by sifting sand for trash.

Aiie! Apple //e emulator

Jorj Bauer has made a full-speed handheld Apple //e emulator using a Teensy 3.6. – UPDATE NOW USES TEENSY 4.1

Aiie! is an Apple //e emulator, made by Jorj Bauer using a Teensy 3.6. The Apple //e is a vintage desktop computer that was released by Apple in 1983. It was a popular first home computer for many people and was manufactured and sold for 11 years, making it the longest living computer in Apple’s history. Aiie! is named after a sound effect in the classic 1981 Apple //e game Ali Baba and the Forty Thieves.

Bauer copied the ROM from a vintage Apple //e and has replicated it in three prototypes: one in the original desktop form factor and two scaled down handheld versions using 3″ and 5″ LCD screens. Happily for us, Bauer has documented his work on Aiie! extensively. You can see his code on GitHub along with a readme file full of helpful notes aimed at other people who might want to try making a similar project. You can also check out the informative build logs for the Aiie! Apple //e emulator on the Hackaday.io project page, see or follow Bauer’s work on Twitter.