Radio Waves (by )

I really love learning things, and recently I've finally been removing a long-standing thorn in my side - the fact that I don't really understand radio frequency electronics and the propagation of radio waves.

I've tried to fix this a few times in the past, but the resources I'd read never seemed to quite explain the whole picture - and I couldn't see how to piece the things they explained together into one coherent understanding of the electromagnetic world; they were clearly only shedding light on little corners of a totality that still remained mysterious to me.

Well, there are still gaps in my understanding... but I've made some progress, and in the hope that I can help others struggling with the same confusions as I was, I'd like to share my way of understanding it all.

One thing that bothered me was that explanations of transmission-line behaviour seemed to flip between talking about instantaneous voltages and currents at some point in the line, sampling the analogue signal travelling down the line - or talking about an RMS average voltage or current, and thereby causing me to struggle to make sense of what they were saying. But I think I now get transmission lines to some extent (although I'm still hazy on waveguides, because I've not gotten around to looking into them yet). And I was never quite sure what the impedance of a whole transmission line really meant, regardless of its length. If I had a transmission line and put a resistor over the end of it, and hooked it up to a battery and an ammeter, I knew that the current flowing would depend on the total resistance of the line and the resistor at the end - which would depend on the length of the line, as its resistance would be in ohms per meter. So what the heck was this impedance thing about? How did impedance mismatches cause reflections?

So, here's how I think about transmission lines now. The "DC model" of hooking a battery up to one end of a line and reading the current that flows into it is, of course, perfectly true - we can set the circuit up and test it; the reason it doesn't contradict with this weird parallel world of impedances is that the DC model is a steady state model of the system. When you first connect that battery to the line, current is going to start flowing into it, crawling along at a sizeable fraction of the speed of light; but until that current has reached the end, flowed through the terminating resistor, and flowed all the way back, it can't possibly have communicated any information about the total resistance of the line and its terminating resistor... So how much current initially flows from the battery, and why? Of course, the line can be thought of as two series of tiny inductors (with resistors in series, if we assume the inductors are perfect) with tiny capacitors connecting the two conductors, due to the inherent inductance of the wire and the inherent capacitance of the gap between them; you can imagine that the current from the battery has to charge the capacitors through the inductors for the voltage/current surge to propagate down the line. But what made "impedance" really click for me was going back to the basics of Ohm's Law and seeing it as a ratio of voltage to current. At any point along that transmission line, a certain instantaneous current will be flowing - and there will be a certain instantaneous voltage between the two conductors at that point; and the voltage divided by the current is the impedance.

So, if a 12 volt voltage source is connected suddenly to a 50 ohm impedance cable, an instantaneous current of 0.24 amps (12̣̣̣̣÷50) will flow. Now, as Kirchoff's current law tells us, the currents flowing into a node must sum to zero; so with the imaginary node at any point on the transmission line connecting two halves of it, the input current must equal the output current (although some current may be lost to resistive heating or leakage, that's not relevant in this case). So what happens when there's a change in impedance at some point in the transmission line? The current must remain the same, but the impedance changes - so the voltage must change, to make Ohm's Law still hold. If my 50 ohm cable is connected to a 75 ohm cable, that 0.24 amps flows into it and changes into a voltage of 18 volts (0.24×75). Which is why high impedance transmission lines are less lossy; a transmitter putting a watt of power down such a line (with proper impedance matching) will push out a higher voltage with less current that one putting a watt of power into a low impedance line - and resistive losses in the cable are worse for higher currents.

How about the reflections when impedance changes? I'm still a little hazy on this, but I think it's something along the lines of this: imagine a point just where the impedance changes in our example of moving from a 50 ohm cable to a 75 ohm one. A current is flowing into that point, but the voltage is higher after that point than before - which is going to create a current travelling back the other way. Where I'm hazy on is how this happens at junctions where the impedance falls (is it to do with the fact that the current flows alternately backwards and forwards, so the junction is traversed by current in both directions anyway, and the phases where the current travels from low to high impedance are what create the reflections? If so, isn't that a kind of rectifying action, that will create harmonics and intermodulation? But what is the "direction" of a signal travelling along a line, anyway? If we froze the signal in time, we'd just see a sine wave of voltage and a sine wave of current along the transmission line - if we restart time, how does it "know" what direction to propagate in? Something to do with the relative phase of the voltage and current waves?) So, yeah, I've a little more to learn there.

