TCP sucks (by )

The go-to transport-layer protocol for people to build Internet applications on these days, with the exception of real-time streaming media or a few specialist apps, is TCP.

The problem is, TCP isn't really all that great for the things we're using it for.

I won't go into any more detail on how it works than is necessary to make my point, but let's take a look at how TCP is used by an application. Read more »

Debugging poor home wifi at the Snell-Pym residence (by )

So, we have a fairly complicated network at home - the Snell-Pym Family Mainframe has a dedicated DSL link with a static IP for hosting various Internet-facing things, as well as providing internal services to the home LAN. The home LAN has the usual mix of desktop computers, the laser printer, and two wireless APs for mobile devices to connect to - one in the house and one in the workshop, because one can't get a good signal to both locations. And there's a separate infrastructure LAN for systems control and monitoring.

Now, we've often had on-and-off poor connectivity on the wifi in the house; this used to happen sporadically, usually for around a day, then just get better. The wifi signal strength would remain good, but packet loss was high (10-20%) so stuff just didn't work very well. TCP is poor at high packet loss; it's OK once a connection is open, but packet loss during the initial SYN/SYNACK/ACK handshake causes it to take a long time to retry on most implementations.

I went looking for interfering networks (we live in a pretty wifi-dense urban area) using an app called "Wifi Analyzer" on my Android phone, and it showed a strange network, always on the same channel as the house wifi (as in, if I changed the channel, it would move too). The network never had a name, and the signal strength was about the same as the house wifi; sometimes a bit stronger, sometimes a bit weaker. Read more »

Redesigning my workspace (by )

So, I work from home - and a lot of my hobbies involve sitting at the same desk, as they're computer-based or electronics-based. My workspace is an outbuilding at the end of my garden, with power and Ethernet connecting it to the house. Half of it is a workshop, and the other half is my computer / electronics lab. The workshop end is pretty good since I made my custom welding bench, but the lab end was just made from furniture I had lying around that fitted in, so has been a compromise for some time. I am forming a plan to fix it!

Read more »

The effect of the pandemic on my mental health (by )

I'm definitely not alone in finding the current pandemic a time for difficult emotions, but it's taken me a while to unpick the emotions I've been having. Having managed this, however, I'm documenting them here - as a record for myself, to save me repeating myself when explaining them to people who ask how I'm feeling, and in the hope that it might provide some ideas for people who are still trying to work their feelings out; you might have something in common with me.

Read more »

12v DC Power Distribution (by )

What with not needing to spend quite so much of my time driving my family to places these days, I've been catching up on household maintenance, DIY, and vehicle maintenance tasks, and one of those has been to finish a 12v DC power distribution unit (PDU).

Why do I need such a thing? Well, our van has an auxiliary power system - a pair of large lead-acid batteries in the back that are charged from the engine while it's running, which then power internal and external lights, a microwave oven, a mobile amateur VHF/UHF band transceiver, and things like that.

This is useful compared to just running from the vehicle starter battery for three reasons:

  1. While the starter battery is optimised for brief, intense, surges of current to start an engine, the auxiliary battery pack is optimised for energy storage so can store a lot more energy more efficiently.
  2. If I leave things on and run the auxiliary batteries flat, I can still start the engine from the starter battery (and thus recharge the auxiliary batteries).
  3. I can mumble things like "Switching to auxiliary power" and pretend I'm piloting a spaceship.

However, the auxiliary power system was installed in the van's original life as a work crew support vehicle, so it was hardwired to a few appliances and the lights. Somebody who owned it since had attached a set of four "ligher sockets" - perhaps the nastiest 12v accessory socket in common use to a fuse marked as "spare" in the fusebox. But I ripped that out and used the "spare" circuit to run the transceiver instead. On the other hand, where the van had originally had a hot water system for making hot drinks that was removed before it came into our hands, a 50A fused circuit terminated in a large SB50 Anderson connector.

I had nothing that would plug into such a socket, but did want to plug in things such as:

  • Chargers for various kinds of batteries I use
  • USB sockets for charging phones
  • An inverter to run things I don't have DC power supplies for
  • Amateur radio equipment (which usually runs at 12v from 30A Anderson Powerpole connectors)

So the solution was obvious: Make a Thing that plugs into the 50A socket, and then itself has lots of different sockets on so I can plug stuff in. Desirable extra features are:

  • Individually fusing all those outputs, as if most of them pulled 50A in a short circuit (which the upstream circuit can provide) it probably wouldn't end well.
  • Integral voltmeter so I can check the battery status.
  • Usable in other off-grid power situations as well.
  • A commonning point for RF grounds for antennas and ground stakes and stuff for radio gear.

The design

