Do the MacGyver Hacks Actually Work?

Really, I’m just answer this question from Twitter.

Honestly, this is what I love about working with the MacGyver people. It’s great that they even care enough to bring in a science consultant (that’s me) to look at the MacGyver hacks.

So, I will start off by saying this. Pretty much all of the hacks are at least based on some real scientific idea. None of them are just magic.

In fact, you could go through all the Mac hacks and rate them on a scale from 0 to 10. 10 would be a hack that is one hundred percent legit—totally real. 0 would be magic. Like I said, there are no zero’s that I can recall.

How about some examples from previous episodes with some reality scores?

  • Score = 10: Break into a hotel room door using a coat hanger. Basically use a metal wire to reach under a hotel door and pull down the handle. Sadly, this is completely real.
  • Score = 9: Use a picture and perspective to triangulate the location of an apartment. This is real, but sort of difficult to calculate. But you could do this.
  • Score = 8: DIY dog whistle. It might take some messing around to get it to work just right, but it’s basically legit.
  • Score = 7: Hot air balloon for you phone. Yes. You can totally make a hot air balloon. It’s not even hard. The problem is the lifting capacity. If you want to a balloon to lift a phone, it’s going to have to be fairly big.
  • Score = 5: Pick a lock with a paper clip. The idea is right, but I really doubt you could use a normal paper clip unless it was a super sucky lock.
  • Score = 4: See through walls with wifi. This is based on a real actual thing—however, it would be pretty tough to set it up with stuff you find laying around.
  • Score = 3: All the explosions. When you mix two or more chemicals together, bad stuff can happen. Often the effect size is smaller in reality and often the time to set these things up is quite long. Don’t make explosions.
  • Score = 2: Disabling a car with some electromagnetic thingy. MacGyver builds some devices to stick under cars to prevent them from starting. Yes, starting a car deals with lots of things working together, so you just have to disrupt one of these things. If you have an electromagnetic oscillation (from the device), it could interfere with the computer or maybe even the spark. It’s a stretch, but it could indeed work.

What about a score of 1 or 0? I’m sure they are out there, but I don’t have any that come to my mind. What about the average score? If I had to guess (apparently I do), I would say a score of 6 would fit pretty well.

MacGyver Season 3 Episode 17 Science Notes: Seeds + Permafrost + Feather

The Seed Vault is real

It’s basically a giant insurance policy. Suppose something terrible happens and a bunch of crops are wiped out. What then? How do you start over? Yes, you go to the seed bank and withdraw your seeds.

https://www.croptrust.org/our-work/svalbard-global-seed-vault/

Feather to detect air currents

MacGyver pulls a feather out of his jacket and uses this to detect air currents. This should work since the feather will move due to super tiny air motion that would be too small for a human to feel.

This reminds me of a job I once had. The job was to go to people’s swimming pools and find leaks. I would take a small squeeze bottle with red dye and let out tiny amounts into the water to see what would happen. If the red dye got sucked into the wall—there’s your leak. Oh, this was done with scuba gear so that I could stay underwater for long periods of time. It was extremely boring.

Finding position from a smartphone accelerometer

Your phone has an accelerometer (probably). At the very least, this accelerometer is used to determine the orientation of the phone so that it knows if you are taking a normal video or a vertical video (don’t do vertical videos).

This accelerometer is essentially a tiny mass on a spring (but not an actual spring). When the phone accelerates, the spring gets compressed by an amount that is proportional to the acceleration. That’s how you get the acceleration. Once you have the acceleration, you can integrate twice to the get the change in position of the phone (assuming the phone started from rest). If you keep doing this every tenth of a second (or whatever time frame you want), you can track the location of the phone. True.

In fact, if you use the augmented reality (AR) on your phone then you have to use the accelerometer. Your phone figures looks at a surface from different viewpoints to figure out how far away it is. The different viewpoints are determined by the motion of the phone and the accelerometer.

Just because it’s cool—here is my short explanation of AR on the phone.

Toxic Pea

Can you actually make a toxin from a pea seed? Yup. That’s possible. In fact, there are a bunch of things out there in the real world that have some pretty deadly stuff in them. Here are some options.

Directional satellite dish

If you have a normal wifi antenna on your computer (and you probably do), it basically just transmits radio waves in all directions. It’s not a completely uniform signal strength in all directions, but let’s just assume it is.

