Zilog ZMOT0BHH User Manual

ZMOTIONL200ZCOG
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
UM023902-1013
Copyright ©2013 Zilog®, Inc. All rights reserved.
www.zilog.com
ZMOTION® 20-Pin Detection and Control Development Kit
Warning:
User Manual
DO NOT USE THIS PRODUCT IN LIFE SUPPORT SYSTEMS.
LIFE SUPPORT POLICY
ZILOG’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT DEVICES OR SYSTEMS WITHOUT THE EXPRESS PRIOR WRITTEN APPROVAL OF THE PRESIDENT AND GENERAL COUNSEL OF ZILOG CORPORATION.
As used herein
Life support devices or systems are devices which (a) are intended for surgical implant into the body, or (b) support or sustain life and whose failure to perform when properly used in accordance with instructions for use provided in the labeling can be reasonably expected to result in a significant injury to the user. A critical component is any component in a life support device or system whose failure to perform can be reasonably expected to cause the failure of the life support device or system or to affect its safety or effectiveness.
Document Disclaimer
©2013 Zilog Inc. All rights reserved. Information in this publication concerning the devices, applications, or technology described is intended to suggest possible uses and may be superseded. ZILOG, INC. DOES NOT ASSUME LIABILITY FOR OR PROVIDE A REPRESENTATION OF ACCURACY OF THE INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED IN THIS DOCUMENT. ZILOG ALSO DOES NOT ASSUME LIABILITY FOR INTELLECTUAL PROPERTY INFRINGEMENT RELATED IN ANY MANNER TO USE OF INFORMATION, DEVICES, OR TECHNOLOGY DESCRIBED HEREIN OR OTHERWISE. The information contained within this document has been verified according to the general principles of electrical and mechanical engineering.
ZMOTION and Z8 Encore! XP are registered trademarks of Zilog Inc. All other product or service names are the property of their respective owners.
UM023902-1013 ii
ZMOTION® 20-Pin Detection and Control Development Kit

Revision History

Each instance in the table below reflects a change to this document from its previous edi­tion. To learn more, refer to the corresponding pages and appropriate links in the table below.
Revision
Date
Oct 2013
Mar 2012
Level Description Page
02 Deleted references to CD-ROM. All software and documentation is available
free from the Zilog Store.
01 Original issue All
User Manual
n/a
UM023902-1013 iii
ZMOTION® 20-Pin Detection and Control Development Kit

Table of Contents

Revision History. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .iii
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Kit Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Supported Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Safeguards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Download and Install the ZDSII Software and Documentation . . . . . . . . . . . . . . . . . 3
Download and Install the Code and Documentation . . . . . . . . . . . . . . . . . . . . . . . . . 3
Safeguards . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
ZMOTION 20-Pin Detection and Control Development Board . . . . . . . . . . . . . . . . . . . . 6
Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
MCU Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
ZMOTION 20-Pin Detection and Control Development Kit Lenses and
Pyroelectric Sensors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Pyroelectric Sensor Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Lens Mounting Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Attaching the PIR Sensor Lens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Attaching the Circuit Board Lens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Assembling the Circular Lens Holder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Assembling the Flat Lens Holder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Connecting the USB SmartCable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Running the Sample Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
ZMOTION 20-Pin Development Kit Application Software . . . . . . . . . . . . . . . 19
Making Changes to the ZMOTION_Serial_Config Project . . . . . . . . . . . . . . . . 21
User Manual
Appendix A. Installing the USB SmartCable Driver . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Windows 7 32/64 Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
Windows Vista 32/64 Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Windows XP Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
Appendix B. Installing the FTDI USB-to-UART Driver . . . . . . . . . . . . . . . . . . . . . . . . 26
Appendix C. Schematic Diagrams . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
Customer Support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
UM023902-1013 iv

Introduction

Note:
Zilog’s ZMOTION 20-Pin Development Kit provides a general-purpose platform for eval­uating the capabilities and operation of the ZMOTION 20-Pin Detection and Control Fam­ily of microcontrollers featuring Zilog’s passive infrared (PIR) technology. The family includes a series of high-performance microcontrollers with integrated motion detection algorithms. A variety of included lenses and pyroelectric sensors demonstrate the flexibil­ity of the integrated motion detection algorithms to provide the best p ossible performance for a range of lighting, detection and control applications.
This user manual acquaints users with Zilog’s ZMOTION 20-Pin Detection and Control Development Kit Revision B or later.
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
The Z8FS040 MCU, a prominent member of the ZMOTION 20-Pin Detection and Con­trol Family, combines the programmability and rich peripheral set of Zilog’s Flash Z8 Encore! XP vide the functions necessary for PIR motion detection applications. These motion detec­tion algorithms comprise Zilog’ s PIR technolo gy and run in the background while control and status of the motion detection engine is accessed through a software Application Pro­grammer Interface (API). As a result, the designer can create his or her own application­specific software while taking advantage of Zilog’s ZMOTION Motion Detection Tech­nology.
Within this kit, API settings are provided to match the Engine operation to each of the lens and pyroelectric sensor combinations provided.
T o learn more about the ZMOTION MCU, including functional differences between the 8­and 20-pin versions, refer to the ZMOTION
(PS0285), available free for download from the Zilog website.

