Suppose you take a few measurements of a time-varying signal. Let’s say for concreteness that you have a microcontroller that reads some voltage 100 times per second. Collecting a bunch of data points together, you plot them out — this must surely have come from a sine wave at 35 Hz, you say. Just connect up the dots with a sine wave! It’s as plain as the nose on your face.
And then some spoil-sport comes along and draws in a version of your sine wave at -65 Hz, and then another at 135 Hz. And then more at -165 Hz and 235 Hz or -265 Hz and 335 Hz. And then an arbitrary number of potential sine waves that fit the very same data, all spaced apart at positive and negative integer multiples of your 100 Hz sampling frequency. Soon, your very pretty picture is looking a bit more complicated than you’d bargained for, and you have no idea which of these frequencies generated your data. It seems hopeless! You go home in tears.
But then you realize that this phenomenon gives you super powers — the power to resolve frequencies that are significantly higher than your sampling frequency. Just as the 235 Hz wave leaves an apparent 35 Hz waveform in the data when sampled at 100 Hz, a 237 Hz signal will look like 37 Hz. You can tell them apart even though they’re well beyond your ability to sample that fast. You’re pulling in information from beyond the Nyquist limit!
This essential ambiguity in sampling — that all frequencies offset by an integer multiple of the sampling frequency produce the same data — is called “aliasing”. And understanding aliasing is the first step toward really understanding sampling, and that’s the first step into the big wide world of digital signal processing.
Whether aliasing corrupts your pristine data or provides you with super powers hinges on your understanding of the effect, and maybe some judicious pre-sampling filtering, so let’s get some knowledge.
Those of us who have spent a lifetime building electronic projects have probably breathed more solder smoke than we should. This is not an ideal situation as we’ve probably increased our risk of asthma and other medical conditions as a result.
It has become more common over the years to see fume extraction systems and filters as part of the professional soldering environment, and this trend has also started to appear in the world of the home solderer. As always, where commercial products go the hardware hacker will never be far behind. We’ve seen people producing their own soldering fume filters using computer fans.
A particularly neat example comes via [Engineer of None], who has posted an Instructable and the YouTube video shown below the break for a filter mounted on a desk lamp. A toaster is used to heat a piece of acrylic. The softened plastic is then shaped to fit the contours of the lamp. The lamp’s articulated arm is perfect for placing light and fume extraction exactly where it is needed. It’s not the most complex of hacks, but we’d have one like it on our bench without a second thought. We would probably add an activated carbon filter to ours though.
One of the first frustrating situations a beginning microcontroller programmer will come across is the issue of debouncing switches. Microcontrollers are faster than switches, and the switch has yet to be built that can change state in zero time like they can on paper. This hurdle is easily overcome, but soon we are all faced with another issue: filtering noise from an analog signal. Luckily [Paul Martinsen] has put together a primer of three different ways to use an Arduino to filter signals.
The first (and fastest, simplest, etc.) way to filter an analog signal is to sample a bunch of times and then average all of the samples together. This will eliminate most outliers and chatter without losing much of the information. From there, the tutorial moves on to programming a running average to help increase the sample time (but consume much more memory). Finally, [Paul] takes a look at exponential filters, which are recursive, use less memory, and can be tweaked to respond to changes in different ways.
[Paul] discusses all of the perks and downsides of each method and provides examples for each as well. It’s worth checking out, whether you’re a seasoned veteran who might glean some nuance or you’re a beginner who hasn’t even encountered this problem yet. And if you’re still working on debouncing a digital input, we have you covered there, too.
As anyone who is a veteran of many RF projects will tell you, long component leads can be your undoing. Extra stray capacitances, inductances, and couplings can change the properties of your design to the point at which it becomes unfit for purpose, and something of a black art has evolved in the skill of reducing these effects.
RF Biscuit is [Georg Ottinger]’s attempt to simplify some of the challenges facing the RF hacker. It’s a small PCB with a set of footprints that can be used to make a wide range of surface-mount filters, attenuators, dummy loads, and other RF networks with a minimum of stray effects. Provision has been made for a screening can, and the board uses edge-launched SMA connectors. So far he’s demonstrated it with a bandpass filter and a dummy load, but he suggests it should also be suitable for amplifiers using RF gain blocks.
It’s a tough challenge, to produce a universal board for multiple projects with very demanding layout requirements such as those you’d find in the RF field. We’re anxious to see whether the results back up the promise, and whether the idea catches on.
This appears to be the first RF network prototyping board we’ve featured here at Hackaday. We’ve featured crystal filters before, and dummy loads though, but nothing that brings them all together. What would you build on your RF Biscuit?
Measuring the body’s electrical signals is a neat trick… if you can get your equipment dialed in enough to establish dependable measurements. The technique is called Surface ElectroMyography (SEMG) though you’ll hear many call this ECG. They’re essentially the same technology; the Electro CardioGraph instruments monitor the activity of the heart while SEMG Instruments monitor electrical signals used to control other muscles. Both types of hardware amount to an instrumentation type amplifier and some form of I/O or display.
This topic has been in my back pocket for many months now. Back in May we Hackaday’ites descended on New York City for the Disrupt NY Hackathon event. We arrived a day or so early so that we might better peruse the Korean BBQ joints and check out the other electronics that NY has to offer. On Saturday we gathered around, each shouting out the size of his or her t-shirt preference as we covered up our black Hackaday logo tees with maroon maroon ones (sporting the Hackaday logo of course) for a 24-hour craze of hardware hacking.
There were two individuals at our tables who were both hacking away on hardware to measure the electrical field produced by the body’s muscles in some form or another. The electrical signals measured from the skin are small, and need careful consideration to measure the signal despite the noise. This is a fun experiment that lets you work with both Instrumentation Amplifiers and OpAmps to achieve a usable signal from the movement of your body.
USB has become pretty “universal” nowadays, handling everything from high-speed data transfer to charging phones. There are even USB-powered lava lamps. This ubiquity doesn’t come without some costs, though. There have been many attacks on smartphones and computers which exploit the fact that USB is found pretty much everywhere, and if you want to avoid these attacks you can either give up using USB or do what [Jason] did and block the data lines on the USB port.
USB typically uses four wires: two for power and two for data. If you simply disconnect the data lines, though, the peripheral can’t negotiate with the host for more power and will limp along at 0.5 watts. However, [Jason] discovered that this negotiation takes place at a much lower data rate than normal data transfer, and was able to put a type of filter in between the host and the peripheral. The filter allows the low-frequency data transfer pass through but when a high-frequency data transfer occurs the filter blocks the communication.
[Jason] now has a device that can allow his peripherals to charge at the increased rate without having to worry about untrusted USB ports (at an airport or coffee shop, for example). This simple device could stop things like BadUSB from doing their dirty work, although whether or not it could stop something this nasty is still up in the air.
Network Analyzers are frequently used for measuring filters, making them extremely valuable for building radios and general mucking about with RF. They are, however, extremely expensive. You can, however, build one in an Altoids tin with an Arduino Nano, a small screen, and an AD9850 frequency synthesis module picked up on eBay.
The basic idea behind a network analyzer is to feed a frequency into a device, and measure the amplitude coming out of the device, and plot this relationship over a frequency. [Bill Meara] has been a human network analyzer before, changing frequencies and plotting the output of devices under test by hand. [DuWayne] (KV4QB) build a device to automate the entire process.
The block diagram is easy enough – an AD9850 sends a signal to the device, and this is measured by the Arduino with a small amplifier. The signal is measured again when it comes back from the device under test, and all this is plotted on a small display. Simple, and [DuWayne] is getting some very good readings with a lowpass filter and crystal filter made on a small solderless breadboard.