[00:00]
But have you ever wondered how they work? There are several kinds out there but the most common one is the passive infrared sensor. You might already know that these detect your body heat, but how does it do that?
[00:16]
And what’s going on inside here to, y’know, actually determine that something is moving and not just warm? Like so many of the ubiquitous devices in our lives, the fundamental thing this is doing is incredibly simple.
[00:29]
But look at how all its pieces fit together and you’ll start to uncover something amazing. You’re glowing today! In the infrared.
[00:44]
“All matter with a temperature greater than absolute zero emits thermal radiation” and we matter! And greater than absolute zero. Now, fun fact about infrared light, when it lands on stuff it heats that stuff up.
[01:04]
So you literally make everyone and everything around you just a little bit warmer simply by being there. Because of a little phenomenon called pyroelectricity.
[01:18]
no not like that actual crystals — Gallium nitride is one such crystal. It’s a really, really small effect producing only a wee bit of voltage so it’s not like they’re useful for doing work
[01:36]
but thanks to the extremely sensitive field-effect transistor or FET, pyroelectric crystals can be used to detect changes in heat. Hook one of these crystals up to the gate of a sufficiently sensitive transistor
[01:50]
and you can produce a large electrical signal when the crystal heats up even just a tiny little bit. Since your body is constantly radiating infrared light, that means a pyroelectric crystal could be used to detect your presence.
[02:05]
If you glitched into existence right in front of a pyroelectric crystal [fwoop] it would produce a blip of voltage as your body heat raised its temperature
[02:17]
It’s only the change in temperature that produces the voltage, otherwise we’d have something of a free energy device on our hands. So once your body heat brought it to a new equilibrium temperature,
[02:30]
But also, we don’t want that anyway. Such a sensor would react to anything near it that quickly changes temperature - say a heater switching on. But what if you had…
[02:45]
If one crystal warmed up but the other didn’t, there'd be an imbalance in voltage between the two which could be measured. So if you can figure out a way to cause a person moving in front of a device with a pair of pyroelectric crystals to heat only one of them at a time,
[03:04]
Which brings us to these: here I have two common types of passive infrared sensor, both used in lighting products.
[03:17]
The translucent piece of plastic you find on the front of both sensors is actually a complicated lens. They look cloudy since they’re not transparent to visible light, but this material affects infrared light just as if it were glass.
[03:31]
And sitting behind the lens (quite far behind it as a matter of fact) is our pair of pyroelectric crystals. They’re inside this metal can and hiding underneath a filter which rejects visible light so we can’t see them,
[03:45]
And what’s inside? This may not look like much but this is in fact a pair of pyroelectric crystals.
[03:58]
OK, well the H isn’t - at least, I don’t think it is. Full disclosure, I don’t really understand how this is constructed or indeed what the crystals are - Pyroelectricity is exhibited in lots of stuff.
[04:14]
And I’m not even sure this is only two crystals. If you look closely, you’ll see that there’s a translucent, vaguely shiny and stripy pattern on top of the H. That could be a series of crystals, and my intuition tells me the H we see below them
[04:32]
is a printed pattern on their support which helps maximize the temperature differential between different areas of the crystal surface by absorbing more IR in some spots and reflecting more in others.
[04:44]
I was looking through some data sheets for similar parts and this arrangement isn’t always the same, which leads me to believe that the actual sensor element can be tuned for different applications. Regardless of the specifics, look closely and you’ll see that the crystal is sort of floating above…
[05:02]
So I broke it to see what that something was. And it’s a small transistor package containing a FET. Now that we can see everything, we can figure out how this component works.
[05:15]
Its three pins which attach it to a circuit board are labeled V, G, and S. Then if we look back at the component’s topside, we see that the voltage and signal pins are connected to the source and drain of the FET.
[05:31]
But the ground connection - that went to one side of the crystal element. And, before I destroyed it, the other side of the crystal was connected to the gate of the FET. Now, you might be a bit confused here because I said there were two crystals
[05:49]
and yet there’s only one structure connected to one transistor. The two crystal elements found on this structure have opposite polarity.
[06:02]
While one produces a positive voltage, the other produces a negative voltage. This means that if the whole structure heats up, while both crystals will produce some voltage, they perfectly oppose each other.
[06:15]
And the net effect is… nothing happens. Well, let’s say there was a bright flash of light - maybe from lightning. That will actually cause a voltage spike in a pyroelectric material because that visible light also becomes heat when it’s absorbed by it.
[06:34]
Thanks to the opposing polarity of the crystals it won’t. the equal and opposite voltages produced in the two halves of the pyroelectric element cancel each other out.
[06:51]
If it’s only partially heated, then only one crystal produces voltage while the other doesn’t. That means there’s an imbalance, so there’s a voltage potential across the entire structure.
[07:05]
And, since that structure is connected across ground and the gate of the transistor, that difference in heat (and thus difference in potential) will trigger the FET and it will in turn produce a blip on the signal pin.
[07:18]
I mean, lenses. If I remove this and we look at the backside, you’ll see that this is actually a bunch of Fresnel lenses. Counting each section with a circle bit as one lens means there are twenty-eight lenses in total.
[07:36]
Unfortunately because this is designed to bend infrared light and not visible light I can’t demonstrate what this lens is actually doing all that well. But if I stick my phone’s flashlight behind it at roughly the same position the crystals sit,
[07:51]
you might be able to see that only one section of the lens lights up brightly, and which section lights up changes as I move the camera around. Of course, in practice, this is designed to collect light and focus it on the sensor
[08:07]
But hopefully this helps you understand that each section of this lens is looking at a narrow slice of what’s in front of it. The infrared light your body is emitting will be collected by these lenses
[08:25]
and projected onto the inside surface of the enclosure as a series of fuzzy spots. Since it’s infrared light, wherever those spots land heats up just a tiny bit.
[08:38]
And here’s the key: as you move in front of the lenses, those fuzzy spots of infrared light will move, too. And some of them will end up sweeping across the crystal face, heating one side first, and then the other.
[08:53]
That temperature imbalance as the warm spot sweeps across means there’s a voltage imbalance in the crystal, With each lens collecting light from a small slice of its field of view, these sweeps of IR across the sensor repeat as you continue moving.
[09:13]
It's tough because I can’t show you this but As the ball turns (this clip is only seven seconds long, so it’s gonna loop a lot)
[09:26]
sorry couldn’t resist). As the ball turns, thanks to the fog machine in the room, we can see the moving beams of light that sweep across the space. The same thing would happen if the ball were motionless but the light shining on it was moving around the ball.
[09:45]
And if we look at the walls of the room, you’ll see that those spots of light are sweeping across the walls. This motion sensor is basically exactly that, but in reverse. The lens is collecting your body heat and creating hot spots inside this enclosure, focused on the sensor.
[10:03]
As you move in front of this thing, those spots move, too. When they sweep across the two halves of the pyroelectric crystal, it generates enough voltage to trigger the transistor and produce a signal blip.
[10:16]
Then, the electronics inside the device will… do whatever it is they’re supposed to do. And by the way, infrared motion sensors can be more like disco balls than you may realize. When the front face of one of these looks uniform rather than segmented, sometimes it isn’t a lens.
[10:33]
Instead it might be a simple window that’s transparent to infrared, and behind it is a segmented mirror focusing and reflecting light onto the pyroelectric sensor.
[10:45]
Those mirror segments reflect your body heat onto the face of the crystal, and just like the segmented lens, the spots of heat your body generates on the crystal move across it as you move around. A sweep across produces a voltage imbalance, which triggers the FET, and the electronics react accordingly.
[11:03]
Speaking of electronics, this module is the kind of module you typically find on an outdoor floodlight. These knobs turn potentiometers on the board: one for the time the light should stay on after being triggered
[11:19]
What that distance adjustment does is change how many signal blips from the sensor are required in a given time for the module to interpret movement.
[11:31]
Set at its furthest distance, it may react to just a couple of blips. But you can dull its sensitivity by requiring the logic to see more blips from the sensor before it switches the lights on.
[11:44]
You probably noticed already that some of the lens elements are smaller and they’re aimed in different directions. The smaller lenses at the bottom won’t produce as bright of an infrared spot on the inside as their larger neighbors,
[12:01]
you have to be closer to this (with your body taking up more of its angular view) for those lens segments to trigger the sensor. So, if you require more sensor blips in a given period to trigger this,
[12:16]
the thing it’s reacting to needs to be closer to it so it’s seen by more of the lens elements and causes more IR sweeps and thus more signal blips more quickly.
[12:28]
Of course, there are plenty of other designs you can play with, but like everything in life, there are tradeoffs. The golf ball lookin' lens on this solar light, since it’s a hemisphere, is able to detect movement across a wider field of view.
[12:43]
You often see this kind of sensor on ceilings to detect room occupancy. you have to be pretty close to this for your body heat to affect the pyroelectric crystal.
[12:57]
That gives it a limited detection range, and since the lens elements are mostly uniform, while you could in theory adjust its sensitivity that won’t correspond as nicely to distance as it does with this design.
[13:12]
You can also use the lens elements and their size to calibrate how large of a living creature you want this to react to. Lots of home security systems have motion sensors that don’t react to pets,
[13:25]
and one way that's is accomplished is by using lens elements that are simply too small to generate enough heat on the crystal It may also use smaller lens elements for areas facing the floor.
[13:40]
Since the actual sensor in these is so simple, tweaks to the lens and careful calibration is really the name of the game here. And as you might have noticed, at the end of every video
[13:55]
this scrolling list of names appears. These are some of the lovely people who are supporting my work via Patreon. I haven’t really talked about Patreon in a long time because, to be honest, I’m doing just fine.
[14:11]
But in the video I just made where I was fawning over awnings, it was dawning on some folks that I’ve never done a sponsored segment or ad read. I’ve never explicitly said that since I don’t like tooting my own horn, and also that's a weird thing to brag about:
[14:28]
Especially if they’re funny. But truly, the reason I'm not doing that is these folks! I consider myself very lucky that I don’t have to read words somebody at a PR firm wrote for me,
[14:44]
and so long as I can keep going as I am now, I won’t. So as the jazz fades in, I want to give a heartfelt thanks not just to the people you see here but everyone who supports my work on Patreon.
[14:57]
I’ve got a lot of cool plans lined up and they’re all made possible by people like you. What is this, PBS? But look at how all its… beh.
[15:13]
It may be gallium nitride but it could be something else. What? What am I doing? And what goes in front of it?
[15:26]
Oh. Well that’s a problem. If you… I need you to stay… I need you to not do that.
[15:41]
And one way this is accomplished is by using smalllllllll what? Well I skipped a skipped some words.
[15:54]
Speaking of oops, I'm sitting at my desk with the top half of the flood light sensor enclosure and there's a little mirror in there I didn't show you! It's angled to help the IR coming in from the extreme side areas of the lens make it onto the sensor.
[16:06]
And it looks like it's also throwing the light coming up from the small segments at the bottom back downward. Neat.