Kit Contents

The ZMOTION 20-Pin Detection and Control Development Kit contains the following hardware, software and documentation:

Hardware

®
Family of MCUs with built-in motion detection software algorithms to pro-
Detection and Control Product Specification
ZMOTION 20-Pin Development Board
USB SmartCable Debugger
0.9" Focal Flat Lens Holder
0.77" Focal Circular Lens Holder
Selection of lenses
UM023902-1013 1
ZMOTION® 20-Pin Detection and Control Development Kit
Wall-Mount Power Supply
Lenses
ZMOTION 20-Pin Detection and Control Development Board
Mini-USB Serial Cable
2 additional pyroelectric sensors
USB Smart Cable Debugger
Lens Holders
User Manual
Selection of pyroelectric sensors, including a RE200B-P sensor installed on the Board
Mini-USB serial cable
Wall-mount mini-USB 5 V DC power supply
An assortment of mounting hardware
The contents of the kit are shown in Figure 1.
1
Figure 1. ZMOTION 20-Pin Detection and Control Development Kit Components

Supported Operating Systems

1. Zilog recommends using only the power supply provided in the ZMOTION 20-Pin Detection and Control Development Kit.
UM023902-1013 2
The software and documentation for this kit supports Microsoft Windows 7 (32-bit/64­bit), Windows Vista (32-bit/64-bit) and Windows XP.
ZMOTION® 20-Pin Detection and Control Development Kit
Caution:
Note:

Safeguards

The following precaution must be observed when working with the devices described in this document.
Always use a grounding strap to prevent damage resulting from electrostatic dis­charge (ESD).

Download and Install the ZDSII Software and Documentation

Prior to connecting the ZMOTION Development Board to your PC, observe the following procedure.
User Manual
1. Download ZDS II for Z8 Encore! v5.0.0 (or later) from the Downloadable Software category in the Zilog Store
2. Run the software installation file and follow the on-screen instructions to install ZDS II.
.

Download and Install the Code and Documentation

ZMOTION software and documentation is available as a downloadable file from the Zilog Store. Observe the following brief procedure to download and install your ZMOTION software.
1. In the Zilog Store of the available software in the Zilog Store. In this list, click
Software and Documentation
Product Details page that appears next, click the blue plete the checkout process to download the ZMOTION software and documentation files to your hard drive.
If you’re a first-time visitor to the Zilog Store, you will first be required to register as a Zilog Store user before downloading your software. Returning visitors must log in to pur­chase or download.
, under Categories, click Downloadable Software to present a list
ZMOTIONL200ZCOG
; the Product ID for this software is SD00026. On the
Add to Cart button and com-
2. When the download is complete, unzip the file to your hard drive, double-click to launch the screen instructions.
UM023902-1013 3
ZMOTIONL200ZCOG_<version>.exe installation file, and follow the on-
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
User Manual
<version> represents the release version of the ZMOTIONL200ZCOG installation.
3. When the installation is complete, the ZMOTION documentation will be located in the following path, by default:
C:\Program Files\Zilog\ZMOTIONL200ZCOG_<version>\ZMOTION
Lighting Documentation
Documentation
The following documentation supports the ZMOTION 20-Pin Detection and Control Development Kit.
ZMOTION Detection and Control Product Brief (PB0225)
ZMOTION Detection and Control Development Kit Quick Start Guide (QS0076)
ZMOTION Detection and Control Product Specification (PS0285)
This ZMOTION 20-Pin Detection and Control Development Kit User Manual (UM0239
The following documentation supports the ZMOTION Product Family.
ZMOTION Detection Module: – ZMOTION Detection Module Product Brief (PB0223 ZMOTION Detection Module Product Specification (PS0284
ZMOTION Intrusion Detection: – ZMOTION Intrusion Detection Product Brief (PB0230 ZMOTION Intrusion Detection Product Specification (PS0288
Supporting Documentation: – ZMOTION Lens and Pyroelectric Sensor Product Specification (PS0286 ZMOTION – A New PIR Motion Detection Architecture White Paper (WP0017 ZMOTION Detection Lens and Pyro Sensor Configuration Guide (WP0018 Power Management and Customer Sensing with Zilog’s ZMOTION Detection
ZMOTION Detection Module Application Walkthrough (AN0307 High Brightness LED Reference Design (AN0309 Controlling Power with the ZMOTION Detection Module and Clare Solid State
ZMOTION Intrusion Reference Design (RD0001 Motion Sensing & LED Control with a ZMOTION/ IXYS Display (RD0003 ZMOTION Detection Module II Reference Design (RD0026
)
Module (AN0301
Relays Application Note (AN0319
)
)
)
)
)
)
)
)
)
)
)
)
)
)
UM023902-1013 4

