Week 57: The star is called Wormwood
I had a bit of a Spın̈al Tap moment this week. I wanted to tidy up my soldering tools, so I ordered a small toolbox. It’s one thing to see it advertised as 12.5”. It’s quite another to receive the tiny box, open it, and realise that the usable volume is much less than the length as measured at its longest point would indicate. Now I still have a mess plus a box that’s too small. It might be good for holding sewing stuff instead: it’s not really worth the hassle of returning something so cheap.
L— got cheap NHS discount tickets to see Matilda, so we went with a third friend on Thursday night. Neither of us had any particular expectations – it’s a musical based on a children’s book! – but it was really very good. The story is charming, entertaining, funny, and modernised from what I remember of the book. The choreography was superb. The staging was ingenious: an entire classroom of desks and chairs emerges from and disappears back into the floor several times. However, it felt to me uncomfortably outdated that Miss Trunchbull is played for laughs by a man, dressed up in prosthetic bosom and hunchback. It was one of those moments that makes you realise that society has moved on in the past decade.
The play ends with Matilda Wormwood speaking Russian to some Russians, which reminded me that one of the Russian names for wormwood is чернобы́ль, or chernobyl, as any 90s apocalyptic prophecy forum kid knows.
And the third angel sounded, and there fell a great star from heaven, burning as it were a lamp, and it fell upon the third part of the rivers, and upon the fountains of waters; And the name of the star is called Wormwood: and the third part of the waters became wormwood; and many men died of the waters, because they were made bitter. — Rev 8:10-11
I still haven’t watched that Chernobyl disaster TV series. I couldn’t really face it in 2020 when daily life was so miserable. Maybe it’s time.
We replaced our hot water pot with the identical model. It lasted us many years, but there’s a limit to how much hard London water anything can survive. The lid catch broke a long time ago, but the final blow was the length of time that it was taking for water to come out of the dispenser.
One thing we couldn’t do was to go back to a regular kettle. When you’re used to having boiling water immediately, waiting for water to boil is a big step backwards.
I have a new favourite YouTube channel to keep me company while I’m debugging obtuse tests: Wes Lee Music Repair. A man bashes the dents out of apparently-ruined brass instruments. Until you’ve seen it, it’s hard to believe that these crumpled shapes can be restored into working instruments, but they can, and he does.
I did indeed make a minor mistake when copying over resistor values for my Pipistrelle eurorack module. It’s not too serious: a voltage divider that provides the output offset voltage (to convert 0–3.3V to a bipolar voltage) should be a 3:1 ratio, but it’s actually 330kΩ:200kΩ. I could fix it by replacing the 200kΩ resistor with 110kΩ, but I don’t have any, so on my test module I replaced both with 300kΩ and 100kΩ. It’s easy enough, especially before all the larger through-hole components are in place, and replacing one or two resistors is still much less effort than soldering everything by hand.
The other problem that was confusing me was that all my outputs were being truncated, even though my first tests had been able to use the full range. The problem was that I’d set up the analogue output pin as an output pin. Sounds sensible, doesn’t it? Until you realise that that means a pull-up resistor which prevents the output from getting any higher than about 2.2V.
I implemented a calibration routine that I’m pleased with. The module doesn’t have any buttons or state indicators, deliberately, because I prefer WYSIWYG modules to ones whose behaviour depends on state. But it has an LED, an output, and three inputs, which is enough to implement a calibration handshake. Here’s mine:
- Turn all the potentiometers fully anticlockwise
- Connect output to input CV1
- Power on
The first thing the initialisation code does is to check the potentiometers. If they’re all anticlockwise, it sends a high output, checks if input CV1 is high, sends a low output and checks for low, and, if they are, it knows that the two are connected. Calibration then proceeds:
- Light flashes
- Send 1V to the V/oct input
- Turn potentiometer A fully clockwise
- Light flashes with a double pulse
- Send 3V to the V/oct input
- Turn potentiometer B fully clockwise
- Calibration values are stored and normal startup resumes
Once you know what readings two voltages correspond to, you can calculate the gradient and offset and turn any reading into a voltage. The frequency is then f * 2v where f is the lowest frequency of the oscillator.
I’ve successfully implemented a square wave oscillator, because that’s the simplest possible to calculate. Even though 48MHz sounds fast, there’s not a huge time budget for each sample. At 32kHz, there are 1500 operations per cycle before considering overheads, and floating-point calculations are slow. But that’s all a question of optimisation. It works, and it plays in tune, so I know where to go from here.