The ATtiny MIDI Plug Synth

MIDI was created over thirty years ago to connect electronic instruments, synths, sequencers, and computers together. Of course, this means MIDI was meant to be used with computers that are now thirty years old, and now even the tiniest microcontrollers have enough processing power to take a MIDI signal and create digital audio. [mitxela]’s polyphonic synth for the ATtiny 2313 does just that, using only two kilobytes of Flash and fitting inside a MIDI jack.

Putting a MIDI synth into a MIDI plug is something we’ve seen a few times before. In fact, [mitxela] did the same thing a few months ago with an ATtiny85, and [Jan Ostman]’s DSP-G1 does the same thing with a tiny ARM chip. Building one of these with an ATtiny2313 is really pushing the envelope, though. With only 2 kB of Flash memory and 128 bytes of RAM, there’s not a lot of space in this chip. Making a polyphonic synth plug is even harder.

The circuit for [mitxela]’s chip is extremely simple, with power and MIDI data provided by a MIDI keyboard, a 20 MHz crystal, and audio output provided eight digital pins summed with a bunch of resistors. Yes, this is only a square wave synth, and the polyphony is limited to eight channels. It works, as the video below spells out.

Is it a good synth? No, not really. By [mitxela]’s own assertion, it’s not a practical solution to anything, the dead bug construction takes an hour to put together, and the synth itself is limited to square waves with some ugly quantization, at that. It is a neat exercise in developing unique audio devices and especially hackey, making it a very cool build. And it doesn’t sound half bad.

Continue reading “The ATtiny MIDI Plug Synth”

Tombstone Brings New Life To Board

Making revisions to existing PCBs with surface mount components often leads to creative solutions, and this insertion of a switch over a tombstoned resistor is no exception. According to [kubatyszko], “this is an FPGA-based Amiga clone. R15 serves as joint-stereo mixing signal between channels to make it easier on headphone users (Amiga has 4 channels, 2 left and 2 right). Removing R15 makes the stereo 100% ‘original’ with fully independent channels. Didn’t want to make it permanent so I decided to put a switch.”

Whether [kubatyszko] intends it or not, this solution is not going to be permanent without some additional work to mechanically secure the switch. We’ve tried this sort of thing before and it sometimes results in the contact area of the resistor being ripped off the substrate and separated from the rest of the resistor, rendering it useless. However, the creative use of the pads to get some additional functionality out of the board deserves some kudos.

We love creative fixes for board problems but it’s been a really long time since we’ve seen several of them collected in one place. We’d love to hear your favorite tricks so let us know in the comments below.

A Pi Powered Recording Studio

In the mid-90s, you recorded your band’s demo on a Tascam cassette tape deck. These surprisingly cheap four-track portable studios were just low tech enough to lend an air of authenticity to a band that calls itself, ‘something like Pearl Jam, but with a piano’. These tape decks disappeared a decade later, just like your dreams of being a rock star, replaced with portable digital recording studios.

The Raspberry Pi exists, the Linux audio stack is in much better shape than it was ten years ago, and now it’s possible to build your own standalone recording studio. That’s exactly what [Daniel] is doing for our Raspberry Pi Zero contest, and somewhat predictably he’s calling it the piStudio.

Although the technology has moved from cassette tapes to CompactFlash cards to hard drives, the design of these four-track mini recording studios hasn’t really changed since their introduction in the 1980s. There are four channels, each with a fader, balance, EQ, and a line in and XLR jack. There are master controls, a few VU meters, and if the technology is digital, a pair of MIDI jacks. Since [Daniel] is using a Raspberry Pi for this project, he threw in an LCD for a great user interface.

As with all digital recorders, the money is in the analog to digital converters. [Daniel] is using a 24-bit, 216kHz, four-channel chip, Texas Instruments’ PCM4204. That’s more than enough to confuse the ears of an audiophile, although that much data will require a hard drive. Good thing there will be SATA.

Although you can buy an eight-channel solid state recorder for a few hundred dollars – and [Daniel] will assuredly put more than that into this project, it’s a great application of a ubiquitous Linux computer for a device that’s very, very useful.


Raspberry_Pi_LogoSmall

The Raspberry Pi Zero contest is presented by Hackaday and Adafruit. Prizes include Raspberry Pi Zeros from Adafruit and gift cards to The Hackaday Store!
See All the Entries || Enter Your Project Now!

Embed With Elliot: Audio Playback With Direct Digital Synthesis

Direct-digital synthesis (DDS) is a sample-playback technique that is useful for adding a little bit of audio to your projects without additional hardware. Want your robot to say ouch when it bumps into a wall? Or to play a flute solo? Of course, you could just buy a cheap WAV playback shield or module and write all of the samples to an SD card. Then you wouldn’t have to know anything about how microcontrollers can produce pitched audio, and could just skip the rest of this column and get on with your life.