Safeguards

Caution:
The following precaution must be observed when working with the devices described in this document.
Always use a grounding strap to prevent damage resulting from electrostatic dis­charge (ESD).
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
UM023902-1013 5
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual

ZMOTION 20-Pin Detection and Control Development Board

Zilog’s ZMOTION 20-Pin Detection and Control Development Board is a development and prototyping platform for the ZMOTION 20-pin silicon and software, as well as for its lens/pyroelectric sensor/silicon and software bundled solutions. The Board provides the user with a tool to evaluate the many features of ZMOTION PIR technology as well as the actual performance of each lens and pyro combination.

Features

The ZMOTION 20-Pin Detection and Control Development Board features the following elements:
Z8FS040 ZMOTION 20-Pin Detection and Control MCU (20-pin SSOP)
Mini-USB power connector and serial interface
Power-On and Detection LED
On-chip debugger interface
Board openings for an assortment of lens holders and clip-on lens attachments
Prototyping area
2.7 V–3.6 V operating voltage with 5 V-tolerant inputs

MCU Features

The Z8FS040 ZMOTION 20-Pin Detection and Control MCU combines the programma­bility and rich peripheral set of Zilog’s Flash Z8 Encore! XP Family of MCUs with built­in motion detection software algorithms to provide the functions necessary for PIR motion detection applications.
The Z8FS040 MCU includes the following features:
High-performance eZ8® MCU core
4 KB in-circuit programmable Flash memory available for application code
Single-pin debug with unlimited breakpoints
Flexible clocking scheme
Internal precision oscillator running at 5.53 MHz
External oscillator operating up to 20 MHz
Sigma Delta ADC
Four single-ended channels or two differential channels available
On-chip analog comparator with independent programmable reference voltage
UM023902-1013 6
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Full-duplex UART with dedicated BRG
T wo 16-bit timers with input capture, ou tput compare and PWM capability (11 modes total)
Watchdog timer (WDT) with dedicated internal oscillator
Up to 20 vectored interrupts
16 I/O pins
2.7 V to 3.6 V operating voltage with extended operating temperature range –40° C to +105° C
Zilog PIR technology controlled and monitored via software API registers
Selection capability from an assortment of lenses and pyroelectric sensors to best fit your application
API settings provided for each lens and pyroelectric sensor combination
Directly supports 1 or 2 pyroelectric sensors
Sensitivity control, range control and directionality detection
Extended detection modes for occupancy sensing
Low power modes

ZMOTION 20-Pin Detection and Control Development Kit Lenses and Pyroelectric Sensors

The ZMOTION 20-Pin Detection and Control Development Kit includes nine different types of lenses and three different types of pyroelectric sensors to fill a wide variety of lighting control, occupancy sensing, HVAC, display, proximity and power management applications. These applications also demonstrate the flexibility , and superior performance of Zilog’s PIR motion detection technology.
Please refer to the ZMOTION Lens and Pyroelectric Sensor Product Specification
(PS0286) for part-specific details about the individual lenses and pyroelectric sensors.
Refer to the ZMOTION 20-Pin Detection and Control Development Kit Quick Start Guide
(QS0085) for specific installation instructions for the lenses and pyroelectric sensors.

Pyroelectric Sensor Options

The ZMOTION 20-Pin Detection and Control Development Kit includes the following three pyroelectric sensors:
RE200B-P: a basic dual element sensor installed on the board
SDA02-54-P, a premium dual-element sensor
SBDI46-504AA, a quad-element sensor
UM023902-1013 7
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
User Manual
Figure 2. Two Additional Pyroelectric Sensors (L–R): SDA02-54-P and SBDI46-504AA
The type of sensor you use depends on your application requirements; however , not all sen­sors are suitable for all lenses.

Lens Mounting Options

The ZMOTION 20-Pin Detection and Control Development Board supports four lens­mounting options, as indicated in T able 1. For lens installation instructions, please refer to the sections that follow.
Table 1. Four Supported Lens-Mounting Options
Lens Mounting Supported Lens
PIR Sensor Clip-On NCL-9(26)
NCL-3B NCL-3R NCL-10S
NCL-10IL Circuit Board Clip-In CWM 0.5 GI V1 Circular Lens Holder 0.77 Focal CM 0.77 GI V3
CM 0.77 GI V5 Flat Lens Holder 0.9 Focal AA 0.9 GI T1
UM023902-1013 8
ZMOTION® 20-Pin Detection and Control Development Kit

Attaching the PIR Sensor Lens

Each of the clip-on lenses slide atop the PIR sensor, and the notch on the PIR sensor a ligns with the notch in the base of the lens, as shown in Figure 3.
User Manual
Figure 3. NCL-9(26) Lens and PIR Sensor Installed on the
ZMOTION 20-Pin Development Board

Attaching the Circuit Board Lens

