Scratching Vinyl Straddles Physical and Digital Realms

The life of a modern DJ is hard. [Gergely] loves his apps, but the MIDI controller that works with the app feels wrong when he’s scratching, and the best physical interfaces for scratching only work with their dedicated machines. [Gergely]’s blog documents his adventures in building an interface to drive his iPad apps from a physical turntable. But be warned, there’s a lot here and your best bet is to start at the beginning of the blog (scroll down) and work your way up. Or just let us guide you through it.

In one of his earliest posts he lays out his ideal solution: a black box that interprets time-code vinyl records and emulates the MIDI output of the sub-par MIDI controller. Sounds easy, right? [Gergely] gets the MIDI side working fairly early on, because it’s comparatively simple to sniff USB traffic and emulate it. So now he’s got control over the MIDI-driven app, and the hard part of interfacing with the real world began.

After experimenting a lot with timecode vinyl, [Gergely] gives up on that and looks for an easier alternative. He also considers using an optical mouse, but that turns out to be a dead-end as well. Finally, [Gergely] settled on using a Tascam TT-M1, which is basically an optical encoder that sits on top of the record, and that makes the microcontroller’s job a lot easier. You can see the result in the video below the break.

And then in a surprise ending worthy of M. Night (“I see dead people”) Shyamalan  he pulls timecode vinyl out of the grave, builds up a small hardware translator, and gets his original plan working. But we have the feeling that he’s not done yet: he also made a 3D printed optical-mouse holder.

Continue reading “Scratching Vinyl Straddles Physical and Digital Realms”

Reverse Engineering the ARM ALU

[Dave] wanted to learn more about the ARM architecture, so he started with an image of the ARMV1 die. If you’ve had some experience looking at CPU die, you can make some pretty good guesses at what parts of the chip have certain functions. [Dave], however, went further. He reverse engineered the entire ALU–about 2,200 transistors worth.

Continue reading “Reverse Engineering the ARM ALU”

Programming with Rust

Do hardware hackers need a new programming language? Your first answer might be no, but hold off a bit until you hear about a new language called Rust before you decide for sure.

We all know real hackers use assembly language to program CPUs directly, right? Well, most of us don’t do as much assembly language as we used to do. Languages like C can generate tight, predictable code and are easier to manage.

Although some people use more abstract languages in some embedded systems, it is no secret that for real-time systems, device driver development, and other similar tasks, you want a language that doesn’t obscure underlying details or generate code that’s difficult to reason about (like, for example, garbage collection). It is possible to use special techniques (like the Real-Time Java Specification) to help languages, but in the general case a lean language is still what most programmers reach for when you have to program bare metal.

Even C++, which is very popular, obscures some details if you use things like virtual functions (a controversial subject) although it is workable. It is attractive to get the benefit of modern programming tools even if it does conceal some of the underlying code more than straight C.

About Rust

That’s where Rust comes in. I could describe what Rust attempts to achieve, but it is probably easier to just quote the first part of the Rust documentation:

Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren’t good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve ‘zero-cost abstractions’ even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would.

Continue reading “Programming with Rust”

Polyphonic FM Synthesizer uses ARM

There seems to be a direct correlation between musicians and people who can program. Even programmers who don’t play an instrument often have a profound appreciation of music and so we see quite a few musical projects pop up. [Ihsan Kehribar’s] latest project is a good example. He married an STM32F031 ARM development board, an audio codec, and a simple op amp filter to make a playable MIDI instrument. Of course, it is hard to appreciate a music project from a picture, but if you want to listen to the results, there’s always Soundcloud.

He’d started the project using an 8-bit micro, but ran into some limitations. He switched to an STM32F031, which is a low-end ARM Cortex M0 chip. [Ihsan] mentions that he could have used the DSP instructions built into larger ARM chips, but he wanted to keep the project done on minimal hardware. The audio CODEC chip is from Cirrus Logic (a WM8524), and it produces two output channels at 192 kHz. As an unexpected benefit, the CODEC uses a charge pump to generate a negative voltage (much like a MAX232 does) and [Ihsan] was able to tap that voltage to provide the op-amps in the audio filter with a negative supply rail.

Continue reading “Polyphonic FM Synthesizer uses ARM”

ARM-Based Gesture Remote Control

When we wave our hands at the TV, it doesn’t do anything. You can change that, though, with an ARM processor and a handful of sensors. You can see a video of the project in action below. [Samuele Jackson], [Tue Tran], and [Carden Bagwell] used a gesture sensor, a SONAR sensor, an IR LED, and an IR receiver along with an mBed-enabled ARM processor to do the job.

The receiver allows the device to load IR commands from an existing remote so that the gesture remote will work with most setups. The mBed libraries handle communication with the sensors and the universal remote function. It also provides a simple real-time operating system. That leaves just some simple logic in main.cpp, which is under 250 lines of source code.

Continue reading “ARM-Based Gesture Remote Control”

El Cheapo Phased-Array Sonar

Sonar is a great sensor to add to any small-scale robot project. And for a couple bucks, the ubiquitous HC-SR04 modules make it easy to do. If you’ve ever used these simple sonar units, though, you’ve doubtless noticed that you get back one piece of information only — the range to the closest object that the speaker is pointing at. It doesn’t have to be that way. [Graham Chow] built a simple phased-array using two SR04 modules, and it looks like he’s getting decent results.

PB211200The hack starts out by pulling off the microcontroller and driving the board directly, a hack inspired by [Emil]’s work on reverse engineering the SR04s. Once [Graham] can control the sonar pings and read the results back, the fun begins.

[Graham] uses TI’s Cortex M4F LaunchPad eval kit to generate a ping and receive the reflections. With normal sonar, the time between the ping being sent and its reception is determined by the range to the target. In a phased array, in this case just the two modules, the difference in the times it takes for the ping to return to each module is used to determine the angle to the target.


If you’re DSP-savvy, [Graham] is using a phase-shifted square wave signal so that the correlations of the sent and returned signals have better peaks. This also helps the peaks in correlation across the two SR04s in the array. We think it’s pretty awesome that [Graham] is resolving a couple of degrees in angular separation when he moved his wine bottle. With a couple more SR04 units, [Graham] could start to get height information back as well.

For not much scratch, [Graham] has himself an experimental setup that lets him play with some pretty heavy signal processing. We’re impressed, and can’t wait to see what’s next. Special thanks to [Graham] for posting up the code.

And thanks [João] for the tip!

Physical Fitness for the Truly Lazy

We’re going to get in shape around here, starting today. Well… in the United States, it is almost Thanksgiving, so we might as well wait until… but then it is going to be the end of the year and between Christmas, Hanukkah,  and New Year’s, we should put it off until then.

OK, we get it. There’s always some excuse. We know we should go on and do some push ups today. Of course, we are a lazy bunch, so not everyone’s going to do a full push up. Then we’ll all argue how many we actually did. If this sounds like you, maybe you need an Arduino-based project that counts proper push ups.

Continue reading “Physical Fitness for the Truly Lazy”