36C3: Open Source Is Insufficient To Solve Trust Problems In Hardware

With open source software, we’ve grown accustomed to a certain level of trust that whatever we are running on our computers is what we expect it to actually be. Thanks to hashing and public key signatures in various parts in the development and deployment cycle, it’s hard for a third party to modify source code or executables without us being easily able to spot it, even if it travels through untrustworthy channels.

Unfortunately, when it comes to open source hardware, the number of steps and parties involved that are out of our control until we have a final product — production, logistics, distribution, even the customer — makes it substantially more difficult to achieve the same peace of mind. To make things worse, to actually validate the hardware on chip level, you’d ultimately have to destroy it.

On his talk this year at the 36C3, [bunnie] showed a detailed insight of several attack vectors we could face during manufacturing. Skipping the obvious ones like adding or substituting components, he’s focusing on highly ambitious and hard to detect modifications inside an IC’s package with wirebonded or through-silicon via (TSV) implants, down to modifying the netlist or mask of the integrated circuit itself. And these aren’t any theoretical or “what if” scenarios, but actual possible options — of course, some of them come with a certain price tag, but in the end, with the right motivation, money is only a detail.

Continue reading “36C3: Open Source Is Insufficient To Solve Trust Problems In Hardware”

Turning Sounds From A Flute Into Sheet Music

Composing music can be quite difficult – after all, you have to keep in mind all of the elements of musical theory, from time signature and key signature to the correct length for all of the notes. A team of students from Cornell University’s Designing with Microcontrollers class developed a solution for this problem by transcribing sounds from a flute into sheet music.

The project doesn’t simply detect the notes played – it is able to convert the raw audio into a standardized music score complete with accurate note timings and beats per minute. Before transcribing the music, some audio processing was necessary. The team chose to use a Sallen-Key filter to amplify the raw audio input due to its complex conjugate poles. They then used a fast Fourier Transform (FFT) to determine the frequency for the input note, converting the signal from the time domain to the frequency domain.

The algorithm samples the data to generate an input signal, using the ADC on the microcontroller to receive input from the microphone. It takes the real and imaginary components of the sampled signals and outputs a pair of real and imaginary amplitude components corresponding to the sampled frequency, evenly spaced from 0 to the Nyquist rate (half the sampling rate). The spacing of these bins and the bin with the largest amplitude are used to convert the signal back to a real frequency and a MIDI note.

The system uses a PIC32 for the logic. The circuitry for the microphone amplification uses a non-inverting op-amp with a gain of 50 to increase the microphone output signal amplitude from 15 mV to 750 mV to use by the microcontroller’s ADC. The signal is then sent to the anti-aliasing Sallen-Key filter, with a pole at 2.5 kHz and a Q of 1. The frequency was chosen since the FFT samples at 8 kHz and the frequency corresponds to a note out of the range of a flute. As for the filters, only the low pass filter was implemented in hardware.  While a bandpass filter could have been implemented in hardware, the team decided on a cleaner software approach.

The project is well-documented on the team’s project page, and it’s certainly worth checking out for more detailed discussions on the keypad controls and the software side of the audio processing. If you want to learn more about the FFT, check out this 2016 Hackaday Prize entry for an FFT spectrum analyezer.

Continue reading “Turning Sounds From A Flute Into Sheet Music”

36C3: Phyphox – Using Smartphone Sensors For Physics Experiments

It’s no secret that the average smart phone today packs an abundance of gadgets fitting in your pocket, which could have easily filled a car trunk a few decades ago. We like to think about video cameras, music playing equipment, and maybe even telephones here, but let’s not ignore the amount of measurement equipment we also carry around in form of tiny sensors nowadays. How to use those sensors for educational purposes to teach physics is presented in [Sebastian Staacks]’ talk at 36C3 about the phyphox mobile lab app.

While accessing a mobile device’s sensor data is usually quite straightforwardly done through some API calls, the phyphox app is not only a shortcut to nicely graph all the available sensor data on the screen, it also exports the data for additional visualization and processing later on. An accompanying experiment editor allows to define custom experiments from data capture to analysis that are stored in an XML-based file format and possible to share through QR codes.

Aside from demonstrating the app itself, if you ever wondered how sensors like the accelerometer, magnetometer, or barometric pressure sensor inside your phone actually work, and which one of them you can use to detect toilet flushing on an airplane and measure elevator velocity, and how to verify your HDD spins correctly, you will enjoy the talk. If you just want a good base for playing around with sensor data yourself, it’s all open source and available on GitHub for both Android and iOS.