This clip-in lens style clips directly into the circuit board over the top of the PIR sensor. There are 4 mounting clips on the lens that are aligned with the slots in the circuit board. Note the locating tab on the side of the lens is to be aligned with the silkscreened tab, as indicated in Figure 4.
UM023902-1013 9
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Figure 4. Assembled Clip-In Lens Installed on the ZMOTION 20-Pin Development Board

Assembling the Circular Lens Holder

The circular lens holder, shown in Figure 5, is a 2-piece assembly that provides a 0.77" focal length mounting.
UM023902-1013 10
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Figure 5. Circular 0.77" Lens Holder (Cap and Base)
To assemble the lens and lens holder, observe the following brief procedure.
1. Place the circular lens into the base of the lens holder, aligning the notch on the lens with the inside notch on the base.
2. Place the circular cap over the lens and the base ensuring the outside tab on the cap aligns with the outside tab on the base. Use the provided ¾" machine screws (2) with a nut to secure the cap in place.
3. Place the lens and lens holder assembly onto the ZMOTION 20-Pin Development Board by aligning the screw holes on the lens holder with the upper set of holes on the circuit board, as shown in Figure 6. The 4 screw holes in the circuit board should line up with the four center-mounting holes in the lens holder.
UM023902-1013 11
ZMOTION® 20-Pin Detection and Control Development Kit
Figure 6. Top of Lens Holder on the ZMOTION 20-Pin Development Board
User Manual
4. Use the provided ⅜" machine screws (4) with a nut to secure the lens holder in place. See Figure 7.
UM023902-1013 12
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Figure 7. Assembled Circular 0.77" Lens Holder and Circular Lens Installed on the
ZMOTION 20-Pin Development Board

Assembling the Flat Lens Holder

The flat lens holder, shown in Fig ures 8 and 9, is a two-piece assembly that provides a 0.9" focal length mounting.
UM023902-1013 13
ZMOTION® 20-Pin Detection and Control Development Kit
Figure 8. Flat 0.9" Lens Holder (Cap and Base)
User Manual
Figure 9. Flat Lens: AA 0.9 GI T1
To assemble this flat lens and holder, observe the following brief procedure.
1. Place the lens into the inside of the cap, ensuring that the grooves of the lens are facing inward.
2. Place the cap over the base, ensuring that the top of the lens is toward the arrow on the base. Use the provided ½" machine screws (2) with a nut to secure the cap in place; see the example in Figure 10.
3. Place the lens and lens holder assembly onto the ZMOTION 20-Pin Development Board with the arrow on the lens holder aligned with the primary placement arrow on the circuit board, as shown in Figure 10. The four screw holes in the circuit board should line up with the four upper mounting holes in the lens holder.
UM023902-1013 14
ZMOTION® 20-Pin Detection and Control Development Kit
Caution:
User Manual
4. Use the provided ⅜" machine screws (4) with a nut to secure the lens holder in place; see the example in Figure 6
Figure 10. Assembled Flat 0.9" Lens Holder and Flat Lens
on page 12.

Connecting the USB SmartCable

Observe the following steps to connect the USB SmartCable to the ZMOTION 20-Pin Development Board.
The power to the development board must be disconnected or turned OFF before con­necting or disconnecting the USB SmartCable.
1. Attach one end of the six-conductor ribbon cable (included) to the USB SmartCable six-pin DBG connector, as shown in Figure 11.
Figure 11. Connecting the Six-Conductor Ribbon Cable to the USB SmartCable
UM023902-1013 15
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
2. Attach the free end of the ribbon cable to the DBG connector (ZDI Interface) on the development board. Ensure that pin 1 on the ribbon cable (indicated by the dark stripe) is aligned with pin 1 on the target connector (indicated by a 1 on P2 of the board).
3. Install the FTDI USB-to-serial driver. For assistance, see Appendix B. Installing the
FTDI USB-to-UART Driver on page 26.

Running the Sample Project

