Hacker Dictionary: RS-485 Will Go The Distance

RS485 is a communication standard that should be part of the advanced hardware hacker’s arsenal; it’s not commonly encountered, but powerful exactly when you need it. It’s a physical layer interface for wired communications that uses a single differential pair for noise immunity, has good long-distance properties, and allows many connections to a single bus. Because of that, you will encounter it in security systems and even cameras, wired sensor networks, DMX512 lighting and all sorts of industrial electronics. For our hobbyist goals, you can absolutely use RS485 to build your home (or room) automation system, or a relatively large robot – without all those worries that wireless brings.

The name might remind you of RS232, and that’s because both RS232 and RS485 are standards that come from EIA (Electronics Industries Alliance). It also might remind you of RS422, if you’ve ever seen this name mentioned online – RS422 and RS485 are closely intertwined, sharing most of the physical layer, and I’ll show how exactly they relate. Continue reading “Hacker Dictionary: RS-485 Will Go The Distance”

Impedance Mismatch

There are a few classic physics problems that it can really help to have a mental map of. One is, of course, wave propagation. From big-wave surfing, through loudspeaker positioning, to quantum mechanics, having an intuition for the basic dynamics of constructive and destructive interference is key. Total energy of a system, and how it splits and trades between kinetic and potential, is another.

We were talking about using a bike generator to recharge batteries on the Podcast last night, and we stumbled on a classic impedance mismatch situation. A pedaling person can put out 100 W, and a cell phone battery wants around 5 W to charge. You could pedal extremely lightly for nearly three hours, but I’d bet you’d rather hammer the bike for 10 minutes and get on with your life. The phone wants to be charged lightly — it’s high impedance — and you want to put out all your power at once — you’re a low impedance source.

The same phenomenon explains why you have to downshift your internal combustion automobile as you slow down. In high gear, it presents too high an impedance, and the motor can only turn so slowly before stalling. This is also why all vibrating string acoustic instruments have bridges that press down on big flat flexible surfaces, and why horns are horn shaped. Air is easy to vibrate, but to be audible you want to move a lot of it, so you spread out the power. Lifting a heavy rock with human muscle power is another classic impedance mismatch.

If these are fundamentally all the same problem, then they should all have similar solutions. The gear on the bike or the car, the bridge on a cello, the flared horn on the trumpet, and the lever under the boulder all serve to convert a large force over a short distance or time or area into a lower force over more distance, time, or area.

Pop quiz! What are the common impedance converters in the world of volts and amps? The two that come to my mind are the genafsbezre and the obbfg/ohpx pbairegre (rot13!). What am I missing?

Circuit Impedance Calculations Without Cumbersome Simulations

Using circuit simulating software like SPICE can be a powerful tool for modeling the behavior of a circuit in the real world. On the other hand, it’s not always necessary to have all of the features of SPICE available all the time, and these programs tend to be quite expensive as well. To that end, [Wes Hileman] noticed an opportunity for a specific, quick method for performing impedance calculations using python without bulky, expensive software and came up with a program which he calls fastZ.

The software works on any network of passive components (resistors, capacitors, and inductors) and the user can specify parallel and series connections using special operators. Not only can the program calculate the combined impedance but it can perform frequency analysis at a specified frequency or graph the frequency response over a wide range of frequencies. It’s also running in python which makes it as simple as importing any other python package, and is also easy to implement in any other python program compared to building a simulation and hoping for the best.

If you find yourself regularly drawing Bode plots or trying to cobble together a circuit simulation to work with your python code, this sort of solution is a great way to save a lot of headache. It is possible to get the a piece of software like SPICE to to work together with other python programs though, often with some pretty interesting results.

The $50 Ham: A Cheap Antenna For The HF Bands

So far in the $50 Ham series, I’ve concentrated mainly on the VHF and UHF bands. The reason for this has to do mainly with FCC rules, which largely restrict Technician-level licensees to those bands. But there’s a financial component to it, too; high-frequency (HF) band privileges come both at the price of learning enough about radio to pass the General license test, as well as the need for gear that can be orders of magnitude more expensive than a $30 handy-talkie radio.

But while HF gear can be expensive, not everything needed to get on the air has to be so. And since it’s often the antenna that makes or breaks an amateur radio operator’s ability to make contacts, we’ll look at a simple but versatile antenna design that can be adapted to support everything from a big, powerful base station to portable QRP (low-power) activations in the field: the end-fed half-wave antenna.

Continue reading “The $50 Ham: A Cheap Antenna For The HF Bands”

Dead Simple Time-Domain Reflectometry With Just A Battery And An Oscilloscope

“Time-domain reflectometry” sure sounds like something that needs racks of expensive equipment to accomplish. In reality, TDR is just measuring the time between injecting a pulse into a cable and receiving its echo, either from the other end of the cable or from some fault or defect along the way. It’s a useful technique, and as [Allen Wolke (W2AEW)] shows us, it can be accomplished with little more than a battery, a resistor, and an oscilloscope. And a little math, of course.

There are, of course, dedicated time-domain reflectometers, but all of them are really just elaborations of the basic principles [W2AEW] demonstrates with his simple setup. The oscilloscope is set up with a tee connector on one channel; one side of the tee is connected to the cable under test, while the shield conductor of the other side is connected to the negative terminal of a 9V battery. A resistor connected to the center conductor is used to complete the circuit, which sends a brief pulse down the test cable. The scope is set up to capture the outgoing pulse as well as the return pulse, allowing the time between the two to be measured. Some simple math gives the length of the cable, the distance to a fault, or with a little rearrangement, the velocity factor of the cable.

The video below shows the simple method at work on coax and Cat 5e Ethernet cable. It even worked on a roll of zip cable, which was a little surprising. If this technique is too simple, you can always elaborate a bit and roll your own TDR tester. Googly eyes optional, of course, but recommended.

Continue reading “Dead Simple Time-Domain Reflectometry With Just A Battery And An Oscilloscope”

Finding RF Cable Impedance

At DC and low frequency, we can pretend wires are perfect conductors. At radio frequencies, though, there are many effects that you need to take into account for wires and cables. One of these is characteristic impedance. If you have a marked cable, you can look it up on the Internet, of course. But what if you don’t know what kind of wire it is? With help from [The Offset Volt], you can measure it as he shows in the video below.

This is one of those things that used to take exotic test equipment like an LCR bridge, but these days meters that measure inductance and capacitance are commonplace. The trick is simple: measure the capacitance and then short one end of the cable and measure the inductance.

Continue reading “Finding RF Cable Impedance”

Shoot The Moon With This Homebrew Hardline RF Divider

You can say one thing for [Derek]’s amateur radio ambitions — he certainly jumps in with both feet. While most hams never even attempt to “shoot the Moon”, he’s building out an Earth-Moon-Earth, or EME, setup which requires this little beauty: a homebrew quarter-wave hardline RF divider, and he’s sharing the build with us.

For background, EME is a propagation technique using our natural satellite as a passive communications satellite. Powerful, directional signals can bounce off the Moon and back down to Earth, potentially putting your signal in range of anyone who has a view of the Moon at that moment. The loss over the approximately 770,000-km path length is substantial, enough so that receiving stations generally use arrays of high-gain Yagi antennas.

That’s where [Derek]’s hardline build comes in. The divider acts as an impedance transformer and matches two 50-ohm antennas in parallel with the 50-ohm load expected by the transceiver. He built his from extruded aluminum tubing as the outer shield, with a center conductor of brass tubing and air dielectric. He walks through all the calculations; stock size tubing was good enough to get into the ballpark for the correct impedance over a quarter-wavelength section of hardline at the desired 432-MHz, which is in the middle of the 70-cm amateur band. Sadly, though, a scan of the finished product with a NanoVNA revealed that the divider is resonant much further up the band, for reasons unknown.

[Derek] is still diagnosing, and we’ll be keen to see what he comes up with, but for now, at least we’ve learned a bit about homebrew hardlines and EME. Want a bit more information on Moon bounce? We’ve got you covered.

Continue reading “Shoot The Moon With This Homebrew Hardline RF Divider”