Make Your Own SPL DB Meter With A Microphone And MCU

Measuring equipment such as SPL (Sound Pressure Level) decibel meters may seem daunting, but this article by [Shawon M. Shahryiar] shows that making your own need only have two essential ingredients: a microphone and a microcontroller. Obviously the microphone is for measuring the sound pressure level, and its output is then fed into the ADC of the microcontroller which does some math before sending the result to a display.

[Shawon] runs through all of the theory behind the calculations that have to be performed, before showing the C code that runs on the PIC18F242 8-bit MCU targeted by the prototype setup. The display is a graphical LCD type, capable of displaying the text with values as well as bar graphs indicating the measured levels. For the measurements themselves, the RMS value is taken of 16 ADC samples while the algorithm takes into account the specifications of the Seeed-sourced microphone module, specifically its average 50 dB sensitivity rating.

Although a full schematic is not provided, the essentials are all there for anyone to build their own SPL dB meter using virtually any microphone and MCU with built-in ADC. As the article also notes, opting for a higher quality microphone will yield better result and of course a faster MCU will offer more options, including FFT processing. Since the code itself is fairly basic, it should be easy enough to port it to an ARM-based MCU, which would allow one to use for example a TFT LCD.

Take a peek after the break for a video of the article’s SPL dB meter in action.

Continue reading “Make Your Own SPL DB Meter With A Microphone And MCU”

An Epic Tale Of Thermistors: Tricks For Much Better Temperature Sensing

For years [Edward] has been building professional grade underwater sensing nodes at prices approachable for an interested individual without a government grant. An important component of these is temperature, and he has been on a quest to get the highest accuracy temperature readings from whatever parts hit that sweet optimum between cost and complexity. First there were traditional temperature sensor ICs, but after deploying numerous nodes [Edward] was running into the limit of their accuracy. Could he use clever code and circuitry to get better results? The short answer is yes, but the long answer is a many part series of posts starting in 2016 detailing [Edward]’s exploration to get there.

Orange is 12 bits, red is 24

The first step is a thermistor, a conceptually simple device: resistance varies with temperature (seriously, how much more simple can a sensor get?). You can measure them by tapping the center of a voltage divider the same way you’d measure any other resistance, but [Edward] had discarded this idea because the naive approach combined with his Arduino’s 10 bit ADC yielded resolution too poor to be worthwhile for his needs. But by using the right analog reference voltage and adjusting the voltage divider he could get a 20x improvement in resolution, down to 0.05°C in the relevant temperature range. This and more is the subject of the first post.

What comes next? Oversampling. Apparently fueled by a project featured on Hackaday back in 2015 [Edward] embarked on a journey to applying it to his thermistor problem. To quote [Edward] directly, to get “n extra bits of resolution, you need to read the ADC four to the power of n times”. Three bits gives about an order of magnitude better resolution. This effectively lets you resolve signals smaller than a single sample but only if there is some jitter in the signal you’re measuring. Reading the same analog line with no perturbation gives no benefit. The rest of the post deals with the process of artificially perturbing the signal, which turns out to be significantly complex, but the result is roughly 16 bit accuracy from a 10 bit ADC!

What’s the upside? High quality sensor readings from a few passives and a cheap Arduino. If that’s your jam check out this excellent series when designing your next sensing project!

Create A Low-Cost, High-Accuracy LCR Meter With An STM32 MCU

Having a good LCR meter was something which [Adil] had wanted for his personal lab, so as any good university student (and former Hackaday contributor) does, he ended up building his own. Using a Nucleo-F446RE board for the MCU side and a custom PCB for the side that does the actual measuring, he created a meter that reportedly comes pretty close to commercial meters, and for the low price of £55.

Running through some of the theory behind the design as well some design choices, the resulting product is then presented. The choice to not using a standard current shunt, but instead a transimpedance amplifier (TIA) is explained as well. Unfortunately there are no schematics or source code, and the text is somewhat unclear on some points, failing to explain some acronyms that’d make it hard for someone who is not active in this field to understand the full design.

We hope that [Adil] can address those points and provide design files and source code, as it does look like a very interesting project!

Live Apollo 11 Transcript On EInk Display

There are few moments in history that have ever been recorded in more detail or analyzed as thoroughly as the Apollo 11 mission to the Moon. Getting three men to our nearest celestial neighbor and back in one piece took a lot of careful planning, and recording every moment of their journey was critical to making sure things were going smoothly. As we celebrate the 50th anniversary of man’s first steps off our world, these records give us a way to virtually tag along with Armstrong, Aldrin, and Collins.

As part of the 50th anniversary festivities at the Parkes Radio Telescope in Australia, [Andrew] created a badge that would let him wear a little piece of Apollo 11. Using an ESP32 and an eInk screen, it replays the mission transcript between the crew and ground control in real-time. It’s a unique way to experience the mission made possible by that meticulous data collection that’s a hallmark of the National Aeronautics and Space Administration.

[Andrew] was inspired by the “Apollo 11 In Real Time” website, but rather than pulling the content from the Internet, he’s loaded the mission transcripts onto the ESP32’s SPIFFS filesystem as a CSV file. Not that the badge is completely offline, it does need to connect to the Internet (via a hotspot on his phone) so it can keep its internal clock synchronized with NTP. Keeping everything local does reduce power consumption compared to streaming it from the Internet, but he admits that otherwise he didn’t give much thought to energy efficiency and there’s definitely some room for improvement.