But this model of impedance does explain a lot. I wondered why the angles of the radials of a ground-plane monopole antenna affected impedance, but now it makes sense - the end of the transmission line basically spreads out to become a dipole, or a monopole and its ground plane; the electrical field of the travelling signal has to cross a larger region of space, so it makes sense that the voltage required to do so might vary depending on the amount of space crossed. All the mysterious constants, like the fact that a dipole trimmed to 0.48 times the wavelength has an impedance of 70 ohms are really down to the electromagnetic stretchiness of space: the impedance is the voltage required to push one amp along a transmission line (a dipole antenna just being an oddly-shaped transmission line, handing the signal over to the even weirder transmission line that is free space itself), and that is a function of the permittivity and permeability of that space.

This model also explains how impedance matching transformers work. A 1:2 transformer will transform X volts and Y amps on the "left" into 2X volts and Y/2 amps on the "right"; as the impedance is V/I, that means it converts R ohms on the left into R4 ohms on the right, simply through changing the voltages and currents. A 1:N transformer makes a 1:N^2 change in impedance.

Antennas with multiple elements are confusing, but I'm not sure anybody really understands them - as far as I can tell, the design process is almost always to mock it up in a finite-element computer simulation or build a prototype and tweak the design until the desired parameters are obtained experimentally; the mutual interactions between the elements (not to mention ground, support structures, and the transmission line feeding the antenna) are just too complicated to analyse.

I really don't get why there's a near field and a far field (or that funny one inbetween that, I think, is just a mixture of the two). Does the antenna both far and near fields at once, and the near field is stronger but doesn't spread out far, so the far field is negligible when close to the antenna? Or does the antenna create a near fields, which "decays into" the far field as it spreads out? Nothing I've found seems to explain.

I'm not very clear on why a balanced transmission line that's shorted at one end and open at the other end has varying impedance along its length, and can be used for impedance matching, but it doesn't create reflections from the ends.

But, I can understand how to run a cable to a dipole or monopole antenna, manage the impedance transitions, and make it radiate efficiently. That's progress!

Compressed air distribution in the workshop (by )

Up until now, I've just plugged flexible hoses into my compressor to run tools.

I've got a bunch of things that need clean air (spray guns, tyre inflator, the plasma cutter, and a blow gun), and a bunch of things that need lubricated air (nailer, drill, impact screwdriver, sander, angle grinder, chisel, and impact wrench), so I've standardised on using PCL connectors for clean air and the ones that come with cheap air tools from Aldi and Lidl (what is that interface called?) for lubricated air:

Aldi/Lidl airline fittings

To convert from one to t'other, I have my handy compressed air tool caddy. On the front is a regulator, filter, and oil injector, with a PCL plug on the inlet, and on the outlet a springy hose with a shutoff valve and a socket for oiled air:

Air caddy front

At the rear is a storage box with my bottle of airline oil, the key for my air drill, the spanners for my air grinder, and a box with a pipette and funnel for putting oil into tools:

Air caddy back

Now, this setup is OK, but it's a bit fiddly to go the compressor and plug things in; and I've been making something that needs compressed air as part of the building infrastructure (there will be a blog post focussing on it later so I won't go into detail now, but it's a pneumatic vacuum ejector):

Vacuum ejector

So, it was time to run proper pneumatic plumbing around the place! I had a bunch of copper plumbing pipe left behind by plumbers as we've had a lot of building work lately, so I had some 28mm, 22mm, and normal 15mm tube lying around. I decided to use all the 28mm tube for the long run across the ceiling, all the 22mm tube I had to extend that to make the distance I needed, then 15mm tube for the rest, because larger tube means easier air flow - and because all that volume inside the pipes gives me an extra litre or so of air storage...

To combine them, I had to buy reducers of the appropriate diameters; I went for solder-ring fittings because I'm well equipped with blowtorches. Plastic pipe clips hold it securely to the ceiling beams:

15mm 22mm and 28mm pipe

And the 15mm plumbing terminates in things like this:

PCL Compressed air outlet

