In this guide, we'll look at common methods of detecting people and some of the different sensors you can use to detect people in your next project.

Transcript

Detecting if a person is or is not physically present can be useful for a range of internet of things and home automation applications, such as automatic lighting and security systems. Today we're going to look at some common sensors that you can use to detect people, how they work and when to use each one. The sensors we are looking at are PIR, radar, ultrasonic and laser. All of these are linked in the guide, so head over there if you want to check out any of them in more detail.

All around you right now there is a bunch of different light, sound and radiation bouncing all over the place. Each of these sensors work by watching for these things in the physical space, like this studio, and detect when a person causes them to fluctuate or change unexpectedly.

The PIR sensor, which stands for passive infrared, monitors for changes of infrared radiation. Anything that gives off heat is detectable as infrared, such as the human body. They work by using a pyroelectric sensor, which inside has two halves, kind of like two little windows. Sitting on top is a dome called a Fresnel lens, which directs light coming in from different directions straight into either one of the two windows. If either of the two windows detects more infrared than the other window, an electrical imbalance is created inside the sensor which tells it that something has been detected. The middle pin goes high when something is detected and then low when that something is no longer detected, which can be read from a microcontroller like the Raspberry Pi Pico. You can also control the sensitivity and high to low delay time with the on-board trim pots. This one is delay and this one is sensitivity.

The heat from our body radiates as infrared, which makes the PIR sensor great for detecting people, but this also makes them susceptible to interference from other heat. Sensors are essential components in electronic devices. These devices have revolutionized the way we live and interact with the world around us. There are different types of sensors, each with unique capabilities. One type of sensor is a PIR (Passive Infrared) sensor, which detects infrared radiation emitted by living sources, especially the sun. PIR sensors work best in spaces out of direct sunlight and that don't have fluctuating heat sources, such as fireplaces.

However, this is not a problem for the next type of sensor, the radar. Radar sensors monitor for changes in microwave and millimetre wave radiation. They work by first emitting signals at their chosen frequency and then monitor for changes in the signals when they bounce back to the sensor. One significant advantage they have over PIR sensors is that they can detect through solid non-metal surfaces, making them handy for putting inside a waterproof enclosure or detecting movement through walls and ceilings.

It's important to note that radar sensors don't like metal, so you need to make sure that you're not blocking the front side of these sensors with metal and that the back side is also clear for at least one centimeter. This microwave-based radar operates at around 3 gigahertz. It is operated much like a PIR sensor and has an output pin that goes high when motion is detected. However, unlike a PIR, you cannot customize the sensitivity and any delay timing. It needs to be implemented manually in your own code on a microcontroller.

That being said, this unit is a great replacement for the trusty old PIR as it costs roughly the same price at only a few bucks, works inside a project box, and doesn't trip up from interference so easily. This is a millimetre wave or mm wave-based radar, which operates at a much higher 24 gigahertz. This sensor is similar to but more sophisticated than the microwave radar, although it does cost more. My favourite feature is that it not only detects people when they are moving, but it also detects people when they are standing still. For example, if someone walked into a room, the PIR and microwave sensor would at first detect them, but once they sat down and stopped moving, they would both think the person wasn't there anymore. However, the mm radar would still detect that person's presence even if they were sitting still.

Overall, each sensor type has its advantages and disadvantages. It's essential to choose the right sensor for a project, depending on what they need to detect, their placement, and their environment. Whether it's a PIR, microwave radar, or mm wave-based radar, each sensor serves a unique purpose and can make a difference in maximizing a project's potential.In this discussion, we'll be diving into different types of sensors used for detecting people. Firstly, we'll start with passive infrared (PIR) and microwave radar sensors. PIR sensors work by detecting changes in infrared radiation, such as the radiation that a person or animal emits. Microwave radar sensors work by emitting microwave radiation and detecting the radiation reflected back. These two sensors are commonly found in motion-activated lights and security systems.

However, a possible issue with these sensors is that they may not detect the presence of a person if they are stationary or not moving. This is where mm wave sensors shine. These sensors are smarter than PIR and microwave radar, as they can detect stationary objects and people. They work by emitting and detecting millimetre waves and determining any changes in those waves. For instance, they can detect the presence of a person sitting at their desk, so the lights can stay on while they work.

Most mm wave sensors include a UART interface for configuring the sensor and reading the detection state over serial. Users are able to configure the detection distance and timing and read back a constant stream of detection statuses. If readers have any personal experiences with this module, we'd love to hear from you. When configured correctly, this sensor can work really well; it significantly outperforms a PIR in both reaction time and rejecting false positives.

Moving on to our last two sensors: ultrasonic and laser sensors. Unlike area-based sensors, ultrasonic and laser sensors are distance-based. These sensors send out a signal, which bounces off whatever is in front of it and measures how long it takes for the signal to bounce back. These sensors work in a single direction and can be used in a tripwire setup to detect any unexpected changes to distance. For example, an ultrasonic or laser sensor might activate a ding-dong tone in a store when a customer walks through its path.Distance measurements from these sensors can detect someone walking up or down a hallway or if someone is stationary in front of the sensor, such as sitting at a desk. This is a PiicoDev ultrasonic. Like all ultrasonic sensors, it works by sending out sound waves beyond human hearing, kinda like how a bat uses echolocation. Ultrasonic sensors are cost-effective. This one costs half the price of its laser counterpart but they do have a shorter range - this one is up to a few meters.

Ultrasonic sensors are not affected by light interference like lasers. However, they aren't well suited to noisy environments, as other sound waves may cause interference. This is a PiicoDev laser sensor, which like all lasers, works by sending out light pulses. Laser sensors are more accurate than ultrasonic, with up to per millimetre readings and usually have a longer range as well - this module is accurate up to 4 meters. However, they are susceptible to interference from light in the infrared spectrum, which sunlight contains lots of, so these sensors work best when indoors. Conversely, they aren't affected by sound at all, like the ultrasonic, which can make them a good alternative in noisy environments.

There are great guides on how to use both of these ultrasonic and laser sensors, which are linked in the guide if you want to check them out. We've covered the most common types of sensors for detecting people, but there are many other ways that it can be done, from combining simple electronic components to using cameras and AI. Check out the guide for a suite of other sensors and components that you can use. If you're detecting people in an interesting way, or if you have any questions about anything from this video, let us know about it in the comments or on the forums. And until next time, happy making!

Comments


Loading...
Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.