jes notes Index Gallery . Shaft passers Snap issues

2023-12-02

Last modified: 2023-12-02 22:21:02

< 2023-12-01 2023-12-03 >

Advent of Code

Could have made use of regexes again! Oh man.

Stepper motor clocks

I tried surfacing the paint off the dials, but the deeper I went the worse the colour bleed got:

So I've surfaced it all the way through all of the paint, then I'm going to spray white, engrave again, varnish, wait for it to dry, and then use acrylic paint to fill in the letters with a brush.

Both clocks seem to be losing time, at least a couple of minutes since I synced them about 17 hours ago.

2 minutes in 17 hours is 0.2% slow, which would work out to 2.56 * 1.02 = 2.61 secs per rev.

It's hard to know whether the motors have a slightly incorrect gear ratio, or if I made an error in the train, or if they are still losing steps, or if the grid frequency is low.

Well I can check the train, and it looks correct. 1:25 6:45 6:45 is indeed what is modelled, and that turns 2.56 seconds into 3600 seconds.

So then the motors could be losing steps, or the motors could have incorrect gear ratios, or the grid could be slow.

https://gridwatch.co.uk/frequency is showing a slightly slow grid frequency for yesterday - however I'm using my other stepper motor clock as a reference, so this can't be the discrepancy, else that would run slow as well and they woulds how no error.

So the motors could be losing steps or they could have incorrect ratios. I'm going to try to order some 33uF capacitors, and I'm also going to replace the 9v transformer with the 12v one to see if it helps. I do think the 6.3v clock has lost more time than the 9v one, which does tend to suggest lost steps as the problem.

12.41pm: the beech clock is now on 12v, both clocks synced.

The bamboo clock has a split above the motor:

I will probably want to rectify this with epoxy or something.

Just noticed the capacitors I bought are only rated for 6.3v, so I'm kind of abusing them by driving it at 12v, so I possibly want replacement capacitors anyway.

I can't find anyone selling these high-value ceramic capacitors :(. Am I searching for the wrong thing? Maybe I just have to go Digi-Key and pay for the postage. I've done that.

It just occurred to me that I should have bought several different values of capacitor to amortise the postage cost, oh well.

I'm going to experiment with darkening the text on the dial I made for the first clock. Emma has given me some watercolour paints that come in a tube, and I'm going to try to paint these into the letters and then wipe the excess off.

Before:

After:

This is loads better than the spraypaint method, I think my watercolour wants to be a bit thicker though. And I also probably want to make sure I have a smooth layer of white paint and a healthy coat of lacquer over it, to stop the watercolour from soaking into the irregularities.

I'm using a paper towel to dab off the worst of the water, then a damp paper towel to wipe over the surface to clean off the white area.

I'm happy with the process, but the area around 4 and 5 o'clock is not engraved very deep here, and my paint is probably too thin. Also the area just after 6 o'clock is bad because I was too hasty with the white paint. So I think it will work a bit better on the new dials as long as the white surface is prepared well enough.

SCAMP

I'm going to add some features to the regex library. In fact maybe a good plan is to rewrite today's solution using the regex library, and then implement enough of the regex library for it to actually work.

One particular feature I need is to re-run the previous match, but find the next match in the string, so I probably want to expose the full matched substring, as well as exposing the actual indices instead of just the strings.

Maybe I make it possible to re-run the previous match on the next bit of string by running the match on recap(0)? If recap() doesn't automatically zero out the end of the capture.

I keep typing things like \d in regex strings and it turns into just a "d", I should make this a warning from the compiler/interpreter.

Some good progress made tonight, it now supports most of the things I'd expect from a regex, the main issues are:

< 2023-12-01 2023-12-03 >