Say It With Me: Aliasing

Suppose you take a few measurements of a time-varying signal. Let’s say for concreteness that you have a microcontroller that reads some voltage 100 times per second. Collecting a bunch of data points together, you plot them out — this must surely have come from a sine wave at 35 Hz, you say. Just connect up the dots with a sine wave! It’s as plain as the nose on your face.

And then some spoil-sport comes along and draws in a version of your sine wave at -65 Hz, and then another at 135 Hz. And then more at -165 Hz and 235 Hz or -265 Hz and 335 Hz. And then an arbitrary number of potential sine waves that fit the very same data, all spaced apart at positive and negative integer multiples of your 100 Hz sampling frequency. Soon, your very pretty picture is looking a bit more complicated than you’d bargained for, and you have no idea which of these frequencies generated your data. It seems hopeless! You go home in tears.

But then you realize that this phenomenon gives you super powers — the power to resolve frequencies that are significantly higher than your sampling frequency. Just as the 235 Hz wave leaves an apparent 35 Hz waveform in the data when sampled at 100 Hz, a 237 Hz signal will look like 37 Hz. You can tell them apart even though they’re well beyond your ability to sample that fast. You’re pulling in information from beyond the Nyquist limit!

This essential ambiguity in sampling — that all frequencies offset by an integer multiple of the sampling frequency produce the same data — is called “aliasing”. And understanding aliasing is the first step toward really understanding sampling, and that’s the first step into the big wide world of digital signal processing.

Whether aliasing corrupts your pristine data or provides you with super powers hinges on your understanding of the effect, and maybe some judicious pre-sampling filtering, so let’s get some knowledge.

Continue reading “Say It With Me: Aliasing”

The Hard Way of Cassette Tape Auto-Reverse

The audio cassette is an audio format that presented a variety of engineering challenges during its tenure. One of the biggest at the time was that listeners had to physically remove the cassette and flip it over to listen to the full recording. Over the years, manufacturers developed a variety of “auto-reverse” systems that allowed a cassette deck to play a full tape without user intervention. This video covers how Akai did it – the hard way.

Towards the end of the cassette era, most manufacturers had decided on a relatively simple system of having the head assembly rotate while reversing the motor direction. Many years prior to this, however, Akai’s system involved a shuttle which carried the tape up to a rotating arm that flipped the cassette, before shuttling it back down and reinserting it into the deck.

Even a regular cassette player has an astounding level of complexity using simple electromechanical components — the humble cassette precedes the widespread introduction of integrated circuits, so things were done with motors, cams, levers, and switches instead. This device takes it to another level, and [Techmoan] does a great job of showing it in close-up detail. This is certainly a formidable design from an era that’s beginning to fade into history.

The video (found after the break) also does a great job of showing glimpses of other creative auto-reverse solutions — including one from Phillips that appears to rely on bouncing tapes through something vaguely resembling a playground slide. We’d love to see that one in action, too.

One thing you should never do with a cassette deck like this is use it with a cassette audio adapter like this one.

Continue reading “The Hard Way of Cassette Tape Auto-Reverse”

The Think Tank at the Chicago Unconference

On Saturday the Hackaday community turned out in force to try something new. The first Hackaday Unconference was held in three places at the same time, and I was in Chicago and was amazed at the turnout and variety of presentations. The image above sums up the concept quite well, everyone shows up ready to give an eight minute talk, but as a whole, no one knows what to expect. Well, we should have known to expect awesome and that’s what we got.

As usual, people are excellent… to one another and in adapting to the fluid nature of the day. Pumping Station: One, a renowned Hackerspace in the Avondale neighborhood near downtown Chicago, opened their doors for us. Not knowing how many people to expect we set up two presentation rooms with a third on deck just in case it was needed.

We just barely squeezed everyone in one room for the first track but ended up splitting into two for part of the day. Here you can see that second room filling up. Even so we still had a handful of presentations that didn’t get a chance to shine — we simply must do this again so they can have the chance and because I had such a great time!

Continue reading “The Think Tank at the Chicago Unconference”

Mood Lamp Also Warns of Nuclear Catastrophe

[Michal Zalewski] has radiation on the brain. Why else would he gut a perfectly-horrible floor lamp, rebuild the entire thing with high-power RGB LEDs, and then drive it with a microcontroller that is connected up to a Geiger-Müller tube? Oh right, because it also looks very cool, and Geiger tubes are awesome.

If you’ve been putting off your own Geiger tube project, and we know you have, [Michal]’s detailed explanation of the driver circuit and building one from scratch should help get you off the couch. Since a Geiger tube needs 400 volts DC, some precautions are necessary here, and [Michal] builds a relatively safe inverter and also details a relatively safe way to test it.

The result is a nice piece of decor that simultaneously warns you of a nuclear disaster by flashing lights like crazy, or (hopefully) just makes a nice conversation piece. This is one of the cooler Geiger tube hacks we’ve seen since [Robert Hart] connected up eighteen Geiger tubes, and used them to detect the direction of incoming cosmic rays and use that to compose random music (YouTube, embedded below).

[Michal] is also author of the most excellent Guerrilla Guide to CNC Machining and keeps good tabs on his background radiation.

Continue reading “Mood Lamp Also Warns of Nuclear Catastrophe”

