This website is not masterful. It is devoted to things
I do either because they need doing, or because I enjoy doing them,
and which someone else might possibly want to do. Perhaps if my
mistakes are included here in enough detail someone else might not
make them…
I am not an engineer, or a software developer, or a mechanic, or a
carpenter, or a bookbinder, or anything else I might pretend to be on
these pages. I am just an Amateur, but in real life I’m a PhD student
in Theology. Except insofar as the aformentioned things I am not come
in to it, this is unlikely to be apparent here.
This website is purely static, and is the successor to a wordpress
blog.
PdfJam: for more than just pdfs
Posted on November 25, 2018
(Last modified on October 6, 2020)
|
Can we take a moment to remark on how wonderfully useful
PdfJam is? Behind
the scenes it’s just LaTeX. Thus you might be surprised to notice
that
pdfnup --nup 1x1 --paper a5paper --no-landscape image.png
Is an excellent way to turn an image—say, a bunch of screenshots of a
page which you concatenated with
convert image1.png image2.png image3.png -append image.png
Into (say) an a5 pdf, ready to be turned into a full-length pdf with
[Read More]Bicycle Stand
Posted on November 7, 2018
(Last modified on August 13, 2021)
|
After a few months of balancing my bicycle between two walls where
once, it would seem, was a pantry, it got too annoying. Ideally one
would like some kind of stand to hold the bike out the way,
vertically. The internet turns up
many
such designs. After a trip around the rather poor selection of wood
available at B&Q (the only place open), I settled on something
slightly different—an L-shaped half-lapped frame with wooden chocks to
space it, and the bicycle balanced with just a small inward turning
moment counteracted by its own weight.
[Read More]Napkin Rings
Posted on October 26, 2018
(Last modified on October 6, 2020)
|
One expects a student’s life to have a certain ascesis to it. One,
for instance, does not buy rings for one’s napkin, one makes them.
And so I procured some cord (the seller considered me carefully and
then said that I had a face which permitted me to indulge in sailing,
which in turn justified buying cord to tie knots—‘Sailors fiddle’, she
said approvingly; though I cannot play the violin). And I procured a
helpful video on the tying of 3-lead 8-bight Turks Heads, because I
can never remember any of these fancy knots. Yet being a student is no
cause for shoddy workmanship. It seems I cannot recognise cotton, for
I tried a butane backsplice. But lo! cotton does not melt. So the
question is, how small a sailmaker’s whipping can you
make?
[Read More]Clap-clap switch
Posted on September 19, 2018
(Last modified on October 5, 2020)
|
I’ve always thought of those clap-activated switches as a bit of a
gimmick—after all, you can always just move the lightswitch if it’s
that hard to get at. But currently my mother is hobbling around on
crutches, and it suddenly struck me that turning the uplighter on from
the doorway would be handy. A rummage through the junkbox found a
board—I think from an old washing machine—full of relays, and 5v
relays at that, so no need for a voltage multiplier to turn the relay
on. I also found an old ‘usb charger’ rated at 1A 4.2V (?!), which is
thankfully enough to turn on the relay.
[Read More]ChuffChuff (cheaply)
Posted on August 29, 2018
(Last modified on October 3, 2020)
|
On a rainy day here I wondered exactly when I should book a ticket up
to Durham for another term. Most of the booking websites will help
you, but not much: it’s tiresome to check a few days to see what the
price variation is—and it can be fairly enormous. I was also curious
as to what the long term trends might be: they don’t just seem to go
down. All of which suggested some code to screenscrape all the tickets
from somewhere and analyse them. It seems the national rail website
encodes the query straight into the url (though not as an http query)
and then sticks the results, in json, in the page served, presumably
for some javascript to parse later. So all we need is to generate the
url:
[Read More]Compiling KiCAD/WxWidgets
Posted on August 13, 2018
(Last modified on October 3, 2020)
|
Since this has, alongside other things, occupied a whole day, I
thought I’d put it up here in case anyone else tries. Back in the day
KiCAD had a python scripting console. Currently that would be very
useful: but it’s implemented with gtk2, and everything ships with
wxwidgets compiled against gtk3. So we have to compile wxwidgets,
which is fairly straightforward: get the
sources
compile—except it’s not a ./configure, make, make install job:
rather a python script calls other python scripts, and so on. And of
course there was a problem: a function whose argument might not be a
char buffer throws a format-security error, and the whole thing won’t
work. Normally we’d just edit the GCC flags and set
-Wno-format-security
, but how to do that here? I spent ages ag-ing
around the sources trying to find out where the python code actually
called gcc, and was about to give up. Then I thought of environment
variables. In fish (which is not quite bash-compatible) we do:
[Read More]Basic Counter
Posted on August 2, 2018
(Last modified on August 13, 2021)
|
Now that we have a working counter and display the next thing to look
at is the timebase. The timebase I built when first working on this
counter is odd. It uses, for some reason, a 3.2768MHz crystal divided
by (2^16 * 10n) to get a gate pulse which is a multiple of 1s, then
further divided and decoded by a 3-to-8 decoder to generate pulses
which latch the counter onto the display, and reset the counters.
This much was copied from
EMRFD
but without the intelligence that excellent book expects: obviously,
this solution is fine for a quick gate but highly tedious for the long
gates I decided to add, as well as being useless for
pulse-width-counting, which I wanted to make it do like G0UPL’s
counter—the other project I
copied rather blindly. I’d be much better off with a 10 or 20MHz
crystal and drop the needless 2^16 counter. But more on that later
when I finish it.
[Read More]'Off and on again' remotely
Posted on August 2, 2018
(Last modified on August 13, 2021)
|
The internet in Durham, which was allowing me to use the workstation
there remotely, has gone down; support tell me to ’turn it off and on
again’. But obviously I can’t do that remotely. Ah well, it wasn’t
really needed. But what if it were? I’ve run servers over
unreliable wifi links with good uptime before, with a failsafe script
which rebooted everything if it couldn’t ping the gateway for too
long—and looking at the logs, sometimes it was needed. But I can’t
reboot the router (and though I’ll replace it, there’s little
opensource DSL firmware, so I’m never going to be able to reboot
the modem). So what we need is the remote equivalent of pulling the
plug out and putting it back in again. I have a few of those Poor
Man’s Rasberry
Pi boards
lying around; one could surely be made to pulse a relay if it can’t
ping after a while? But the only relays I have (mainly rescued from a
faulty boiler) are designed for industrial 24v DC. I hunted for a
while and then gave up on finding any 12v relays. Isn’t there a
circuit called a voltage doubler? As usual, SM0VPO has some
information. I was going to use a 555
timer, but that shamed me: I can still build a discrete
multivibrator—it was one of the first circuits I ever built, after
all. But first off the relay inline in an extension cord. Here I
made a completely daft error: the box is about 100% too long, because
I thought the cable exit grommets went the other way round. But
anyhow, here is how to make a box out of hardboard, that most
intractable thing:
[Read More]Display Board
Posted on July 31, 2018
(Last modified on August 13, 2021)
|
I started this peice of test equipment when I was about 15, I think,
built the timebase with enthusiasm, the counting chain with a bit
less, and then wondered how on earth I was to attach the 7-segment
displays. Surely not one wire each?! So the project languished, and
eventually got relegated to the shelf without ever being finished.
All I had was the breadboard and two schematics which nearly
corresponded with what was in front of me:
[Read More]CD Player Line-In
Posted on July 31, 2018
(Last modified on October 5, 2020)
|
This is a very simple project indeed: add a line-in input feeding the
amplifier in my sister’s CD/Tape/Radio, which has much better sound
than the ‘device’ she mainly plays music from. How hard can it be to
find the amplifier IC and feed in directly?
Taking the thing apart was none too hard, and it’s cheap ’90s hardware
so all through-hole and single-sided PCB. I found the mode switch,
traced it back to the amplifier, paid careful attention to the pinouts
and soldered a small cable onto one input, the other end going to a
555 ‘signal generator’ kit I had lying around. Power up: the signal
generator exploded and the lcd backlight died.
[Read More]