Capturing smooth movies from VPython

This post is for anyone using VPython to create animations. If you are having problems with lost/skipped frames when trying to capture the animations to video, here is a trick I’ve come up with to ensure every frame is reliably captured.

Continue reading
Posted in Other | Leave a comment

Reflections from the open end of a pipe

I made a video about why sound reflects from the open end of a pipe. As usual, this turned out to be more complex than I expected, and the video follows my journey through the physics. This post contains some extra technical notes about details that I glossed over in the video.

Continue reading
Posted in Physics | Leave a comment

How do wires work? (electromagnetic picture)

I made a video about the electromagnetics of wires which you can watch on YouTube here. At this point there is no blog post to go with it, but if I have technical notes to add, I might add them here later.

Posted in Electronics, Physics | Leave a comment

The physics of toppling dominoes

This post has an accompanying YouTube video here.

Most people think of toppling dominoes as a sequential chain reaction where one domino falls, then the next, then the next. But consider this picture of a domino line toppling:

Continue reading
Posted in Physics | 1 Comment

-1/12 and the area under the sum function

A version of this post is also available as a YouTube video here.

You might have previously seen the assertion that:

    \begin{align*} 1 + 2 + 3 + ... = -\tfrac{1}{12} \end{align*}

This is, of course, intuitively absurd. It is also properly absurd under standard rules of mathematics, so the use of an equals sign is reckless. The value -1/12 is obtained from either Ramanujan summation, or analytical extension of the Riemann zeta function and the subsequent assumption that ζ(-1) represents the sum 1 + 2 + 3 + ….

I shall not dwell too much on this topic as it is already well discussed elsewhere; for a gentle introduction I would recommend Mathologer’s video, or for a more technical but brilliantly accessible piece I would suggest Terence Tao’s blog post.

What I do want to dwell on is a curious fact pointed out by Mathologer at the very end of his video. It is well known that 1 + 2 + 3 + … + n can be evaluated via \tfrac{n(n+1)}{2} or equivalently \tfrac{1}{2}n^2 + \tfrac{1}{2}n, I will denote this function S1(n). Consider the plot of the function S1(n):

The yellow area is 1/12, in other words the integral over the interval [-1,0] is -1/12, the magic value referred to above. Co-incidence?

Continue reading
Posted in Mathematics | 3 Comments

The physics of a playground swing

A version of this post is also available as a YouTube video here.

In this post I want to look at the physics of a playground swing, and how we can pump it to get higher. There are actually two different methods of pumping a swing: a seated method and a standing method. In my post and video I focus on the seated method.

I used a model from Hirata et al (2023) in which the human body is approximated by three segments, and the chain of the swing is assumed to remain straight. I took the Euler-Lagrange equation from the paper, with minor fixes1, and ran it forward in time using a Runge-Kutta method. My source code is available here and includes the parameters I used.

Continue reading
Posted in Physics | Leave a comment

Kinetic energy of rotation around two axes

A version of this post is also available as a YouTube video here.

Recently, while working on my upcoming post about the physics of playground swings, I was analyzing the mechanics of a double pendulum system similar to the following:

The motion of the lower limb can be thought of as a superposition of two rotational motions, ω0 around one axis and ω1 around another axis. It got me thinking about how to write down the kinetic energy of such a superposition.

Continue reading
Posted in Physics | Leave a comment

The reverse sprinkler, part 3: results

In part 1 and part 2, we introduced the reverse sprinkler problem and tried to gain some theoretical insight. In this final part, we will simulate five different sprinkler designs and interpret the torque results.

Continue reading
Posted in Physics | Leave a comment

The reverse sprinkler, part 2: theory

In part 1, we introduced the reverse sprinkler problem and attacked the most ideal case, ignoring factors such as pipe diameter. Now we will perform a more general analysis.

Continue reading
Posted in Physics | Leave a comment

The reverse sprinkler, part 1: introduction

A short version of this post series is also available as a YouTube video here.

