Open-Source Random Numbers

Whether it’s a game of D&D or encrypting top-secret information, a wide array of methods are available for generating the needed random numbers with high enough entropy for their use case. For a tabletop game this might be a single die but for more sensitive applications a more robust method of generating random numbers is needed. Programmers might reach for a rand() function of some sort, but these pseudorandom numbers don’t cut the mustard for encryption. For that you’ll need a true random number generator (RNG), and this open-source hardware RNG uses one of the better methods we’ve seen.

The device, called RAVA, is based on a property found in many electronic devices called avalanche breakdown. Avalanche breakdown occurs when a high voltage (in this case approximately 25V) is applied in the reverse bias direction, with this device using a pair of Zener diodes. When this high voltage is applied, an “avalanche” of electrons occurs which allows the diodes conduct in the opposite direction that they would when they are forward biased. This isn’t a constant current flow, though; there are slight variations over time which can be amplified and used as the random number generator. The noise is amplified over a series of op amps and then fed to an ATmega32U4 microcontroller which can provide the user with 136.0 Kbit/s of random data.

Unlike other random number generators, this device is based on a method generally accepted to be truly random. Not only that, but since it’s based on discrete hardware it can be accessed directly for monitoring and replacement in case of faults, unlike other methods which are more “black boxes” and are more opaque in their processes which are thus harder to audit. We also appreciate it’s open-source nature as well, and for some more information on it be sure to check out the paper on it in IEEE. If you’re looking for something to generate random numbers but will also bring some extra flair to the next game night, take a look at this radioactive dice replacement.

Film Capacitors Can Go In The Wrong Way Round? Who Knew!

You can work with a part for many decades, and still learn something new about it. At least we can, and we don’t mind admitting it. Take film capacitors — we all know they aren’t a polarized part like an electrolytic capacitor is, but as [TheDannVal] points out, that doesn’t mean both their leads are the same.

This might sound counterintuitive, but if you consider for a moment their construction it makes sense. A film capacitor is made from two strips of foil with a strip of plastic film between then, rolled up tightly into a cylinder. One of the pieces of foil that forms one side of the capacitor ends up on the outside of the cylinder, and thus forms the shield for the other. Thus if that side isn’t connected to the lower impedance side of whichever circuitry it resides in, it can pick up noise, while the inside strip of foil can not. It’s so obvious when demonstrated, but we have to admit to never having considered it before. Some film capacitors have a line marked on them to denote the connection forming the shield, for those that don’t he provides a couple of methods for detecting it.

The full video is below the break, and maybe you too can now pay attention to your capacitors for lower noise audio circuitry.

Continue reading “Film Capacitors Can Go In The Wrong Way Round? Who Knew!”

A solar-powered decibel meter the size of a business card.

2024 Business Card Challenge: NoiseCard Judges The Sound Around You

Let’s face it: even with the rise of the electric car, the world is a noisy place. And it seems like it has only gotten worse in recent years. But how can we easily quantify the noise around us and know whether it is considered an unhealthy decibel level?

That is where the NoiseCard comes in. This solar-powered solution can go anywhere from the regrettable open office plan to the busy street, thanks to a couple of 330 µF capacitors. It’s based on the low-power STM32G031J6 and uses a MEMS microphone to pick up sound from the back of the card, which the code is optimized for. Meanwhile, the LEDs on the front indicate the ambient noise level, ranging from a quiet 40 dB and under to an ear-splitting 105 dB or greater.

When it comes to building something the size of a business card, every component is under scrutiny for size and usefulness. So even the LEDs are optimized for brightness and low power consumption. Be sure to check it out in action after the break in various environments.

Continue reading “2024 Business Card Challenge: NoiseCard Judges The Sound Around You”

AI System Drops A Dime On Noisy Neighbors

“There goes the neighborhood” isn’t a phrase to be thrown about lightly, but when they build a police station next door to your house, you know things are about to get noisy. Just how bad it’ll be is perhaps a bit subjective, with pleas for relief likely to fall on deaf ears unless you’ve got firm documentation like that provided by this automated noise detection system.

OK, let’s face it — even with objective proof there’s likely nothing that [Christopher Cooper] is going to do about the new crop of sirens going off in his neighborhood. Emergencies require a speedy response, after all, and sirens are perhaps just the price that we pay to live close to each other. That doesn’t mean there’s no reason to monitor the neighborhood noise, though, so [Christopher] got to work. The system uses an Arduino BLE Sense module to detect neighborhood noises and Edge Impulse to classify the sounds. An ESP32 does most of the heavy lifting, including running the UI on a nice little TFT touchscreen.

When a siren-like sound is detected, the sensor records the event and tries to classify the type of siren — fire, police, or ambulance. You can also manually classify sounds the system fails to understand, and export a summary of events to an SD card. If your neighborhood noise problems tend more to barking dogs or early-morning leaf blowers, no problem — you can easily train different models.

