Listen to the Rain, Raspberry Pi Style

There’s an old proverb algebra teachers often recite: You have to use what you know to find out what you don’t know. The same could be said about sensors. For example, analog to digital converters use something computers are good at finding (like time) and use it to determine something they aren’t good at finding (like voltage). So how do you detect rainfall? If you are [lowflyerUK], you use the microphone in your web camera and a Raspberry Pi.

The idea was to reduce irrigation usage based on rainfall, so an exact measurement isn’t necessary. The Python code that analyzes the audio input is calibrated with three configuration parameters and attempts to remove wind noise. Even so, it needs to be in a room that gets a lot of noise from rainfall and ambient noise can throw the reading off.

The weather service is never going to adopt this system. Still, it is a great example of taking something you know and using it to get something you don’t know. If you want a more complete weather station, we have a few options for you.

Make a Microphone Out of a Hard Drive

[Rulof Maker] has a penchant for making nifty projects out of old electronics. The one that has caught our eye is  a microphone made from parts of an old hard drive. The drive’s arm and magnet were set aside while  the aluminum base was diagonally cut into two pieces.  One piece was later used to reassemble the hard drive’s magnet and arm onto a wooden platform.

v2_micThe drive’s arm and voice coil actuator are the key parts of this project. It was modified with a metal extension so that a paper cone cut from an audio speaker could be attached, an idea used in microphone projects we’ve previously featured. Copper wire scavenged from the speaker was then soldered to voice coil on the arm as well as an audio jack. In the first version of the Hard Drive Microphone, the arm is held upright with a pair of springs and vibrates when the cone catches sound.

While the microphone worked, [Rulof] saw room for improvement. In the second version, he replaced the mechanical springs with magnets to keep the arm aloft. One pair was glued to the sides of the base, while another pair recovered from an old optical drive was affixed to the arm. He fabricated a larger paper cone and added a pop filter made out of pantyhose for good measure. The higher sound quality is definitely noticeable. If you are interested in more of [Rulof’s] projects, check out his YouTube channel.

Continue reading “Make a Microphone Out of a Hard Drive”

DIY Bass Drum Microphone Uses Woofer Cone As Diaphragm

Anyone into audio recording knows that recording drums is a serious pain. Mic setup and positioning can make or break a recording session. One particular hurdle is getting a great sound out of the bass drum. To overcome this, [Mike] has built a microphone using an 8″ woofer in an attempt to capture the low-end frequencies of his bass drum. Using a speaker as a microphone isn’t a new idea and these large diaphragm bass drum mics have taken commercial form as the DW Moon Mic and the now-discontinued Yamaha SubKick.

The project is actually quite simple. The speaker’s positive terminal is connected to Pin 2 of a 3-pin XLR microphone connector. The speaker’s negative terminal is connected to the connector’s Pin 1. [Mike] made a bracket to connect the woofer to a mic stand, which in turn was cut down to position the woofer at bass drum height. The setup is then plugged into a mixer or pre-amp just like any other regular microphone.

[Mike] has since made some changes to his mic configuration. It was putting out way too hot of a signal to the preamp so he added an attenuation circuit between the speaker and XLR connector. Next, he came across an old 10″ tom shell and decided to transplant his speaker-microphone from the open-air metal rack to the aesthetically pleasing drum shell. Check out [Mike’s] project page for some before and after audio samples.

Converting Morse Code to Text with Arduino

Morse code used to be widely used around the globe. Before voice transmissions were possible over radio, Morse code was all the rage. Nowadays, it’s been replaced with more sophisticated technologies that allow us to transmit voice, or data much faster and more efficiently. You don’t even need to know Morse code to get an amateur radio license any more. That doesn’t mean that Morse code is dead, though. There are still plenty of hobbyists out there practicing for the fun of it.

[Dan] decided to take a shortcut and use some modern technology to make it easier to translate Morse code back into readable text. His project log is a good example of the natural progression we all make when we are learning something new. He started out with an Arduino and a simple microphone. He wrote a basic sketch to read the input from the microphone and output the perceived volume over a Serial monitor as a series of asterisks. The more asterisks, the louder the signal. He calibrated the system so that a quiet room would read zero.

He found that while this worked, the Arduino was so fast that it detected very short pulses that the human ear could not detect. This would throw off his readings and needed to be smoothed out. If you are familiar with button debouncing then you get the idea. He ended up just averaging a few samples at a time, which worked out nicely.