To convert between the world of plumbing (15mm copper) and the world of compressed air lines (1/4" BSP threads), I searched on eBay and found adapters with 15mm compression fittings on one side and 1/4" BSP on the other end:

The PCL fittings, ball valves, and other hardware came from Airlines Pneumatics.

Now, at various points, I needed to interface to flexible hoses - to connect to the compressor or the plasma cutter, for instance. To do that, I needed to get adapters between barbed hose fittings and 1/4" BSP threads or PCL fittings, as appropriate (all from Airlines Pneumatics). Fitting these correctly needs to be done with care, or they'll leak, so I've made a video explaining the process:

(you can also watch it on YouTube)

Although the fittings are depressingly expensive, it's been very rewarding setting this up - I love working on infrastructure, and now it's a lot easier to use my compressed air equipment 🙂

Don’t fund your online business with advertising (It’ll only make everyone hate you) (by )

I first got online in 1994 or so, and the Internet was a very different place to how it is now. It was like a busy marketplace - thousands of FTP servers, things you could telnet to, email addresses, Usenet groups, IRC channels, gophers, MUDs and, increasingly, Web sites. Directories like DMOZ and Yahoo!, as well as FAQs for relevant newsgroups and mailing lists, were how I found things. It was cheap to set up servers and run services on them, so lots of people did. Companies and universities got leased lines to provide Internet access to their folks, and ran servers to provide their presence to the Internet; while individuals got dialup Internet access, and basic email/Web hosting capability from their ISPs; or for the nerdier amongst us, wrangled or paid for "colocation", getting somebody with a leased line to let you put your computer on a shelf somewhere, hooked up to their power and network.

It was pretty chaotic, but it worked. Internet usage exploded in that period, but the rate of technological advancement wasn't that fast (relatively speaking). All the technologies we used - TCP/IP itself, DNS, Email, Usenet, IRC, the Web - were built around some documents describing how the system worked (usually in the form of RFCs). Most of these technologies were implemented in two parts: the client that somebody ran on their computer to interact with it, and the server that somebody ran on a big permanently-Internet-connected computer with a fixed IP address and a nice hostname. For instance, with the Web, the client is your Web browser, and the servers are the computers that actually hold all the web pages; your web browser talks over the Internet to the server responsible for the page you want, gets it, and then shows it to you. Because the client and the server talk to each other using the protocol defined in the documents, there would often be several clients and several servers available, written by different people and aimed at various different kinds of users - and they would largely work together. Read more »

Alien (by )

It'd certainly be fair to call me a noncomformist; I'm hardly a slave to fashions, and my hobbies tend to revolve around meddling with the fundamental forces that bind the Universe together, science fiction, old technical books, and learning self-defence.

But... this isn't exactly a role I've chosen for myself. I haven't gone to some effort to step off the beaten track; I've not rejected the mainstream as an act of rebellion. The truth is, I've never really felt a part of the human race.

Why should being different be a problem, though? I love talking to people who are different to me - and I couldn't do that unless I was different from them. The diversity of human experience fascinates me; I love seeing how people's lives differ from mine. Monocultures are harmful and fragile: our diversity is a great strength.

Of course, for many, being different is hell because they experience explicit discrimination for it. LGBT folks, immigrants, minority ethnic groups are all explicitly targetted for their difference, by people who think that their being different makes them a threat. But I'm lucky; I've had very little of that in my life. At school I had some unwelcome attention from the bullies for being bookish and shy rather than sporty, but I'm pretty sure those folks were just looking for levers to mess with people rather than actually taking some kind of moral high ground over me; and I didn't have all that much trouble with them, as I didn't react much so they went after more interesting targets.

For me, the problem is more subtle: my experience is mainly of feeling left out, unwanted, or forgotten.

I was born with one functioning eye, so "3D" films and magic-eye pictures were always things for normal people; and PE teachers at school never seemed to understand that I really had a problem with depth perception, and assumed that my pitiful performance at anything resembling catching a ball was me mucking around. I was given an unusual name, so those things in shops with keyrings/pens/mugs with a selection of common names on never had anything for me. I was raised vegetarian, so I always had to check if I could actually eat food I was given, and went hungry at my primary school's leaver's barbecue. I was the only child of an unemployed single parent, so normal family dynamics never applied, and I never had the expensive toys the other kids at school had. I learnt to read before I started school and read through books insatiably, so my experience of education was very different to that of the other children in my class; I can hardly complain about the fact that I found school and exams easy, but it meant I couldn't really relate to my friends' difficulties. We ate food we grew on our own allotment, and didn't have a car. For whatever reason, I've never liked hot drinks. Spectator sports hold little joy for me. I find pubs and parties distressing. The only mass media that featured people like me was the harder end of science fiction, so I was used to most stuff on the TV (and what the other kids raved about, in particular) as reinforcing the idea that "normal people aren't like me". I can certainly relate to the calls for better representation of different groups in mass media today!

I become irrationally touchy about any situation where somebody assumed that something which applied to most people would apply to all people: People describing bacon and coffee as delicious as if this was some objective truth, rather than just the fact that they find them delicious. Employers thinking that expensive coffee and free beer are a good way to reward the team. Each of these things is tiny in itself, not really worth making a fuss over, but the accumulated weight of them all became hard to bear. This makes me feel angry: I remember a dream I had when I was about ten years old. In this dream, there was a special event at school; the teachers had organised everyone into groups of three, each of which had a kit to assemble, but they'd forgotten about me when drawing the groups up. So I was sat with a couple of other kids who'd been explicitly excluded from the activity for being troublemakers, and we were given some leftovers from everyone else's kits to "just mess around with". I was furious - so recruited the two troublemakers into a plan: with the leftover parts we had, we built a high-powered catapult and, when everyone else had finished their kits, we opened fired and smashed them all. I woke from the dream seething with fury, almost in tears.

But I can't simply blame others for my situation; I am certainly complicit in my own invisibility. When somebody assumes something about me, I feel embarrassed about being different, and I freeze; the opportunity to interject passes, and I seem to have implicitly agreed to whatever it is. It's only when I look back and realise: that was the point where I could have gently avoided whatever catastrophe it turned into. For instance, a few years ago, some friends came to visit our house for New Year's Eve. This was great at first, but then one of them proudly produced a bottle of some strong spirit from their bag, and the others were pleased about this. I, however, wasn't; it made my stomach churn with fear, but my initial thoughts were just "Oh no, this is bad". I held on as long as I could, but they started showing signs of inebriation, then talking about their symptoms of inebriation, and after a few hours I couldn't cope any more and made excuses to go and hide away on my own elsewhere in the house, only reappearing when my help was needed with something. I was furious that I had been made to feel like this in my own house; some reptilian-hindbrain part of me was feeling like my home had been invaded; I was riding the stressful emotional rollercoaster of bitter fantasies of storming downstairs and kicking them out of my home (into the cold streets of an unfamiliar city at night when they'd be legally unable to drive themselves the 50-odd miles home), while rationally knowing I could do no such thing; history would certainly record me as the Bad Guy if I did that.