The reverse sprinkler is a physics problem that has long been a source of confusion and debate. It is sometimes known as the Feynman sprinkler problem after Richard Feynman who popularized it. Briefly: consider the type of garden sprinkler that rotates as water is ejected from it. Now submerse the sprinkler in a tank and reverse the fluid flow such that water is sucked in instead of ejected. Does the sprinkler rotate, and if so, in which direction?

Continue reading
Posted in Physics | Leave a comment

Directly downwind faster than the wind

A short version of this post is also available as a YouTube video here.

Is it possible to build a wind-powered vehicle that can continuously travel faster than the wind, in the same direction as the wind?

Like the airplane-on-treadmill problem and the Feynman sprinkler problem, this question has spawned endless Internet arguments. In 2010, Rick Cavallaro and team demonstrated a vehicle called Blackbird that officially reached a speed of 2.7 times the wind speed. But this just spawned more arguments. Indeed the design, in which the wheels are geared to a propeller, has all of the hallmarks of a perpetual motion machine, so it is understandable that some are skeptical. Here I want to present a thought experiment that might help to clarify some of the physics by reference to something more familiar: an airplane.

Continue reading
Posted in Physics | Leave a comment

Amplifiers in the real world: a case study

I encountered an interesting problem recently. As part of a personal project related to magnetic resonance, I built a small coil set and pre-amplifier:

NMR coilset

The pre-amplifier is located on the tiny green PCB; the signal received by the inner coil is amplified here and sent over a coaxial cable to an ADC. Since this is an Earth’s field system (EFNMR) with no large magnets, the frequency of interest is very low, around 2400Hz.

Now here is the strange thing: when I oriented the coil in a particular direction, the received environmental noise was very high, with lots of 50Hz harmonics. But when I oriented the coil in exactly the opposite direction, the noise was low. I repeated the experiment several times with the same puzzling result.

Continue reading
Posted in Electronics | 1 Comment

Electromagnetic radiation from accelerating charges

Electromagnetic radiation is something that has often eluded my intuition. Electrical engineering depends on numerous abstractions: current flowing in wires like a fluid, capacitance/inductance in lieu of near field interactions, antenna theory to model far field interactions, etc. These abstractions are essential to make electromagnetic theory tractable for everyday use. But they also obscure the underlying physics and can result in incorrect conclusions when reality crosses the boundaries of the abstractions.

Looking at electromagnetic radiation from first principles provides, I think, some interesting insights. In this blog post I show how the phenomenon of radiation can be derived from little more than basic special relativity (which itself follows from only a small number of postulates about the universe). This is not new but I think many readers may not be aware of it.

Continue reading
Posted in Physics | 4 Comments

MEMS oscillator frequency increase from helium

You may have heard of the incident where a helium leak suddenly disabled many iPhones at a medical facility. The root cause tiny MEMS oscillators being susceptible to helium leaking into their hermetically-sealed casings is interesting but not especially surprising. Helium is the second lightest element in the periodic table; helium atoms are tiny and have a knack for diffusing through all sorts of barriers.

What is very interesting, though, is that the helium exposure causes the frequency of the oscillator to go up rather than down (at least initially before more serious failures occur). In an experiment performed in a YouTube video from Applied Science, the frequency increases from 32768.24 Hz to 32768.70 Hz (14 parts per million) before device failure. In a research paper, which exposes a (different) MEMS oscillator to helium at high pressure over 50 hours, the frequency increases from 30418 Hz to 30501 Hz which is over 2700 ppm!

If the oscillators weren’t hermetically sealed, then the frequency increase would be understandable helium is lighter than air, and we all know what happens when we breathe in helium. But normally the oscillators are under near-vacuum conditions. Intuitively one would expect the addition of helium atoms to slow down the oscillation, either via gas damping or mass increase. Neither the YouTube video nor the mentioned research paper explain why the frequency increases.

Continue reading
Posted in Physics | Leave a comment

