Skin (Effect) In The Game

We love to pretend like our components are perfect. Resistors don’t have capacitance or inductance. Wires conduct electricity perfectly. The reality, though, is far from this. It is easy to realize that wire will have some small resistance. For the kind of wire lengths you usually encounter, ignoring it is acceptable. If you start running lots of wire or you are carrying a lot of current, you might need to worry about it. Really long wires also take some time to get a signal from one end to the other, but you have to have a very long wire to really worry about that. However, all wires behave strangely as frequency goes up.

Of course there’s the issue of the wire becoming a significant part of the signal’s wavelength and there’s always parasitic capacitance and inductance. But the odd effect I’m thinking of is the so-called skin effect, first described by [Horace Lamb] in 1883. [Lamb] was working with spherical conductors, but [Oliver Heaviside] generalized it in 1885.

Put simply, when a wire is carrying AC, the current will tend to avoid traveling in the center of the wire. At low frequencies, the effect is minimal, but as the frequency rises, the area in the center that isn’t carrying current gets larger. At 60 Hz, for example, the skin depth for copper wire — the depth where the current falls below 1/e of the value near the surface — is about 0.33 inches. Wire you are likely to use at that frequency has a diameter less than that, so the effect is minimal.

However, consider a 20 kHz signal — a little high for audio unless you are a kid with good ears. The depth becomes about 0.018 inches. So wire bigger than 0.036 inches in diameter will start losing effective wire size. For a 12-gauge wire with a diameter of 0.093 inches, that means about 25% of the current-handling capacity is lost. When you get to RF and microwave frequencies, only the thinnest skin is carrying significant current. At 6 MHz, for example, copper wire has a skin depth of about 0.001 inches. At 1 GHz, you are down to about 0.000081 inches. You can see this (not to scale) in the accompanying image. At DC, all three zones of the wire carry current. At a higher frequency, only the outer two zones carry significant current. At higher frequencies, only the outer zone is really carrying electrons.

Continue reading “Skin (Effect) In The Game”

Scratch That SDR!

When you think of a software defined radio, what language might you consider reaching for to create the software part of the equation? C? C++, maybe?

How about Scratch?

“What, Scratch as in the visual programming language aimed at young people?”, we hear you cry incredulously. It’s not exactly the answer you’d expect for an SDR, but thanks to [Andrew Back]’s work there is now ScratchRadio, a set of Scratch extensions for software defined radio. Why on earth do this? The aim is to lower the barrier to entry for software defined radio as far as possible, and to place it in a learning environment such as Scratch seems an ideal way to achieve that.

Of course, Scratch itself isn’t powerful enough for the heaviest of heavy lifting, so in reality this is a Scratch wrapper for a LuaRadio backend. It was created with the LimeSDR Mini in mind, but given that LuaRadio is not specific to that hardware we’d expect it to work with other SDRs such as the ever-popular RTL chipset TV sticks. It gives an owner of a Raspberry Pi 3 the ability to experiment with SDR coding without the need for a huge level of experience, and that to our mind can only be a good thing.

If you fancy trying ScratchRadio, you can find the code in its GitHub repository, and take it from there. Meanwhile we covered LuaRadio last year, so if Scratch is a little basic for you and GNU Radio too advanced, give it a try.

Radio icon: [Sakurambo], (CC BY-SA 3.0).

Scratch cat logo: MIT Media Lab.

LoRa Is The Network

We’ve become used to seeing LoRa appearing in projects on these pages, doing its job as a low-bandwidth wireless data link with a significant range. Usually these LoRa projects take the form of a client that talks to a central Internet connected node, allowing a remote wireless-connected device to connect through that node to the Internet.

It’s interesting then to see a modest application from [Mark C], a chat application designed to use a set of LoRa nodes as a peer-to-peer network. In effect LoRa becomes the network, instead of simply being a tool to access it. He optimistically describes peer-to-peer LoRa networks as the new FidoNet in his tip email to us, which might be a bold statement, but we can certainly see some parallel. It’s important to note that the application is merely a demonstrable proof-of-concept as it stands, however we’d agree that it has some potential.

The hardware used for the project is the Heltec ESP32-based LoRa board, which comes with a handy OLED screen on which the messages appear. As it stands a PC connection is required to provide text input via serial, however it’s not impossible to imagine other more stand-alone interfaces. If it interests you the code can be downloaded from the GitHub repository, so maybe this can become the seed for wider peer-to-peer LoRa networks.

There have been no shortage of LoRa projects featured here over the years. Recent ones include a handy local LoRa packet sniffer, and news of an extreme distance record from a LoRa node on a balloon.

Radio Tuning The Quicksilver Way

Modern radios are often digital affairs, in which the frequency is derived from a stable crystal oscillator and varied through a microprocessor controlled frequency synthesiser. It won’t drift, and it’s exactly on the frequency dialed in. Older radios though relied on a tuned circuit, a combination of capacitor and inductor, for their frequency selection. If you were curious enough to peer inside — and we know you were — you’d have seen the moving vanes of a variable capacitor controlled by the tuning knob.

Of course, there is another way to adjust a tuned circuit: by changing the value of the inductor. Older car radios for instance moved a ferrite slug inside a coil to tune from station to station. But that method is not good enough for [David Mills]. Being in possession of some finely graduated syringes he decided to try liquid tuning by increasing the volume within the coil.

Solutions of salts made little difference, so he reached for some mercury. The result is an RF inductor wound round a syringe body, with a body of mercury whose position can be adjusted by the plunger. He measures the Q factor of the coil with air core or mercury core, and as the inductance decreases with more mercury, so does the Q.

