Wednesday, January 9, 2013

Infrared remotes

So another buddy of mine said that he always wondered how infrared works (specifically tv remotes and such). Since this is a bit simpler to explain, Im going to add in a few tangential topics for fun.

Let there be LIGHT!

This is the electromagnetic spectrum. Its a chart showing most of the wavelengths (or energy) of photons we know about. If you look at the chart, the top part tells you whether or not that phton will go through our atmosphere, or bounce off it before it even gets to the earth. The second part shows the name we use to refer to those types of photons. The third shows how large the wavelength of the photon are. (The bigger a wavelength, the less powerful the photon is) The next part shows the "color" of the photon. (We can only see the small chunk in the middle, all the red to the left and all the violet to the right are only there to show we call those areas "infra-red" and "ultra-violet") The bottom shows the temperature of an object that shoots out these photons. (the more you heat something up, the higher energy photons are shot out of it)

Light is made of photons, little packets of energy that depending on how you interact with them look to us like particles or waves. Photons are not like anything else we know of,  they are not particles, they are not waves, you cannot hold them in your hand. They are pure energy. When you look at something, whats really happening is the light in your room (or from the sun if you are outside) is bouncing off the thing you are looking at, and then hitting your eye. Your eye then acts like a camera (it has a ton of "sensors" in the back that talk to your brain, and your brain makes the imagine).

The sensors in our eye only see colors between 700nm (red) and 400nm (violet). Everything outside of this like radio, infrared, ultraviolet, xray, and microwaves we cannot see.

Ok, so now I know what light is, how do we make it?

Humans probably first discovered a means to make light by starting fires.

Here is a quick video from my personal favorite scientist of all time: Richard Feynman explaining fire, and why it shoots out photons.

Since fire, we found we could make lights a bunch of different ways. Light bulbs with the wire inside heat up the wire really hot using electricity, which then shoots out photons. Normally when you heat up thin wire this much it melts, but we found that if we stuck it inside of a vacum (very few air particles) it wouldnt melt so we made a glass bulb around the metal wire, and sucked out all the air and now they last a very long time!


Lets jump forward a few years and talk about LED's.

LED stands for light emitting diode. Emit means to "give off" or to "shoot out". A diode something that only lets electricity go one way. So an led is a diode that we've added a bit of special "stuff" to, so that as it goes across the diode, photons are shot out. The energy of the photon (or its color) depends on the stuff we add to the diode.

So the light that comes out of your remote, is infrared (thats why you cant see it). To make an infrared led the "stuff" we add to the diode is Gallium arsenide (a compound of the elements gallium and arsenic).

So now that we can shoot "invisible" light, we need to be able to detect them. Turns out leds also work in reverse too! If you connect a computer chip to the negative pin of an led, you will get electricity when photons hit it. We found that in order to detect infrared only, we can cover the led with a special black film that blocks most light but lets infrared go through.


We can make infrared light, and we can detect it. Now we need to be able to do something with it. We are going to use an IC to turn signals from the ir detector into "logic".