The next iteration of the software added the ability to detect each legitimate beep from the Morse code signal. He cleared away anything too short. The result was a series of long and short chains of asterisks, representing long or short beeps. The third iteration translated these chains into dots and dashes. This version could also detect longer pauses between words to make things more readable.

Finally, [Dan] added a sort of lookup table to translate the dots and dashes back into ASCII characters. Now he can rest easy while the Arduino does all of the hard work. If you’re wondering why anyone would want to learn Morse code these days, it’s still a very simple way for humans to communicate long distances without the aid of a computer.

Annoy Your Enemies with the Hassler Circuit

[Craig] recently built himself a version of the “hassler” circuit as a sort of homage to Bob Widlar. If you haven’t heard of Bob Widlar, he was a key person involved in making analog IC’s a reality. We’ve actually covered the topic in-depth in the past. The hassler circuit is a simple but ingenious office prank. The idea is that the circuit emits a very high frequency tone, but only when the noise level in the room reaches a certain threshold. If your coworkers become too noisy, they will suddenly notice a ringing in their ears. When they stop talking to identify the source, the noise goes away. The desired result is to get your coworkers to shut the hell up.

[Craig] couldn’t find any published schematics for the original circuit, but he managed to build his own version with discrete components and IC’s. Sound first enters the circuit via a small electret microphone. The signal is then amplified, half-wave rectified, and run through a low pass filter. The gain from the microphone is configurable via a trim pot. A capacitor converts the output into a flat DC voltage.

The signal then gets passed to a relaxation oscillator circuit. This circuit creates a signal whose output duty cycle is dependent on the input voltage. The higher the input voltage, the longer the duty cycle, and the lower the frequency. The resulting signal is sent to a small speaker for output. The speaker is also controlled by a Schmitt trigger. This prevents the speaker from being powered until the voltage reaches a certain threshold, thus saving energy. The whole circuit is soldered together dead bug style and mounted to a copper clad board.

When the room is quiet, the input voltage is low. The output frequency is high enough that it is out of the range of human hearing. As the room slowly gets louder, the voltage increases and the output frequency lowers. Eventually it reaches the outer limits of human hearing and people in the room take notice. The video below walks step by step through the circuit. Continue reading “Annoy Your Enemies with the Hassler Circuit”

Ask Hackaday: Can you Hack an Appliance into a Spy Device?


A story surfaced a few days before Halloween on Russian news site Rosbalt (yep, that’s in Russian), claiming Russian authorities intercepted Chinese-made electric irons and kettles: each equipped with microphones and WiFi. You can read a summary in English on the BBC’s website. The “threat” imposed by these “spy appliances” is likely the result of gross exaggeration if not downright fear mongering against Chinese-made products. It’s not worth our (or your) effort to speculate on what’s really happening here, but the situation does present a fun exercise.

Say you wanted to spice up your pen testing by altering a small home appliance: how easily could you build it? Let us know in the comments which appliance would serve as the best “host” for the modifications and what features you would include. Could you manage all the components listed in the article–a microphone, WiFi (any chance of cracking unsecured networks?), plus some vague indication that it “spreads viruses?” There’s a video below with a few glimpses of the electronics in question, but unless you speak Russian it probably won’t offer much insight.

Continue reading “Ask Hackaday: Can you Hack an Appliance into a Spy Device?”

A cortex M4 based platform with ETH, USB, BT and many on-board peripherals

Here is a very time consuming project that I worked on during last summer: an ARM Cortex M4 based platform with plenty of communication interfaces and on-board peripherals. The particular project for which this board has been developed is not really HaD material (one of my father’s funny ideas) so I’ll only describe the platform itself. The microcontroller used in the project is the ATSAM4E16C from Atmel, which has 1Mbyte of flash and 128Kbytes of SRAM. It integrates an Ethernet MAC, a USB 2.0 Full-speed controller, a sophisticated Analog to Digital Converter and a Digital to Analog Converter (among others).

Here is a list of the different components present on the board so you can get a better idea of what the platform can do: a microphone with its amplifier, a capacitive touch sensor, two unipolar stepper motors controllers, two mosfets, a microSD card connector, a Bluetooth to serial bridge, a linear motor controller and finally a battery retainer for backup power. You can have a look at a simple demonstration video I made, embedded after the break. The firmware was made in C and uses the Atmel Software Framework. The project is obviously open hardware (Kicad) and open software.

Continue reading “A cortex M4 based platform with ETH, USB, BT and many on-board peripherals”