{"id":4075,"date":"2026-04-05T09:00:00","date_gmt":"2026-04-05T09:00:00","guid":{"rendered":"https:\/\/pirhome.com\/?p=4006"},"modified":"2026-04-05T09:00:00","modified_gmt":"2026-04-05T09:00:00","slug":"pir-sensor-arrays-people-counting","status":"publish","type":"post","link":"https:\/\/www.pirhome.com\/?p=4075","title":{"rendered":"PIR Sensor Arrays for People Counting and Tracking"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>While a single PIR sensor can detect motion, multiple sensors in an array can count people, determine direction, and even track movement. This guide covers array configurations and signal processing techniques.<\/p>\n<h2>Why Use Arrays?<\/h2>\n<ul>\n<li>People counting: Determine number of people passing a point<\/li>\n<li>Direction detection: Know whether someone entered or exited<\/li>\n<li>Tracking: Follow movement across a space<\/li>\n<li>Improved accuracy: Reduce false positives through sensor fusion<\/li>\n<li>Coverage: Eliminate blind spots with overlapping fields<\/li>\n<\/ul>\n<h2>Array Configurations<\/h2>\n<h3>Linear Array (Direction Detection)<\/h3>\n<p>Two PIR sensors placed side by side with overlapping fields. The order of triggering indicates direction: left-to-right vs. right-to-left.<\/p>\n<h3>2\u00d72 Grid (Basic Tracking)<\/h3>\n<p>Four sensors in a square pattern. Can track quadrant-level movement.<\/p>\n<h3>Ceiling-Mounted Circular Array<\/h3>\n<p>Multiple sensors arranged radially for 360\u00b0 coverage. Used in room occupancy counting.<\/p>\n<h2>Signal Processing for Arrays<\/h2>\n<h3>Correlation Method<\/h3>\n<p>Cross-correlate signals from adjacent sensors to determine time delay and thus direction\/speed.<\/p>\n<pre><code>\/\/ Simplified direction detection\nif (sensor1.triggered && sensor2.triggered) {\n  timeDiff = sensor2.triggerTime - sensor1.triggerTime;\n  if (abs(timeDiff) < threshold) {\n    if (timeDiff > 0) direction = LEFT_TO_RIGHT;\n    else direction = RIGHT_TO_LEFT;\n  }\n}\n<\/code><\/pre>\n<h3>Machine Learning<\/h3>\n<p>Train a model on multi-sensor data to classify patterns (e.g., one person vs. two people walking together).<\/p>\n<h2>People Counting Algorithms<\/h2>\n<h3>Dual-Sensor Counting<\/h3>\n<p>Two sensors in a narrow passage. Algorithm:<\/p>\n<ol>\n<li>Detect trigger order<\/li>\n<li>Increment count for entry direction, decrement for exit<\/li>\n<li>Handle edge cases (people stopping, turning around)<\/li>\n<\/ol>\n<h3>Zone-Based Counting<\/h3>\n<p>Divide area into zones, each covered by a sensor. Track occupancy by monitoring which zones are active.<\/p>\n<h2>Hardware Implementation<\/h2>\n<h3>Discrete Sensors<\/h3>\n<p>Multiple individual PIR modules, each with its own signal conditioning. Requires multiple microcontroller inputs.<\/p>\n<h3>Integrated Arrays<\/h3>\n<p>Some manufacturers offer multi-element pyroelectric arrays in a single package (e.g., 2\u00d72 elements). These simplify design and ensure matched performance.<\/p>\n<h2>Case Study: Retail Store Entry Counter<\/h2>\n<p>A retail store installed a dual-sensor PIR array above the entrance. The system counts customers entering and exiting, updates real-time occupancy display, and triggers alerts when capacity reached. Achieved 95% accuracy after calibration.<\/p>\n<h2>DIY Implementation Example<\/h2>\n<pre><code>\/\/ Pseudo-code for 2-sensor direction detection\nconst int sensorLeft = 2;\nconst int sensorRight = 3;\nvolatile unsigned long timeLeft, timeRight;\nvolatile bool triggeredLeft, triggeredRight;\n\nvoid leftISR() {\n  timeLeft = millis();\n  triggeredLeft = true;\n}\n\nvoid rightISR() {\n  timeRight = millis();\n  triggeredRight = true;\n}\n\nvoid loop() {\n  if (triggeredLeft && triggeredRight) {\n    if (timeLeft < timeRight) {\n      count++;\n    } else {\n      count--;\n    }\n    triggeredLeft = triggeredRight = false;\n  }\n}\n<\/code><\/pre>\n<h2>Conclusion<\/h2>\n<p>PIR sensor arrays unlock advanced capabilities beyond simple motion detection. With careful design and signal processing, they can provide people counting, direction detection, and tracking for a fraction of the cost of camera-based systems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction While a single PIR sensor can detect motion, multiple sensors in an array can count people, determine direction, and even track movement. This guide covers array configurations and signal processing techniques. Why Use Arrays? People counting: Determine number of people passing a point Direction detection: Know whether someone entered or exited Tracking: Follow movement [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[],"class_list":["post-4075","post","type-post","status-publish","format-standard","hentry","category-reference"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\r\n<title>PIR Sensor Arrays for People Counting and Tracking - PIRHOME<\/title>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/www.pirhome.com\/?p=4075\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"PIR Sensor Arrays for People Counting and Tracking - PIRHOME\" \/>\r\n<meta property=\"og:description\" content=\"Introduction While a single PIR sensor can detect motion, multiple sensors in an array can count people, determine direction, and even track movement. This guide covers array configurations and signal processing techniques. Why Use Arrays? People counting: Determine number of people passing a point Direction detection: Know whether someone entered or exited Tracking: Follow movement [&hellip;]\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/www.pirhome.com\/?p=4075\" \/>\r\n<meta property=\"og:site_name\" content=\"PIRHOME\" \/>\r\n<meta property=\"article:published_time\" content=\"2026-04-05T09:00:00+00:00\" \/>\r\n<meta name=\"author\" content=\"nic@nicsky.com\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"nic@nicsky.com\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075\"},\"author\":{\"name\":\"nic@nicsky.com\",\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/person\\\/41049b5236f9c77c9314997d070db3e3\"},\"headline\":\"PIR Sensor Arrays for People Counting and Tracking\",\"datePublished\":\"2026-04-05T09:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075\"},\"wordCount\":337,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#organization\"},\"articleSection\":[\"Reference\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.pirhome.com\\\/?p=4075#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075\",\"name\":\"PIR Sensor Arrays for People Counting and Tracking - PIRHOME\",\"isPartOf\":{\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#website\"},\"datePublished\":\"2026-04-05T09:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.pirhome.com\\\/?p=4075\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.pirhome.com\\\/?p=4075#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\\\/\\\/www.pirhome.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"PIR Sensor Arrays for People Counting and Tracking\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#website\",\"url\":\"http:\\\/\\\/www.pirhome.com\\\/\",\"name\":\"PIRHOME\",\"description\":\"PIR &amp; Motion Sensor\",\"publisher\":{\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\\\/\\\/www.pirhome.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#organization\",\"name\":\"PIRHOME\",\"url\":\"http:\\\/\\\/www.pirhome.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.pirhome.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg\",\"contentUrl\":\"https:\\\/\\\/www.pirhome.com\\\/wp-content\\\/uploads\\\/2026\\\/02\\\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg\",\"width\":512,\"height\":512,\"caption\":\"PIRHOME\"},\"image\":{\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"http:\\\/\\\/www.pirhome.com\\\/#\\\/schema\\\/person\\\/41049b5236f9c77c9314997d070db3e3\",\"name\":\"nic@nicsky.com\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g\",\"caption\":\"nic@nicsky.com\"},\"sameAs\":[\"http:\\\/\\\/www.pirhome.com\"],\"url\":\"https:\\\/\\\/www.pirhome.com\\\/?author=1\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"PIR Sensor Arrays for People Counting and Tracking - PIRHOME","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.pirhome.com\/?p=4075","og_locale":"en_US","og_type":"article","og_title":"PIR Sensor Arrays for People Counting and Tracking - PIRHOME","og_description":"Introduction While a single PIR sensor can detect motion, multiple sensors in an array can count people, determine direction, and even track movement. This guide covers array configurations and signal processing techniques. Why Use Arrays? People counting: Determine number of people passing a point Direction detection: Know whether someone entered or exited Tracking: Follow movement [&hellip;]","og_url":"https:\/\/www.pirhome.com\/?p=4075","og_site_name":"PIRHOME","article_published_time":"2026-04-05T09:00:00+00:00","author":"nic@nicsky.com","twitter_card":"summary_large_image","twitter_misc":{"Written by":"nic@nicsky.com","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.pirhome.com\/?p=4075#article","isPartOf":{"@id":"https:\/\/www.pirhome.com\/?p=4075"},"author":{"name":"nic@nicsky.com","@id":"http:\/\/www.pirhome.com\/#\/schema\/person\/41049b5236f9c77c9314997d070db3e3"},"headline":"PIR Sensor Arrays for People Counting and Tracking","datePublished":"2026-04-05T09:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/www.pirhome.com\/?p=4075"},"wordCount":337,"commentCount":0,"publisher":{"@id":"http:\/\/www.pirhome.com\/#organization"},"articleSection":["Reference"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.pirhome.com\/?p=4075#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.pirhome.com\/?p=4075","url":"https:\/\/www.pirhome.com\/?p=4075","name":"PIR Sensor Arrays for People Counting and Tracking - PIRHOME","isPartOf":{"@id":"http:\/\/www.pirhome.com\/#website"},"datePublished":"2026-04-05T09:00:00+00:00","breadcrumb":{"@id":"https:\/\/www.pirhome.com\/?p=4075#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.pirhome.com\/?p=4075"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.pirhome.com\/?p=4075#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/www.pirhome.com\/"},{"@type":"ListItem","position":2,"name":"PIR Sensor Arrays for People Counting and Tracking"}]},{"@type":"WebSite","@id":"http:\/\/www.pirhome.com\/#website","url":"http:\/\/www.pirhome.com\/","name":"PIRHOME","description":"PIR &amp; Motion Sensor","publisher":{"@id":"http:\/\/www.pirhome.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/www.pirhome.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/www.pirhome.com\/#organization","name":"PIRHOME","url":"http:\/\/www.pirhome.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/www.pirhome.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.pirhome.com\/wp-content\/uploads\/2026\/02\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg","contentUrl":"https:\/\/www.pirhome.com\/wp-content\/uploads\/2026\/02\/cropped-\u5fae\u4fe1\u56fe\u7247_2026-02-19_222409_472.jpg","width":512,"height":512,"caption":"PIRHOME"},"image":{"@id":"http:\/\/www.pirhome.com\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"http:\/\/www.pirhome.com\/#\/schema\/person\/41049b5236f9c77c9314997d070db3e3","name":"nic@nicsky.com","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/271d4eaab48e299e4fce771a8c43c537be3ac77a3115cc7de802a6c8b692d971?s=96&d=mm&r=g","caption":"nic@nicsky.com"},"sameAs":["http:\/\/www.pirhome.com"],"url":"https:\/\/www.pirhome.com\/?author=1"}]}},"_links":{"self":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4075","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4075"}],"version-history":[{"count":1,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4075\/revisions"}],"predecessor-version":[{"id":4111,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=\/wp\/v2\/posts\/4075\/revisions\/4111"}],"wp:attachment":[{"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4075"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4075"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.pirhome.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4075"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}