Acoustic Coupler Pole-Vaults Over China’s Firewall

[agp.cooper]’s son recently went to China, and the biggest complaint was the Great Firewall of China. A VPN is a viable option to get around the Great Firewall of China, but [agp] had a better idea: an acoustic coupler for his son’s iPhone.

Hackaday readers of a recent vintage might remember an old US Robotics modem that plugged into your computer and phone line, allowing you to access MySpace or Geocities. Yes, if someone picked up the phone, your connection would drop. Those of us with just a little more experience under our belts will remember the acoustic coupler modem — a cradle that held a phone handset that connected your computer (indirectly) to the phone line.

With a little bit of CNC work, [agp] quickly routed out a block of plywood that cradled his son’s iPhone. Add in a speaker and a microphone, and that’s an acoustic coupler. There’s not much to it, really. The real challenge is building a modem.

In the late 90s, there were dedicated chipsets for modems, and before that, there was a 74xx-series chip that was a 300-baud modem. [agp] isn’t using anything like that. He’s building a modem with an Arduino. This is a Bell 103A-compatible modem, allowing an iPhone to talk to a remote computer at 300 bits per second. This is a difficult challenge; we’re not able to get 33kbps over a smartphone voice connection simply because of the codecs used. However, with a little bit of work, [agp] managed to build a real modem with an Arduino.

Modern DIY FM radio

Back in the day, building a DIY radio was fun! We only had to get our hands at a germanium diode, make some coils, and with a resistor and long wire as an antenna maybe we could get some sound out of those old white earplugs. That was back then. Now we have things like the Si4703 FM tuner chip that can tune in FM radio in the 76–108 MHz range, comes with integrated AGC and AFC, controlled by I2C, as well as a bunch of other acronyms which seem to make the whole DIY radio-building process outdated. The challenges of the past resulted in the proven solutions of the present in which we build upon.

This little project by [Patrick Müller] is a modern radio DIY tutorial. With an Arduino Nano as the brains and controller for an Si4703 breakout board, he builds a completely functional and portable FM radio. A small OLED display lets the user see audio volume, frequency, selected station and still has space left to show the current available battery voltage. It has volume control, radio station seek, and four buttons that allows quick access to memorized stations. The source code shows how it is possible to control the Si4703 FM tuner chip to suit your needs.

As for ICs, not everything is new, [Patrick] still used the good old LM386 amp to drive the speaker, which is almost 35 years old by now. As we can listen in the demo video, it can still output some seriously loud music sounds!

Continue reading “Modern DIY FM radio”

Well Engineered Radio Clock Aces Form and Function

Clocks that read time via received radio signals have several advantages over their Internet-connected, NTP-synchronised brethren. The radio signal is ubiquitous and available over a fairly large footprint extending to thousands of kilometres from the transmitting antennae. This allows such clocks to work reliably in areas where there is no Internet service. And compared to GPS clocks, their front-end electronics and antenna requirements are much simpler. [Erik de Ruiter]’s DCF77 Analyzer/Clock is synchronised to the German DCF77 radio signal, which is derived from the atomic clocks at PTB headquarters. It features a ton of bells and whistles, while still being simple to build. It’s a slick piece of German hacker engineering that leaves us amazed.

Among the clock functions, it shows time, day of the week, date, CET/CEST modes, leap year indications and week numbers. The last is not part of the DCF77 protocol but is calculated via software. The DCF77 analyzer part has all of the useful information gleaned from the radio signals. There are displays for time period, pulse width, a bit counter, bit value indicator (0/1) and an error counter. There are two rings of 59 LEDs each that provide additional information about the DCF77 signal. A PIR sensor on the front panel helps put the clock in power save mode. Finally, there is a whole bunch of indicator LEDs and a bank of switches to control the various functions. On the rear panel, there are RJ45 sockets for the DCF77 receiver antenna board, temperature sensor and FTDI serial, a bunch of audio sound board controls, reset switches and a mode control switch.

His build starts with the design and layout of the enclosure. The front panel layout had to go through a couple of iterations before he was satisfied with the result. The final version was made from aluminium-coated sandwich-panel. He used an online service to photo-etch the markings, and then a milling machine to carve out the various windows and mounting holes. The rear panel is a tinted acrylic with laser engraving, which makes the neatly laid out innards visible for viewers to appreciate. The wooden frame is made from 40-year-old Mahogany, sourced from an old family heirloom desk. All of this hard work results in a really professional looking product.

The electronics are mostly off the shelf modules, except for the custom built LED driver boards. The heart of the device is an Arduino Mega because of the large number of outputs it provides. There are seven LED driver boards based around the Maxim 7221 (PDF) serial interface LED drivers – two to drive the inner and outer ring LEDs, and the others for the various seven-segment displays. The numerous annunciator LEDs are driven directly from the Arduino Mega. His build really comes together by incorporating a noise resilient DCF77 decoder library by [Udo Klein] which is running on a separate Arduino Uno. All of his design source files are posted on his GitHub repository and he hopes to publish an Instructable soon for those who would like to build one of their own.

In the first video below, he walks through the various functions of the clock, and in the second one, gives us a peek in to its inside. Watch, and be amazed.

Thanks for the tip, [Nick]

Continue reading “Well Engineered Radio Clock Aces Form and Function”