Imagine these radio waves expanding out and forming a sphere. Since the area of the this radio wave sphere is proportional to the square of the radius, the signal power decreases with distance. That’s just how it works.

But wait! What if you redirect these waves into one direction? That would increase the radio power along that direction and give you a better signal. However, you now have to aim this thing.

There are several methods to make a directional antenna. The two common methods are to use a parabolic dish (like a satellite dish) or a wave guide. The wave guide uses a tube with an antenna located at a certain point. Waves go down the tube and then reflect to constructively interfere and make the signal stronger in that direction.

MacGyver Season 1

Since I have finally finished my notes for season 1 of MacGyver, I figured I should include all of my notes in one page.

Here are the episodes.

Hopefully I can finish Season 2 before too long.

MacGyver Season 1 Episode 21 Science Notes: Cigar Cutter

Dirty Bomb

It’s not a Mac-Hack (I assume that’s clear), but let me just explain the difference between a nuclear bomb and a dirty bomb.

A nuclear bomb uses a nuclear reaction to create energy. If you take some large mass element (let’s just say plutonium) and spit it into two pieces, you get some stuff. Obviously you get at least two smaller atoms. But you also get some neutrons and stuff. However, if you added up the mass of all the stuff after the split, it would be slightly less than the mass of the original plutonium. This lost mass is accounted for in energy. Here is the energy-mass relationship.

E = mc^2

The “c” is the speed of light. This says that you get a BUNCH of energy for just a little bit of mass and this is the basis for a nuclear fission reaction. For a nuclear bomb, the split creates neutrons that can also split more atoms which produces MORE neutrons and more splits. Oh, the energy and the left over pieces tend to make stuff radioactive.

The dirty bomb also uses radioactive material. However, the main explosion is not a nuclear reaction but instead a more conventional chemical-based bomb. The bomb includes radioactive material that gets spread around from the explosion. It’s dirty. Yes, it’s bad—but it’s not a nuclear explosion. Also, these are pretty easy to make since you just need a normal bomb and some radioactive material.

Parsecs and Time and Distance

Everyone (except Jack) is correct. The parsec is a unit of distance. It has to do with parallax. Here is a simple experiment. Hold your thumb out in front of your face. Now close one eye and look at your thumb. Hopefully there is something in the background that you can line it up with. Now close that eye and open the other one. Notice that your thumb now lines up with something else in the background? That’s parallax.

Wait. You didn’t actually do the eye thumb thing. Really, you should do that.

OK, back to the parsec. The motion of your thumb with respect to the background depend on the distance from your thumb to your face as well as the distance between your two eyes. What if you increase the distance between your eyes? What if this distance is the size of the Earth’s orbit around the Sun? In that case the change in observation locations (on different sides of the Sun) can be used to measure the distance to nearby stars. If a star has an apparent angular shift of 1 second of a degree, that’s a parsec.

The “sec” in parsec is for “seconds of a degree”—not time seconds. Yes, they made a mistake in Star Wars. Here is even more details about measuring distances in astronomy.

Blood Stopping Foam

I don’t know what to call this stuff. MacGyver injects some liquid into Bozer’s knife wound and it sort of seals it up so it won’t bleed. It’s not so much of a hack, but it does appear to be real.

https://www.dailymail.co.uk/sciencetech/article-2697428/The-injectable-foam-stop-soldiers-bleeding-death-battlefield.html

It would be sort of like that expanding foam you use to seal cracks around your house—except for blood.

Fertilizer grenades

What do fertilizer and explosives have in common? Nitrogen. It’s really interesting if you think about it. The air we breath has a BUNCH of nitrogen in it—79 percent. However, it’s not so simple to get. Once humans figured out how to get the nitrogen, they used it for fertilizer and explosives.

But yeah, you can make explosives from fertilizer—but don’t.

Liquid Oxygen

Yeah, this is bad stuff. Of course it’s cold, but more important is that it’s oxygen. If you want to burn stuff, you need oxygen. Liquid oxygen is WAY denser than gas oxygen. So, if you put this stuff on something you can get a lot of fire.

Check it out.

MacGyver Season 1 Episode 20 Science Notes: Hole Puncher

Fake Blood

