Blog Posts

Obstacle Avoidance Using An iPad and LIDAR

Shane Wighton, the designer behind the well-known basketball hoop that won’t let you miss, has created a system for obstacle detection that uses the new iPad’s built-in LIDAR scanner.

The LIDAR system works by taking regular readings of a room by sending out tiny pulses of light at targets and measuring the time it takes to return a reflection. In this way, a scan can be taken of an entire room to accurately determine the location of objects and obstructions.

Wighton used the technology to make an app which not only harnesses data from the LIDAR scans at regular intervals but visualizes the data as an augmented reality overlay color coded to show the relative distance of objects. When paired with a custom 3D-printed tactile interface that attaches to the back of the iPad, the data can be translated through a mechanism that depresses or exposes a set of pins as an indicator of obstacle presence. In a video posted to YouTube, Wighton discusses his design process including how he decided to use the iPad’s LIDAR system and how he built the tactile feedback mechanism which uses two stepper motors driven by a Teensy 3.6. He also discusses the parts of the project he feels could be improved as well as his hopes for future iterations, especially if LIDAR were to be released for the iPhone. You can view Wighton’s other projects on his website and his YouTube channel Stuff Made Here.

 

Binaural Beat Synthesizer

Instrument maker and artist Greg Francke recently shared a project on Hackaday that uses binaural recording in combination with the Teensy audio library to produce a six channel wave synthesizer capable of generating “complex aural soundscapes.”

Binaural recording is a process that makes use of two microphones strategically located to create a 3-D stereo experience for the listener that replicates the experience of being in a room with a live sound performance.

The project features a TFT display GUI showing options for sound manipulation that include modulation frequency, waveform, duty cycle, center frequency, beat frequency, beat waveform, and beat duty cycle.

In his project posting on Hackaday, Francke mentions that his original plan for the synth was to use analog potentiometers for control but found that noise levels were too high leading him to scrap this feature.

Francke’s blog includes many other projects which explore everything from J.G. Ballard-inspired robots to USB-powered “Tesla Stress Relief” devices.

 

 

 

F°LUEX: A Smart Thermometer

Few people are able to distinguish between a flu and a cold based on symptoms alone, but what if a device could do it for you? F°LUEX is an automated medical diagnostics device that uses the Teensy 3.2.

Designed by engineer and actual rocket scientist M. Bindhammer, F°LUEX is an automated medical diagnostics device that incorporates a medical-grade MLX90614 infrared thermometer to read human body temperature with an accuracy of ±0.2˚C. Following the reading, the patient is asked a series of questions displayed on an OLED screen about their symptoms. Based on their temperature reading and the patient’s responses which are input using the device’s controls, the thermometer is able to distinguish cold from flu within a certain probability based upon the same Bayesian statistic analysis process that is frequently used among modern medical practitioners. The device is powered by two 1.5 V AA alkaline batteries and all electronics including display, inputs (soft power switch and miniature joystick), and sensor are driven by a Teensy 3.2.

M. Bindhammer created the project to support his 8 year old daughter who frequently contracts the flu and whose pediatrician is often unavailable on the weekends when she usually becomes ill. In his design, he strove to use only a few easy-to-obtain components in combination with a 3D printed case so that others could replicate the project at home. The project is a winner of a 2020 Hackaday Prize and the full project description can be viewed on Hackaday.

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.