Behind The Pin: How The Raspberry Pi Gets Its Audio

Single board computers have provided us with a revolution in the way we approach computing as hardware creators. We have grown accustomed to a world in which an entire microcomputer has become a component in its own right rather than a complex system, and we interface to them as amorphous entities through their exposed interfaces. But every pin or socket on a single board computer has something behind it, so following up on a recent news-inspired item in which we took a look at what lies behind the Ethernet jack on a Raspberry Pi, we’d like to continue that theme by looking behind more pins and interfaces. So today we’ll stay with the Raspberry Pi, and start with an easy target by taking a look down its audio jack.

All the main Raspberry Pi board releases since 2012 with the exception of the Pi Zero series, have featured a 3.5mm jack carrying line-level audio. The circuits are readily accessible via the Raspberry Pi website, and are easy enough to understand because of course all the really hard work is done within the silicon of the Broadcom system-on-chip. Looking at the audio circuitry, we’ll start by going back to the original Pi Model B from 2012 (PDF) because though more recent models have seen a few changes, this holds the essence of the circuitry.

Continue reading “Behind The Pin: How The Raspberry Pi Gets Its Audio”

Replace Your Calipers With A Microscope And Image Analysis

Getting a good measurement is a matter of using the right tool for the job. A tape measure and a caliper are both useful tools, but they’re hardly interchangeable for every task. Some jobs call for a hands-off, indirect way to measure small distances, which is where this image analysis measuring technique can come in handy.

Although it appears [Saulius Lukse] purpose-built this rig, which consists of a microscopic lens on a digital camera mounted to the Z-axis of a small CNC machine, we suspect that anything capable of accurately and smoothly transitioning a camera vertically could be used. The idea is simple: the height of the camera over the object to be measured is increased in fine increments, with an image acquired in OpenCV at each stop. A Laplace transformation is performed to assess the sharpness of each image, which when plotted against the frame number shows peaks where the image is most in focus. If you know the distance the lens traveled between peaks, you can estimate the height of the object. [Salius] measured a coin using this technique and it was spot on compared to a caliper. We could see this method being useful for getting an accurate vertical profile of a more complex object.

From home-brew lidar to detecting lightning in video, [Saulius] has an interesting skill set at the intersection of optics and electronics. We’re looking forward to what he comes up with next.

Give The Clapper A Hand

While “The Clapper” probably first conjures images of low-budget commercials, it was still a useful way to remotely switch lights and other things around the house. But if the lights you want to switch weren’t plugged into the wall, like a ceiling fan, for example, The Clapper was not going to help you. To add some functionality to this infamous device, [Robin] built one from scratch that has all the extra features built in that you could ever want.

First, the new Clapper attaches to the light switch directly, favoring mechanical action of the switch itself rather than an electromechanical relay which requires wiring. With this setup, it would be easy to install even if you rent an apartment and can’t do things like rewire outlets and it has the advantage of being able to switch any device, even if it doesn’t plug into the wall. There’s also a built-in microphone to listen for claps, but since it’s open-source you could program it to actuate the switch when it hears any sound. It also includes the ability to be wired in to a home automation system as well.

If the reason you’ve stayed out of the home automation game is that you live in a rental and can’t make the necessary modifications to your home, [Robin]’s Clapper might be just the thing you need to finally automate your living space. All the files are available on the project site, including the 3D printing plans and the project code. Once you get started in home automation, though, there’s a lot more you can do with it.

Continue reading “Give The Clapper A Hand”

Old Time Traffic Signal Revived With A Raspberry Pi Controller

Anyone with even a passing familiarity with the classic animated shorts of the 1940s will recognize the traffic signal in the image above. Yes, such things actually existed in the real world, not just in the Looney world of [Bugs Bunny] et al. As sturdy as such devices were, they don’t last forever, though, which is why a restoration of this classic Acme traffic signal was necessary for a California museum. Yes, that Acme.

When you see a traffic signal from the early days of the automotive age like this one, it becomes quickly apparent how good the modern equivalent has become. Back in the day, with a mix of lights distributed all over the body of the signal, arms that extend out, and bells that ring when the state changes, it’s easy to see how things could get out of hand at an intersection. That complexity made the restoration project by [am1034481] and colleagues at the Southern California Traffic Museum all the more difficult. Each signal has three lights, a motor for the flag, and an annunciator bell, each requiring a relay. What’s more, the motor needs to run in both directions, so a reversing relay is needed, and the arm has a mechanism to keep it in position when motor power is removed, which needs yet another relay. With two signals, everything was doubled, so the new controller used a 16-channel relay board and a Raspberry Pi to run through various demos. To keep induced currents from wreaking havoc, zero-crossing solid state relays were used on the big AC motors and coils in the signal. It looks like a lot of work, but the end results are worth it.