How do you make it look like you killed someone? Fake blood would help. MacGyver mixes up a batch using cocoa mix and some fruit punch.

Here is another recipe.

Fog Machine

MacGyver needs some smoke or something like that so he can elude the bad guys. In this case, he is going to use the water in the pool to make a giant humidifier.

OK, this isn’t smoke. It’s water vapor—water in a gas state. You can see through water vapor, because it’s in the air right now (hopefully). However, when the water vapor condenses out of the air, it makes tiny drops of water. These tiny drops of water reflect light to give a similar appearance to smoke.

But how do you make water vapor from a pool? One way is to use a spinning rod. If you put a rod that spins very fast in the water, some of the water will interact with the spinning rod. If the rod is spinning fast enough, then this water will get “flung” into the air.

Numerical Calculation of an Electric Field of a Half-Ring

Suppose there is a charge distribution that is half a circle with uniform charge. How do you find the electric field due to this half-ring? Here is a picture.

If you wanted to find the electric field at the origin (center of the half-ring), you could do this analytically. If you want to find the electric field somewhere else, you need to do a numerical calculation.

Here is the plan for the numerical calculation.

  • Break the ring into N pieces (where N can be whatever number makes you happy).
  • Treat each of these N pieces as though they were point charges.
  • Calculate the electric field due to each of these pieces and add them all up.
  • The end.

Maybe this updated picture will be useful.

Let’s say the total charge is 5 nC and the ring radius is 0.01 meters. We can find the electric field anywhere, but how about at < 0.03 ,0.04, 0 > meters.

I’m going to break this ring into pieces and let the angle θ determine the location of the piece. That means I will need the change in angular position from one point to the next. The total circle will go from θ = π/2 to 3π/2. The change in angle will be:

d\theta = \frac{\pi}{2N}

I know it’s wrong, but I will just put the first piece right on the y-axis and then space out the rest. Here is what that looks like for N = 7.

Here is the code.

That works. Oh, and here is the link to the code. Go ahead and try changing some stuff. See what happens if you put N = 20.

But there is a problem. If I make these charge balls, I need to also calculate the electric field due to each ball. I was going to make a list (a python list) to put all these balls in, but I don’t think I need it.

Here is my updated code.

With the output of:

I think this is working, but let me go over some of the deets.

  • Line 13: you need to know the charge of each piece—this depends on the number of pieces.
  • Line 12: We need to add up the total electric field from each piece. This means that we need to start with a zero electric field.
  • Line 15: I named the point charges so I can reference them. But here you can see that with this method, there is only one charge—it just moves.
  • Line 16: calculate r from a piece to observation location.
  • Line 17: electric field due to a point charge.

Homework

I’m stopping here. You can do the rest as homework.

  • How do you know this answer is correct? Hint: put the observation location at the origin.
  • How many pieces do you need to get a valid answer?
  • Make a plot of E vs. distance along the x-axis. This graph should show E approaching zero magnitude as you get farther away.
  • What about electric potential with respect to infinity? Oh yeah. That’s a good one.
  • Display the electric field as an arrow at different locations.

MacGyver Season 1 Episode 19 Science Notes: 19 Compass

What does “normal” mean?

Honestly, this a great physics joke. MacGyver and Jack are in a trash compactor—yes, there are some Star Wars jokes here too. In order to break the hydraulic pump, Mac wants to put a pole so that it pokes through a particular screw. Here’s the important part.

MacGyver: …if I hold the pipe perfectly normal.

Jack: Dude. Nothing about this is normal.

Jack messes up and hurts his arm. According to MacGyver: “I used a technical term that Jack didn’t understand.”

Ok, so what does “normal” mean? In short, it means perpendicular. That’s it. MacGyver needed the pipe to be perpendicular to the wall. That’s what normal means. That’s also why physicists call the force a surface pushes on an object “the normal force” —because it’s perpendicular to the surface.

Yes, we also use “normal” in geometry—but of course Jack wouldn’t get that.

What is a spectrometer?

Not a MacGyver hack, but I want to talk about spectrometers anyway.

My first idea of a spectrometer is a visible-light spectrometer. This is essentially a prism. Light goes into the prism and is then separated into different colors. By looking at the colors in the light you can identify the light source. Oh, but this kind of spectrometer wouldn’t be found in a chemistry lab—at least probably not.

