Tuesday, July 20, 2021

Nuu Shuuz

I've put a fair few miles on Crimson Ghost since I got it, and there were a fair few miles put on before then too. As with all things in life, the tires were impermanent and only shared a short but fulfilling life with us.

To make a long story short, the knobs on the tires were starting to get chewed up, and it was compromising traction in certain circumstances.

I'd known this for a while, of course, which is why I'd been keeping an eye out for some sales. I managed to pick up a replacement front tire at a discount, but after waiting and waiting I only ever saw the rear at full price. Finally I had to admit that enough was enough, and since I was due for the quarterly sealant refresh this month, I just ponied up and bought the rear at full retail.

The bike had come with a Maxxis DHF in front and a Maxxis Aggressor in the rear. This is a fine all-purpose combination, but it tends to lean towards all-around performance in both wet and dry, whereas 100% of my riding is in the dry. As such, I opted to replace them with a Maxxis Dissector in the front, and a Maxxis Rekon in the rear. This tire pair is (supposedly) roughly equivalent in grip in dry conditions, while shedding a fair bit of weight and picking up some improvements in rolling resistance.

They don't look half bad neither.

As for the old tires, I decided that it'd be a good idea to keep them around as emergency spares, just in case I accidentally damage one of the new ones beyond repair and need something to tide me over while I wait for another sale. As such, I'm currently giving them a bath to wash the old sealant out of them.

I think I'll give the new rubber a test run tomorrow morning around my XC loop. I usually ride Blackbirb for that since it's just flat, smooth dirt trails but it's also really close to home so if anything alarming happens with these tires it'll be a short walk back to fix things.

Saturday, July 17, 2021

Surface-mount CMOS

