# detecting human presence basic and coding

**URL:** <https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120>\
**Category:** General Guidance\
**Created:** [October 9, 2018, 1:28pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120 "2018-10-09T13:28:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![melchett](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@melchett](https://forum.arduino.cc/u/melchett)\
**Post date:** [October 9, 2018, 1:28pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/1 "2018-10-09T13:28:12Z")

</div>

Hello,

In function of an art project I want to make a led board (6x48) with red leds. Each 6x6 ledmatrix shows one letter. A sensor (thermal sensor?) connected to the arduino decides if the board shows “ENTRY” or “NO ENTRY”. If the board reckognizes a human presence the ledmatrix must show “ENTRY”, If the board doesn’t reckognize a human presence it must show “NO ENTRY”.

My plan: instead of working with a led matrix, I would just connect the LED’s that need to light up.

my questions:

is there an affordable sensor that can get the job done?

what would the code for this project look like? (i know electronics, but don’t have much arduino experience)

---

<div class="post-metadata">

**Author:** ![ardly](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ardly/32/264974_2.png) [@ardly](https://forum.arduino.cc/u/ardly)\
**Post date:** [October 9, 2018, 1:35pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/2 "2018-10-09T13:35:58Z")

</div>

You could just use a light beam. When the beam is not broken display one message, when it is broken display another.  
You could use an ultrasonic sensor to detect something approaching the installation. A lot depends on the geometry of the situation e.g. how people will approach and leave the exhibit. You also need to think about how you handle multiple people.

---

<div class="post-metadata">

**Author:** ![wvmarle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wvmarle/32/1013044_2.png) [@wvmarle](https://forum.arduino.cc/u/wvmarle)\
**Post date:** [October 9, 2018, 1:59pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/3 "2018-10-09T13:59:14Z")

</div>

If you're quite sure those people will be moving all the time (or at least not sit still for long) a PIR motion sensor may do the job.

---

<div class="post-metadata">

**Author:** ![johnwasser](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/johnwasser/32/214270_2.png) [@johnwasser](https://forum.arduino.cc/u/johnwasser)\
**Post date:** [October 9, 2018, 2:22pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/4 "2018-10-09T14:22:27Z")

</div>

An HC-SR04 ultrasonic range finder is cheap and generally good for detecting presence. It can't tell a human from any other object but what other objects do you expect to be moving around in your display space?

---

<div class="post-metadata">

**Author:** ![melchett](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@melchett](https://forum.arduino.cc/u/melchett)\
**Post date:** [October 9, 2018, 2:47pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/5 "2018-10-09T14:47:37Z")

</div>

Hello,

I clarify, I want people to stand for the sensor and the sensor needs to read if the person for the sensor is a human or for example a can of coca cola.

So a lightbeam won't do the trick. It needs to measure the difference in temperature and preferrably after the subject takes place after the sensor and waits 10 seconds, or pushes a button,...

---

<div class="post-metadata">

**Author:** ![ardly](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ardly/32/264974_2.png) [@ardly](https://forum.arduino.cc/u/ardly)\
**Post date:** [October 9, 2018, 3:02pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/6 "2018-10-09T15:02:34Z")

</div>

Here they say they have code for an Arduino;

> **[Adafruit AMG8833 IR Thermal Camera Breakout - STEMMA QT](https://shop.pimoroni.com/products/adafruit-amg8833-ir-thermal-camera-breakout?variant=984585994250&gclid=EAIaIQobChMI4tyQ08_53QIVzbDtCh13jgRnEAQYASABEgJZfPD_BwE)**
>
> Add heat-vision to your project and with an Adafruit AMG8833 Grid-EYE Breakout!

You might be able to tell a human from a coke can but telling a human from a cat or dog might not be that easy. There may also be issues with what people are wearing, the ambient temperature and any heat sources in the area.

---

<div class="post-metadata">

**Author:** ![wvmarle](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/wvmarle/32/1013044_2.png) [@wvmarle](https://forum.arduino.cc/u/wvmarle)\
**Post date:** [October 9, 2018, 3:07pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/7 "2018-10-09T15:07:49Z")

</div>

A PIR sensor detects movement of warm objects, such as a person. Stationery warm objects are ignored.

The can of coke is also easily distinguishable from a human using a break beam sensor, by simply placing it above the height of that coke can.

An ultrasound sensor placed above can also simply be set to ignore all objects under it that are less than 90 cm above the floor. Some really short people and very small children may not be detected that way, but the vast majority of people will. The can of coke will also not set it off - but the human placing that can there, may, but that's OK as it's a human which is what you want to detect.

The delay thing can easily be done in software.

---

<div class="post-metadata">

**Author:** ![melchett](https://avatars.discourse-cdn.com/v4/letter/m/47e85d/32.png) [@melchett](https://forum.arduino.cc/u/melchett)\
**Post date:** [October 9, 2018, 7:13pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/8 "2018-10-09T19:13:26Z")

</div>

thanks everybody! the thermal breakout camera will do the thing!

---

<div class="post-metadata">

**Author:** ![ardly](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/ardly/32/264974_2.png) [@ardly](https://forum.arduino.cc/u/ardly)\
**Post date:** [October 11, 2018, 9:52am UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/9 "2018-10-11T09:52:53Z")

</div>

> melchett:  
> thanks everybody! the thermal breakout camera will do the thing!

It is not that cheap but it might do it. The advertising certainly sounds promising but getting things to work can sometimes be a struggle.

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/arduino/user_avatar/forum.arduino.cc/system/32/1140315_2.png) [@system](https://forum.arduino.cc/u/system)\
**Post date:** [May 5, 2021, 6:41pm UTC](https://forum.arduino.cc/t/detecting-human-presence-basic-and-coding/550120/10 "2021-05-05T18:41:54Z")

</div>

Closed on May 5, 2021, 6:41pm UTC


