Latest geek reads

Some of the things I’ve read/watched lately to sharpen my skills:

Power off.

Today I replaced a couple of quick hacks with InfluxDB and Chronograf.

I like things that run without breaking:

# supervisorctl
carbon      RUNNING   pid 1415, uptime 207 days,  19:49:57
graphite    RUNNING   pid 1419, uptime 207 days, 19:49:57
icecast     RUNNING   pid 24419, uptime 32 days, 1:11:18

Boot / No Boot

Today while cleaning I found an old stm32 board carrying an STM32F030F4P6.

Turns out that PlatformIO supports it so just for fun I tried to blink some lights.

I couldn’t find my stlink at home but openocd can use a buspirate as a programmer.

It took a while to upload but after that I was able to launch gdb.

And the light was dead.

Strangely enough poking at the memory showed that the code indeed was there. After a long pause to think I noticed that the boot 0 jumper was misplaced.

The lights flashed and there was much rejoicing.

Hey, I wrote an assembler.

(It was about time I interrupted a never ending pile of drafts with something)

So, for a bit more than a month I’ve been attending a seminar on VHDL microcontroller design.

One of the workshops involved doing some simple exercises on eval boards. While the overall instruction set is small (fits on less than a page) the idea of programming and then assembling the sources using pencil and paper wasn’t very appealing at the moment.

It sure is a fun way to keep the mind fresh but given time constraints I couldn’t cope with such a long debugging cycle.

And… The obvious path was to build a tool.

I reused parts of python-lx200 because smart data structures and dumb code are nice. Most of this could be implemented with M4 too, perhaps for another code golf session.

A couple of years ago I’d probably tried to use Bison and Flex but doubt that I could manage something like this in just a handful of hours during the weekend.

There are some rough edges but as it is it supports labels, variable definitions and emits a valid IHEX file. I made a couple of dumb mistakes but they were really evident when looking at what Quartus made of the output file.

I’m quite proud of the result, I don’t know when was the last time I had so much fun doing a one off project, even if it wouldn’t be used anymore after the seminar.

The source code lives here:


This year I haven’t read as many books as others at this point.

My list so far has:

  • “Las neuronas de Dios” by Diego Golombek
  • “Effetti personali” by Francesca Duranti
  • “Blonde’s requien” by Raymond Marshall / James H. Chase
  • “The terminal Man” by Michael Crichton
  • “La Mala Fama” by Benchi Calligo
  • “La Otra Orilla” by Raúl Filgueira
  • “Sacrificios en Días Santos” by Antonio Dal Masetto
  • “Justine, or The Misfortunes of Virtue” and “La Marquise de Gange” by Donatien Alphonse François de Sade. Horrible Spanish translations. The ones I remember in English were better but I should try next time with the original in French.

And on the queue:

  • “Consciousness and the Brain” by Stanislas Dehaene
  • “The Psychology of Selling”, “Master Your Time, Master Your Life”, “Kiss that Frog” and “Eat that frog!” by Brian Tracy.
  • “What Color Is Your Parachute” by Richard Bolles.
  • “Management – Tasks, Responsibilities, Practices” by Peter Drucker
  • “Tras la crisis, El nuevo rumbo de la política económica y laboral en Argentina y su impacto” by Damill, Frenkel y Maurizio

Name plate and tags

Well the remote control for our transmitter is officially finished. Today as a last detail I built a couple of name tags for the cables and a bigger plate to mount on the front panel.

They are not only for aesthetic purposes but also to keep things where they should be, as sometimes they drift apart with strangers.

I cut some pieces from a scrap lamp and used the alphabet punch on them. They certainly look better with a small touch of permanent marker.

I like how they lay on the cables. All of this gives me an old time vibe feeling.

Metal name tags installed on audio and rf cables

Sunday worklog

Today I started to build the rope guides for the lightning fixture. I have some nice ground rods from a textile machine that are perfect for this.

Rope guide with rollers

On the evening I went to Futura and cleaned up a bit the stage, moving most of it to one place:

The Museum Corner at Futura

Then I started to install real cable trays instead of our improvised version with halves of water pipes. I need to cut a small section with a special bend to accommodate the opening on the wall.

Cable trays

I emptied most of the rack cabinet and installed the patchbay I built earlier. I had to drill and tap another set of holes as the power outlet interfered with the movement.

I also finished that small table:


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.

Fixing a Hitachi V212 oscilloscope

Sunday work log

Today I worked mostly on that remote control for our transmitter and on a simple pulse conditioner for a clock distribution system on our university.

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.

And from then on everything worked as intended.

DTMF Remote control and sequencer

Many years ago I built a remote control for our transmitter. It was pretty simple, just a dtmf decoder rescued from an old answering machine.

It served us well for a long time, however it was lost when we moved to a new location.

For the last couple of weeks I spent a while polishing the firmware and making new boards in KiCad. The original was very crude, just a simple on/off panel and delayed power sequence.

This one adds an RF sense and automatic restart, so if one of our amplifiers bails out on a power dropout we don’t have to do anything about it.

Yesterday I etched the boards. I ran out of toner and had to ask a friend to print the transfers. They came horrible but work fine nevertheless.

It’s amazing that nowadays buying an arduino and a preassembled dtmf decoder is cheaper than the single chips (and not counting the time to layout a more complex board).

All the design files are here:

DTMF remote

Dumpster heaven

If there’s a heaven I think I visited it today.

After running a couple of errands early in the morning I headed to Lisandro Olmos on the outside of the City to buy some scrap metal for my welding classes.

A couple of members of the group said good things about Grúas Mársico so I went there, it was also a good opportunity to travel a bit on this part, as I don’t know almost anything about it.

As I entered the warehouse I became speechless. There are shelves that extend up to the roof with parts from all kind of machines neatly organized on one side. On the other pieces of metal plate and tubing. Some big planers, milling machines and spot welders among them. And on the background, the tallest pile of industrial waste I ever seen in person. All of this on sale by weight save for a couple of weird stuff.

The shop was run by a very nice lady and her brother. This morning I only bought some iron but the next time I come around I’ll bring a small truck to pick some very , very interesting stuff.

Fixing an inverter welder

Today while working on the rack closet the welder died on me for no apparent reason. But, after power off it made a couple of noises and the fan ran for a moment.

For being a Chinese machine it actually looks quite good and neat on the inside. The boards have conformal coating and just a tad of flux residue on some pads. The only thing out of place was a blob of solder on a header instead of a jumper.

I made a couple of measurements, the high voltage section was fine but the control supply was totally dead, except for a brief moment when turning off the main switch. Traced back from that board until finding a small block with a forward converter (kinda odd, I expected a flyback). The only component with bad readings was the recovery diode. I swapped in an UF4007 and at the next flick it was alive again.

Of all the things that could go wrong with a welder on novice hands this was not expected.