Python Script Sends Each Speaker Its Own Sound File

When it comes to audio, the number of speakers you want is usually governed by the number of tracks or channels your signal has. One for mono, two for stereo, four for quadrophonic, five or more for surround sound and so on. But all of those speakers are essentially playing different tracks from a “single” audio signal. What if you wanted a single audio device to play eight different songs simultaneously, with each song being piped to its own speaker? That’s the job [Devon Bray] was tasked with by interdisciplinary artist [Sara Dittrich] for one of her “Giant Talking Ear” installation project. He built a device to play multiple sound files on multiple output devices using off the shelf hardware and software.

But maybe a hack like this could be useful in many applications other than just art installations. It could be used in an Escape room, where you may want the various audio streams to start in synchronicity at the same time, or as part of a DJ console, sending one stream to the speakers and another to the head phones, or a game where you have to run around a room full of speakers in the right sequence and speed to listen to a full sentence for clues.

His blog post lists links for the various pieces of hardware required, although all of it is pretty generic, and the github repository hosts the code. At the heart of the project is the Sounddevice library for python. The documentation for the library is sparse, so [Bray]’s instructions are handy. His code lets you “take a directory with .wav files named in numeric order and play them over USB sound devices attached to the host computer over and over forever, looping all files once the longest one finishes”. As a bonus, he shows how to load and play sound files automatically from an attached USB drive. This lets you swap out your playlist on the Raspberry Pi without having a use a keyboard/mouse, SSH or RDP.

Check the video after the break for a quick roundup of the project.

Continue reading “Python Script Sends Each Speaker Its Own Sound File”

FPGA Makes Digital Analog Computer

When you think of analog computing, it’s possible you don’t typically think of FPGAs. Sure, a few FPGAs will have specialized analog blocks, but usually they are digital devices. [Bruce Land] — a name well-known to Hackaday — has a post about building a digital differential analyzer using an FPGA and it is essentially an analog computer simulated on the digital fabric of an FPGA.

Whereas traditional analog computers use operational amplifiers to do mathematical integration, on the FPGA [Land] uses digital summers The devices simulate a system of differential equations, which can be nonlinear.

Continue reading “FPGA Makes Digital Analog Computer”

Be Ready To Roll With Universal Electronic Dice

There are applications you can download for your smartphone that can “roll” an arbitrary number of dice with whatever number of sides you could possibly want. It’s faster and easier than throwing physical dice around, and you don’t have to worry about any of them rolling under the couch. No matter how you look at it, it’s really a task better performed by software than hardware. All that being said, there’s something undeniably appealing about the physical aspect of die rolling when playing a game.

Luckily, [Paul Klinger] thinks he has the solution to the problem. His design combines the flexibility of software number generation with the small form factor of a physical die. The end result is a tiny gadget that can emulate anything from a 2 to 64 sided die with just 6 LEDs while remaining as easy to operate as possible. No need to tap on your smartphone screen with Cheetos-stained hands when you’ve got to make an intelligence check, just squeeze the Universal Electronic Die and off you go. Granted you’ll need to do some binary math in your head, but if you’re the kind of person playing D&D with DIY electronic dice, we think you’ll probably be able to manage.

The 3D printed case that [Paul] came up with for his digital die is very clever, though it did take him awhile to nail it down. As shown in the video after the break, it took seven iterations before he got the various features such as the integrated button “flaps” right. There’s also a printed knob to go on the central potentiometer, to make it easier to select how many sides your virtual die will have.

In terms of the electronics, the design is actually quite simple. All that lives on the custom PCB is a ATtiny1614 microcontroller, the aforementioned LEDs, and a couple of passive components. A CR2032 coin cell powers the whole operation, and it should provide enough juice for plenty of games as it’s only turned on when the user is actively “rolling”.

We’ve seen a number of very impressive electronic dice projects over the years, and it doesn’t look like the trend is slowing down anytime soon. Of course, if you absolutely must hear those physical dice rolling, we can help you with that too.

Now Hackaday Looks Great On The Small Screen Too

Most of use read and comment on Hackaday from the desktop, while we let our mind work through the perplexing compiler errors, wait for that 3D print to finish, or lay out the next PCB. But more and more people discovering Hackaday for the first time are arriving here on mobile devices, and now they’ll be greeted with a better reading experience — we’ve updated our look for smaller screens.

Yes, it may be a surprise but there are still people who don’t know about Hackaday. But between featuring your amazing hacks, and publishing the incredible original content tirelessly written by our amazing writers and editors, we’re seeing more new readers than ever. Our mission is to bring hardware hacking and the free and open sharing of information and ideas to people everywhere. So we made a responsive design that fits on the tall and narrow shards of glass attached to everyone’s hand.

There’s a generation of mobile-first hackers that we know has been headed our way — just a few years ago I lamented the change this poses to full-sized keyboards. But we think everyone should be interested in the kind of delightful self-learning that happens all the time around here and we’re happy to improve the mobile experience for that reason. Now we look great on a cellphone screen, and continue to look great on your battlestation where you have one-tab-always-open with Hackaday while laying out that circuit board, or debugging those timing issues on a sweet embedded project.

New Part Day: A RISC-V CPU For Eight Dollars

RISC-V is the new hotness, and companies are churning out code and announcements, but little actual hardware. Eventually, we’re going to get to the point where RISC-V microcontrollers and SoCs cost just a few bucks. This day might be here, with Seeed’s Sipeed MAix modules. it’s a RISC-V chip you can buy right now, the bare module costs eight US dollars, there are several modules, and it has ‘AI’.

Those of you following the developments in the RISC-V world may say this chip looks familiar. You’re right; last October, a seller on Taobao opened up preorders for the Sipeed M1 K210 chip, a chip with neural networks. Cool, we can ignore some buzzwords if it means new chips. Seeed has been busy these last few months, and they’re now selling modules, dev boards, and peripherals that include a camera, mic array, and displays. It’s here now, and you can buy one. If it seems a little weird for Seeed Studios to get their hands on this, remember: the ESP8266 just showed up on their web site one day a few years ago. Look where we are with that now.

The big deal here is the Sipeed MAix-I module with WiFi, sold out because it costs nine bucks. Inside this module is a Kendryte K210 RISC-V CPU with 8MB of on-chip SRAM and a 400MHz clock. This chip is also loaded up with a Neural Network Processor, an Audio Processor with support for eight microphones, and a ‘Field Programmable IO array’, which sounds like it’s a crossbar on the 48 GPIOs on the chip. Details and documentation are obviously lacking.

In addition to a chip that’s currently out of stock, we also have the same chip as above, without WiFi, for a dollar less. It’ll probably be out of stock by the time you read this. There’s a ‘Go Suit’ that puts one of these chips in an enclosure with a camera and display, and there’s a microphone array add-on. There’s a binocular camera module if you want to play around with depth sensing.

The first time we heard of this chip, it was just a preorder on Taobao. It told us two things: RISC-V chips are coming sooner than we expected, and you can do preorders on Taobao. Seeed has a history of bringing interesting chips to the wider world, and if you want a RISC-V chip right now, here you go. Just be sure to tell us what you did with it.

Supercon 2018: Mike Szczys And The State Of The Hackaday

Every year at Superconference, Editor-in-Chief Mike Szczys gets the chance to talk about what we think are the biggest, most important themes in the Hackaday universe. This year’s talk was about science and technology, and more importantly who gets to be involved in building the future. Spoiler: all of us! Hackaday has always stood for the ideal that you, yes you, should be taking stuff apart, improving it, and finding innovative ways to use, make, and improve. To steal one of Mike’s lines: “Hackaday is an engine of engagement in engineering fields.”

Continue reading “Supercon 2018: Mike Szczys And The State Of The Hackaday”

New Part Day : A Sensor Chip For 3D Color X-Ray Imaging

We all know CERN as that cool place where physicists play with massive, superconducting rings to smash atoms and subatomic particles to uncover secrets of matter in the Universe. To achieve this aim, they need to do a ton of research in other areas, such as development of special particle detectors.

While such developments are essential to the core research needs of the Centre, they also lead to spinoff applications for the benefit of society at large. One such outcome has been the Medipix Collaborations – a family of read-out chips for particle imaging and detection that can count single photons, allowing X-rays and gamma rays to be converted to electrical signals. It may not be possible for us hackers to get our hands on these esoteric sensors, but these devices are pretty interesting and deserve a closer look. Medipix sensors work like a camera, detecting and counting each individual particle hitting the pixels when its electronic shutter is open. This enables high-resolution, high-contrast, noise hit free images – making it unique for imaging applications.

Some months back, CERN announced the first 3D color X-ray of a human made possible using the Medipix devices. The result is a high-resolution, 3D, color image of not just living structures like bones, muscular tissues and vessels, but metal objects too like the wrist watch, seen in the accompanying photograph. The Medipix sensors have been in development since the 1990’s and are presently in their 4th “generation”. Each chip consists of a top semiconducting sensor array, made from gallium arsenide or cadmium telluride. The charge collected by each pixel is transported to the CMOS ASIC electronics via “bump bonds”. The integration is vertical, with each sensing pixel connected via the bump bond to an analog section followed by a digital processing layer. Earlier versions were limited, by technology, in their tiling ability for creating larger matrices of multiple sensors. They could be abutted on three sides only, with the fourth being used for on-chip peripheral logic and wire-bond pads that permit electronic read-out. The latest Medipix4 Collaboration, still under some development, eliminates this short coming. Through-silicon-via (TSV) technology provides the possibility of reading the chips through copper-filled holes that bring the signals from the front side of the chip to its rear. All communication with the pixel matrix flows through the rear of the chip – the peripheral logic and control elements are integrated inside the pixel matrix.

The Analog front end consists of a pre-amplifier followed by a window discriminator which has upper and lower threshold levels. The discriminator has four bits for threshold adjustment as well as polarity sensing. This allows the capture window to be precisely set. The rest of the digital electronics – multiplexers, shift registers, shutter and logic control – helps extract the data.

Further development of the Medipix (Tech Brief, PDF) devices led to a separate version called Timepix (Tech Brief, PDF). These new devices, besides being able to count photons, are capable of two additional modes. The first mode records “Time-Over-Threshold”, providing rough analog information about the energy of the photon. It does this by counting clock pulses for the duration when the signal stays above the discrimination levels. The other mode, “Time of Arrival”, measures arrival time of the first particle to impinge on the pixel. The counters record time between a trigger and detection of radiation quanta with energy above the discrimination level, allowing time-of-flight applications in imaging.

Besides medical imaging, the devices have applications in space, material analysis, education and of course, high energy physics. Hopefully, in a few years, hackers will lay their hands on these interesting devices and we can get to know them better. At the moment, the Medipix website has some more details and data sheets if you would like to dig deeper. For an overview on the development of such single photon detectors, check out this presentation from CERN – “Single X-Ray Photon Counting Systems: Existing Systems, Systems Under Development And Future Trends” (PDF).