Download PDF 407 kB - Elmos Semiconductor AG

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Mains electricity wikipedia , lookup

Power over Ethernet wikipedia , lookup

Opto-isolator wikipedia , lookup

Rectiverter wikipedia , lookup

Television standards conversion wikipedia , lookup

Immunity-aware programming wikipedia , lookup

Transcript
Functional Description for E931.96 Ultra Low Power PIR Controller
AN 0138
Mar 2, 2016
The “E931.96 Ultra Low Power PIR Controller, USB interface” is used to read and write setup data to an E931.96 IC. The module
connects to a PC via the USB interface and is controlled by a terminal program.
Traditional PIR detector
Debugging header
E931.96
MCU
Mini USB Port
Pin 1 of PIC Programming
Header
USB Serial Bridge IC
USB Powersupply OK LED
Motion Detect LED
Figure 1. Description of module M925
Notes:
The module is not protected against ESD, avoid potential difference between yourself and the module before use.
1 Power supply
The SiLab USB to UART Bridge internal regulator generates a stable 3.3V for the circuitry on the module. The various signals and
voltages for the test mode selection are generated on the board.
2 Sensor readout
The Microchip PIC reads the data from the E931.96 via the INT/DOCI pin and writes data to the E931.96 via the SERIN pin.
3 Motion detection
A power LED D2 indicates that the module is powered and connected to the USB port. LED D1 is controlled by the MCU and will
indicate movement with the correct setup.
4 Programming connector
The programming connector can be used to reprogram the MCU. The pins on the programming on the connector are compatible to the MPLAB ICD2 LE and PICKit 2 and PICKit 3 programmers.
5 Debugging header
All of the important IOs between the MCU, E931.96 and USB Bridge are accessible on the debugging connector.
Elmos Semiconductor AG
Application Note 1/6
QM-No.: 25AN0138E.01
Functional Description for E931.96 Ultra Low Power PIR Controller
AN 0138
Mar 2, 2016
6 USB interface with a Personal Computer (PC)
A CP2102-GM USB to UART Bridge interfaces between a PC and the UART on the MCU.
It may be necessary to install an appropriate driver on the PC if it is not handled automatically by the operating system.
The driver can be found here:
http://www.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx
After the driver is installed correctly and the module is plugged in to a USB port on the PC, an additional entry in the Ports category of the Device Manager will show up.
Note the new Com Port number that is assigned to the module, since it will have to be specified when using the terminal software.
Port used by module
Figure 2. Device manager
7 Terminal interface
The software on the module is able to interface to a terminal with the following settings for the port.
The data format is as follows:
115200b/s
8 data bits, 1 start bit, 1 stop bit, no parity, no flow control
All information from the MCU are transferred as ASCII characters and end with a <LF><CR combination.
Figure 3. Terminal module settings
Elmos Semiconductor AG
Application Note 2/6
QM-No.: 25AN0138E.01
Functional Description for E931.96 Ultra Low Power PIR Controller
AN 0138
Mar 2, 2016
8 Module use
After the module is plugged in and the terminal program is running, press “spacebar” or “q” to see the following menu:
Complete setup string
Column contains values in
MCU memory.
Column contains values read
back from IC
[ ] Valid choices to change
parameters on IC
[ ] Options to control MCU
program flow
Figure 4. Terminal display
Note that all of the registers that are described in the datasheet are on the upper half of the terminal display, on the bottom half is controls for
program flow.
As an example, to change the pulse count to 4 pulses, press the following:
“2”
Enter a value between 0 and 3 => “3”
The program changes the bit value so setting bits 12 and 11 to 1’s will change the pulse counter to 4.
The value is not yet stored on the E931.96; it is only changed in the MCU memory. To write it to the E931.96 press “w” and then
“r” to read back the contents of the E931.96’s memory and redisplay it. The two rightmost columns should display the same
values. If not, ensure that ‘a’ is pressed that will read back all of the memory registers on the E931.96. If a partial read back is
done only the PIR voltage register is read back.
9 Register read back
To read back the PIR register value the following setup must be done
[4] Motion detector Enable {OFF}
[5] Interrupt Source {FILTER}
Select the source of the PIR register, there are a couple of options, keep in mind that the filter would need to settle first so let
the readings run a bit until the value is stable.
[6] PIR voltage source { LPF } {SUPPLY} { TEMP }{ BPF }
[w] Write to device once
[r] Read from device once
Verify that the MCU memory values are the same as the values read back from the IC.
The next step is to setup the MCU software to read and display the data from the IC.
[m] Motion Sensor Function {OFF}
[i] Read on DOCI int {ON }
The DOCI pin may be high at this stage so to ensure that the next interrupt is read the DOCI interrupt is cleared
[c] Clear Motion Int
The readings are being done at this stage but it is not printed on the terminal. To enable the display
of any data press “d”
[d] Disp data from IC {1}
Elmos Semiconductor AG
Application Note 3/6
QM-No.: 25AN0138E.01
Functional Description for E931.96 Ultra Low Power PIR Controller
AN 0138
Mar 2, 2016
10 Module setup for motion detection:
The settings below set up the IC for motion sensing. Once the setup is done and written to the IC interrupts will be issued to
the MCU to indicate motion. The MCU will display the time since the previous interrupt and illuminate the motion sense LED.
Figure 5. Motion sensing
The threshold for motion sensing is usually set between 100 and 200 uV
[`] Sensitivity x 6.5uV{1.234E-04}
Set the other detection parameters as required.
[1] Blind Time x 0.5s {1.500}
[2] Pulse Counter { 2}
[3] Window Time { 4}s
Enable motion detection on the IC
[4] Motion detector Enable {ON }
Set the interrupt source on the IC to motion
[5] Interrupt Source {Motion}
The PIR voltage source can be either on BPF or LPF.
[6] PIR voltage source { LPF } { BPF }
The PIR detector must be powered so the regulator must be enabled.
[7] Supply Regulator Enable {ON}
[w] Write to device once
[r] Read from device once
Verify that the MCU memory values are the same as the values read back from the IC.
The SW on the MCU must also be enabled to process the motion
[m] Motion Sensor Function {ON }
Motion detected will give an output similar to the output below.
Motion INT rec!for 3.0s
Motion INT rec!for 12.0s
Elmos Semiconductor AG
Application Note 4/6
QM-No.: 25AN0138E.01
Elmos Semiconductor AG
IC_ V D D
T2
T A RG ET
Application Note 5/6
0R
R5
M4
T1
T A RG ET
M8
M OU NT
M OU NT
M3
M5
M6
M OU NT
M7
M OU NT
M2
M1
S ER IN
R C1
S UP P
10
9
8
7
6
S TX
R C3
5
S RX
VD D
1
S RX
S TX
PI C16F 1825
RC 0/A N4/ C2I N+
RC 1/A N5/ C2I N-
RC 2/A N6
RC 3/A N7
RC 4/C 2OU T / T X/ CK
RC 5/R X/ DT
VD D
U2
R ST
23
24
27
28
1
2
26
25
9
12
11
DD+
RE GI N
VB US
G ND
G ND
VD D
VS S
5
4
7
8
BB
3
6
RA 0/A N0/ C1I N+ / I CSP DAT /U LPW U
RA 1/A N1/ C1I N-/V REF /I CS PCLK
RA 2/A N2/ T 0CK I/ I NT / C1O UT
RA 3/M CLR /V PP
RA 4/A N3/ T 1G /O SC 2/C LKO UT
RA 5/T 1CKI / OS C1/ CLKI N
CP 2102-G M
CT S
RT S
DS R
DT R
DC D
RI
TX D
RX D
RS T
SU SPE ND
SU SPE ND
U1
C5 VD D
VS S 1u
R4
0R
VD D
13
12
11
4
3
2
14
ICS P DA T
ICS P CL K
D OC I
M C LR
LE D _D R
R A5
VS S
1u
C4
100n
C3
VD D
V BU S
DD+
C2
100n
Q1
2N7002
M otion
D1
VS S
10u
+ C1
VS S
LE D _D R
C OL
LE D 2
R2
1k
VD D
US B
1
2
3
4
5
J1
C10
100n
LE D 1
LHI 968 C8
10n
PI R1
VS S
Pow er
D2
R1
1k
VD D
R6
100k
P IR O
VP IR
470n
C9
R7
2. 2M
P IR I N
1
6
7
5
10K
R3
VS S
VD D
1
2
3
4
5
6
7
8
9
10
11
12
13
14
SE RI N
VD D
V BU S
V SS
V DD
S RX
S TX
R C3
LE D _D R
R A5
S ER IN
R C1
IC_ V D D
D OC I
V SS
V PIR
T E ST
E931. 96A-SO -8
VS S
NPIRIN I NT / DO CI
PIRIN
VP IR
U3
T E ST
J3
VS S
C6
100n
1
2
3
4
5
6
7
8
9
10
11
12
13
14
8
2
3
4
VS S
V BU S
V SS
V DD
S RX
S TX
R C3
LE D _D R
R A5
S ER IN
R C1
IC_ V D D
D OC I
V SS
V PIR
D OC I
S ER IN
I SD
1
2
3
4
5
J2
T E ST
J4
M C LR
V DD
V SS
ICS P DA T
ICS P CL K
C11
2u
C7
100n
I C_VD D
Functional Description for E931.96 Ultra Low Power PIR Controller
Mar 2, 2016
AN 0138
Figure 6. Schematic
QM-No.: 25AN0138E.01
Functional Description for E931.96 Ultra Low Power PIR Controller
AN 0138
Mar 2, 2016
Usage Restrictions
Elmos Semiconductor AG provide the E931.96 Demonstration Board simply and solely for IC evaluation purposes in laboratory.
The Kit or any part of the Kit must not be used for other purposes or within non laboratory environments. Especially the use or
the integration in production systems, appliances or other installations is prohibited.
The pcb´s are delivered to customer are for the temporary purpose of testing, evaluation and development of the Elmos IC´s only.
Elmos will not assume any liability for additional applications of the pcb.
Disclaimer
Elmos Semiconductor AG shall not be liable for any damages arising out of defects resulting from (1) delivered hardware or software, (2) non observance of instructions contained in this document, or (3) misuse, abuse, use under abnormal conditions or
alteration by anyone other than Elmos Semiconductor AG. To the extend permitted by law Elmos Semiconductor AG hereby expressively disclaims and user expressively waives any and all warranties of merchantability and of fitness for a particular purpose,
statutory warranty of non-infringement and any other warranty or product liability that may arise by reason of usage of trade,
custom or course of dealing.
Elmos Semiconductor AG – Headquarters
Heinrich-Hertz-Str. 1 | 44227 Dortmund | Germany
Phone + 49 (0) 231 - 75 49 - 100 | Fax + 49 (0) 231 - 75 49 - 159
[email protected] | www.elmos.com
Note Elmos Semiconductor AG (below Elmos) reserves the right to make changes to the product contained in this publication without notice. Elmos assumes no responsibility for the use of any circuits described herein, conveys no licence under any patent or other right, and makes no representation that the circuits are free of patent infringement. While the information in this publication has been checked,
no responsibility, however, is assumed for inaccuracies. Elmos does not recommend the use of any of its products in life support applications where the failure or malfunction of the product can reasonably be
expected to cause failure of a life-support system or to significantly affect its safety or effectiveness. Products are not authorized for use in such applications.
Copyright © 2016 Elmos Reproduction, in part or whole, without the prior written consent of Elmos, is prohibited.
Elmos Semiconductor AG
Application Note 6/6
QM-No.: 25AN0138E.01