There is also a mass spectrometer. This takes a gas of molecules and shoots them into an area. Using magnetic fields, the path of the molecules is bent. Based on the amount of particle deflection, you can get a value for the mass of the particles.

Also, it’s just fun to say “mass spectrometer”.

Origin of Hacking

Come on. We know that MIT didn’t really invent hacking. Humans have always been able to creatively figure out problems—which is the essence of hacking.

However, MIT might indeed have invented the word “hacking”. The history of this stuff is really interesting. Let me recommend the following book—Hackers: Heroes of the Computer Revolution (Steven Levy). I liked it.

Door Alarm

Another non-MacGyver hack. This is a hack from his friend. She creates a door alarm. You can’t really see it very well, but it would be a small battery with a buzzer. The circuit runs to a clothes pin with aluminum foil on the pinchers and a piece of paper between them. Since the paper is an insulator, there is not a closed circuit. The paper is then attached to the door (with tape) so that opening the door pulls the paper out.

It’s actually a pretty simple design. You can (and should) build one of these yourself. Here is a video showing how to do that.

Electric Whip

In order to make an improvised weapon, Mac takes an extension cord and cuts off one end. Then he strips the wires on that end and plugs it in to the wall outlet. Note: DON’T DO THIS.

When the two bare ends of the wires touch someone, they will get shocked. Oh, and it’s a whip.

So, would this work? I think it would mostly work. It wouldn’t make the lightning stuff, but that just makes it look cool. It does look cool, right?

DIY Centrifuge

This might be the best hack in MacGyver history. Basically, this is a real life MacGyver-hack. It’s a low cost and simple to build centrifuge.

What the heck is a centrifuge? It’s a super high speed spinning thingy. You can put liquids in there and the high rotation rate causes a centrifugal force (yes, I used that term correctly) to separate liquids of different densities. This can be used to process blood.

Here is a real centrifuge.

And here is the DIY version. It’s basically just string and cardboard. However, with this simple version people can process blood stuff in more rural areas. Awesome.

It’s real.

Elastic Collisions in 1D

I need a nice model to predict the final velocity when two balls collide elastically. Don’t worry why I need this—just trust me.

After working on this for a short bit and making an error, I realized what I need to do. I need to blog about it. A blog is the perfect place to work things out.

So, here is the situation. A ball of mass 10 kg (ball A) is moving with a speed of 0.1 m/s in the positive x-direction. This collides with a 1 kg ball (ball B) moving at 0.1 m/s in the negative x-direction. What is the final velocity of the two balls if the collision is perfectly elastic.

For a perfectly elastic collision, the following two things are true:

  • Momentum is conserved. The total momentum before the collision is equal to the total momentum after the collision.
  • Kinetic energy is conserved. The total kinetic energy is the same before and after the collision.

In one dimension, I can write this as the following two equations. I’m going to drop the “x” notation since you already know it’s in the x-direction. Also, I am going to use A1 for the velocity of A before the collision and A2 for after. Same for ball B.

m_Av_{A1}+m_B v_{B1} = m_Av_{A2}+m_B v_{B2}

\frac{1}{2}m_A v_{A1}^2+\frac{1}{2}m_B v_{B1}^2 = \frac{1}{2}m_A v_{A2}^2+\frac{1}{2}m_B v_{B2}^2

That’s two equations and two unknowns (the two final velocities). Before solving this, I want to find the answer with a numerical calculation.

Numerical Solution

Here’s the basic plan (I’m not going over all the deets).

  • Model the two masses as points with springs on them (not really going to show the springs).
  • When the two masses “overlap” there is a spring force pushing them apart. The strength of this force depends on the amount they overlap.
  • Calculate the position and force on each ball (the force would be the zero-vector in cases where they aren’t “touching”).
  • Update the momentum of the balls.
  • Update the position of the balls.
  • Repeat until you get bored.

Oh, make sure you set your fake spring constant high enough. If it’s too low, the two masses can just pass through each other (which would still be an elastic collision).

Here is what it looks like.

Here is the code (you should take a look). Oh, the final velocities are 0.0636 m/s for ball A and 0.2639 m/s for ball B. Also, here is a plot of the momentum so you can see momentum is conserved.

What about the kinetic energy? Here you go.

Actually, notice that KE is NOT conserved. During the collision there is a decrease in the total KE because of the elastic potential energy. I just thought that was cool.