Looking for more information on traffic signal controls? We talked about that a while back.

Fail Of The Week: Careful Case Mod Is All For Naught

Today’s entry comes to us from [Robert Tomsons], who was kind enough to document this crushing tale of woe so that we might all learn what true heartbreak is. If you’ve ever toiled away at getting that perfect surface finish with body filler, this one is going to hurt. In fact, you might just want to hit that “Back” button and head to safety now. There’s probably a pleasant story about some 3D printed thing being used with a Raspberry Pi of some sort that you can read instead.

For those of you brave enough to continue on, today we’ll be looking at what [Robert] thought would be a simple enough project. Seeing the board from a USB 3.0 external hard drive kicking around his parts bin, he had a rather unusual idea. Wanting to add an extra drive to his computer, but liking the idea of being able to independently control its power, he decided to integrate the external drive into machine’s front panel. This would not only allow him to power off the secondary drive when not in use, but it meant he could just plug his laptop into the front panel if he wanted to pull files off of it.

All [Robert] needed to do was make it look nice. He carefully squared off the edges of the external drive’s back panel to roughly the size of the computer’s 3.5 inch drive bay opening. He then glued the piece in place, and began the arduous task of using body filler to smooth everything out. It’s a dance that many a Hackaday reader will know all too well: filler, sand, primer, sand, filler, sand, primer, sand, so on and so on. In the end, the final result looked perfect; you’d never have thought the front panel wasn’t stock.

It should have been so easy. Just snap the case back together and be done with it. But when [Robert] finally got the machine buttoned back up and looked at the front, well, it’s safe to say his day couldn’t get much worse. Maybe the glue was not up to the task. Perhaps it was how excited he was to get the case put back together; a momentary loss of muscular coordination. A few extra foot-pounds of energy per second, per second. Who can say?

[Robert] says he’ll return to the project, but for now he needs a break. We agree. Interestingly, he mentions in his post that his body filler work was inspired by [Eric Strebel], a name that is well known around these parts. Considering how good it looked before it exploded, we’ll consider that high praise.

Teardown Of Sonos And Amazon Smart Speakers Reveals Interesting Engineering Details

Taking things apart is always fun, and this What Cracking Open a Sonos One Tells Us About the Sonos IPO”>excellent writeup of a teardown of a Sonos and Amazon smart speaker by [Ben Einstein] shows what you can learn. [Ben] is a Venture Capitalist and engineer, so much of his write up focuses on what the devices say about how the company spends money. There are plenty of things to learn for hackers, though: he details how the Sonos One uses a PCI daughterboard for wireless communications, while the Amazon Echo has a programmable radio on the main board.

Continue reading “Teardown Of Sonos And Amazon Smart Speakers Reveals Interesting Engineering Details”

Hacked LCD Shutter Glasses See The Light

It’s always a little sad to see a big consumer technology fail. But of course, the upside for us hacker types is that the resulting fire sale is often an excellent source for hardware that might otherwise be difficult to come by. The most recent arrival to the Island of Unwanted Consumer Tech is 3D TV. There was a brief period of time when the TV manufacturers had nearly convinced people that sitting in their living room wearing big dorky electronic glasses was a workable solution, but in the end we know how it really turned out.

Those same dorky glasses are now available for a fraction of their original price, and are ripe for hacking. [Kevin Koster] has been playing around with them, and he’s recently came up with a circuit that offers the wearer a unique view of the world. Any reflective surface will look as though it is radiating rainbows, which he admits doesn’t show up as well in still images, but looks cool enough that he thought it was worth putting the board into production in case anyone else wants in on the refraction action.

To explain how it works, we need to take a couple of steps back and look at the mechanics of the LCD panels used in these type of glasses. At the risk of oversimplification, one could say that LCDs are sort of like capacitors: when charged the crystals align themselves in such a way that the polarization of the light passing through is changed. Combined with an external polarization filter, this has the end result of turning the panel opaque. To put the crystals back in their original arrangement, and let the light pass through again, the LCD panel is shorted out in the same way you might discharge a capacitor.

What [Kevin] found was that if he slowly discharged the LCD panel rather than shorting it out completely, it would gradually fade out instead of immediately becoming transparent. His theory is that this partial polarization is what causes the rainbow effect, as the light that’s passing through to the wearers eyes is in a “twisted” state.

[Kevin] has provided all of the information necessary to build your own “Rainbow Adapter”, but you can also purchase a kit or assembled board from Tindie. If you’re looking for other projects to make use of those 3D glasses collecting dust, how about turning them into automatic sunglasses or having a go at curing your lazy eye.