A quick update today on my TV timer project (which I'm building to automatically turn my security cam TV on and off based on various inputs). I finally got around to ordering up some CMOS 556 chips to replace the TTL 556, the latter of which requires 5v, has relatively low bandwidth, and crowbars the VCC line every time it changes states.

The new chips, however, did not come in 14-DIP packaging, but rather in SOP-14 surface mount. This meant I had to put my surface mount adapters to work for the first time, and the result I think looks pretty decent.

I had minor concerns about flowing the solder joints with standard solder rather than a solder/flux paste mix, but it turned out not to be an issue. I just tinned up the pads, slathered it with flux, and reflowed it with my hot air gun.

I did have a slight mix-up when I reinstalled the chip, however, as I didn't pay enough attention to its orientation and accidentally plugged it in backwards. This lead to inverting the VDD and GND pins, though surprisingly not only did the chip not lose its magic smoke, but it even gave some appearances of working correctly (despite all the rest of the pin connections likewise being incorrect). In fact, the only reason I noticed it was because it seemed to be drawing a rather excessive amount of current from the 3.3v supply.

Thankfully the problem was quick and easy to both identify and correct, and after reinstalling it the right way around the chip seems to be no worse for wear.

It's nice to not have to use the extra mosfets to level shift the output down to 3.3v.

Thursday, July 15, 2021


Plant update time. The Lithodora is...

Technically not yet dead, I guess. I think I might have planted it a bit late and it didn't manage to get established before the dry season hit. I've been giving it some deep soaks this week to see if it perks up a bit.

The Mexican Heather has come back from its transplant stress ok.

It dropped all its leaves and replaced them with much smaller ones, and is back to spitting out tiny purple flowers. I'm guessing I'll see some good growth out of it this coming winter.

The Fuchsia is angry at the world again.

It's hard to figure out what's going on with it because the symptoms for underwatering and overwatering are basically identical. The good news is that it's been through this before and bounced back just fine, so I guess we'll just have to see. I might let it dry out for a week and see what that does.

The baby sage is going all spindly and leafbare again.

But I fully expect that after I prune it back hard this fall it'll come back better than ever again, just like the last time.

The pink lemonade blueberry is looking surprisingly healthy given it's supposedly intolerant to alkaline soil. It's not growing a ton but is, nonetheless, growing.

It started out pretty smol though so it'll take a year or two before it starts to really shoot up. That should give me enough time to amend the soil with some compost and some more iron sulphate to drop the pH.

The yellow iris in the back has recovered from not putting out any flowers, and is now putting out flowers regularly.

The foliage isn't as green as I'd like but I guess it's happy.

Finally, I seem to have a morning glory popping up in the vegetable patch.

There was a pot in this location previously with a plant that died, which I never bothered to identify. I suspect that this might be sprouting from a remnant of its roots that got out the bottom of the pot.

Saturday, July 10, 2021


So not too long ago I noticed a hum coming from my speakers. Diagnosing a little: turning off the little desktop amplifier driving them caused the hum to go away (naturally), and changing the volume didn't seem to affect the level.

This pointed to an obvious cause: 120hz line noise was getting into the final stage of the amp. Not particularly surprising given that it's just a cheap Chinese unit.

So out came the screwdriver and scope to investigate the source.

Well it can't be the main filter cap, it passed Q. C. so it must be something else.

Despite the schmoo on the board, the main cap hadn't actually emptied its bowels of all it contained. I think the source of that stain was a connector that sits just above it, which had some similar looking retaining compound on it.

I did remove the cap to test it though, and it seemed to still be holding close to the value printed on the label.

Of course, a little more investigation revealed that the power supply is incredibly primitive: the AC comes in through a simple mains transformer to the white connector near the bottom of the above photo, then goes through a bridge rectifier (the black rectangular component just above and to the left), before getting filtered through the big capacitater in the middle. And that's it, no regulation at all.

So that means that the power rail has a constant sawtooth ripple to it, as the main capacitor gets charged up at the peak of the rectified input, then sags back down again as the input voltage falls below forward conduction on the diodes. The scope says it's on the order of 300mv on a 25-ish volt DC supply. This same ripple is present at the power pins of the dual power op-amp (visible just above the rectifier in the photo at the very left edge), so it's not like it's disappearing somewhere along the way.

With this in mind, the first thing I'm gonna try is replacing the 2200µF main cap with a 3300µF, which I can get in roughly the same size and voltage rating. If that doesn't work (and it may well not) then the next step will be to scoop the transformer out and replace it with a 24v switching supply, which I can just solder straight to the DC side of the rectifier (or remove the rectifier entirely and use it somewhere else maybe).

Honestly I'd prefer to jump straight to plan B, but with parts availability like it is these days, I'm looking at something like a 20wk wait time for a power supply. Ugh.

So let's hope a new capacitato does the job.

Wednesday, July 7, 2021

Mad Scientist Lair

 My nerd cave is starting to shape up nicely.

Some notable recent additions: a light blue silicone soldering mat (keeps you from burning holes in the benchtop), a little brass scrubby holder for wiping off the soldering iron, a hot air rework gun, a bino microscope for inspecting tiny components, a signal generator (I may have covered some of these in previous posts), and finally a 4-channel scope: a Siglent 1104 X-E.

It took me quite a while to settle on which scope to get, but in the end I settled on this 4-channel model, specifically because it has the option to later upgrade it to an MSO with the addition of a logic analyzer module.

I've still got more stuff on the short list to buy, but things are coming along quite nicely.

New Shoes

The rear tires on the PedoVan weren't worn out down to the cords, but they'd been on there long enough that the sidewalls were starting to crack, and the tread rubber was getting pretty hard. I'd put off changing them for long enough, and decided that since I had an oil change coming up, now would finally be the time to swap them out.

I decided to go with an all-terrain tire given my ambitions for dragging the van into the great unknowns of national forest and BLM lands, and the BFG KO2 tires got great marks from other van owners for combining respectable dirt performance with incredibly good highway manners.

They don't look half bad either. The wheels, on the other hand, could probably use a fresh coat of paint.

Ah well, another thing to add to the list.

He's Just Resting

I was waiting around to catch a ride over to the dealership to pick up the PedoVan from service when I noticed a western fence lizard chilling out on my driveway.

Usually they're pretty skittish and will dart away when you get too close, but this one seemed pretty happy to just hang out here soaking up the sun.

When I got back from the dealership it was still in the same spot though, which I found curious.

Ah, yes, I guess he won't be waking up from that nap.

Sunday, July 4, 2021


One of the puzzles that vexes those who dabble in electronics is what to do with a capacitato that's holding a charge.

Some might say the best use is to throw it at a friend/enemy in the hopes that they'll touch both leads when they catch it, thus discharging it. Others will say to lick the terminals yourself to get that "tastes like a lot more than 9 volts" experience.

But eventually once the novelty of those solutions wear off, most folk build one of these out of an alligator clip test lead and a 5w 20kΩ resistor.

Not such a big fan anymore

So I finally got around to cracking open the ceiling fan with the noisy bearing. I expected it to be a reasonably simple operation, with a few possible pitfalls.

One of those potential pitfalls was if the bearings were pressed into the motor rather than just simply retained by the motor's construction.

Of course, as it would happen, that turned out to be the case. And with the way the motor was constructed, it would be nearly impossible to press the bearings back out without completely destroying the motor.

I knew that these weren't designed for serviceability but I at least expected it to still be possible to struggle through a full disassembly and reassembly. I suppose my hopes had been too high.

So what's to become of the second ceiling fan now?

It will go on an adventure. Hopefully it will find a home with a family less concerned with their ceiling fans rattling.

Saturday, July 3, 2021

Smaller Ambitions

So I think it's time for me to scale down my ambitions a bit.

Physically, of course. In the upper left we can see my security TV auto on/off circuit as it stood so far, with the blue rectangle in the middle being the microcontroller board. On the bottom right we can see the start of the new circuit I'm cooking up, with the silver square at the bottom being the microcontroller board.

Much smaller.

The new board is a "Seeeduino Xiao", which is a fancy name for a SAMD21 chip on a 14-pin breakout board.

I didn't bother putting the sticker on mine, since the sticker is spectacularly tiny and also not printed at very high resolution, so it's a bit blurry and pointless.

I made this change for two reasons. The first is that the Nano board I was using previously had way more IO lines than I actually needed for this project, and the second is that the ATMega328p chip it uses was designed by a lunatic. The AVR architecture has really peculiar external interrupt handling, a surprising shortage of timer/counters, and a shockingly slow CPU core compared to the SAMD21. I'm sure there's other differences as well but these are the main points that convinced me to switch.

For reference, this is how small the new board is.

One of the other changes I decided to make was adding an OLED display, given that they're only about $2 each. I figure it'll be nice to have a little status indication, and drawing little glowing pictures is gonna be more fun than just making single LEDs blink.

Of course it's also very tiny, so I'll need to make sure I don't get too carried away with how much I try to cram onto the display.

So now begins the task of transplanting the supporting circuitry from the old board to the new, starting with the 556 debouncing circuit for the switch input.

This was the most complex bit in terms of part count, though the principle of operation is fairly straightforward. It's just a pair of one-shot timers, after all.

But transplanting this circuit also came with some new challenges. The old board ran on a 5v supply and was happy to take 5v inputs as a result. The new board runs on a 3.3v supply because it's not stuck in the stone age. The NE556, however, is stuck in the stone age and has a minimum supply voltage of 4.5v, essentially restricting it to 5v (and up) operation.

Now just powering up the 556 wasn't going to be a problem because the board comes with a 5v supply pin, but getting those 5v signals into the board meant I'd need to level shift them down to 3.3 volts.

I decided to do this by inverting each of the signals through a common-source open-drain BS170 mosfet, using the internal pull-up resistors on the microcontroller to terminate them.

Why a mosfet though? Why not a resistor divider or a bipolar transistor?

The answer is failure modes. Suppose we hook a resistor divider up so that the pin input voltage is taken part way between the 556 output and ground. Everything goes fine, unless the ground connection comes loose, at which point the full 5v gets blasted into the microcontroller and fries the chip. Not failsafe.

The same story happens with a bipolar transistor: everything is fine and dandy so long as the emitter is tied to ground, but if the ground connection is cut then the base-collector junction will become forward biased and the microcontroller again gets fried with (a bit less than) 5v.

The mosfet solution is safe from this, though, as its gate pin is electrically isolated from the source and drain. If the source pin becomes disconnected, then the drain simply floats. There's no possibility of the gate voltage passing through the device unless the transistor itself is destroyed and shorted out internally.

Also I just happen to like mosfets, I think they're kind of under appreciated.

Now with that said I will most likely be sticking with a bipolar transistor for driving the IR LED. Since the LED is modulated at a relatively high carrier frequency, the gate capacitance of a logic level mosfet like the BS170 might load the microcontroller's output pin excessively, and while there's certainly plenty of ways to get around that I don't really feel like adding extra components to compensate when I can just avoid the problem altogether by using a BJT.

Wednesday, June 30, 2021

A Capacity for Cooling

I've noticed every now and then that the compressor on my AC has a bit of trouble starting up. Like, the fan will come on, and it'll try to start the compressor but it won't quite turn over. Then maybe a minute later it'll re-try to start the compressor and it'll kick on just fine.

My first thought was that the starting capacitater might be going soft, given that the unit is going on 20-some years old now. But I pulled the electrical cover off and gave it a check, and it was actually still reading just fine. A touch low on the compressor side but still well within reasonable values.

For future reference, it's a 50/5 µF capacitato. (The 50 side is for the compressor, the 5 for the fan, since the latter is a much smaller motor with lower starting current requirements)

It would have been nice if it were the problem, given that a replacement costs about $15 and takes all of 10 minutes to install.

Oh well, I shall meditate on this a while. The cooling works for now, so it's no big emergency.

Thursday, June 24, 2021

I Have Many Fans

Meet the new fan, same as the old fan.

The old fan worked just fine, but it had a minor issue: one of the bearings was faulty and started making rattly bearing noises. This was especially unfortunate since this fan is in my bedroom, and I like to leave it running when I'm sleeping.

Or trying to sleep, as the case may be.

But a quick call to Honeywell, better known as Hong Kong China Electric Appliance LTD, secured a free replacement unit, as the support person I spoke with agreed that ceiling fans should probably not make this kind of noise.

I didn't have to send the broken unit back, however. They simply invited me to dispose of it as I saw fit.

And so I shall dispose of it, by spending $2 on amazon to order a set of replacement bearings and fixing the problem at its source.

And then I'll have two ceiling fans.

Tuesday, June 22, 2021

A Door, A Bull

Much like (or unlike, as the Mythbusters demonstrated many years ago) a bull in a china shop, I occasionally run into things I don't mean to. Sometimes this means my toe meets the leg of my coffee table, my shin says hello the corner of my bed frame or, in this case, my knee introduces itself violently to the door on my slant-top desk.

That's not quite sitting right. Looking closer...

The hinge-side stile seems to be looking a little worse for wear.

Ah yes, cheap Ikea construction bites again. if this were a quality frame and panel door, there would be a tenon on the rail that would extend all the way through the stile so that this sort of damage would be less likely to happen, due to the long grain keeping the stile from splitting. Much like this haunched mortise and tenon joint illustration that I stole from the internet.

But, well, Ikea.

So on to the fix, which involves first drilling a few worm holes in through the back of the door.

A number 55 drill bit turned out to be the exact right size for injecting the glue, which is the step that came next.

And letting it sit in the clamps for a few hours.

Before finally remounting, much less cracked and crooked than before.

At least until the next time I run into it with my knee.

Monday, June 14, 2021

I bought a 10-pack of 556 timer ICs from a grocery store in china because it's 2021 and I've simply stopped caring

Amazon can lead a person to strange places. Today it lead me to "Gump's grocery", an entirely plausible name for an electronics vendor in the middle kingdom's Shenzhen city.

It lead me there because they were selling the 556 chips for about half the price of any other vendor on Amazon.

My expectations were low, but I was still disappointed.

When the chips arrived, I found that they had simply been shoved into an antistatic ziplock bag without any sort of protection for the pins. As a result, at least half the pins on all the chips were bent. This is not ideal. I didn't take a picture of them in that sorry state because I was a bit frustrated, and instead went straight to unbending all the pins.

Thankfully I was able to straighten them out without any of them breaking off, so that's good.

(I just set them on the breadboard like this for temporary storage, and also to make sure the pins were lined up.)

Now you might notice in the above picture that there are only 9 556 ICs present. Thankfully I did receive 10, the other one is sitting in circuit right now, doing its wibbly-wobbly timey-wimey thing.

I've also officially run out of space on this breadboard, but that's a worry for another time.

Upon installing the first chip, wiring it up, and powering on the controller, I found to my dismay that it was performing in unexpected and erratic ways. Then I remembered that I had the code set up for an active-low signal and the circuit was providing an active-high one now, and after fixing that things worked perfectly.

I even went through and tested all 10 chips in the same circuit (thank goodness for breadboards) and they all somehow passed with flying colors.

Despite very obviously being salvaged from e-waste.

Ah well, I suppose it's environmentally friendly to buy back our trash on Amazon after shipping it over there in the first place for 'disposal'.

Thursday, June 10, 2021

Delightfully Airy

Decided it was high time I jumped on the M1 bandwagon.

Mmm, refurb discount. 16G of RAM and 1TB of HD. Didn't really need that much but the lower option was 8G of RAM and 256GB of HD plus one less graphics core, and I didn't want to regret not getting enough RAM.

Make It Snappy

One of the buckles on one of my motorcycle covers decided that it had too much of this world recently.

Not ideal. Luckily new buckles are pretty cheap and are, additionally, a bit nicer than these bargain basement ones.

It took a bit of doing to replace the one side though. The male portion just threaded on an open-ended strap like you'd normally see, but the female side was sewn into a loop that I had to disassemble and then stitch back together.

Wasn't too bad though, maybe took a half hour of actual work, including hauling out the sewing machine and setting it up.

Saturday, June 5, 2021

Two Weeks of Fitness

Now that my two weeks of vacation is wrapping up, I figured I'd write a quick summary of the outdoor adventures I partook in.

First up, a gravelly loop around RSV, Calero and RCDO. I had initially planned to drop down the far side of the hills in RCDO and try out a trail I hadn't ridden before, but I felt a bit low on steam and decided to turn around at the peak instead. The new trail can wait for another ride.

Speaking of new trails, Wilder Ranch was next on the list. I hadn't been there before and I found it to be a very pleasant day out. For some reason I felt really chill riding the trails there, and I didn't mind just taking my time and taking it easy.

Not every ride was off road though, and I dusted off Purple Haze for a ride down to Chesboro Reservoir, which was basically just a repeat of a ride I'd done previously, but where I'd taken an unexpected break part way up a climb when I noticed that my camera had filled its SD card.

I also scouted out a possible morning ride around Almaden. The ride is nice, but it's a bit too slow to be able to do before work, which I try to limit to 1 hour or less.

I had a doctorb appointment first thing in the morning on Wednesday so I didn't ride the bike that day, but I made up for it with a sweaty hike through Heintz Open Space.

I wrapped things up with a lap around Demo, this time with the aim to work on my jumping a bit. It was a nice day out.

An Enlightening Video

Made the modifications to my LED light fixture that I alluded to in a previous post, and documented the process in video form because why not.

Tuesday, May 25, 2021

A Vacation From Writing Software

 It's nice to take a break from my day to day job writing software, and finally just kick back, relax, and write software.

Today's project is updating my security cam monitor. No changes to the actual cam displays, but rather I'm filling in the space below it that had just been a plain blank white space up until now.

As we can see, it's now a plain black space! And it has a calendar display in it, which I coded up from scratch over the past few days. The current day's highlight is a bit less unreadable in person, thankfully.

We can also see the whole reason I have this display in the first place: to see when packages arrive. Nice.

I still have plans to add a clock and weather widget. I might try knocking one or both of them out this vacation, or I might wait for later. Depends on how bored I get, and how many other projects distract me from this task.

Saturday, May 22, 2021

Yet More Flowery Stuff

 Another garden update, because why not.

First up, the fuchsia is doing well and spitting out some flowers.

So repotting it didn't kill it, I guess. That's nice.

The irises and roses are doing their thing.

I haven't needed to fertilize the rose in a hot minute, so that's nice.

The yarrow is yarrowing along.

It's still got a little ways to go before it's fully filled in along the retaining wall. If I get bored at some point I can take some of the potted ones and dump them in the ground, which I might do as they're probably root bound by now.

The echeveria is sending out its weird alien flower tentacles again.

The only downside is it's planted in a strawberry pot. Never plant things in a strawberry pot, they're just awful.

The blue potato bush is somewhat less dead than normal.

Still pretty ugly though. I'm going to give it a hard pruning this fall to see if that makes it less ugly, or kills it. Either outcome will be fine.

The daikon has gone to seed, but has shown little signs of growing a respectable taproot. I'm going to call this one a bit of a failure.

It really hasn't thrived in this location. I think it needs more sun.

The mysterious elderberry has appeared again. I'm not sure if it'll stay and bloom, or if it'll vanish again.

Either outcome would be fine. It does look a bit weird growing next to the yarrow that I planted because I assumed there was nothing alive left in this pot. (I have since learned to sift the soil in a pot before reusing it)

The yellow iris in the back has finally sent out flower shoots again. For a few years it didn't have any, but they're back now.

This is actually the yellow iris in the front. The flowers on the one in the back aren't open yet, so just picture this, but 40 feet away.

Speaking of the front yard, the salvia is going bonkers. Like the baby sage, it seems to respond really well to hard pruning.

Awkwardly, it's kind of growing over top of the blueberry I planted.

That blueberry is, itself, doing well though. I expect it'll take a year or two to get properly established though.

Curiously I expected it to give me the most trouble out of all the new plantings I did this spring, but so far it's really taken well to living in my yard. I look forward to the birds stealing all the half-ripe blueberries before I get a chance to eat them.

And last but not least, the rosemary is looking lovely.

I mean it doesn't really do much except be green and smell nice.

On a related note, the garden organic fertilization project is making progress this week.

It's nice to have one less thing chewing holes in my fence.