Friday, July 30, 2021

Amping it up

Yes we have no bananas today

A few weeks back I decided to try to expand my banana horizons. I saw some "burro bananas" in the produce section and figured sure, why not try them.

I bought one, set it in my fruit bowl and waited for it to ripen.

And waited.

And waited.

In the meantime I looked up some information on them. Some sources said that they were natural, wild bananas. This information is a lie, they are not in any way remotely like natural, wild bananas. Wild bananas are full of seeds surrounded by a starchy membrane. Burro bananas are just another modern, artificial cultivar.

They're also the subject of some sort of weird cult-like pseudo-scientific diet fad, which is just super.

Anyway, after a week of waiting I figured the banana was as ripe as it was gonna get. I peeled it and eated it, and it was unremarkable. It clearly hadn't managed to fully ripen as it was still a bit grassy and firm, and it really didn't bring anything new and exciting to the banana party in terms of flavors. Given it's well over 3x the price of a regular cavendish banana, it gets a hard pass. No thanks.

But I still wanted to try alternative bananas, so I decided to pick up a small bunch of red bananas. This time I did some research beforehand to make sure it wasn't part of another weird diet scam.

Thankfully they seem to be completely normal in terms of crazy weirdo attractions. They're just a different type of banana that's supposedly got a slightly raspberry note to its flavor, along with being sweeter and much smaller than a cavendish.

Again I set them in my fruit bowl and waited for them to ripen.

And waited.

And waited.

Over a week later I finally peel one, and things already aren't looking good. The peel is pretty tough to split away from the flesh, and the insides don't really smell particularly fragrant and fruity.

I take a bite, and it's massively starchy. It tastes like I've got a mouth full of flour, and there's not even a slight hint of sweetness.

I couldn't even manage to eat it, and spat it out. The rest of them went in the trash.

Like, I really want to be adventurous and try new things, but if producers can't put a fruit in my kitchen that actually ripens and doesn't just... sit there unripe and inedible forever, what am I supposed to do?

So it's back to the old cavendish for me. Science better get some kind of mRNA vaccine for panama disease going or something.

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.