While we can’t say that this will help keep the peace in his neighborhood, we really like the way this one came out. We’ve seen the BLE Sense and Edge Impulse team up before, too, for everything from tuning a bike suspension to calming a nervous dog. Continue reading “AI System Drops A Dime On Noisy Neighbors”

Sailor Hat Adds Graceful Shutdown To Pis

Even though Windows and other operating systems constantly remind us to properly eject storage devices before removing them, plenty of people won’t heed those warnings until they finally corrupt a drive and cause all kinds of data loss and other catastrophes. It’s not just USB jump drives that can get corrupted, though. Any storage medium can become unusable if certain actions are being taken when the power is suddenly removed. That includes the SD cards on Raspberry Pis, too, and if your power isn’t reliable you might consider this hat to ensure they shut down properly during power losses.

The Raspberry Pi hat is centered around a series of supercapacitors which provide power for the Pi temporarily. The hat also communicates with the Pi to let it know there is a loss of power, so that the Pi can automatically shut itself down in that situation to prevent corrupting the memory card. The hat is more than just a set of backup capacitors, though. The device is capable of taking input power from a wide range of sources and filtering it for the power requirements of the Pi, especially in applications like boats and passenger vehicles where the input power might be somewhat noisy. There’s an optocoupled CAN bus interface as well for those looking to use this for automotive applications.

The entire project is also available on the project’s GitHub page for those wishing to build their own. Some sort of power backup is a good idea for any computer, though, not just Raspberry Pis. We’ve seen uninterruptible power supplies (UPS) with enough power to run an entire house including its computers, to smaller ones that’ll just keep your Internet online during a power outage.

Continue reading “Sailor Hat Adds Graceful Shutdown To Pis”

Taking Mechanical Keyboard Sounds To The Next Level

When it comes to mechanical keyboards, there’s no end to the amount of customization that can be done. The size and layout of the keyboard is the first thing to figure out, and then switches, keycaps, and then a bunch of other customizations inside the keyboard like the mounting plate and whether or not to add foam strips and other sound- and vibration-deadening features. Of course some prefer to go the other direction with it as well, omitting the foam and installing keys with a more noticeable click, and still others go even further than that by building a separate machine to make their keyboard activity as disruptive as it could possibly be.

This started as a joke among [ac2ev] and some coworkers, who were already teasing about the distinct sound of the mechanical keyboard. This machine, based on a Teensy microcontroller, sits between any USB keyboard and its host computer, intercepting keystrokes and using a small solenoid to tap on a block of wood every time a keystroke is detected. There’s also a bell inside that rings when the enter key is pressed, similar to the return carriage notification for typewriters, and as an additional touch an audio amplifier with attached speaker plays the Mario power-up sound whenever the caps lock key is pressed.

[ac2ev] notes that this could be pushed to the extreme by running a much larger solenoid powered by mains electricity, but since this was more of a proof-of-concept demonstration for some coworkers the smaller solenoid was used instead. The source code for the build can be found on the project’s GitHub page and there’s also a video of this machine in action here as well. Be careful with noisy mechanical keyboards, though, as the sounds the keys produce can sometimes be decoded to determine what the user is typing.

Don’t Let The Baluns Float Over Your Head

Most ham radio operators will build an antenna of some sort when they first start listening or transmitting, whether it’s a simple dipole, a beam antenna like a Yagi, or even just a random wire vertical antenna. All of these will need to be connected feedline of some sort, and in the likely event you reach for some 50-ohm coax cable you’ll also need a balun to reduce noise or unwanted radiation. Don’t be afraid of extra expenses when getting into this hobby, though, as [W6NBC] demonstrates how to construct an “ugly balun” out of the coax wire itself (PDF).

The main purpose of a balun, a contraction of “balanced-unbalanced” is to convert an unbalanced transmission line to a balanced one. However, as [W6NBC] explains, this explanation obscures much of what baluns are actually doing. In reality, they take a three-wire system (the coax) and convert it to a two-wire system (the antenna), which keeps all of the electrical noise and current on the shield wire of the coax from interfering with the desirable RF on the interior of the coax.

This might seem somewhat confusing on the surface, as coax wires only have a center conductor and a shield wire, but thanks to the skin effect which drives currents to the outside of the conductor, the shield wire effectively becomes two conductors when taking into account its inner and outer surfaces. At these high frequencies the balun is acting as a choke which keeps these two high-frequency conductors separate from one another, and keeps all the noise on the outside of the shield wire and out of the transmitter or receiver.

Granted, the world of high-frequency radio circuits can get quite complex and counter-intuitive and, as we’ve shown before, can behave quite unexpectedly when compared to DC or even mains-frequency AC. But a proper understanding of baluns and other types of transformers and the ways they interact with RF can be a powerful tool to have. We’eve even seen other hams use specialty transformers like these to make antennas out of random lengths and shapes of wire.

Continue reading “Don’t Let The Baluns Float Over Your Head”