Pages

Tuesday, November 19, 2019

Cents and Cents-Ability

A late post this week, since I'm currently traveling in Italy with my parents! Going between EU countries and using cash more often than usual has reminded me of how inept I feel making change in euros after 30 years of using the US denominations. I thought I'd take a look at the relationship between the different coin/bill values and the ways to get a certain amount of money.

Here are the US denominations less than $5 (not including $1):
Wikipedia
And the EU denominations less than 5€:
Wikipedia

We're looking for ways to get a total value using some number of each of these coins. We can write this as an equation, for example
where p, n, d, q, and D are the numbers of pennies, nickels, dimes, quarters, and dollars. Since we no longer cut coins to make change, all these values must be integers, which makes this a Diophantine equation. These can be difficult to solve; the Python package SymPy has tools for it, but I couldn't find a way to restrict it to only positive integers (handling anti-pennies is far too dangerous). I was able to make my own though, which uses a simple brute-force technique.

Since it slows down exponentially as the total value gets larger, I was only able to run it for values up to 4 dollars/euros. The results are still interesting though. Here's the minimum number of coins needed to make a total:

As each larger denomination becomes available, there's a sudden drop in the number of coins needed. Since euros include many more denominations, they're able to use fewer.

We won't always get the minimum in change though, so it's useful to look at the different ways to make a value, and find out what the average number of coins is:
These are going to include many sets with mostly pennies though, so we can also look at the median:
At the very beginning of each of these, you can see there are a few cases where the US uses more coins, probably due to the euro having a 2 cent coin, but in the end, more denominations means more coins on average.

There are many things I'll need to unlearn when I return to the US next month (like saying "merci" instead of "thanks"), but since I never really got the hang of euros I suppose making change won't be one of them.

Saturday, November 9, 2019

A Bolt of Cloth

The past couple weeks here have been non-stop drizzling rain – not the nicest farewell I could have – but it reminded me of a post from another of my favorite blogs, Futility Closet.

Wikipedia
Shortly after Benjamin Franklin created the first lightning rod, the idea caught on in Europe as a fashion accessory. There were umbrellas fitted with lightning rods (above), as well as hats, which trailed a wire for grounding. The information on these is a bit sparse, in particular whether they had ever been tested. This concerned me, since I saw some potential problems with the design, which I thought I'd explore today.

First, a quick explanation of how lightning rods work: During thunderstorms, charge collects in clouds. If enough charge builds up, it can overcome the resistance in the air, and create a channel down to the ground, where it discharges. This is lightning, which can carry lots of charge at high speed. Electricity takes the path of least resistance, and since humans and animals carry a lot of salty water, that makes us appealing routes to the ground. Tall buildings can also make good conductors, but since lightning carries so much energy, it can start fires. To protect ourselves, and our homes, we can make even better channels by topping buildings with a metal rod that connects directly to the Earth through a wire. Based on this, the lightning rod apparel doesn't seem unreasonable, but let's look at some issues.

Ground Current
For real lightning rods, the grounding wire is buried several feet deep to better distribute the charge, but that wouldn't be possible with a rod you carry with you. Instead, the wire just drags behind you, but that's no different from lightning striking the ground near you. Lightning carries a lot of charge, and it takes some space to dissipate, which can be just as dangerous as the initial strike. The National Weather Service webpage illustrates this with a charmingly-90s, yet still horrifying, animated GIF:


According to the Washington Post, ground current can be dangerous as far as 60 feet from the initial strike, so you'd need an awfully long tail on your umbrella/hat, not to mention the danger to anyone else who happens to be near the contact point.

Melting Wire
Since these are fashion accessories we're talking about, the Wikipedia article above mentions that the grounding wire was silver, but that could get expensive. One site I found lists the gauge for a grounding wire as 2 AWG, or about a quarter inch. There's also the problem that silver has a lower melting point than copper, 961.78 °C. That made me curious whether you'd be trading electrocution for being sprayed with molten silver.

The energy absorbed by the wire will be
where I is the current, 𝜌 is silver's resistivity, l is the length of the wire, A its area, and t is the duration of the strike. Using those values, along with a normal (rather than rope-sized) silver chain, and a height of 1.8 meters, I come up with 195 Joules, which is nowhere near enough to melt even a thin chain.

Magnetic Field
So at this point, you're still dead from the ground current, but your relatives will be able to salvage your silver chain. What about your smartphone? When current flows through a wire, it produces a magnetic field, according to

I couldn't find info for smartphones, but according to this site, credit cards could be damaged at a distance of 63 centimeters, and pacemakers at 25 meters! I'm not sure whether the short duration of the bolt would change these calculations, but it still doesn't seem like you or your electronics would be safe in a thunderstorm, even if you are wearing the height of 18th century fashion.

Big thanks to Futility Closet for pointing out this fleeting trend! I'm sure we would never use new technology in such a frivolous way, right?

Sunday, November 3, 2019

Riding a Charger

In high school, I got interested in electronics tinkering through the blog Hack-a-Day. I haven't done much myself for many years, but I still read the blog, and last week there was a post that seemed ripe for physics analysis:

The setup is that each player has a button they can press and release. While the button is pushed, a capacitor is charged by a voltage source, and when it's released, the capacitor switches to power a motor that drives the horse. You can see the full plans here, but this is a simplified version of the circuit:
Made using www.circuit-diagram.org
In the state shown above, the voltage source (V) begins to charge the capacitor (C). At first, this would act like a short circuit, so we add a resistor (R) to limit the current flow. For this type of circuit, the charge on the capacitor is given by
The voltage over a capacitor is proportional to the charge stored in it, so as the capacitor charges up, it pushes back more and more on the voltage source, which slows the charge that's added. That leads to an asymptotic behavior:


When the button is released, the switch in the diagram above flips to the other side of the circuit, and the capacitor begins discharging through the motor. This acts like a resistor, but converts the charge flowing through it to motion, driving the horse. Once again, we have an asymptotic relationship, since as the charge flows out of the capacitor, it can't push as strongly:
Here, Q0 is the amount of charge we put on in the first step. This is similar to the plot above, but decaying to zero:


This made me curious if I could come up with the optimal strategy for getting the horse to the end as quickly as possible. That translates into the most charge in the least amount of time, or the maximum current. If we ignore the initial charge up, we can think of switching between some maximum and minimum charge:
The average current through the motor over one cycle is
where tC and tD are the charge and discharge times. The expressions for those are a bit ugly, so I won't write them out here. Rather than try to get the exact maximum current, we can try a variety of values for Qmin/max:
The best option appears to be keeping the capacitor at ~50% charge by rapidly flipping the switch between the two states. As with many games, the answer lies in hyperactivity!