But what I should have done was say something at the beginning. My instinct was to freeze and think "Oh crap", and then enter into the vicious spiral of feeling bad, hiding my emotions, and then feeling worse because nobody's responding to how I feel.

I don't feel comfortable with drawing attention to my different-ness, particularly when it's something that's bad about me; but a big factor in my tendency to hide my pain was a nasty episode at a place I worked many years ago. I worked part-time while I was at University; I had been struggling with the alcohol culture amongst my university peers, so I had as little to do with university as possible, just turning up for the bare minimum of lectures, and focussing my attention on my workplace; it became a safe refuge for me. But the little software consultancy I worked for was growing, and started to hire non-technical people for roles such as HR and sales; and with those people came a drinking culture that quickly spread to dominate the company's social fabric, and became a significant topic of conversation during the days. I went to my boss and explained that the recent shift towards all company-organised social and celebratory functions being held in bars with drinks on the company was becoming a problem for me, and he asked the person who had been tasked with organising all that stuff (the new sales guy) to change it; but he took exception to that, did everything he could to work around the spirit of the restriction while staying just inside the letter of the ruling, pointedly rubbed my face in this, and privately told me that I had no right to dictate how other people lived their lives. Ever since then, I've tended to just grit my teeth and bear it, but I think the result of this has just been that I'm slowly filling up with resentment. I need to be a bit more open about my mental health issues (hence starting to blog about it), but I must also be careful about who I hand that power over me to. In hindsight, I have come to realise that a large fraction of people are alcoholics, probably without even realising; they will react, with aggressive defensiveness, to anything that might call their use of alcohol into question.

I don't think complaining to other people is the solution, anyway. Spending all my time suggesting that people offer nice smoothies as well as coffee as a reward for something because not everybody likes coffee gets tiring, and I don't want to be That Guy who complicates everything for everybody. I know I'm a minority, and I think there should be some kind of trade-off between the current situation and some hypothetical world where every decision has to take into account every possible weird edge case; I think I wouldn't mind being left out if I didn't feel like people were making assumptions. "We could only afford the time/money to organise one thing so we got coffee as most people like it, please give us suggestions for other stuff you might like in future" is fantastic. "We got a reward budget and we spent it all on coffee, isn't that fantastic?" isn't. But explaining that distinction to busy people every time this comes up would be rather tiring. What energy we have for changing the world needs to be diverted to fighting more pressing problems, like sexism, hompohobia, transphobia and xenophobia, or better disabled access; these are things that affect large groups of people, so effort spent there will have a greater improvement on the average quality of human life than worrying about weird edge cases such as myself.

Instead, I think we need to just broaden our minds in general. People like to make assumptions about other people. If we learn to stop doing that, then things will be a bit better for everyone who's a little bit different. I don't mind being weird in itself - life would be pretty boring if everyone was the same. It's just people making assumptions that hurts!

Stencil-tagging my phone case (by )

My favourite thing to do with the laser cutter at Cheltenham Hackspace is to cut stencils in thin card.

It's dead easy to knock them together in Inkscape, once you've found a suitable stencil font, and the laser can cut thin card in no time at all.

With that done, it's then trivial to spray-paint my Kitten Technologies logo onto things I own or make, Diresta Style!

WordPress Themes

Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales
Creative Commons Attribution-NonCommercial-ShareAlike 2.0 UK: England & Wales