Harmonic distortion down ~45db on an Arduino
~45db signal to noise ratio from an Arduino

But that’s not the way we roll. We’re going to embed the audio data in the code, and play it back with absolutely minimal additional hardware. And we’ll also gain control of the process. If you want to play your samples faster or slower, or add a tremolo effect, you’re going to want to take things into your own hands. We’re going to show you how to take a single sample of data and play it back at any pitch you’d like. DDS, oversimplified, is a way to make these modifications in pitch possible even though you’re using a fixed-frequency clock.

The same techniques used here can turn your microcontroller into a cheap and cheerful function generator that’s good for under a hundred kilohertz using PWM, and much faster with a better analog output. Hackaday’s own [Bil Herd] has a nice video post about the hardware side of digital signal generation that makes a great companion to this one if you’d like to go that route. But we’ll be focusing here on audio, because it’s easier, hands-on, and fun.

Continue reading “Embed With Elliot: Audio Playback With Direct Digital Synthesis”

Hacking A USB Port Onto An Old Router

Sometimes hacks don’t have to be innovative to be satisfying. We thought that [daffy]’s instructions and video (embedded below the break) for turning an old WRT54G router into an Internet radio were worth a look even if he’s following a well-traveled path and one that we’ve reported on way back when.

The hack itself is simple. [daffy] locates unused USB data lines, adds in a 5V voltage regulator to supply USB bus power, and then connects it all to a USB sound card. Hardware side, done! And while he doesn’t cover the software side of things in this first video, we know where he’s headed.

The WRT54G router was the first commodity Linux-based router to be extensively hacked, and have open-source firmware written for it. If you’re using OpenWRT or dd-wrt on any of your devices, you owe a debt to the early rootability of the WRT54G. Anyway, it’s a good bet that [daffy] is going to find software support for his USB sound card, but we remain in suspense to see just exactly how the details pan out.

Our favorite WRT54G hack is still an oldie: turning a WRT54G into the brains for a robot. But that was eight years ago now, so surely there’s something newer and shinier. What’s the coolest device that you’ve seen a WRT router hacked into?

Continue reading “Hacking A USB Port Onto An Old Router”

Audio Streaming On The Cheap With An RPi Zero

The minuscule size of the Raspberry Pi Zero makes it perfect for hacks where size is a factor. For example, a small, standalone device for getting streaming audio into your speakers. The RPi Zero doesn’t have an audio output on board, so PolyVection paired it up with their PlainDAC to build a minimal audio streaming device.

Their build uses a few lines from the GPIO header to drive an I2S digital to analog converter. The DAC is a PCM5142 from Texas Instruments that provides high quality sound output, and contains a built in programmable DSP.

The hardware fits into a 3D printed case, coming in at 68 mm by 48 mm. There’s no WiFi inside, but this can be added with an external USB device for wireless streaming. The DAC used is supported by the Linux kernel, so a simple configuration is all that’s needed to pipe audio out.

Once you have a device like this assembled, you can install a server like Music Player Daemon to remotely control the device and cue up internet radio channels.

A Sound And LED-tastic Tricycle Shopping Cart

What do you get when you take a massive number of LEDs and combine them with a shopping cart and a bicycle? An awesome rave-mobile created by [kramerr]. He’s even taking it one step further by making the electronics solar powered.

[Kramerr] controls the LEDs with multiple WS2803 LED drivers. Three PIC18F4550s control the WS2803s over SPI. He devised a neat way of exciting the LEDs from music by using a pair of graphic equalizer display filter chips, MSGEQ7s, to drive the PICs to create patterns. A USB input also allows the PICs to display song titles or other information.

leds and boards

The mechanical design is as impressive as the electronics. The rear half of a bicycle is welded to the frame of the shopping cart with the cart’s handle used for steering. The shopping cart’s rear wheels are replaced by small bicycle wheels.

But [Kramerr] wasn’t done. He built his own solar panel since he couldn’t find one to fit the size requirements. The panel consists of 26 cells connected in series to provide 1A at 13V on a sunny day. A solar charge controller keeps a standard 12v lead acid battery ready to power the tricycle cart.

And there is still more! There is a sound system driven by a Raspberry Pi. The Pi also drives the USB inputs when [Krameer] wants to display song titles or artists instead of the audio patterns.

There are at least four hacks in this project each worthy of applause. [Karmeer] deserves an ovation for doing all of them in one project. If you are looking for less bling and less pedaling may we direct you to this powered, riding shopping cart.

Some rave music and lights via video after the break.

Continue reading “A Sound And LED-tastic Tricycle Shopping Cart”