In this example, we reference the ZMOTION_Serial_Config project, which is the proj­ect that the kit is initially programmed with. The steps that follow show you how to build the project and run it on the ZMOTION Module in a debug session; these steps also apply to any of the other projects provided in the kit.
At this point, you should have installed the FTDI-to-USB Serial Driver and loaded ZDS II and the USB SmartCable driver onto your computer. If you haven’t yet done so, refer to
Appendix A. Installing the USB SmartCable Driver Installing the FTDI USB-to-UART Driver on page 26 to learn more about how to install
these items.
User Manual
on page 23 and/or Appendix B.
1. Open ZDS II and select the project folder labeled
C:\Program Files\Zilog\ZMOTIONL200ZCOG_<version>\SW Project and
Downloads\ZMOTION_Serial_Config
File Open Project, then navigate via the following path to
ZMOTION_Serial_Config:
2. Open the ZMotion_Serial_Config_20_Pin.zdsproj project. When you first re­ceive your kit, this project is already loaded into the ZMOTION MCU. Right-click within the open grey area below the menu icons and select
Workbook Mode to turn on
the tabs at the bottom of the editor and therefore make it easier to switch between files.
3. Click the
Rebuild All icon to build the project. The build output should not indicate any
errors. If you receive errors, try reloading the projects from the original Application CD and ensure that the folders are not set to ure 13 indicates the location of the
Read Only. See Figure 12 for an example; Fig-
Rebuild All icon in the ZDS II menu bar.
UM023902-1013 16
ZMOTION® 20-Pin Detection and Control Development Kit
The Rebuild All icon
User Manual
Figure 12. Building the ZMOTION_Serial_ Co n fig proje ct in ZD S II
Figure 13. The Location of the Rebuild All Icon
4. Make sure that the ZMOTION 20-Pin Development Board is powered OFF, then con­nect the USB SmartCable (Debugger) to P2, as described above.
5. Ensure that the J8 jumper is closed in position 1–2, to control the USB power supply.
6. Apply power to the Development Board by plugging in the USB cable and setting SW1 to the ON position. Next, click the tion of both the
Reset and Go icons in the ZDS II menu bar.
Reset icon in ZDS II. Figure 14 indicates the loca-
UM023902-1013 17
ZMOTION® 20-Pin Detection and Control Development Kit
The Reset icon The Go icon
User Manual
Figure 14. The Location of the Rest and Go Icons
7. An information notice may appear, indicating that the silicon is not the latest version. This occurrence is normal and is not an issue. Click
OK to continue. You should see a
message in the Debug Output Window indicating that the load was successful, as shown in Figure 15.
Figure 15. ZDS II’s Debug Output Window for the ZMOTION_Serial_Config Project
8. Click the
Go icon to start the application running. The Red LED (LED3) will be ON
initially until the pyroelectric sensor stabilizes – a period that can take up to 30 seconds. After it has stabilized, (LED3) turns OFF, to turn ON only when motion is detected.
9. To test this procedure, wave your hand over the lens and notice (LED3) turning ON for approximately 1 second.
UM023902-1013 18
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual

ZMOTION 20-Pin Development Kit Application Software

The ZMOTION application software includes the ZMOTION_Serial_Config motion detection project, which is described in this section.
ZMOTION_Serial_Config
The ZMOTION_Serial_Config project demonstrates the basic motion detection func­tionality of the ZMOTION 20-Pin Development Board. The MCU included with the Board is programmed with this project.
Each lens type is supported by an asso ciat ed len s c onf igur atio n hea der file which displays a name format of
API_INIT_xx.h
the include project folder of the file contains the
include
directive to add the header file to the project. Changes to these header files should not be required, but any modifications you make should be made to a copy of the original header file; added to the ZMOTION family, an associated lens configuration file is made available on the Zilog website.
. Header files for all supported lens types are included in
ZMOTION_Serial_Config
do not modify the original versions
project. The
main.c
. As new lens types are
source
Table 2 lists additional project features that can be modified or enabled in
main.h
Feature File Define/Variable Default Values
LED ON time duration main.h DEF_LED_ON_TIME DELAY_500MSEC (500
Lens Support main.c #include "API_INIT_xx.h" API_INIT_04.h
.
Table 2. Additional Project Features
milliseconds)
main.c
When motion is detected, the LED is turned ON for 500 msec (DEF_LED_ON_TIME). A serial terminal program such as HyperTerminal can be used to view the detection mes­sages from the ZMOTION 20-Pin Development Board. In Figure 16, 26 indicates the ver- sion of the application; the S following the
ZMOTION > prompt is displayed when the
pyroelectric sensor has become stable and the system is ready to detect motion. When motion is detected, an N or E is displayed to indicate the type of detection (Normal motion or Extended motion), along with the count and a time stamp (in seconds) after power-up.
and
UM023902-1013 19
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Figure 16. The ZMOTION_Serial_Config Project Running in HyperTerminal
The menu shown in Figure 16 allows you to monitor and make real-time changes to the operation of the motion detection software (a description of this menu’s selections fol­lows). When the ZMOTION device is reset or power-cycled, all settings return to their default values.
0) Display API Registers. Displays the current setting of the ZMOTION Engine regis-
ters.
1) Read/Write RAM. Allows you to make direct modifications to specific RAM locations
(Peek/Poke).
2) MCU Reset. Reset the ZMOTION MCU.
3) LED On/Off Time. Sets the duration of the LED ON time and minimum LED OFF
time.
4) Display Events On/Off. Turns the automatic display of motion events ON or OFF.
When OFF, events are still stored in the log.
5) Dump Event Log. Displays a history of motion events since power-on.
6) Reset Event Log/Counts. Clears the Event Log and resets the time stamp to 0.
7) Hypersense On Time. If Hypersense mode (menu item 8) is enabled when motion is
detected, the sensitivity of the system can be increased for a set amount of time;
sense On Time
sets this time. If motion is detected while sensitivity is increased, the
Hyper-
ON time starts over.
UM023902-1013 20
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
User Manual
8) Hypersense Mode/Level. There are three settings that control sensitivity to motion
during Hypersense; these settings are Major Sensitivity, Minor Sensitivity and Range. This menu option allows you to enable and set each of these settings individually.
9) Normal Sense Level. When in normal motion sense mode (i.e., not in Hypersense
mode), this selection allows you to set the sensitivity levels of the three settings (Major Sensitivity, Minor Sensitivity and Range).

