Motion Detection Using a Dynamically Configurable 8-bit Microcontroller

Дата канвертавання28.04.2016
Памер26.47 Kb.
Motion Detection Using a Dynamically Configurable 8-bit Microcontroller

This article describes a means for developing a digital motion sensor/occupancy detection system with a pyro-electric (PIR) sensor using a smart 8-bit microcontroller plus software solution from Zilog.

By: John Caras, Senior Field Applications Engineer, Zilog, Inc.

One of the key design challenges in PIR motion detection is the ability to ensure reliability and performance. In order for a designer to keep false alarm/trip rates low, he or she is often forced to make a tradeoff between stability and sensitivity. Pyro-electric sensors require the designer to extract a very small signal from a noisy background with a large DC offset. In traditional designs, electrolytic capacitors are used for DC blocking and multi-stage, op amp-based, low-pass filters and gain stages create stability and susceptibility issues. With Zilog’s Z8F042A motion-detection product, designers are not limited by filter performance and system gain - the raw signal is available for processing with no requirement for external gain or filtering, so that all pertinent signal information remains available, and stability and susceptibility issues are significantly reduced.
Zilog’s Z8 Encore! XPF042A motion detection product is comprised of silicon and software components including a programmable MCU and integrated motion detection software algorithms (the ePIRTM engine). Embedded designers are able to write their own application software - as they would with any typical MCU product - while having all motion detection functions handled by the ePIR engine. Access to the ePIR engine is provided through an API. In addition to the silicon plus software solution, the product includes a series of tested and verified lens/pyro-electric sensor combinations and the associated ePIR Engine API configuration parameters.
Figure 1 shows an example of the circuit design for the F042A 8 pin device for a motion detection application. The interface to the pyro-electric sensor is done via the dedicated input ANA2 (pin 5). Pin 6 is normally configured as a GPIO by the application to control the state of the LED. However, when White Light Detection is enabled, the ePIR engine automatically reconfigures pin 6 to an ADC input to perform the necessary ADC conversion and then returns it to a GPIO when done. Pin 2 is usually reserved as the single pin debug input to the chip and Pin 4 is set up for the Reset function, but either pin can be used for other functions as required for the application. Note that pull-up resistors (10K) are provided on the Debug and Reset signals as required for the Debug interface. The signals on the remaining pins 3 and 7 can be used as needed. However, in Dual Pyro mode, the second Pyro-electric sensor is connected to Pin 3 (ANA3) with all other connections remaining the same.

Figure 1. ePIR Motion Detection Circuit

Z8F042A motion detection with customizable API
The Z8F042A motion detection product comes with the ePIR engine factory pre-programmed in for ease of use. The motion detection algorithms comprising the ePIR engine run in the background of the MCU while control and status of the engine is accessed through a software API (Application Programmer Interface). The ePIR engine is located in the upper 4KB area of the 8KB device leaving 4KB of code space available for custom application development allowing designers to create there own application specific software while taking advantage of Zilog’s motion detection technology. Additionally, the ePIR Engine supports up to two pyro-electric sensors, and standard lens types as required for different applications.
Figure 2. Memory Map

Additional Features of the Z8F042A motion detection product

The Z8F042A motion detection product enables application developers to monitor the direction of motion from left-to-right or right-to-left, which is typically used in counting occupants entering or leaving a room.

White Light Detection

Due to the physical nature of the pyro-electric sensors, sudden large changes in white light will cause a DC shift in the signal output which could potentially generate a false motion event and, in the event of strong white light, blind the sensor rendering the device completely useless. Sources such as car headlights have been known to cause this issue. The Z8F042A motion detection product is tested to 10K Lux white-light, and can easily be used to monitor this occurrence and be configured to ignore the event.

Dynamically Enabled Pet Immunity

Traditional motion detectors require costly custom molded lenses to enable pet immunity. The Z8F042A motion detection product coupled with a standard, low cost, off the shelf lens is tested for pet immunity over 48 kilograms. With simple configuration settings, the Z8F042A motion detection product can filter out frequency content generated from pet activity in a room. And because this is done with a standard lens, the Zilog solution helps lower overall bill of material cost.

Dynamically Adaptive Motion Range/Sensitivity

Occupancy detection for automated-lighting and security detection share similar architectural characteristics making Zilog’s Z8F042A motion detection product scalable across multiple sensing applications including intrusion, lighting control, access control, vending, display, proximity, power/energy management and other general purpose motion detection and control.

Figure 3. Traditional Motion Detector Design vs. Zilog’s Z8F042A Motion Detection Product

Profile Programmability

With the Z8F042A motion detection product, a designer can manage time of day profiling and detection dynamically via profile settings. For example, in a large office building, the motion detector can be used during the daytime to control the automated lighting network with dynamically programmable characteristics such as extended sensitivity and disabling white light and pet immunity. During the night, that same motion detector can be reconfigured for security, dynamically reprogramming the sensitivity to reduce false alarms and enabling white light and pet immunity.

Product Information

Table 1 - ePIR Motion Detection Solution Part Selection Guide

ePIR Motion Detection IC

Part Number

Z8 Encore XP

Base Part Number





ADC Channels







8 pin







20 pin SSOP






28 pin SSOP
Note 1. Available Now

Note 2. Available Q4 09

Keeping it simple
With Zilog’s Z8 Encore! XP Z8F042A motion detection product, you get outstanding performance, bill of materials cost efficiency and the tools and technical support you need to deliver your embedded PIR motion detection solutions to market quickly.
For more information about the Z8 Encore! XP flash microcontrollers and other Zilog products, visit our website at:
Zilog – Embedded in Life.
Zilog, Z8 Encore! XP is a trademark or registered trademark of Zilog Inc. in the United States and in other countries.
All other marks mentioned may be trademarks or registered trademarks of their respective owners.

База данных защищена авторским правом © 2016
звярнуцца да адміністрацыі

    Галоўная старонка