Continue reading “36C3: Phyphox – Using Smartphone Sensors For Physics Experiments”

Analog Meter Clock Uses Parts From A Simpler Time

Clocks with hands that turn are all well and good for the common folk, but hacker types prefer something different. [Sjm4306] is one such person, and developed this analog dial clock with parts we’d almost consider retro by modern standards.

The microcontroller at the heart of the build is a PIC16F886. An 8-bit micro from the Microchip brand, it features no Arduino bootloader or USB interface, being flashed via a dedicated programmer. This is combined with a DS1302 real-time clock to keep accurate time, and a MCP4922 DAC which is responsible for generating the output to drive the dials. The dials themselves are sourced from eBay, being simple voltmeters. They’re given a new backing to display hours and minutes instead of volts, and backlit with LEDs for style.

In this day and age, we’re more used to seeing high-end micros used with integrated DACs and USB programming, but it’s nice to see the parts of yesteryear being used, too. It’s not the first clock we’ve seen from [sjm4306], either. Video after the break.

Continue reading “Analog Meter Clock Uses Parts From A Simpler Time”

FET Based Motor Driver Is Better Than L298N

If you want to build a small robot with a motor, you are likely to reach for an L298N to interface your microcontroller to the motor, probably in an H-bridge configuration. [Dronebot] has used L298N chips like this many times. In the video below, he uses a TB6612FNG instead, taking advantage of the device’s use of MOSFETs. The TB6612 may be a little more expensive, but it’s clearly worth it.

You can get breakout boards for the tiny chips. [DroneBot] looks at several ready-to-go breakout boards. They are not drop-in compatible, though. For example, the L298N can operate motors from 4.5 to 46V while the TB6612 can go from 2.5 to 13.5V on the motor voltage. The L298N also handles more current. However, because of its relatively low efficiency, it needs a heat sink. The TB6612 boasts up to 95% efficiency and also has a low current standby mode. Of course, the TB6612 drops much less voltage which is great if you are using low voltage motor.

Continue reading “FET Based Motor Driver Is Better Than L298N”

Building A Spinning Moiré Effect Lamp

A concise, comical explanation of Moiré patterns, via XKCD.

Moiré patterns are interference patterns created when grids of different size or alignment are placed over each other. You’ve probably seen these when photographing a TV screen or looking through a pair of windows screens at the same time. [ChrysN] put the effect to work with this spinning Moiré lamp build.

It’s a build that can be achieved with scrap-bin components. An LED-encrusted PC cooling fan is used as the base of the lamp, fitted with Sugru bumpers to hold a cheap glass vase. A line pattern is then printed on to paper, rolled into a cylinder, and slid on to the fan to spin with the blades, inside the vase. Another line pattern is then printed on to a transparency (a printable transparent sheet for those who don’t remember overhead projectors) and slid around the outside of the vase. When powered up, the LEDs glow, and the fan spins, creating a hypnotizing moving moiré pattern.

It’s a simple but visually captivating build, and one that should keep you up at night thanks to the blue LEDs. Moiré patterns can do so much more though – they’re even put to work guiding ships. Video after the break.

Continue reading “Building A Spinning Moiré Effect Lamp”

Subterranean Uses For LIDAR: Cave Surveys

LIDAR has gained much popularity as a means for self-driving cars to survey the space around them. At their most basic, LIDAR is a surveying method that uses lasers to paints the space around the sensors and assembles the distances measured from reflected light into a digital three-dimensional representation. That’s something that has quite a number of other applications, from surveying ancient ruins and rainforests from a bird’s eye view to developing 3D models of indoor spaces.

One fascinating use of LIDAR technology is to map out the routes inside caves, subterranean spaces that are seldom accessed by humans apart from those with specialized equipment and knowledge of how to safely traverse the underground terrain. [caver.adam] has been working on his Open LIDAR project for a few years using an SF30-B High Speed Rangefinder and laser device for a dual-system atop a gimbal with stepper motors for cave scanning.

Originally an entry in the 2016 Hackaday Prize, [Adam] has continued to work on the project. The result shown in the video below is a cheaper 3D LIDAR setup that works by rotating the laser distance module on 2 axes with a sensor centered at the center of rotation. It works for volumetric calculations, detects change over time, and identifies various water patterns and rocks on a surface map. Compared to notebooks, tape measures, and compasses, it’s certainly a step up in cave surveying technology.

Check out some other past underground surveying projects, such as Iowa City’s beer caves scanning projects and National Geographic’s 2014 expedition of the Titan Chamber in southern Guizhou Province in China.

Continue reading “Subterranean Uses For LIDAR: Cave Surveys”