Making Changes to the ZMOTION_Serial_Config Project

The operation of the motion detection software can be changed by making modifications directly to the source code. Follow the comments in the code (generally in
main.c) to make any permanent changes. For example, to change the lens configuration
file and the duration of the LED ON time, observe the following procedure.
main.h and
1. Change the following line in the
#define DEF_LED_ON_TIME DELA Y_500MS EC //Time the LED
main.h file:
//stays on //when motion //is detected
2. Change the line as follows to select a five-second LED ON time:
#define DEF_LED_ON_TIME DELA Y_5SEC //Time the LED
//stays on when //motion is //detected
LED ON time definitions are provided in the main.h file for values from 50 ms to 30 min-
utes.
3. Click the
errors. Click the
Rebuild icon to build the project. The build output should not indicate any
Go icon to download the modified project and start the application
running. Generate motion and notice that the LED now stays on for 5 seconds.
// This file must match the lens and PIR sensor u sed in the application //#include "API_INIT_00.h" // Generic settings: non-lens-specific //#include "API_INIT_01.h" // API configuration file for AA 0.9 GI V1 Lens //#include "API_INIT_02.h" // API configuration file for CM 0.77 GI V3 Lens //#include "API_INIT_03.h" // API configuration file for CM 0.77 GI V5 Lens #include "API_INIT_04.h" // API configuration file for CWM 0.5 GI V1 Lens //#include "API_INIT_05.h" // API configuration file for NCL-9(26) Lens //#include "API_INIT_06.h" // API configuration file for NCL-10IL Lens //#include "API_INIT_07.h" // API configuration file for NCL-3B Lens //#include "API_INIT_08.h" // API configuration file for NCL-3R Lens //#include "API_INIT_09.h" // API configuration file for NCL-10S Lens //#include "API_INIT_0A.h" // API configuration file for NCL-11 Lens //#include "API_INIT_IML-0643.h+" // API configuration file for IML-0643 Lens
UM023902-1013 21
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
User Manual
As the code listed above demonstrates, the API_INIT file must match the lens and pyro­electric sensor being used on the Development Board. Use the Lens Selection Guide in the
ZMOTION Lens and Pyroelectric Sensor Product Specification (PS0286)
to determine
which API_INT file is required for each lens setting.
4. To change the lens used by the project, edit the
file to include the appropriate
API_INIT_04.h to support the CWM 0.5 GI V1 (board clip-in) lens; see the above
API_INIT file. The project initially uses
include line at the top of the main.c
code example. To use a different lens, edit out the comment characters (//) in the
main.c file that correspond to the new lens, and comment out the lens that is no longer
in use.
UM023902-1013 22
ZMOTION® 20-Pin Detection and Control Development Kit

Appendix A. Inst alling the USB SmartCable Driver

The USB Smart Cable can be installed on PCs that run on Windows 7 (32- and 64-bit), Windows Vista (32- and 64-bit) and Windows XP operating systems. The procedures in this appendix will guide you through the USB Smart Cable installation process.

Windows 7 32/64 Systems

Observe the following steps to install the USB Smart Cable on a Windows 7 system.
1. Connect the USB Smart Cable to a USB port on your development PC. When the PC
detects the new hardware, it will display the Installing device driver software dialog.
User Manual
2. Windows automatically searches for the driver; this process can take a few moments.
Because there is no option to terminate this search process, wait for the search to com­plete.
If the driver was previously installed, Windows will automatically install the USB Smart Cable driver. If this is the case, skip ahead to Step 9 driver, close the search dialog and proceed to the next step.
3. From the Start menu, navigate via the
Device Manager in the Search field to cause the Device Manager to appear in a list
of search results.
4. From this search list, click
which presents a list of devices that operate on your PC. Find to view a sublist of additional devices, and right-click your mouse on
Cable
.
5. In the submenu that appears, click
6. In the
7. Click the
Update Driver Software – USB Smart Cable dialog that appears, click the
Browse my computer for driver Software option.
Browse... button to browse to one of the following driver directories,
depending on the configuration of your PC. On 32-bit Windows 7 systems, navigate to:
Device Manager to open the Device Manager dialog,
Search Programs and files menu, and enter
Update Driver Software....
. If Windows cannot find the
Other devices, toggle it
USB Smart
<ZDS II Installation Directory>\device drivers\USB\x32
On 64-bit Windows 7 systems, navigate to:
<ZDS II Installation Directory>\device drivers\USB\x64
8. Click Next to install the driver. On 32-bit: Windows systems, a security dialog will
appear; select
9. Click
UM023902-1013 23
Close after the Wizard finishes the installation.
Install this driver software anyway.
ZMOTION® 20-Pin Detection and Control Development Kit
Note:

Windows Vista 32/64 Systems

Observe the following steps to install the USB Smart Cable on a Windows Vista system.
1. Connect the USB Smart Cable to a USB port on the development PC.
2. After the PC detects the new hardware, it will display the Found New Hardware Wiz-
ard dialog box. Click
3. Depending on your development PC’s User Account Control settings, Windows may
ask for permission to continue the installation. Click
Locate and install driver software (recommended).
User Manual
Continue.
4. When the Insert the Disc dialog appears, select
other options
. Click the Next button to display the Windows couldn’t find driver dia-
log.
5. Select
Browse my computer for driver software (advanced) to display the Browse
For Driver dialog, which prompts you to key in or browse for the location of the driver’s the
.inf file. Depending on the type of computer you use (32- bit o r 64 -bit), use
Browse... button to navigate to one of the following paths, then click the Next but-
ton. On 32-bit Vista systems, navigate to:
<ZDS II Installation>\device drivers\USB\x32
On 64-bit Vista systems, navigate to:
<ZDS II Installation>\device drivers\USB\x64
6. When the Wind ows Security dialog prompts you whether to install or not install, cli ck
Install this driver software anyway and wait until the installation is completed (W in-
dows may prompt you more than once).
7. When the software has been installed successfully, click

Windows XP Systems

I don’t have the disc. Show me
Close.
Observe the following steps to install the USB Smart Cable on a Windows XP system.
1. Connect the USB Smart Cable to a USB port on the development PC. When the PC
detects the new hardware, it will display the Found New Hardware Wizard dialog.
2. In the Wizard, select
Next.
Install from a list or specific location (Advanced), then click
If the Windows Hardware Installation dialog appears, click Continue Anyway.
3. In the Please choose your search and installations dialog, select
driver in these locations and include this location in search
4. Use the
UM023902-1013 24
Browse... button to navigate to one of the following paths:
Search for the best
.
ZMOTION® 20-Pin Detection and Control Development Kit
<ZDS II Installation>\device drivers\USB\x32
5. Click Next to locate the appropriate driver.
User Manual
6. Click
Next, then click Finish to complete the installation.
UM023902-1013 25
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Appendix B. Inst alling the FTDI USB-to­UART Driver
An FTDI USB-to-UART driver is required to allow your PC to communicate through its USB port to the on-chip UART of the Z8F042A MCU. Observe the following procedure to perform these connections.
1. Ensure that the USB cable is not plugged in to the Buck Converter Battery Charger
Design Module’s USB J1 connector.
2. Navigate to the following filepath and double-click the
begin the driver installation.
<ZDS II Installation>\device drivers\FTDI Uart
3. The installation process will begin and you should observe output similar to the fol-
lowing messages on the screen of your PC:
32-bit OS detected <installation path>\dpinstx86.exe Installation driver FTDI CDM driver installation process completed...
4. When the installation is complete, plug in the B connector of the USB cable into the
Board, and the larger A connector into the USB port of your PC.
5. If the driver installation was successful, the Ports (COM & LPT) section of the Device
Manager will display USB Serial Port (COMx) or similar message, as highlighted in Figure 2.
CDM20802_setup.exe file to
UM023902-1013 26
ZMOTION® 20-Pin Detection and Control Development Kit
Note:
User Manual
Figure 17. A Successful USB-to-UART Driver Installation
To launch the Device Manager on Windows 7 systems, launch the Start menu, enter
device manager in the Search programs and files field, and press the Enter key.
T o open the Device manager on earlier Windows systems, navigate via the followi ng path:
Start Control Panel System Hardware Device Manager Ports (COM& LPT).
UM023902-1013 27

Appendix C. Schematic Diagrams

USB PWR WALL PWR
PWR SRC
PWR ON
VCC_3v3
VCC_3v3
VCC_5v
VCC_3v3_T
RXD
TXD
J5
HDR/PIN 1x3 J5
HDR/PIN 1x3
123
R6 20KR620K
U2
FT232RLU2FT232RL
USBDM
16
RTS
3
GND1
7
RI
6
NC1
8
DTR
2
VCCIO
4
3v3 OUT
17
NC
24
RESET
19
TXD
1
USBDP
15
CBUS3
14
OSCI
27
OSCO
28
GND218TEST
26
CBUS1
22
GND3
21
DCD
10
CTS
11
DSR
9
RXD
5
CBUS4
12
CBUS2
13
AGND
25
CBUS0
23
VCC
20
C3
4.7uFC34.7uF
U3
TPS2051BU3TPS2051B
OUT
1
GND
2
OC3EN
4
IN
5
D3
REDD3RED
2 1
C6
0.1uFC60.1uF C7
0.1uFC70.1uF
C5
0.01uFC50.01uF
C4
0.1uFC40.1uF
SW1
EG1218
SW1
EG1218
1
3
2
L1 FERRITE BEAD
L1 FERRITE BEAD
R4
4.75K R44.75K
C1
4.7uFC14.7uF
U1
NCP582LXV33T2G
U1
NCP582LXV33T2G
Vin
1
EN
6
GND
2
NC
4
Vout
3
GND
5
R5
100KR5100K
R7
100 ohmR7100 ohm
R3 20KR320K
C8
4.7uFC84.7uF
C2
0.1uFC20.1uF
P1
USB-OTG, mini-AB
P1
USB-OTG, mini-AB
VBUS
1
DM
2
DP
3
ID
4
GND
5
SH1
6
SH2
7
SH3
8
SH4
9
Figures 18 and 19 show the schematics for the ZMOTION 20-Pin Development Board.
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
Figure 18. ZMOTION 20-Pin Development Board Schematic Diagram, #1 of 2
UM023902-1013 28
3.3V
GND
PROTOTYPE AREA (.1X.1 GRID) DO NOT POPULATE HEADERS
MOTION
3.3V
LIGHT
GND
RST
IN FOR DBG
PB1
PA1
PA0
PA2 PA3 ANA2 PA6 PA7 PD0 PC0 PC1 PC3 PB0
GND
ANA2
PB1/ANA1
PB1/ANA1
PA4/RXD0 PA5/TXD0
DBG
PB1/ANA1
PA0
PA2 PA3
PA1
PB0
PC3
PC1 PC0
PD0 PA7 PA6
PB1/ANA1
PA0
PA2 PA3
PA1
PC3 PB0
PC1
PC0
PD0
PA7
PA6
VCC_3v3_T
VCC_3v3_T
VCC_3v3_T
VCC_3v3_T
VCC_3v3_T
VCC_3v3_T
VCC_3v3_T
RXD
TXD
C9
1uFC91uF
J1
HDR/PIN 1x1
J1
HDR/PIN 1x1
1
U5
PyroSensor Generic
U5
PyroSensor Generic
D
1
S
2
GND
3
LED3
RED
LED3
RED
2 1
R10
0 ohm
R10
0 ohm
R9
470R9470
proto9x20proto9x20
11223344556677889
9
1010111112121313141415151616171718
18
J2
HDR/PIN 1x1
J2
HDR/PIN 1x1
1
C11 1 uF
C11 1 uF
J8
HDR/PIN 1x2
J8
HDR/PIN 1x2
1 2
U8
Z8FS040xHH20EG
U8
Z8FS040xHH20EG
PA5/TXD0
11
PA4/RXD0
10
PA3/CTS0
9
PA2/DE0
8
ANA3
3
PA1/T0OUT/XOUT
6
PA0/T0IN/T0OUT/XIN
5
PC3/COUT/
19
PC2/ANA6/LED/VREF
18
PC1/ANA5/CINN
17
PB0/ANA0
20
RESET/PD0
14
ANA2
2
PB1/ANA1
1
PA7/T1OUT
13
PA6/T1IN/T1OUT
12
VSS
7
VDD
4
DBG
15
PC0/ANA4/CINP
16
R11
100K
R11
100K
LED2
RED
LED2
RED
21
R12 10K
R12 10K
J9
HDR/PIN 1x15
J9
HDR/PIN 1x15
1 2 3 4 5 6 7 8
9 10 11 12 13
R14 470
R14 470
J3
HDR/PIN 1x1
J3
HDR/PIN 1x1
1
R13 10K
R13 10K
U7
spareU7spare
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
LED1
BLUE
LED1
BLUE
2 1
U6
spareU6spare
1
1
2
2
3
3
4
4
5
5
6
6
7
7
8
8
9
9
10
10
11
11
12
12
13
13
14
14
15
15
16
16
P2
HDR/PIN 2x3
P2
HDR/PIN 2x3
12 34 56
R81KR8
1K
R15 47K
R15 47K
J6
HDR/PIN 1x1
J6
HDR/PIN 1x1
1
ZMOTION® 20-Pin Detection and Control Development Kit
User Manual
UM023902-1013 29
Figure 19. ZMOTION 20-Pin Development Board Schematic Diagram, #2 of 2
ZMOTION® 20-Pin Detection and Control Development Kit

Customer Support

To share comments, get your technical questions answered, or report issues you may be experiencing with our products, please visit Zilog’s Technical Support page at http://sup-
port.zilog.com.
To learn more about this product, find additional documentation, or to discover other fac­ets about Zilog product offerings, please visit the Zilog Knowledge Base ticipating in the Zilog Forum
This publication is subject to replacement by a later edition. To determine whether a later edition exists, please visit the Zilog website at http://www.zilog.com
.
User Manual
or consider par-
.
UM023902-1013 30
Loading...