Monochrome LCD Video Hacks Galore!

[Wenting Zhang] is clearly a fan of old school STN LCD displays, and was wondering how various older portable devices managed to drive monochrome LCDs panels with multiple grey levels. If the display controller supports multiple bits per pixel, it can use various techniques, such as PWM, in order to produce a pseudo-grayscale image. But, what if you have a monochrome-only display controller? With a sufficiently high pixel clock, can you use software on the application side of things to flip those pixels in such a manner as to give a reasonable looking grayscale image?

Simple dithering – don’t look too close!
PDM greyscale approximation in a 1-bit display

[Wenting] goes through multiple techniques, showing the resulting image quality in a clear, systematic manner. The first idea is to use a traditional dithering technique. For each pixel, it is set to black if the grey value is below some threshold. The resulting error value, is then propagated to neighbouring pixels. This error diffusion process smears the error out over the whole display, so spatially speaking, on average the pixel values correspond roughly to the original gray values. But, the pixels themselves are still either on or off. This isn’t quite enough. The next idea is to PWM the individual pixels over multiple frames, to approximate different grey levels. But, that gives a worst case effective refresh rate of 8 Hz with a PWM period of 15 frames, at 120 fps, and that flickers. Badly. One way to mitigate that is to switch to PDM (pulse density modulation) which selects different length sequences to give the same duty cycle but at higher frequency, at least for some grey values. Slightly better, but there’s more that can be done. Continue reading “Monochrome LCD Video Hacks Galore!”

Pitch Sequencer Turns Tascam Tape Deck Into Instrument

The cool thing about magnetic tape is that by varying the speed at which you play it back, you can vary the pitch of the output. [Issac] decided to take advantage of this, executing a fancy digitally-controlled pitch mod on his Tascam Porta 02 tape deck.

The build uses a Raspberry Pi Pico, which employs PWM to control the speed of the tape drive’s motor. This is achieved with the use of an NPN transistor driven by the PWM output of the Pico. This allows accurate control of motor speed, and thus pitch.

With that sorted out, the project was fleshed out with an OLED screen and a rotary encoder. These allow various patches or scripts to be run on the Pico, controlling the motor speed of the tape player in various ways. With a bit of work, [Issac] was also able to create a function that converted MIDI note values into PWM values that determine various motor speeds.

The natural thing to do next was to put in a tape with a looping sample at a set pitch, and then vary it in a sequence controlled by the Pico. The 8 steps of the sequence can be manually set with the rotary control, and in future, [Issac] even plans to add a real MIDI input, allowing the system to act as a monophonic synth.

If you prefer other routes to pitch shifting shenanigans, check out this project. Video after the break.

Continue reading “Pitch Sequencer Turns Tascam Tape Deck Into Instrument”

Mini MIDI Synth Uses Minimum Number Of Parts

The 80s were the golden age of synthesizers in pop music. Hugely complicated setups that spared no expense were the norm, with synths capable of recreating anything from pianos and guitars to percussion, strings, and brass. These types of setups aren’t strictly necessary if you’re looking to make music, though, especially in the modern age of accessible microcontrollers. This synthesizer from [Folkert] with MIDI capabilities, for example, creates catchy tunes with only a handful of parts.

This tiny synth is built around an ESP32 and works by generating PWM signals normally meant for LEDs. In this case, the PWM signals are sent through a rudimentary amplifier and then on to an audio output device.  That could be a small speaker, an audio jack to another amplifier, or a capture device.

The synth’s eight channels use up most of the ESP32’s I/O and provide a sound that’s reminiscent of the eight-bit video game era. The total parts count for this build is shockingly small with only a handful of resistors, the ESP, an optocoupler, and a few jacks.

For those wishing to experiment with synthesizers, a build like this is attractive because it’s likely that all the parts needed are already sitting around in a drawer somewhere with possibly the exception of the 5 pin DIN jacks needed for MIDI capabilities. Either way, [Folkert] has made all of the schematics available on the project page along with some sample mp3 files. For those looking to use parts from old video game systems sitting in their parts drawer, though, take a look at this synthesizer built out of a Sega Genesis.

Processing Audio With The RP2040

The Raspberry Pi, although first intended as an inexpensive single-board computer for use in education, is now ubiquitous in electronics communities. Its low price as well as Linux platform and accessible GPIO make it useful in many places outside the classroom. But, if you want to abandon the ease-of-use in favor of an even lower price, the Raspberry Pi foundation makes that possible as well with the RP2040 chip, commonly found on the Pico. [Jason] shows us one way to make use of this powerful chip by putting one in an audio digital signal processing board.

While development boards are available for this chip, [Jason] has opted instead for a custom PCB which he designed himself and includes an integrated headphone amplifier and 3.5 mm audio jacks. To do the actual DSP work, the RP2040 chip uses three 12-bit ADC channels and 16 controllable PWM channels. The platform is also equipped with the TLV320AIC3254 codec from Texas Instruments. With all of this put together, he has a functioning open-source platform he calls the DS-Pi.