Android device encryption hang at Time remaining 00:00

Recently I had a frustrating problem while trying to enable full disk encryption on my Android device (Motorola G3 “osprey”). Every time the encryption process would hang forever at:

Encrypting
Wait while your phone is being encrypted.
Time remaining 00:00

Continue reading
Posted in Computing | Leave a comment

WebEx audio input hang on Linux (Chrome/Chromium bug)

If you have been connecting to WebEx meetings on Linux using Chrome/Chromium versions 79 or 80, you might have run into issues where your microphone randomly stops working and other participants cannot hear you. When trying to reconnect to the meeting, the connection process might hang for a long time. In Chrome’s Task Manager you will find that the “Utility: Audio Service” thread is using 100% or 200% CPU.

Continue reading
Posted in Computing | Leave a comment

H field and material boundaries

For a long time I thought of the H field as being generated by free currents only. The problem with this view is that it leads us to make erroneous assumptions. We know from the definition of H that:

    \[ B = \mu_0(H+M) \]

The magnetization M is 0 outside of a material. So if we assume that H is due to free currents only, one would conclude that the magnetic field/flux B outside a material is also a function of free currents only – e.g. the external magnetic field of a solenoid would be independent of the material the core is made of. However, as seen in my previous post, this is not true. Also, one might conclude that permanent magnets have no external magnetic field, which is clearly not true either…!

Continue reading
Posted in Physics | 2 Comments

Magnetic field of a ferrite core solenoid

Consider a solenoid made of wire wrapped around a rod made of iron, ferrite, or other ferromagnetic material:

Image by Svjo via Wikimedia Commons

It is well known that the magnetic field will be significantly stronger inside such a solenoid, compared to an air core solenoid. The ferromagnetic core becomes temporarily magnetized and reinforces the magnetic field. But what I’m more interested in is: what is the effect of the ferromagnetic core on the field outside the solenoid, some arbitrary distance away? This question is interesting when using such a coil as part of a magnetically-coupled data or power transfer system, or when considering the electromagnetic interference produced by such a solenoid.

Some sources seem to suggest that the field will be confined more closely when a ferromagnetic core is used, as is the case for ferrite-core transformers. Other sources seem to suggest the opposite, namely that the ferromagnetic core increases the range of the field. Meanwhile a naive application of the Biot-Savart law would suggest that the field outside the solenoid does not change. Which of these is true?

Continue reading
Posted in Physics | 5 Comments

Designing and making a ring

Recently I designed an engagement ring for my (now-)fiancée, from scratch. This was a fascinating and challenging process, and gave me a new appreciation for both the art and engineering of jewellery design.

The first step in the process was to make a collection of existing designs that we both liked. Heather already knew that she liked diamonds with a step cut shape (such as the emerald cut) so this narrowed it down. Here is one of the pages of our initial design exploration:

We visited a local jeweller, who showed us some designs in similar styles. There were a few features that were missing though; for example, I really liked the gap between the center stone and halo in the vintage ring. For practical reasons I also wanted to design a ring that had a low side profile, as I had nightmares about Heather losing a ring finger in machinery.

Granted, I’m sure a good jeweller could have designed something fitting the bill, but I had been doing a bit of CAD recently and I thought… how hard would it be to design a ring myself?

(The answer, it turns out, is that it’s surprisingly hard if you haven’t done it before. I did intermittently find myself wishing that I was working more closely with a jeweller, but it was a labour of love…!)

Here you can see the evolution of my design in Onshape, from an initial shape, to the detailed design of halo and shoulder, and then some final changes based on manufacturing feedback:

Continue reading

Posted in Other | Leave a comment

Splines in Onshape, part 2

In part 1, we talked about 2D splines and how they can be created in Onshape sketches. In this second part, I’ll briefly cover drawing splines directly in 3D, and then discuss offset curves, which are the original reason I started on this long journey delving into Onshape curves. Continue reading

Posted in Computing | 5 Comments