High Noon For Daylight Savings Time

The US Senate has approved the “Sunshine Protection Act”, a bill to make Daylight Saving time the default time and do away with the annual time changes. While I can get behind the latter half of this motion, redefining Daylight Saving time as Standard time is, in my opinion, nonsense.

It’s particularly funny timing, coming right around the Vernal Equinox, when the sun stands at its highest right at Noon Standard Time, to be debating calling this time “one PM” forevermore.

Right Idea, Wrong Time

Let’s do a quick overview of the good idea here — doing away with time changes. These are known to cause sleep disturbances and this leads not just to sleepy heads on Monday morning, but to an increased risk of heart attack and accidents in general. When researchers look into the data, it’s the “springing forward” that causes trouble. People who’ve slept one extra hour don’t seem to suffer as much as people who’ve lost one. Go figure.

So maybe it makes sense to stop changing times. If we’re going to settle on one standard time, do we pick Standard time or Daylight Saving time? Admittedly, this is a totally unfair way to pose the question, but there are a number of good reasons to prefer all-year Standard time. The biggest one is winter. Basically, it’s already tough enough to get up on a cold January morning when the sun is not due to rise for another hour or two. Add another hour of darkness on top, and you know why the two previous attempts to run all-year Daylight Saving were short-lived. And why the Swedes drink so much coffee.

France-002886 – Sundial” by archer10 (Dennis) CC BY-SA 2.0.

There’s also the fundamental logic behind our measurement of time that’s stood for centuries, and is embedded in most of our cultural references to time. Ante Meridian and Post Meridian. High Noon, when the hour hand on the clock points straight up, represents the sun itself. But even before clocks, the sun’s halfway point along its daily journey marked the halfway point of the day. That’s not only why we eat lunch when we do, it’s the origin of man’s time-telling itself.

If we change the definition of noon permanently, we’ve decoupled time from the sun. How will we explain time to future children? I’ll accept Daylight Saving time when we start reprinting analog watches with 1 o’clock at the top and start referring to 12 AM as the one that’s just before the sun reaches its peak. As soon as “one noon” replaces “twelve noon”, I’ll get on board. Midnight, when the clock strikes one, just doesn’t send the same shiver down my spine. Sorry, Dracula.

If culture and physics point to Standard Time, why would you want Daylight Saving to be the new normal? When people think of Daylight Saving, they naturally think of those nice long summer days that stretch out into the night. My personal bet is that many folks are confounding summertime with Summer Time. Heck, even the name of the bill proposes to protect sunshine itself, rather than just move the hands of the clock around. These are not good reasons.

Continue reading “High Noon For Daylight Savings Time”

The New-Phone Blues: A Reminder That Hackers Shouldn’t Settle

For all the convenience and indispensability of having access to the sum total of human knowledge in the palm of your hand, the actual process of acquiring and configuring a smartphone can be an incredibly frustrating experience. Standing in those endless queues at the cell phone store, jumping through the administrative hoops, and staring in sticker shock at a device that’s likely to end its life dunked in a toilet all contribute to the frustration.

But for my money, the real trouble starts once you get past all that stuff and start trying to set up the new phone just right. Sure, most phone manufacturers make it fairly easy to clone your old phone onto the new one, but there are always hiccups. And for something that gets as tightly integrated into the workflows of your daily life as cell phones do, that can be a real bummer. Especially when you find out that your shiny new phone can’t do something you absolutely depend on.

Continue reading “The New-Phone Blues: A Reminder That Hackers Shouldn’t Settle”

Impedance Mismatch

There are a few classic physics problems that it can really help to have a mental map of. One is, of course, wave propagation. From big-wave surfing, through loudspeaker positioning, to quantum mechanics, having an intuition for the basic dynamics of constructive and destructive interference is key. Total energy of a system, and how it splits and trades between kinetic and potential, is another.

We were talking about using a bike generator to recharge batteries on the Podcast last night, and we stumbled on a classic impedance mismatch situation. A pedaling person can put out 100 W, and a cell phone battery wants around 5 W to charge. You could pedal extremely lightly for nearly three hours, but I’d bet you’d rather hammer the bike for 10 minutes and get on with your life. The phone wants to be charged lightly — it’s high impedance — and you want to put out all your power at once — you’re a low impedance source.

The same phenomenon explains why you have to downshift your internal combustion automobile as you slow down. In high gear, it presents too high an impedance, and the motor can only turn so slowly before stalling. This is also why all vibrating string acoustic instruments have bridges that press down on big flat flexible surfaces, and why horns are horn shaped. Air is easy to vibrate, but to be audible you want to move a lot of it, so you spread out the power. Lifting a heavy rock with human muscle power is another classic impedance mismatch.

If these are fundamentally all the same problem, then they should all have similar solutions. The gear on the bike or the car, the bridge on a cello, the flared horn on the trumpet, and the lever under the boulder all serve to convert a large force over a short distance or time or area into a lower force over more distance, time, or area.

Pop quiz! What are the common impedance converters in the world of volts and amps? The two that come to my mind are the genafsbezre and the obbfg/ohpx pbairegre (rot13!). What am I missing?

Our Favorite Things: Binary Search

You might not think that it would be possible to have a favorite optimization algorithm, but I do. And if you’re well-versed in the mathematical art of hill climbing, you might be surprised that my choice doesn’t even involve taking any derivatives. That’s not to say that I don’t love Newton’s method, because I do, but it’s just not as widely applicable as the good old binary search. And this is definitely a tool you should have in your toolbox, too.