The LILYGO TTGO board he’s using combines the ESP32 with a 2.13 inch eInk display, in a formfactor not unlike the Badgy we’ve covered previously. He was able to find a STL for a 3D printed case on Thingiverse which he modified to fit a battery. Unfortunately the original model was released under a license that prevents him from distributing his modified version, but it doesn’t sound too difficult to replicate if you’re interested in building your own running ticker of humanity’s greatest adventure.

High-Tech Alms Collection With The ESP32

In an ideal world, shop space, tools, and components would be free. But until we get to that Star Trek utopia, hackerspaces will have to rely on donations from the community to help stay afloat. While asking for money, at least you can have some fun with it if you design and build an Internet-connected donation box.

Or at least that’s how [Goran Mahovlic] handled it for the Radiona hackerspace in Zagreb, Croatia. Not content with just cutting a slit in the top of a shoe box, he came up with a physical donation system that’s not only more informative for those donating, but more organized for those collecting the funds.

The key is a arcade-style programmable coin acceptor from SparkFun. When connected to a microcontroller, this allows the box to keep a running tally on how much money has been inserted. With the use of a RFM96 LoRa module, it can even report on the current haul while remaining mobile; perfect for when the hackerspace has events outside of their home base.

But counting quarters is hardly a task befitting a powerful microcontroller like the ESP32. So [Goran] gave the chip something to do in its spare time by adding a couple of buttons and an LCD. This allows the user to scroll through a list of various projects that are looking for donations, and decide which one they want to financially support. When the donation box counts how much money has been inserted, it records which project its been earmarked for.

Of course, if you’d rather the free market do its thing, we’ve seen this same coin acceptor used to build a locker-sized vending machine. Or if you’re feeling crafty, you could always try your hand at building one with cardboard.

Continue reading “High-Tech Alms Collection With The ESP32”

Hardware Notifications For ISS Flybys

Since Sputnik launched in the 1950s, its been possible to look outside at night and spot artificial satellites orbiting with the naked eye. While Sputnik isn’t up there anymore, a larger, more modern satellite is readily located: the International Space Station. In fact, NASA has a program which will alert anyone who signs up when the ISS is about to fly overhead. A better alert, though, is this ISS notifier which is a dedicated piece of hardware that guarantees you won’t miss the next flyby.

This notifier is built around the Tokymaker, a platform aimed at making electronics projects almost painfully easy to learn. Connections to various modules can be made without soldering, and programming is done via a graphical interface reminiscent of Scratch. Using these tools, [jaime_lc98] designed a tool which flips up a tiny paper astronaut whenever the ISS is nearby. The software side takes advantage of IFTTT to easily and reliably control the servo on the Tokymaker.

The project pages goes into detail about how to set up IFTTT and also how to use the block-style language to program the Tokymaker. It’s pretty straightforward to get it up and running, relatively inexpensive, and looks like a great way to get the miniature hackers in your life excited about space. If they happen to learn a little something in the proces, well, we won’t tell them if you won’t. It might also be a good stepping stone on the way to other ISS-related hacks.

Hacking This Smart Bulb Is Almost Too Easy

The regular Hackaday reader no longer needs to be reminded about how popular the ESP8266 is; they see the evidence of that several times a day. But what might not be quite so obvious is that it isn’t just us hacker types that are in love with the inexpensive IoT microcontroller, it’s also popping up more and more frequently in commercial products.

As [Majenko] demonstrates, one of those ESP-powered devices is the LOHAS Smart LED Bulb. Upon cracking one open, he found that these relatively low-cost bulbs are little more than a standard ESP8266 chip and a couple of LED drivers. He wanted to see how hard it would be to get his own code running on the bulb, and by the looks of it, it took longer to get the thing open then it did to load it up with a custom firmware.

The bulb’s PCB features the aforementioned ESP8266, a 1MB 25Q80 flash chip, and MY9231 LED drivers. Whoever put the board together was nice enough to label the RX, TX, and GPIO test points, though [Majenko] notes that what’s labeled as 3.3 V appears dead. With a ESP-01 programmer wired up to the board and the appropriate board settings (which he provides), you can use the Arduino IDE to upload whatever you like to it.

Running “Hello World” on a smart bulb is fun and all, but what about kicking on those LEDs? [Majenko] found a library that works with the MY9231 drivers, and it didn’t take long to figure out which of the ESP’s pins were used to communicate with them. All in all, he said it was far easier than he expected.

You’ll probably want to put this bulb back into service after reprogramming, so [Majenko] advises caution when cracking open the shell. There are clips holding on the diffuser which he assures us are going to break no matter what you do, plus some silicone adhesive. He suggests super glue to hold it together when you’re done programming it, and using an OTA firmware so you don’t need to get back in there.

In the past we’ve shown how some hackers are rolling their own smart bulb hardware, but with cheap commercial offerings that are so easily hackable, it frankly doesn’t seem worth the effort. On the other hand, an influx of cheap ESP-powered bulbs isn’t all good news.