We see home-made parts from time to time, and there’s nothing too special about permeability tuning. However, this unusual take on the matter makes this one rather special. We doubt we’ll see its like very often in the future.

Network Analysers: The Electrical Kind

Instrumentation has progressed by leaps and bounds in the last few years, however, the fundamental analysis techniques that are the foundation of modern-day equipment remain the same. A network analyzer is an instrument that allows us to characterize RF networks such as filters, mixers, antennas and even new materials for microwave electronics such as ceramic capacitors and resonators in the gigahertz range. In this write-up, I discuss network analyzers in brief and how the DIY movement has helped bring down the cost of such devices. I will also share some existing projects that may help you build your own along with some use cases where a network analyzer may be employed. Let’s dive right in.

Network Analysis Fundamentals

As a conceptual model, think of light hitting a lens and most of it going through but part of it getting reflected back.

The same applies to an electrical/RF network where the RF energy that is launched into the device may be attenuated a bit, transmitted to an extent and some of it reflected back. This analysis gives us an attenuation coefficient and a reflection coefficient which explains the behavior of the device under test (DUT).

Of course, this may not be enough and we may also require information about the phase relationship between the signals. Such instruments are termed Vector Network Analysers and are helpful in measuring the scattering parameters or S-Parameters of a DUT.

The scattering matrix links the incident waves a1, a2 to the outgoing waves b1, b2 according to the following linear equation: \begin{bmatrix} b_1 \\ b_2 \end{bmatrix} = \begin{bmatrix} S_{11} & S_{12} \\ S_{21} & S_{22} \end{bmatrix} * \begin{bmatrix} a_1 \\ a_2 \end{bmatrix} .

The equation shows that the S-parameters are expressed as the matrix S, where and denote the output and input port numbers of the DUT.

This completely characterizes a network for attenuation, reflection as well as insertion loss. S-Parameters are explained more in details in Electromagnetic Field Theory and Transmission Line Theory but suffice to say that these measurements will be used to deduce the properties of the DUT and generate a mathematical model for the same.

General Architecture

As mentioned previously, a simple network analyzer would be a signal generator connected and a spectrum analyzer combined to work together. The signal generator would be configured to output a signal of a known frequency and the spectrum analyzer would be used to detect the signal at the other end. Then the frequency would be changed to another and the process repeats such that the system sweeps a range of frequencies and the output can be tabulated or plotted on a graph. In order to get reflected power, a microwave component such as a magic-T or directional couplers, however, all of this is usually inbuilt into modern-day VNAs.
Continue reading “Network Analysers: The Electrical Kind”

An Unconference Badge That’s Never Gonna Give You Up

When your publication is about to hold a major event on your side of the world, and there will be a bring-a-hack, you abruptly realise that you have to do just that. Bring a hack. With the Hackaday London Unconference in the works this was the problem I faced, and I’d run out of time to put together an amazing PCB with beautiful artwork and software-driven functionality to amuse and delight other attendees. It was time to come up with something that would gain me a few Brownie points while remaining within the time I had at my disposal alongside my Hackaday work.

Since I am a radio enthusiast at heart, I came up with the idea of a badge that the curious would identify as an FM transmitter before tuning a portable radio to the frequency on its display and listening to what it was sending. The joke would be of course that they would end up listening to a chiptune version of [Rick Astley]’s “Never gonna give you up”, so yes, it was going to be a radio Rickroll.

The badge internals.
The badge internals.

I evaluated a few options, and ended up with a Raspberry Pi Zero as an MP3 player through its PWM lines, feeding through a simple RC low-pass filter into a commercial super-low-power FM transmitter module of the type you can legally use with an iPod or similar to listen on a car radio. To give it a little bit of individuality I gave the module an antenna, a fractal design made from a quarter wavelength of galvanised fence wire with a cut-off pin from a broken British mains plug as a terminal. The whole I enclosed in a surplus 8mm video cassette case with holes Dremmeled for cables, with the FM module using its own little cell and the Pi powered from a mobile phone booster battery clipped to its back. This probably gave me a transmitted field strength above what it should have been, but the power of those modules is so low that I am guessing the sin against the radio spectrum must have been minor.

At the event, a lot of people were intrigued by the badge, and a few of them were even Rickrolled by it. But for me the most interesting aspect lay not in the badge itself but in its components. First I looked at making a PCB with MP3 and radio chips, but decided against it when the budget edged towards £20 ($27). Then I looked at a Raspberry Pi running PiFM as an all-in-one solution with a little display HAT, but yet again ran out of budget. An MP3 module, Arduino clone, and display similarly became too expensive. Displays, surprisingly, are dear. So my cheapest option became a consumer FM module at £2.50 ($3.37) which already had an LCD display, and a little £5 ($6.74) computer running Linux that was far more powerful than the job in hand demanded. These economics would have been markedly different had I been manufacturing a million badges, but made a mockery of the notion that the simplest MCU and MP3 module would also be the cheapest.

Rickrolling never gets old, it seems, but evidently it has. Its heyday in Hackaday projects like this prank IR repeater seems to have been in 2012.

In-Band Signaling: Quindar Tones

So far in this brief series on in-band signaling, we looked at two of the common methods of providing control signals along with the main content of a transmission: DTMF for Touch-Tone dialing, and coded-squelch systems for two-way radio. For this installment, we’ll look at something that far fewer people have ever used, but almost everyone has heard: Quindar tones.

Continue reading “In-Band Signaling: Quindar Tones”