Fixing a toy strimmer

I’m not sure if Strimmer is a brand name. In Hungarian it’s fűkasza and my son has a toy one that lights up green, spins like a real one and makes engine noises when you pull the trigger. Or at least it used to. Now when you pull the trigger it doesn’t spin and only makes a sound sometimes. First I thought he might’ve left it out in the rain but after taking it apart I found out actually the wires had come apart on the inside.

I’m not sure if this is a design fault in the toy or if it’s because of him knocking it on the ground, copying me activating the spring to release more of the string while I’m working. This made the solution clear though, I just had to re-solder the wires. I’d tried this in the past and the results were bad but it worked. This time I tried holding the soldering iron underneath the wires and heating them from the bottom instead of the top. That way, when I tap the solder onto the heated wires it melts onto them instead of getting stuck on to the iron. The results look like this:

Keep in mind I’m an amateur at soldering. Still, it’s much neater than my previous attempts, so I’ll keep this technique. As for the sound only working sometimes, it turned out sometimes the batteries would get lose and come out of place slightly because their enclosure was too big, so I just fixed that by putting a blob of glue tack on them 😀

Modelling a spacer for between trampoline poles

It’s Spring here, the weather is improving and last weekend in Vaszar we put the trampoline back together for the kids to enjoy. Its metal frame has these little black plastic spacers between the legs and the parts that hold the safety net, some of which were damaged or missing. They look like a thick plastic washer with notches on both sides.

Where are you supposed to buy more of these? The trampoline shop? You can probably find them online if you know what to look for but I decided it’d be simpler to make my own. After all, it’s not that complicated, the hole doesn’t need to be threaded and you can simplify the curve into a slope. Here’s a sketch my father-in-law did for me to take home:

As I imagined this in OpenSCAD, the doughnut would be a cylinder with a cylinder missing from the middle of it and then it’d have the sloped notch cut out of the top and the bottom. As I started to write it out I thought instead instead of repeating myself it would be neat to somehow mirror the notch. It’s the same on both the top and the bottom side of the spacer, and in fact it’s also symmetrical along the surface it’s cutting out from. To my surprise there’s no function to duplicate an object over an axis. Issue #4700 on GitHub called it “mirror copy” and that got closed with the comment that this is so simple that everyone should just write it themselves. Right, so now I too (like how many other people) have copy-pasted this implementation of copy_mirror from the GitHub comment… isn’t this what a standard library is for, so that you don’t have to re-write tedious, obvious stuff? Anyway, it just goes:

module copy_mirror(axis) {
    children();
    mirror(axis)
    children();
}

From this I learnt about the children() function which will put the function (aka module)’s children there. We use it twice, the second time it’s mirrored over the given axis, pretty simple.

/* A-B-------C
 *  \        |
 *   E-------D
 */
A=[0,rampH+t];
B=[rampL,rampH+t];
C=[discW/2+t,rampH+t];
D=[discW/2+t,-1];
E=[rampL,0];
polygon([A, B, C, D, E]);

I also wonder how people keep track about which points they’re doing things with in a polygon while they’re putting it together. If you have any cool tips please write me a message. When I had these in-line in the past I lost track of what’s what either shortly after writing it, or in the worst case while I was trying to put it together. Now I had the ID of labeling the points like in a high-school maths problem so that what each one is becomes a bit clearer and the final polygon() call is just enumerating them. The ASCII-art diagram of where the labeled points are reminds me a bit of the branching diagrams from the git manual 🙂

So here’s the plain doughnut:

Then with the cutout I described above:

Then with that mirrored across the Y axis:

And then with that mirrored across the Z axis:

Leading to this final result:

Side view of the spacer design in OpenSCAD, showing the screw hole and the symmetrical cutout where the poles should go

Side view of the spacer design in OpenSCAD

It’s not a very complicated solution at all but here the mirroring was the new (for me) concept I wanted to try out for simplifying my solution and I quite like it. Anyway here’s the whole code:

// Spacer between poles on the trampoline
$fn=30;

discH=12/2;
discW=25;
holeW=7;
rampH=discH-(6/2);
rampL=4.6;
t=0.1; // tolerance

// mirror top-bottom because it's symmetrical
copy_mirror([0,0,1])
difference(){

    // main ring
    cylinder(discH,d=discW);

    // screw hole
    cylinder(discH+t,d=holeW);


    /* A-B-------C
     *  \        |
     *   E-------D <-- instead of a curve, I will make D slightly lower (-1)
     */
    A=[0,rampH+t];
    B=[rampL,rampH+t];
    C=[discW/2+t,rampH+t];
    D=[discW/2+t,-1];
    E=[rampL,0];

    // ramp shape cutout
    #
    copy_mirror([1,0,0]) // mirror on C-D so I only need to draw 1 quarter
    translate([-discW/2+rampL,0,discH-rampH]) // position to the edge
    rotate([90,0,0])
    translate([-rampL,0,-discW/2]) // centre on origin for rotation
    linear_extrude(discW)
    polygon([A, B, C, D, E]);
};

module copy_mirror(axis) {
    children();
    mirror(axis)
    children();
}