IC stands for integrated circuit. Its basically a tiny computer with a brain and a little bit of memory. (there are millions of different kinds of IC's and they all do different things, we can get into them more later) But for now just know that its basically a very very tiny computer.

One IC will be in your TV (or whatever you will be controlling with infrared). Using this IC we can read from the infrared detector to see whether there is infrared or not. The remote control is also going to have an IC in it, but its will be telling an infrared led when to shoot infrared photons and when to stop.

Using a pattern of "send photons" "dont send photons" the remote will blink a special pattern that the IC in your TV recognizes. This is like a "language" of blinks.

So for example when the remote sends on for 1millisecond then off for 2 milliseconds then on for 1 millisecond then off for 5 milliseconds the TV would see this, and then do something (like change the channel).

Every button on your remote has a different pattern, and your TV has a "dictionary" that it uses to look up what each pattern means, and then do something when it sees the right code.

In the end, infrared remotes are like really really fast morris code using "invisible light".

Monday, January 7, 2013

Whats the deal with hail?

My airplane question buddy had a few more questions that I felt were perfect for this blog. So here we are again.

Where does hail come from?

To start answering this question, first we have to answer another question he had "how do clouds stay in the air? How liquid/hail stays up there?

Another reason (besides explaining science to kids) I love this is because every question I've done so far, I've ended up learning something in researching the answers.

Why dont clouds fall from the sky?

The main reason water particles can stay in the sky without falling, is because the smaller the droplet of water, the slower it falls. You can try this yourself by dumping a bucket of water at the same time you spray a misting water bottle. (the water bottle is not spraying steam, its not a gas its still tiny tiny water droplets.

The reason this happens, is because as you make something bigger (scale it up) its volume and surface area get bigger, but the volume grows faster than the surface area. Surface area is the amount of space on the outside surface of something. (imagine the outside of a water balloon) And volume, is all the space inside something (imagine all of the water in a water balloon). You can see this when you are filling a balloon. Putting in a lot of something, only makes it grow a small amount. The last couple of breaths in blowing up a balloon you can see this very well (the same size breath you put in at the beginning, only makes it grow a tiny amount compared to your first couple of breaths)

So because big droplets only grow their surface area a little while their volume grows a lot, they end up falling faster. This is because how fast something falls depends on how much volume it has, and how much surface area it has (because the more surface area you have the more air is going to bump into you on the way down) and the more volume something has, the more momentum will be generated. The more momentum is generated, the more air particles you can shove out of your way, and pick up more speed.

So now that we know tiny droplets fall very slow, there has to be something else keeping them up there right? Otherwise they would just keep falling, but very slowly. They are kept up by something we call updraft.

Hot air rises (this probably deserves a post on its own, but I'll do it quick here). Heat is just particles jiggling and bumping into each other. So the faster things bump into each other, the more they will space out. Try getting a bunch of friends standing REALLY close to each other, then tell everyone to DANCE AND MOSHPIT!!! Soon you will find everyone spaced out a bit.

Because gravity pulls on everything (air included) air included. Air with particles closer together (high pressure) will be pulled harder than air with particles further apart (low pressure). So the hot air (because its particles are more spaced apart) will be shoved out of the way by the colder air, which pushes it up.

So these updrafts are just hot air pushing up. The hot air gets there because sunlight warms the ground, which warms the air above it. This is why you will notice there are less clouds at night than during the day.

How does hail stay in the sky long enough to get big, and not just fall when its small?

So now that we know how rain droplets are kept up in the sky, how do they turn into hail? Obviously cold is required here. Hail happens when rain drops get too heavy to be held up by updrafts and fall. The temperature in the clouds needs to be below freezing to start the process. On the way down, the droplet freezes, and it runs into other rain droplets on the way down, that stick to it like sticking your tongue to a metal pole when its really cold outside.

This would only result in tiny pea sized hail though, so how does it get bigger sometimes? It doesnt happen very often, but when it does, its because of very strong updrafts  During very strong storms, winds can reach 100 miles per hour. It takes 90mph of updraft to form a baseball sized piece of hail.

So the updraft pushes the tiny ice chunk back up (collecting more droplets and getting bigger) until the air pressure evens out again, then it falls back down (collecting more droplets and getting bigger). It does this a bunch of times, until its size and weight are too much for the updraft to push back up, and it continues falling until it smashes into earth.

So in the end, hail is a bit more complicated than most people think, there are a lot of things that have to happen just right (or wrong depending on your point of view) to get hail.

Relativity (specifically time dilation)

Recently a buddy of mine started dating a girl with two kids (aged 8 and 10... I think). We had them over for dinner a little while ago and as they were leaving they asked a question that brought up relativity (dont remember the exact question unfortunately...) I gave a quick quick answer, but I don't think I did it justice and would like to do a full blown "how to explain stuff to your kids" answer (also because I havnt posted here in a while)

I remember the crux of their question being time dilation, so I'll try to focus on that for now, and maybe post more in the future on the other aspects of it.

I would start by using the "light clock analogy" (I didn't feel like animating this myself, so I found a copy off google images)

(depending on the age) I'm sure you've heard E=MC^2 and if not, its one of the most well known physics equations from Albert Einstein (one of the most known scientists of all time). E stands for energy, M stands for mass, and C stands for the speed of light (which is very very very fast)

Lets find out what that all means!

Energy is the stuff that allows anything, to do anything. Every time you stand up? your body is using energy stored in itself to do that. When you turn on the lights, energy from the electricity is making them work. When you see something on fire, the heat and light that comes from the fire is energy that was stored in the wood.

Mass is the amount of "junk" something has. A simplified way to think about mass is using weight (this only works if everything is on the same planet because two identical baseballs on the earth, and on the moon weigh differently, but the have the same amount of stuff. This is because the moon's gravity is pulling down less.) We are both on earth, and I weigh more than you, so I have more mass. A giant bag of feathers may be bigger than a bowling ball, but because it weighs less, it has less mass. (Mass is not the same as weight, I will explain another time a little better, but this is close enough for now)

The Speed of light is SUPER CRAZY VERY FAST. Its 670,616,629 miles per hour.  Typical bikes can go 10-20 miles per hour. The moon is 238,900 miles away, that means if there was a road (with gravity and air) it would take you one year, and 4 and a half months to bike there. Light takes 1.24 seconds to get to the moon. Its the fastest thing possible in the universe.

The thing that got Einstein thinking about relativity is the fact that the speed of light cant be sped up. Most everything else in the universe can be sped up. If you throw a ball forward 20 miles an hour while you are in a car going 20 miles an hour the ball looks like its going (about) 40 miles an hour to someone standing on the side of the road (its not exactly 40 miles an hour, but close enough, we can look into this more in the future). If you hold the ball in your hand, it doesn't look like its moving at all, but if you are in a car going 20 miles an hour, its actually going 20 miles an hour relative to someone watching on the side of the road.

Here is where relativity comes in. If you noticed I said "relative to". Relative to means "compared to". Pretty much everything in the universe can be looked at differently depending on who is looking at it. A car looks pretty big close up, but if you are far away it looks very tiny. If you are in a car going fast, a house that is standing still, looks like its going past you very fast even though its standing still compared to the earth.

The weird thing about light though, is no matter where its coming from (even if its on a car going a MILLION miles an hour) light always goes the same speed. (We have tested this in almost every way possible and we always find this to be true) Its always the same speed no matter what. This causes some problems that I will show you.

Look at this light "ping pong" clock. Imagine you can slow down time to look at light, and imagine you have 2 mirrors with a bit of light bouncing back and forth between them forever.

Notice how the clock on the left and the clock on the right are not in sync? This is because the clock on the right is moving, and because of that it has a longer distance to travel. Take our a ruler and measure to verify for yourself.

The clock on the right is actually slower (it takes longer for the light to bounce back and forth between the same mirrors) than the clock on the left. This shows that the faster you go, the more time slows down for you (but only you) You don't normally notice this because light is so fast, so the amount of time that is slowed down by going as fast as humans can isn't really noticeable. But we tested this by sending a very accurate clock up in space in a spaceship that was going around the earth (this is called orbiting) very fast. After a while when it came back down, we compared the clock to another very accurate clock we kept on earth, and it was off by 0.007 (not a lot, but enough to prove Einstein right!)

So we know this works, but WHY is the speed of light a constant? I don't like to answer why questions in science because it implies purpose and a pre-defined goal. The speed of light is one of the things that we found out through testing a lot of stuff. There could be a hidden mechanism that prevents light from going faster than its current speed, but for right now we don't know.

There is a lot we still don't know today, and that's what makes science exciting. It seems like every time we figure something out, two more questions pop up that we cant answer. Its like a puzzle that keeps making new puzzles. :)

So the moral of this story is that faster you go (the closer to the speed of light you are) the more time will slow down for you, and the more everyone else around you will look to be going faster.

(Just wanted to point out, that there was a typo in the statement: "The clock on the right is actually slower (it takes longer for the light to bounce back and forth between the same mirrors) than the clock on the right." that an anonymous comment caught, thanks!)

Sunday, January 6, 2013

Airplane wings

So a buddy of mine recently started ranting about how planes shouldn't work. And im still not sure if hes kidding or just trying to get me to rant about science. Either way, I love ranting about science and thought this would be another great questions to answer as simply as I could.

So in our first terrible mspaint image, you have a bunch of air particles (if you dont already know, air is made of tiny little things called atoms), and a wing (we dont care about the shape just yet). The drawing is pretty bad, but imagine that the air particles are evenly spaced around the wing. The spacing of particles is called "air pressure" the more air particles there are packed into a space, the tighter they are together, the more air pressure there is because air particles like to be spread out. This is why in space movies if you open a window all the air goes rushing out, because there are NO air particles in space (or very very few at least) and LOTS of air particles inside for us to breath.

 Our next image two images show the wing moving to the left, and a vacum is formed. This vacum is formed because we moved the wing closer to the particles on the left, but away from the particles on the right. Because of this, the space that the wing normally took up is empty, and the wing is started to bump into particles on the left.

Now the particles on the right are spacing out a bit more because they have more room. (because air particles like to spread out evenly) Imagine sitting on a crowed couch, and someone gets up. Everyone else will want to spread out a bit to be more comfortable. The area above and behind the wing now has a lower air pressure. No particles on the lower left of the wing have come into contact yet, so they are blissfully unaware of what is to come :)

Uh oh... the particles to the bottom left of the wing just got smushed. Now that they are all crammed together, underneath and infront of the wing has a higher air pressure, and because the wing moved again we have another vacuum behind/on top of it.

But this time some of the air from in front of the wing (at the top tip, just high enough over it to not get smushed below it) is going to get sucked downwards into the vacum. All particles that are near the vacum are going to get sucked into it. Except for the particles that are in front of/below the wing, because the wing is in the way.

So this keeps happening (not in steps like this, but continuously so that the vacum builds up more and more the faster the wing goes, and more and more particles get crammed together on the bottom of the wing. This difference in air particle spacing is the difference in air pressure, and because lower air pressures like to suck things into them, and higher air pressures like to press against things, the two work together to push the wing up into the air.

Vacum cleaners work because they push air particles out of a chamber, which creates lower air pressure inside. Because there is a higher air pressure outside the chamber, those particles want to spread out and  rush to get inside and fill the chamber.

Balloons are a great example of high air pressure. The more air you put into a balloon, the more it presses against the rubber walls. If you keep putting more and more inside, eventually it will pop. But if you let go of the hole you were blowing into, you will see the air pushes very fast to get out. (This is because there is a higher pressure inside compared to the air outside.

So all in all, airplane wings work because they create more air pressure underneath the wing, and less air pressure above the wing, and the faster they go, the bigger the difference is, and the bigger the difference is the stronger the wing will be lifted.

Here is a nifty video to show it in real life, and in slow motion :)

A coworker reminded me that you can easily put your hand out of a car window while moving and see this effect for yourself by slightly tipping your hand up and down. (Make sure nothing is close to the side of the road so that you keep all of your hands/fingers) :)