[Jason] has built this as a platform for guitar effects and as a customizable guitar amp modeler, but with a platform that is Arduino-compatible and fairly easy to program it could be put to use for anything involving other types of music or audio processing, like this specialized MIDI-compatible guitar effects platform which is built around the same processor.

Servo Larson scanner

No LEDs Required For This Servo-Controlled Larson Scanner

All things considered, it’s pretty easy to get one LED is a strip to light up sequentially, and have it bounce back and forth. Turning that simple animation into a real Larson scanner, with smooth transitions and controlled fade-out, is another thing entirely. And forgetting the LEDs altogether and making a servo-operated Larson scanner is — well, let’s just call it an interesting lesson in hardware abstraction.

The Larson scanner, named after famed TV producer Glen A. Larson for his penchant for incorporating it into shows like Battlestar Galactica and Knight Rider, is actually hard to execute in hardware thanks to the fading tail that follows the lead pixel as it dances back and forth across the display. [Eric Gunnerson] decided to make this and other animation effects easier to achieve with Fade, a custom framework for LED animations that runs on an ESP32.

LED animations are fine, but what about servos? Could Fade be modified to support them? This turned out to be a fairly easy mod thanks to Fade’s architecture and [Eric]’s existing support for non-addressable LEDs via PWM signals. And it was even possible to support more than the 16 PWM channels on an ESP32by adding a UDP connection that puts multiple ESP32s under the control of a central microcontroller.

The video below shows [Eric]’s demo of servo support, with an eight-channel electromechanical Larson scanner. Each “pixel” is a painted ping pong ball swinging back and forth on a hobby servo, and the whole thing sounds just about as awful as you’d expect it to. If you squint just right, the effect looks pretty convincing, but that’s hardly the point. The real story here is [Eric]’s thoughtful architecture, which made the mods easier than starting from scratch.

Continue reading “No LEDs Required For This Servo-Controlled Larson Scanner”

When A Single Bit Was Enough, Into The Sound Of The ZX Spectrum

It’s normal for a computer in 2022 to come with a fully-featured sound card containing a complete synthesizer as well as high-quality PCM sound recording and playback. It’s referred to as a sound card after the way the hardware first appeared in the world of PCs, but in fact it’s now considered so essential as to be a built-in part of most mainboards. There was a time when computers boasted considerably less impressive sound hardware, and among the chorus of SIDs and AY chips of the perhaps the least well-featured was the original Sinclair ZX Spectrum. Its one-bit sound, a single line on an I/O port, is the subject of a thorough investigation from [Forgotten Computer]. It’s a long video which we’ve placed below the break, but for those with an interest in 8-bit music it should make a for a fascinating watch.

For Sir Clive Sinclair the 1-bit audio must have been welcome as it removed the need for an expensive sound chip and kept the Spectrum to its low price point, but on the face of it there was little more it could do than create simple beeps using Sinclair BASIC’s built-in BEEP command. The video gives us an in-depth look at how interleaving and PWM could be used to create much more complex sounds such as the illusion of multiple voices and even sampled sounds. In particular his technique of comparing the audio output with its corresponding pin on the Sinclair ULA shows the effect of the machine’s simple low-pass filter, though the music was often so close to the edge of what the interface could do that aliasing sounds are often very obvious.

As he demonstrates the various ingenious techniques that game and demo developers used to extract performance from such limited hardware that could even try to compete with the more sophisticated machines even at the same time as their code was running whatever was on the screen, it’s difficult not to come away with immense respect for their skills. If you’ve ever experimented with computer audio then you should try hardware this simple for yourself.

Continue reading “When A Single Bit Was Enough, Into The Sound Of The ZX Spectrum”

Cool WS2811 Trick Makes LED Art Installation Smooth

Normally, when a project calls for addressable LEDs, we just throw a strip of WS2812s and an Arduino together, cobble together some code from the examples in the FastLED library, and call it a day. We don’t put much thought into what’s going on under the hood, unless and until we run into an LED project that’s a little more challenging.

Inventor [Leo Fernekes] found himself in such a situation recently, when he pitched in on an LED art installation. The project called for rings of LED bars around the trunks of trees on a private estate. The physical size of the project and the aesthetic requirements created significant challenges, though. One of these was finding a way to control the LED bars, each of which draws about 100 mA and needs to be very smoothly dimmed. [Leo] looked at the WS2811 LED driver, but found that the low drive current and the 8-bit PWM output failed to tick either of those boxes.

[Leo] solved both problems by using two of the three PWM channels on the chip in concert — one to control the current and one to PWM the LED. The circuit he came up with is deceptively simple — just four transistors, a Schottky diode, and a bunch of passives. The other clever bit is the data interface between LED bars, which can be configured as either single-ended or differential. This allows the same interface to be used for the short distance between bars on a tree, and the longer runs between trees.

As usual, [Leo] does a great job of explaining his design and how it works, which we find very instructional. He did something similar when he managed to dim a non-dimmable LED fixture.

Continue reading “Cool WS2811 Trick Makes LED Art Installation Smooth”