Analytical Solution

Now let’s get to solving this sucker. I’m going to start with a trick—a trick that I’m pretty sure will work (but not positive). Instead of having the two balls moving towards each other at a speed of 0.1 m/s each, I am going to use the reference frame that has ball B with an initial speed of 0 m/s and ball A with a speed of 0.2 m/s.

Since I am switching reference frames, I am going to rename the velocities. I am going to call ball A velocity C1 and C2 and then ball B will be D1 and D2 (for final and initial). Technically, I should use prime notation – but I think it will just get messy.

So, here is how it looks in the new reference frame.

In general, the initial C velocity would be:

v_{C1}=v_{A1}-v_{B1}

Now I get the following for the momentum and kinetic energy conservation equations.

m_A v_{C1}=m_A v_{C2}+m_B v_{D2}

\frac{1}{2}m_A v_{C1}^2=\frac{1}{2}m_A v_{C2}^2 +\frac{1}{2}m_B v_{D2}^2

Now we have two equations two unknowns. I’m going to cheat. I worked this out on paper and I’m just going to take a picture of it.

Here is the final solution (in case you can’t read it).

v_{C2} = v_{C1}-\frac{m_B}{m_A}v_{D2}

v_{D2} = \frac{2v_{C1}}{\frac{m_B}{m_A}+1}

So, you can get a value for vD2 and then plug that into vC2. After that, you can convert them back to the stationary reference frame to get vA2 and vB2.

Boom. It works. Here is my calculation. Just to be clear, it looks like this:

The output looks like this:

Winning. That agrees with my numerical model.

Projectile in Polar Coordinates

Why?  There is no why.

Suppose a ball is shot at an angle θ with an initial velocity v0.  What will the motion be like in polar coordinates?

First, let me start with Newton’s 2nd Law in polar coordinates (I derived this in class).

F_r = m(\ddot{r}-r\dot{\theta}^2)
F_\theta = m(r\ddot{\theta}+2\dot{r}\dot{\theta})

Once the ball is in the air (and ignoring air resistance) the only force on the ball is the gravitational force. Yes, this would be -mg in the y-direction, but we don’t have a y-direction. Instead, we have polar coordinates. Maybe this picture will help.

Photo - Google Photos 2018-02-18 08-55-07.png

The r and θ components of the gravitational force will change as:

F_r = -mg\sin\theta
F_\theta = -mg\cos\theta

If I use these forces with Newton’s law in polar coordinates, I get:

F_r = -mg\sin\theta=m(\ddot{r}-r\dot{\theta}^2)
F_\theta = -mg\cos\theta = m(r\ddot{\theta}+2\dot{r}\dot{\theta})

Of course the mass cancels – but now I can solve the first equation for \ddot{r} and the second equation for \ddot{\theta}.

\ddot{r} = r\dot{\theta}^2-g\sin\theta
\ddot{\theta} = \frac{-2\dot{r}\dot{\theta}}{r} - \frac{g\cos\theta}{r}

It doesn’t matter that these second derivatives depend on the other stuff – I can still calculate them. Once I have those, I can create a numerical calculation to update the velocities and positions. Suppose I have everything know at time(1), then the stuff at time(2) would be:

\dot{r}_2 = \dot{r}_1 +\ddot{r}\Delta t
\dot{\theta}_2 = \dot{\theta}_1 +\ddot{\theta}\Delta t
r_2 = r_1+\dot{r}\Delta t
\theta_2 = \theta_1 +\dot{\theta}\Delta t
t_2 = t_1 +\Delta t

Now I’m all set to do a numerical calculation. Well, I still need the initial conditions. I could use this:

\dot{r}_0 = v_0
r_0 =0
\dot{\theta}_0 = 0
\theta_0 = \theta_0

But wait! There’s a problem. The calculation for \ddot{\theta} has a 1/r term. If r is zero the universe will explode. I can fix this by having the initial r a little bit bigger than zero. Problem solved.

Here is the program in Glowscript.

For the first run, I am going to calculate the x- and y-coordinates in each step and plot x vs y.  I know this should look like a parabola.

newplot (2).png

Boom.  That works.  Now for a plot of both r and theta as a function of time for a high launch angle.

newplot (3).png

Double boom.