One last not on actually printing this, I tried with it oriented 2 different ways knowing that either way it’s going to have overhangs. Well as you can see on the picture below printing it flat looks awful because even after tearing the support material off it’s still very rough and ugly (the one on the left). When printing it on its side you’ve still got some of that, but as you can see on the one on the right, there’s much less of it and the final result looks much more like the original object it was based off.

Of course the design is up on GitHub with my other models.

Hevizibivaly Duathlon, a first-time experience

Last weekend I participated in a Duathlon for the first time, and an interesting one at that: Instead of a cycling stage you’ve got rowing! Every year on 1 March they kick off the spring season in Hévíz by paddling about 10km along a brook starting from the thermal springs and then running back the same way.

Hévíz, or termálvíz literally means thermal water and it’s also the name of the town Hévíz where you can find the lake Hévíz. I was surprised to learn this is the biggest thermal lake in Europe and the second biggest in the world. The name of the race is a play on words in Hungarian because depending on where you break it up it’s either Hévízi bivaly (buffalo from Hévíz) or Hé vízibivaly (hey, water buffalo!), as if you were shouting. Apparently they used to drive water buffalo along the brook to clear out the water weeds.

It seemed like a fun idea to do the race on a tandem SUP. We have a second-hand one that we use with the kids on the Danube in Summer and the race rules don’t forbid two people on the same SUP, although I did get a call from the race organisers to double-check I hadn’t made a mistake filling out the form. All I needed was a teammate. I invited/challenged our local parish priest, Father Attila, to team up for the race; he’s really sporty and seemed like someone who’d be up for the challenge.

Medal with yellow and black graphics resembling a water buffalo and Hungarian text reading: Hevizibivaly Duatlon, evezés, futás, 2025.03.01As the first day of (meteorological) spring after an icy cold winter, it was too cold to go out paddling until the day of the race, so we didn’t have any practice at all at paddling together, which made balancing and steering pretty challenging at first. On the day I ended up going barefoot as the thermal water was pleasantly warm and by the end of the paddling stage we got the synchronised paddling down to a T. The water was really shallow, apparently much shallower than usual, and twice I got knocked down into a kneeling stance when the board’s fin got caught in some weeds. We were the only 2-person team to use a SUP, the rest were in kayaks or canoes, and we ended up being lumped together with the “touring vessels”.

The running stage was particularly tough for me. I’m not really a runner and although I’d run 10k before a few times I didn’t consider I’d start it off tired from holding my body steady on a paddleboard for 2 hours. No problem for Father Attila who didn’t even break a sweat. Okay, it was only 6°C at max, but he also goes for regular runs and is much fitter than me in this regard. Luckily the emphasis of the race is more on fun and several people were even strolling along instead of running, so we didn’t fare too badly despite me being completely out of breath by the end.

All in all it was a great event, pushing quite far out of my comfort zone but with a chilled and fun atmosphere, people cheering each other on during the race and so on. It’s definitely worth trying at least once, even if you’re not a hardcore runner or rower. I met some friends during the race who participate every year and it got me thinking, maybe I’ll sign up next year too… maybe with a bit more practice in advance though. 😉

You can find out more about the race on the Hevizibivaly website or on the Hevizibivaly Facebook page.

FTR, these were the race stats I recorded to Strava/Garmin:
  

Counting digit occurrences in a range

I was asked if I knew an easy way to count how many times digits occur within a range of numbers. For example in the range 10–15, how many times does each digit occur? The numbers 0, 2, 3, 4 & 5 each occur once, and 1 occurs 6 times, that is twice in the number 11, and one in every other number in the range, because the tens all start with a 1. It seemed like an odd request, but it’s for number tags on utility poles, like this one:

There might be several rows of yellow tag numbers on a given utility pole

By Onore Baka Sama – Own work, Public Domain, source

Electricians use these tags to identify the poles and, at least in Hungary, they’re made up of individual plates for each digit, that are screwed on to a larger plate on the pole. If you estimate too few when ordering the digits you’ll run out obviously, and if you order too many you’ll be stuck with a pile of unused digits.

It seemed like a problem that should have a simple mathematical solution to it. Unfortunately, the answers I found on Continue reading

Custom thumbnail generators for audio waveforms and GIMP XCF files

I recently packaged these 3D thumbnailers for Arch Linux and this act inspired me to dig into this topic a bit and make some of my own. First off, what’s a “thumbnailer”? It related to this Free Desktop specification and I’d summarise it as:

A thumbnailer is a program that can generate a small preview image (called “thumbnail”) of a specific file type. File browsers know about thumbnailers by reading configuration from .thumbnailer files which specify which program to call for a specific MIME type, and which arguments to use to get the desired output.

For more details and practical examples of what these files look like and what you can do with them, see this blog post by Radu Zaharia. For most of the 3D thumbnailers I packaged, the thumbnailer programs are small purpose-built scripts, written in Python or Bash, that understand the specified format and how to get a PNG image out of it. The thumbnailer config just specified which order it wants its file input and output arguments in. However, as Radu’s blog post points out these can also be more advanced one-liners using programs you already have installed, so I decided to try that out and this post I’ll cover 2 such examples: Audio & GIMP.

tl;dr: Copy-pastable version at the end of the post Continue reading