So I settled on the following design:

  • SB50 connector on the end of a few metres of nice flexible 8AWG silicone-insulated cable, to plug into the van.
  • Incoming +ve splits into an eight-way blade fuse box I had lying around
  • Two lighter sockets, for legacy devices.
  • A panel-mounting 12v-fed USB charger, with two outlets (with a power switch, as it draws a tiny idle current even when not in use).
  • A voltmeter, powered through a pushbutton so it's not draining the battery when not in use (I ran this from the same fuse as the USB charger).
  • A set of binding posts, for attaching arbitrary wires or banana plugs (also useful as a power INLET by hooking up my bench PSU in the workshop).
  • Four 30A Powerpole sockets.
  • Four banana plug sockets for RF earthing, joined together, with a switch to join them to the -ve DC power line (I can turn it on to bind RF earth to DC -ve at the box, or turn it off to break a ground loop if it's bound elsewhere - basically, just fiddle with the switch and see which produces less noise in the current situation).
  • Every output has a ceramic 100nF filter capacitor in parallel across it, to try and cut down on power line noise.

Then, as the supporting cast:

  • A set of battery clamps hooked up to another SB50 via a 50A fuse (plus a single Powerpole connector on a 20A fuse in parallel so I can plug small stuff in directly) so I can also run the system away from the van, from an old car battery in my possession, or nicer deep-cycle batteries I might own in future.
  • A powerpole connector with a 5A fuse hooked up to a little 1.2Ah sealed lead acid battery I happened to have lying around, so I can run the system away from the van without lugging a huge battery around at all, for small loads only.

Building it

Electrically, the system is dead simple. But mechanically, fitting it all in the box and making it sturdy enough to survive camping trips was challenging.

  • Cables capable of carrying 50A without a problem are bulky
  • I didn't have panel-mount Powerpole connectors, so needed to improvise.
  • The fuse box I had just had spade terminals for each end of each fuse, without a common busbar.
  • The fuse box was meant for mounting to a bulkhead; I wanted the fuses to be accessible from outside the box, while keeping all the spade terminals inside the box so no live stuff was easily pokable.

I dealt with the latter point by cutting a rectangular hole in the front panel so that fuses could stick up, while the electrical connections where beneath the front panel. Long screws through the front panel went down through the mounting holes on the fuse box that should have mounted it to a bulkhead, and a nut on either side of the mounting flange held the fuse box in place at a fixed distance behind the front panel so the fuses stuck out enough to be easily accessed, while the spade terminals were kept amply away from the front panel. I covered the back of it in insulating tape, just in case.

To common the positive connection in, I crimped a massive ring terminal onto the incoming positive wire (I had to buy a special massive hex crimper to do this!), and bolted it to a strip of thick copper I cut to size. I drilled eight holes in it such that I could pull the insulation off of eight female spade terminals and solder them into the holes, then press the entire strip onto the spade terminals along the top of the fuse box, thereby commoning them. Lots of insulating tape and heat shrink then covered all the live (and directly connected to the 50A incoming circuit) parts.

For the Powerpole connectors, I 3D printed some mounting places with suitably sized rectangles, then used them as a guide to cut slightly larger holes in the metal case. I had PCB-mounting powerpoles connectors, which I soldered the filter caps directly onto the backs of, then soldered the negative lines together to common them. Wires were soldered onto the common negative and individual positive lines, and protected with heat-shrink.

I then poked the connectors into the holes (they were a push fit) and used generous gobs of Sugru to protect them against being pulled out or - worse - pushed in. Since Sugru is slightly flexible, I increased the rigidity of the setup by using a length of thick steel TIG welding wire across the backs of all the connectors, embedded in the sugru (and electrically isolated from everything).

I couldn't easily fit filter caps onto the lighter sockets and the USB charger, as they used crimped spade terminals, so I made a bank of filter capacitors fitted to a screw terminal block on the front panel. I glued it in place with epoxy.

Here's a shot of the interior partway through construction, to give you an idea:

12v PDU internals

I put in 15A fuses for the lighter sockets, a 3A fuse for the USB and voltmeter, 10A for the binding posts, and a range of fuses for the powerpoles - 10A, 10A, 20A and 30A.

Finally, to document what each fuse drives, I put a simple schematic of the circuit on the outside - by drawing lines with a permanent marker from each fuse to its load (going via the switch in the case of the USB outlet).

The finished product

Once all those fiddly details had been addressed, and many many crimp connections made, I was delighted to find that the box would close with only gentle pressure!

I carefully tested it for short circuits with a meter and, none found, gingerly plugged it into my bench PSU through the binding posts on the front and crept the current limit up from zero... it didn't explode!

So, I plugged the small sealed lead-acid battery into a Powerpole socket and tested the internal voltmeter:

Testing the internal voltmeter

It doesn't show so well in the nice sunlight we've been having, but that's registering a healthy 12.79v. And not catching fire or exploding.

Next, I plugged it into the car battery using the big SB50 plug, and checked the voltage with my multimeter on the binding posts:

Big battery and DMM

Also all good. Finally, I plugged a USB voltmeter into a USB outlet and turned on the outlet:

USB 5v works nicely

(And, of course, I checked every outlet with the multimeter to make sure everthing was connected properly and all of my fuses were good).

So, with testing complete, it was time to put it to work. I was due to check the tyre pressures on the van, so I plugged the SB50 into that auxiliary power socket that started this whole adventure, and plugged my tyre compressor thingy into a lighter socket, and did all the tyres - after quickly checking how the auxiliary batteries were doing, as I'd not driven the van in weeks:

Active in the van

The pump actually draws eight amps according to the label on the underneath, so this was a test of the system under non-trivial current. It still didn't catch fire.

Things I'd do differently

  • Use proper powerpole panel mounting outlets. Doing it myself was skanky.
  • Put a handle on the thing. As the surface is so covered in sockets and things, it's not actually easy to hold it. Fine when it's sat on a surface, which is what I designed for, but carrying it around feels ungainly.

What next?

I've already got a 240v AC inverter and various chargers with Powerpole connectors, but I want a few more Powerpole accessories:

  • Lighting strips on hooks, so I can set this up inside a tent and light the tent (while also charging all my batteries). I've ordered some cheap 12v LED light strips; I'll put cables with Powerpole connectors on them.
  • A plugtop 12v mains PSU, so I can run this lot from a wall socket easily (for small loads).
  • A DC-DC 12v battery charger, so I can charge my car battery and my little sealed battery from the van's auxiliary power system (just wiring 12v batteries to each other isn't a good way of charging them...) or, in an emergency, charge the van's starter battery from the auxiliary power system.
  • A portable solar powered 12v battery charger for free, clean, energy.
  • A boost-converter DC power supply for my laptop, so I can run it without the wasteful step of running an inverter to generate 240v AC for my laptop charger to drop back down to 18v DC.

WordPress Themes

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