Those of you out there who slept through calculus class probably already have drooping eyelids, so I’ll give you a real-world binary search example. Suppose you’re cropping an image for publication on Hackaday. To find the best width for the particular image, you start off with a crop that’s too thin and one that’s too wide. Start with an initial guess that’s halfway between the edges. If this first guess is too wide, you split the difference again between the current guess and the thinnest width. Updated to this new guess, you split the differences again.

But let’s make this even more concrete: an image that’s 1200 pixels wide. It can’t get wider than 1200 or thinner than 0. So our first guess is 600. That’s too thin, so we guess 900 — halfway between 600 and the upper limit of 1200. That ends up too wide, so we next guess 750, halfway between 600 and 900. A couple more iterations get us to 675, then 638, and then finally 619. In this case, we got down to the pixel level pretty darn fast, and we’re done. In general, you can stop when you’re happy, or have reached any precision goal.

[Ed note: I messed up the math when writing this, which is silly. But also brought out the point that I usually round the 50% mark when doing the math in my head, and as long as you’re close, it’s good enough.]

What’s fantastic about binary search is how little it demands of you. Unlike fancier optimization methods, you don’t need any derivatives. Heck, you don’t even really need to evaluate the function any more precisely than “too little, too much”, and that’s really helpful for the kind of Goldilocks-y photograph cropping example above, but it’s also extremely useful in the digital world as well. Comparators make exactly these kinds of decisions in the analog voltage world, and you’ve probably noticed the word “binary” in binary search. But binary search isn’t just useful inside silicon. Continue reading “Our Favorite Things: Binary Search”

Make It Compatible

I’m probably as guilty as anyone of reinventing the wheel for a subpart of a project. Heck, sometimes I just feel like working on a wheel design. But if that’s the path you choose, you have to think about whether or not it’s important that others can replicate your project. The nice thing about a bog-standard wheel is that everyone has got one.

The case study I have in mind is a wall-plotter project that appeared on Hackaday this week. It’s a really sweet design, and in many ways would be an ideal starter project. I actually need a wall plotter (for reasons) and like a number of the choices made. For instance, having nearly everything, including the lightweight geared steppers on the gondola makes it easy to install and uninstall — you just pin up the timing belt from which it hangs and you’re done. Extra weight on the gondola helps with stability anyway. It’s open source and based on the Arduino libraries, so it should be easy enough to port to whatever microcontroller I have on hand.

But the image-generation toolchain is awkward, involving cutting and pasting into a spreadsheet, which generates a text file in a custom plotting micro-language. Presumably the designer doesn’t know about Gcode, which is essentially the lingua franca of moving machines, or just didn’t feel like implementing it. Where in Gcode, movement commands are like “G1 X100 Y50”, this device expects “draw_line(0,0,100,50)”. They’re essentially equivalent, but incompatible.

I totally understand that the author must have had a good time thinking up the movement commands and writing the spreadsheet that translates SVG files into them. I’ve been there and done that! But if the wall plotter spoke Gcode instead of its own dialect, it would slot instantly into any number of graphics processing workflows, which would make me, the potential user, happier.

When you are looking at reinventing the wheel, think about your audience. If you’re the only person likely to see the project, go ahead and scratch whatever itch you’ve got. You’ll learn more that way. But if you want to share the project with as many people as possible, adhering to the most widely used standards is a good choice for your users, even if it is less fun than dreaming up your own movement language.

The Light Guide Hiding In Your Extrusion

There should be a line of jokes that start “A physicist and an engineer walk into a bar…”. In my case I’m an engineer and my housemate is a physicist, so random conversations sometimes take interesting turns. Take the other day for example, as one does when talking she picked up a piece of aluminium extrusion that was sitting on our coffee table and turned it over in her hands. It has a hole down its centre and it’s natural to peer down it, at which point her attention was caught by the appearance of a series of concentric rings of light. Our conversation turned to the mechanism which might be causing this, and along the way took us into cameras, waveguides, and optical fibres.

The light reaching us after traveling along a straight narrow tube should at a cursory glance be traveling in a straight line, and indeed when I point the extrusion out of my window and look down it I can see a small segment of the tree in the distance I’ve pointed it at. It didn’t take us long to conclude that the concentric rings were successive reflections of the light coming into the end hole from off-centre angles.

In effect, the extrusion is a pinhole camera in which the image is projected onto the inside of a cylinder stretching away from the pinhole rather than onto a flat piece of film, and we were seeing the successive reflections of the resulting distorted image as they bounced to and fro down the tube towards us. It’s likely the imperfect mirror formed by the aluminium wall allowed us to see each image, as light was being diffused in our direction. Adding a piece of tape with a small pinhole at the end accentuated this effect, with the circles becoming much more sharply defined as the projected image became less blurry. Continue reading “The Light Guide Hiding In Your Extrusion”

How Small Is Too Small?

Not a rhetorical question! This week we consider the most micro microcontroller: the HC32L110. It’s the new title holder of the smallest ARM Cortex M0+ part. But could you actually use it?

MCU is the black thing that’s smaller than the capacitor.

I remember way back, when I first learned to solder surface-mount components. It was fiddly at first, but nowadays I don’t use through-hole components unless someone’s twisting my arm. And I still do my soldering myself — down to 0603 really isn’t all that bad with an iron, and below that, there’s always the heat plate. My heat plate has also gotten me through the two times I’ve actually needed to put down a ball-grid-array part. It wasn’t as bad as I had feared, honestly.

So maybe it’s time for me to take the BGA plunge and design a board or two just to get more familiar with the tech. I probably won’t dive straight into the deep end, like the featured chip here with 0.35 mm ball pitch, but rather stick with something that the cheap PCB services can easily handle. My experience tells me that the best way to learn something is just to test it out.

Now, off to go part shopping in the middle of a chip crisis! Wish me luck.