Quite a while ago (in the last century nonetheless) my idea of a productive day entailed writing a lot of code, measured by size in any suitable metric.
Lately I’ve been writing less in volume but I realize that I spend a greater time thinking about the problem at hand as a whole and that it happens mostly in the background while I’m doing something else. By the time I’m again at the workstation everything falls into place.
Also, when stepping aside and contemplating whatever I engineered I can’t help to feel anything but pride. Perhaps except for the documentation I build things from the get go thinking of what I would like to have were I a library user, on terms of building blocks.
During the last two weeks I built a library to parse a protocol called LX200 used to control telescopes and I can’t be happier with the result (for now it’s at https://github.com/telescopio-montemayor/python-lx200 ). The first one was a roller coaster, due to some other issues I went back to a night owl schedule and I can’t remember when was the last time I had such prolonged and intense periods of flow. I also taught myself asyncio.
It’s terse, concise, and (mostly) well structured. My former self would’ve made a mess of a state machine tied together with pages of if statements that worked, for sure, but was a pain to extend or correct. Of course looking down the path and leveraging years of experience this things seem obvious now.
A couple of days ago I started to learn FreeCAD, mostly for its FEM analysis mode and to build a couple of construction plans.
I made another part of the cable trays for our comms closet. Initially I wanted to use FreeCAD for that but at the end it was faster to do a bit of trig and sketch the cuts on paper. It’s held in place with a couple of rivets. I also added a layer of pvc to shield the cables from the metal edges. Fits like a glove.
I also started to build a steel support for one of the walls. We made a big opening for cables and I’m a bit uneasy about the lack of support.
These doors were waiting a long time to be installed. Now this looks a bit more professional than before, except that on the opposite side there’s a chunk of wall missing and a lot of dust on the new hole to feed another cable tray.
We have this old scope for the students. It’s been unused for a while as it behaved erratically and then stopped working completely.
After setting the trigger to a more or less sane value I had something on the screen but the controls where flaky. A heavy dose of our deoxit equivalent and twisting it sprang to life. I adjusted the dc offset (drifts a bit while warming up) and matched the channel gains as much as I could and called it a day.
We have a central clock reference used to synchronize experiments among various buildings. It’s not always spot on frequency but most of the time what matters is that its phase is continuous. There’s a network of underground cables that take that signal wherever is needed. Some of them are good despite their age (the youngest being around 10 years old) but others are crumbling and drowned.
On the seismograph building there’s a clock slaved to that signal and sometimes it looses track of it and lags as many as half an hour. Just as an experiment we decided to use the PPS signal out of a small uBlox GPS. A friend made a small module with the gps and an arduino to initialize it and display some ancillary status and I built a simple level shifter that makes a ~12V pulse out of that 3v logic output.
I also worked on the housing for the remote control. I’m using a weather proof junction box. After a bit of fumbling I had all the holes to mount the boards, connectors, indicators and cable glands done.
Then I finished a couple of details on the boards and hooked up everything for a trial run. The buttons and rf sense worked fine. But when I tried the dtmf audio input I got data on the digit outputs but nothing on the interrupt pin.
At first I thought that the module was bad (I accidentally fed it with 12V for a brief moment) and I swapped another with the same result.
I moved both of them on the breadboard and they worked fine. I inserted a bare wire on the socket and every time I touched GND with it I got an interrupt. But when installing the module that pin was stuck low. Which is quite odd.
I probed with the adjacent pins and all appeared open as they should. But there’s an unconnected pad on the other side, and there was a dead short to that. I used a scribing tool to clean up but the short persisted. That other pad, while not connected to anything on my board, was part of the dtmf module and when tied to the interrupt output it loaded it to the point of not being useful anymore.
When etching the board I used some fine steel wool and a strand perhaps stuck on the top side between the socket pins. After unseating the module, arduino and other connectors I charged a cap (around 3300uF) and applied it between the pair of shorted pins. Surely enough there was a spark.
Today I worked on the base mount for that bench. I chose a 20 degree slope (taken from that guide) as I found it comfortably and it’s a round number too.
I fumbled a bit with some pipes but the cuts and copes to build it properly are more demanding than the time I had, so I settled on some channel iron. The math is a lot easier, I just needed to offset one cut by (channel width) * tan(20°) or 2.6 cm.
I’m very pleased with how I managed to make this weld around the corner in one pass: