dt-sense - innovative electronics · •dt-51 minimum system, dt-51 low cost series, or dt-avr low...

Click here to load reader

Post on 27-Mar-2019

233 views

Category:

Documents

1 download

Embed Size (px)

TRANSCRIPT

DT-SENSETHERMOPILE ARRAY SENSOR

Trademarks & CopyrightAT, IBM, and PC are trademarks of International Business Machines Corp.Windows is a registered trademark of Microsoft Corporation.Pentium is a trademark of Intel Corporation.CodeVisionAVR is copyright by Pavel Haiduc, HP InfoTech s.r.l.BASCOM-51 and BASCOM-AVR are copyright by MCS Electronics.I2C is a registered trademark of Philips Semiconductors.Delphi is a trademark of Inprise Corporation.DT-51 is a trademark of Innovative Electronics.

Table of Contents

1 Introduction............................................................................................... 31.1 Specifications.............................................................................................. 31.2 Suggested System...................................................................................... 3

2 Hardware.................................................................................................. 42.1 Layout........................................................................................................... 42.2 Connector and Jumper Configuration.................................................... 4

3 Software.................................................................................................... 63.1 UART TTL Interface..................................................................................... 63.2 I2C Interface................................................................................................ 73.3 Command Set.............................................................................................. 83.3.1 Status Check................................................................................................ 83.3.2 Autoscan Peak............................................................................................. 93.3.3 Autoscan Valley.......................................................................................... 103.3.4 Autoscan Higher.......................................................................................... 113.3.5 Autoscan Lower........................................................................................... 123.3.6 Read Autoscan............................................................................................ 133.3.7 Set Servo 1.................................................................................................. 143.3.8 Set Servo 2.................................................................................................. 143.3.9 Get Servo 1................................................................................................. 153.3.10 Get Servo 2................................................................................................. 153.3.11 Enable/Disable Servo 1........................................................................... 163.3.12 Enable/Disable Servo 2........................................................................... 173.3.13 Enable/Disable Channel........................................................................... 183.3.14 Read All Channels...................................................................................... 193.3.15 Read Ambient............................................................................................. 193.3.16 Read Channel N-1..................................................................................... 20

4 Testing Procedure..................................................................................... 21

5 Application and Program Examples......................................................... 21

AttachmentA. DT-SENSE THERMOPILE ARRAY SENSOR Schematic........................... 25

2

1. INTRODUCTIONDT-SENSE THERMOPILE ARRAY SENSOR is an intelligent sensor system with the ability to measure object's temperature via non-contact measurement based on infrared radiations emitted by the object. This system consists of a thermopile array sensor and a microcontroller based module to get the sensor's data and process it into temperature data, and manage interface with other system. Some of the DT-SENSE THERMOPILE ARRAY SENSOR application examples are detecting candle light, measures the temperature of a lightbulb, stove, soldering iron, or other objects without making physical contact.

1.1. SPECIFICATIONSDT-SENSE THERMOPILE ARRAY SENSOR specifications are as follows: Measures the object temperature in the range of 0C 100C. Operates in a room temperature of 0C 60C. Thermopile array accuration is around 2C. Equipped with 8 channels thermopile sensor and 1 thermistor to measure

room temperature. Ability to detect candle light or the heat of a 15W lightbulb from a

maximum distance of 200 cm from the sensor at room temperature of 20C.

Requires 9 12 VDC power supply (through onboard regulator) or 4.8 5.4 VDC (without onboard regulator).

Input/Output pins are compatible with TTL and CMOS voltage level. Equipped with UART TTL and I2C interface. 2 connectors are available for standard servo motors. Equipped with jumpers for address management, so it can be cascaded up

to 8 modules without additional hardwares (for one master, using the I2C interface).

1.2. SUGGESTED SYSTEMThe suggested system for the DT-SENSE THERMOPILE ARRAY SENSOR is as follows:Hardware: PC AT Pentium IBM Compatible with Serial port (COM1/COM2) and

Parallel (LPT) or USB. DT-51 Minimum System, DT-51 Low Cost Series, or DT-AVR Low Cost Series. DVD-ROM Drive and Hard disk.

Software: Windows 98 SE operating system. BASCOM-8051, BASCOM-AVR, or CodeVisionAVR. The files included in the program CD/DVD:

CONTOH_I2C.PRJ, CONTOH_I2C.C, DT-SENSE THERMOPILE ARRAY SENSOR MANUAL, dan DT-SENSE THERMOPILE ARRAY SENSOR QUICK START.

3

2. HARDWARE

2.1. LAYOUT

2.2. CONNECTORS AND JUMPERS CONFIGURATIONS POWER (J1 and J2) are connectors for power supply input. The power supply can pass through a voltage regulator (using J1) or without regulator (using J2).

Connector Pin Name Function

J1 1 GND Ground reference for power supply input2 9-12VDC Connected to power supply input (9 12 V)

J21 GND Ground reference for power supply input

2 5VDC Connected to power supply input without regulator (4.8 5.4 V)

Jumper PS SLCT (J4) is used to select the power source used by DT-SENSE THERMOPILE ARRAY SENSOR. The following is a description of how to choose a power source for the DT-SENSE THERMOPILE ARRAY SENSOR via jumper PS Select:

Jumper PS SelectJ4 Power Supply

J1 with regulator( 9 12 V )

J2 without regulator( 4.8 V 5.4 V )

Important!If J1 is used as power supply input (J4 connected), don't use J2 as power supply input.If J2 is used as power supply input, then J4 must be disconnected and don't use J1 as power supply input.

4

1 2

1 2

1

1

INTERFACE connectors (J8 and J3) function as I2C and UART TTL interface connectors.

Connector Pin Name Function

J8

1 GND Ground reference

2 SDA I2C-bus data input / output

3 SCL I2C-bus clock input

J31 TXD Serial output in TTL level from module

2 RXD Serial input in TTL level to module

Jumper PULL UP (J7) is used to activate pull-up resistor for SDA and SCL pins on I2C interface.

Jumper PULL UPJ7 Function

Pull-up inactive(jumper disconnected)

Pull-up active(jumper connected)

Important !If one or more modules are connected to I2C-bus, then only jumper J7 (SCL/SDA) from one of the modules needs to be connected.

Jumper ADDR (J9) is used to managed the I2C address from the DT-SENSE THERMOPILE ARRAY SENSOR module.

J9 (A2)Pin 5-6

J9 (A1)Pin 3-4

J9(A0)Pin 1-2

I2C address

I2C write address I2C read address

E0H E1H

E2H E3H

E4H E5H

E6H E7H

E8H E9H

EAH EBH

ECH EDH

EEH EFHDescription: : jumper connected

5

SENSOR (J5) is the connector for thermopile array sensor.

Pin Name Function

2 GND Ground reference

4 VAmb Output signal from thermistor

5 VSensor Output signal from thermophile

7 C Third input selector

8 AVCC Voltage output to sensor

9 B Second input selector

10 A First input selector

1, 3, 6 NC Not connected

SERVO1 (J10) is used as 1st standard servo motor connector. Servo motor can be used as the base of sensor so that the sensor eye can sweep 180 horizontally or vertically during autoscan process.

Pin Name Function

1 GND Ground reference

2 VCC Voltage output to servo motor

3 Servo Pulse output (1 2 ms) to servo motor

SERVO2 (J11) is used as 2nd standard servo motor connector. This servo motor is not used during autoscan process, so it can be used freely. This motor can be used as the base of 1st servo motor so that the sensor eye could sweep 180 in a different direction.

Pin Name Function

1 GND Ground reference

2 VCC Voltage output to servo motor

3 Servo Pulse output (1 2 ms) to servo motor

3. DT-SENSE THERMOPILE ARRAY SENSOR SOFTWAREDT-SENSE THERMOPILE ARRAY SENSOR possesses an UART TTL and I2C interface that can be used to receive commands or transmit data.

3.1. UART TTL INTERFACEUART TTL communication parameters are as follows:

38400 bps 8 data bits

6

1 stop bit no parity bit no flow control

Every command sent via UART TTL interface starts by sending 1 byte data that contains and (if needed) 1 byte of parameter data.

If the command sent is asking for data from DT-SENSE THERMOPILE ARRAY SENSOR module, then DT-SENSE THERMOPILE ARRAY SENSOR will send the data via TX TTL line.

A parameter data that has a range larger than 255 decimal (larger than 1 byte) is sent in two steps. One byte of MSB data will be sent first and then followed by LSB data. For example parameter that has a range of 500 2500. If has a value of 1500 then the sent/received MSB byte is 5 and the sent/received LSB byte is 220 ((5x256)+220=1500).

The available commands and parameters can be seen in section 3.3.

3.2. I2C INTERFACEDT-SENSE THERMOPILE ARRAY SENSOR module possesses an I2C interface. In this interface, DT-SENSE THERMOPILE ARRAY SENSOR module acts as a slave with an address that has been determined beforehand via jumper configuration (see section 2.2). The I2C interface on DT-SENSE THERMOPILE ARRAY SENSOR module supports up to maximum 100 kHz bit rate.

All commands sent via I2C interface start with start condition and followed by the transmission of 1 byte DT-SENSE THERMOPILE ARRAY SENSOR module address. After the address is transmitted, the master must sent 1 byte data that contains and (when needed) 1 byte parameter data. After all parameters have been sent, the sequence of commands end with the stop condition.

The following is the sequence that must be done to send a command via I2C interface.

If the command sent is asking for data from DT-SENSE THERMOPILE ARRAY SENSOR module, then the data can be read by using read command sequence.

7

+ +

++

1 1 1 0 X X X 0

Write Address

X X X X X X X X

Command

X X X X X X X X

Parameter (if needed)

Start

Stop

The following is the sequence that must be done to read the data from DT-SENSE THERMOPILE ARRAY SENSOR.

A parameter data that has a range larger than 255 decimal (larger than 1 byte) is sent in two steps. One byte of MSB data will be sent first and then followed by LSB data. For example parameter that has a range of 500 - 2500. If has a value of 1500 then the sent/received MSB byte is 5 and the sent/received LSB byte is 220 ((5x256)+220=1500).

The available commands and parameters can be seen in section 5.3.

3.3. COMMAND SETThe following is a complete list of commands in the UART and I2C interface.

3.3.1. STATUS CHECK

Function To check the status of DT-SENSE THERMOPILE ARRAY SENSOR

Command 00HParameter -Response

06H module is in idle position and ready to receive command

15H module is busy and not ready to receive command

Delay between Command and Response

10 ms

Description In UART communication line, the module won't send reply response (15H) when the module is busy.

Example with UART interface:User : 00HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x00); // Status Check commandi2c_stop(); // Stop Condition

delay_ms(10); // 10 ms delay

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY module

8

+ +

+

1 1 1 0 X X X 1

Read Address

X X X X X X X X

Data (if there's any)

Start

Stop

status = i2c_read(0); // Data Statusi2c_stop(); // Stop Condition

3.3.2. AUTOSCAN PEAK

Function To determine the highest temperature positionCommand 01HParameter

50 250 Desired initial servo motor position before starting autoscan process, in 10 ms units.Allowed range is 500 2500 ms.

50 250 Desired final servo motor position after

autoscan process, in 10 ms units.Allowed range is 500 2500 ms.

25 200 Servo motor position change interval during

autoscan process, in ms units.Allowed range is 25 200 ms.

0 255 The time delay before performing data

sampling and changing servo motor position during autoscan process, in 10 ms units.Allowed range is 0 2550 ms.

Response -Delay between Command and Response

-

Description This process uses 1st servo connector. Rotation direction of servo motor connected to the 1st

servo connector (CW/CCW) during autoscan process is determined by the variable of and .

After scanning is done, servo motor will move to the position of the highest data temperature (peak).

Example with UART interface to determine the highest temperature within servo motor position of 1000 2000 ms (or 0 180 on standard servo motors) with an interval of 4.5 (25 ms) and time delay for each position change is 100 ms:User : 01H 64H C8H 19H 0AHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x01); // Autoscan Peak commandi2c_write(0x64); // Scan's first position(1000 ms) i2c_write(0xC8); // Scan's final position(2000 ms)i2c_write(0x19); // Increment/decrement(25 ms)i2c_write(0x0A); // Time delay(100 ms)i2c_stop(); // Stop Condition

9

3.3.3. AUTOSCAN VALLEY

Function To determine the lowest temperature positionCommand 02HParameter

50 250 Desired initial servo motor position before starting autoscan process, in 10 ms units.Allowed range is 500 2500 ms.

50 250 Desired final servo motor after autoscan

process, in 10 ms units.Allowed range is 500 2500 ms.

25 200 Servo motor position change interval during

autoscan process, in ms units.Allowed range is 25 200 ms.

0 255 The time delay before performing data

sampling and changing servo motor position during autoscan process, in 10 ms units.Allowed range is 0 2550 ms.

Response -Delay between Command and Response

-

Description This process uses 1st servo connector. Rotation direction of servo motor connected to the 1st

servo connector (CW/CCW) during autoscan process is determined by the variable of and .

After scanning is done, servo motor will move to the position of the lowest data temperature (valley).

Example with UART interface to determine the lowest temperature within servo motor position of 1000 2000 ms (or 0 180 on standard servo motors) with an interval of 4.5 (25 ms) and time delay for each position change is 100 ms:User : 02H 64H C8H 19H 0AHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x02); // Autoscan Valley commandi2c_write(0x64); // Scan's first position (1000 ms) i2c_write(0xC8); // Scan's final position (2000 ms)i2c_write(0x19); // Increment/decrement (25 ms)i2c_write(0x0A); // Time delay (100 ms)i2c_stop(); // Stop Condition

10

3.3.4. AUTOSCAN HIGHER

Function To determine a higher than limit temperature positionCommand 03HParameter

50 250 Desired initial servo motor position before starting autoscan process, in 10 ms units.Allowed range is 500 2500 ms.

50 250 Desired final servo motor after autoscan

process, in 10 ms units.Allowed range is 500 2500 ms.

25 200 Servo motor position change interval during

autoscan process, in ms units.Allowed range is 25 200 ms.

0 255 The time delay before performing data

sampling and changing servo motor position during autoscan process, in 10 ms units.Allowed range is 0 2550 ms.

0 255 Temperature limit used as a comparison, in C

units.Allowed range is 0 255 C.

Response -Delay between Command and Response

-

Description This process uses the 1st servo connector. Rotation direction of servo motor connected to the 1st

servo connector (CW/CCW) during autoscan process is determined by the variable of and .

After finding a higher temperature than the limit temperature, servo motor will stop and autoscan process is completed.

Example with UART interface to determine temperature higher than 50C within servo motor position of 1000 - 2000ms (or 0 - 180 on standard servo motors) with an interval of 45ms and time delay for each position change is 0 ms:User : 03H 64H C8H 2DH 00H 32HDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x03); // Autoscan Higher commandi2c_write(0x64); // Scan's first position (1000 ms) i2c_write(0xC8); // Scan's final position (2000 ms)i2c_write(0x2D); // Increment/decrement (45 ms)

11

i2c_write(0x00); // Time delay (0 ms)i2c_write(0x32); // Temperature threshold (50Celcius)i2c_stop(); // Stop Condition

3.3.5. AUTOSCAN LOWER

Function To determine a lower than limit temperature positionCommand 04HParameter

50 250 Desired initial servo motor position before starting autoscan process, in 10 ms units.Allowed range is 500 2500 ms.

50 250 Desired final servo motor after autoscan

process, in 10 ms units.Allowed range is 500 2500 ms.

25 200 Servo motor position change interval during

autoscan process, in ms units.Allowed range is 25 200 ms.

0 255 The time delay before performing data

sampling and changing servo motor position during autoscan process, in 10ms units.Allowed range is 0 2550 ms.

0 255 Temperature limit used as a comparison, in C

units.Allowed range is 0 255 C.

Response -Delay between Command and Response

-

Description This process uses the 1st servo connector. Rotation direction of servo motor connected to the 1st

servo connector (CW/CCW) during autoscan process is determined by the variable of and .

After finding a lower temperature than the limit temperature, servo motor will stop and autoscan process is completed.

Example with UART interface to determine temperature lower than 15C within servo motor position of 1000 2000 ms (or 0 180 on standard servo motors) with an interval of 45 ms and time delay for each position change is 0 ms:User : 04H 64H C8H 2DH 00H 0FHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Condition12

i2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x04); // Autoscan Lower commandi2c_write(0x64); // Scan's first position (1000 ms) i2c_write(0xC8); // Scan's final position (2000 ms)i2c_write(0x2D); // Increment/decrement (45 ms)i2c_write(0x00); // Time delay (0 ms)i2c_write(0x0F); // Temperature threshold (15 Celcius)i2c_stop(); // Stop Condition

3.3.6. READ AUTOSCAN

Function To read the autoscan resultsCommand 05HParameter -Response

0 255 The final value of last autoscan process (Peak, Valley, Higher, or Lower), in C units.Allowed range is 0 255 C.

0 255 Total increment/decrement steps taken from

up to finding the final position during autoscan.Allowed range is 0 255 steps.

0 7 Thermophile sensor channel which captures the

highest/lowest/higher than limit/lower than limit temperature during autoscan process.Allowed channel range is 0 7.

Delay between Command and Response

10 ms

Description -

Example with UART interface:User : 05HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x05); // Read Autoscan commandi2c_stop(); // Stop Condition

delay_ms(10); // delay 10 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY modulemaxVal = i2c_read(1); // Temperature resultmaxX = i2c_read(1); // Increment/decrement countmaxY = i2c_read(0); // Sensor's channeli2c_stop(); // Stop Condition

13

3.3.7. SET SERVO 1

Function To move 1st servo motor to the desired positionCommand 06HParameter

500 2500 Desired servo motor position, in ms units.Allowed range is 500 2500 ms.

Response -Delay between Command and Response

-

Description This command controls the position of servo motor connected to 1st servo motor connector.

Example with UART interface to move 1st servo motor to 1500 ms position (or the middle position on standard servo motors):User : 06H 05H DCHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2Caddress example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x06); // Set Servo 1 commandi2c_write(0x05); // MSB of 1500 msi2c_write(0xDC); // LSB of 1500 msi2c_stop(); // Stop Condition

3.3.8. SET SERVO 2

Function To move 2nd servo motor to the desired positionCommand 07HParameter

500 2500 Desired servo motor position, in ms units.Allowed range is 500 2500 ms.

Response -Delay between Command and Response

-

Description This command controls the position of servo motor connected to 2nd servo motor connector.

Example with UART interface to move 2nd servo motor to 1500 ms position (or the middle position on standard servo motors):User : 07H 05H DCHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x07); // Set Servo 2 command

14

i2c_write(0x05); // MSB of 1500 msi2c_write(0xDC); // LSB of 1500 msi2c_stop(); // Stop Condition

3.3.9. GET SERVO 1

Function To read the position of 1st servo motorCommand 08HParameter -Response

500 2500 Current servo motor position, in ms units.Allowed range is 500 2500 ms.

Delay between Command and Response

15 ms

Description This command is used to locate the position of servo motor connected to 1st servo connector. For example, it can be used after autoscan process.

Example with UART interface:User : 08HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x08); // Get Servo 1 commandi2c_stop(); // Stop Condition

delay_ms(15); // delay 15 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY moduleposMSB = i2c_read(1); // MSB data of servo position posLSB = i2c_read(0); // LSB data of servo positioni2c_stop(); // Stop Condition

3.3.10.GET SERVO 2

Function To read the position of 2nd servo motorCommand 09HParameter -Response

500 2500 Current servo motor position, in ms units.Allowed range is 500 2500 ms.

Delay between Command and Response

15 ms

Description This command is used to locate the position of servo motor connected to 2nd servo connector. For example, it can be used after autoscan process.

15

Example with UART interface:User : 09HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x09); // Get Servo 2 commandi2c_stop(); // Stop Condition

delay_ms(15); // delay 15 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY moduleposMSB = i2c_read(1); // MSB data of servo position posLSB = i2c_read(0); // LSB data of servo positioni2c_stop(); // Stop Condition

3.3.11.ENABLE/DISABLE SERVO 1

Function To activate or deactivate 1st servo motorCommand 0AHParameter

0 Deactivates 1st servo motor1 Activates 1st servo motor

Response -Delay between Command and Response

-

Description If servo motor is activated then the servo motor will always try to maintain its position as commanded.

Servo motor status must be actived for commands that use servo motors (command: Set Servo or Autoscan).

If servo motor is deactivated then the servo motor stops functioning and can be rotated by hand.

The deactivate servo motor command can be used to save power supply usage.

Final status of servo motor is not stored in EEPROM and it will be active again when the module is powered on or after reset.

Example with UART interface to activate 1st servo motor:User : 0AH 01HDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x0A); // Enable/Disable Servo 1 commandi2c_write(0x01); // Servo status is set to enable

16

i2c_stop(); // Stop Condition

3.3.12.ENABLE/DISABLE SERVO 2

Function To activate or deactivate 2nd servo motorCommand 0BHParameter

0 Deactivates 2nd servo motor1 Activates 2nd servo motor

Response -Delay between Command and Response

-

Description If servo motor is activated then the servo motor will always try to maintain its position as commanded.

Servo motor status must be actived for commands that use servo motors (command: Set Servo or Autoscan).

If servo motor is deactivated then the servo motor stops functioning and can be rotated by hand.

The deactivate servo motor command can be used to save power supply usage.

Final status of servo motor is not stored in EEPROM and it will be active again when the module is powered on or after reset.

Example with UART interface to activate servo motor-2:User : 0BH 00HDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x0B); // Enable/Disable Servo 2 commandi2c_write(0x00); // Servo status is set to disablei2c_stop(); // Stop Condition

17

3.3.13.ENABLE/DISABLE CHANNEL

Function To activate or deactivate thermopile sensor's channelsCommand 0CHParameter

bit 0 Status of sensor's channel 0 (LSB)bit 1 Status of sensor's channel 1bit 2 Status of sensor's channel 2bit 3 Status of sensor's channel 3bit 4 Status of sensor's channel 4bit 5 Status of sensor's channel 5bit 6 Status of sensor's channel 6bit 7 Status of sensor's channel 7 (MSB)

Response -Delay between Command and Response

-

Description If a bit that represents status of sensor's channel is given logic 1, then the sensor's channel will be active and can detect the temperature in front of it.

If a bit that represents status of sensor's channel is given logic 0, then the sensor's channel will be inactive and the sensor reading result will always have value of 0.

During the autoscan process, if a sensor's channel is inactive then autoscan process will ignore temperature value that sensor's channel produces.

Final status of thermophile sensor's channel is not stored in EEPROM and all channels will be active again when the module is powered on or after reset.

Example with UART interface to activate sensor's channel 0 to 3 and deactivate sensor's channel 4 to 7:User : 0CH 0FHDT-SENSE : -

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x0C); // Enable/Disable Channel commandi2c_write(0x0F); // Desired sensor's channel statusi2c_stop(); // Stop Condition

18

3.3.14.READ ALL CHANNELS

Function To read the temperature data from all sensor's channelsCommand 0DHParameter -Response 8 byte

0 255 Channel temperature data value, in C units.Allowed range is 0 255 C.

Delay between Command and Response

100 ms

Description Channel temperature data value from channel-0 is sent first, and then channel-1, and so on, until channel-7.

If a channel is not activated then the reading result will always have value of 0.

Example with UART interface:User : 0DHDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x0D); // Perintah Read All Channeli2c_stop(); // Stop Condition

delay_ms(100); // delay 100 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY modulekanal1 = i2c_read(1); // Temperature data of channel-0kanal2 = i2c_read(1); // Temperature data of channel-1kanal3 = i2c_read(1); // Temperature data of channel-2kanal4 = i2c_read(1); // Temperature data of channel-3kanal5 = i2c_read(1); // Temperature data of channel-4kanal6 = i2c_read(1); // Temperature data of channel-5kanal7 = i2c_read(1); // Temperature data of channel-6kanal8 = i2c_read(0); // Temperature data of channel-7i2c_stop(); // Stop Condition

3.3.15.READ AMBIENT

Function To read the ambient/surrounding temperature dataCommand 30HParameter -Response

0 255 Ambient temperature value, in C units.Allowed range is 0 255 C.

Delay between Command and Response

100 ms

Description -

19

Example with UART interface:User : 30HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x30); // Read Ambient commandi2c_stop(); // Stop Condition

delay_ms(100); // delay 100 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY moduletAmb = i2c_read(0); // Temperature datai2c_stop(); // Stop Condition

3.3.16.READ CHANNEL N-1

Function To read the temperature data of sensor's channel n-1Command 3nHParameter -Response

0 255 Channel n-1 temperature data value, in C units.Allowed range is 0 255 C.

Delay between Command and Response

100 ms

Description n is replaced with 1 for channel-0, 2 for channel-1, and so on, until number 8 for channel-7.

If a channel is not activated then the reading result will always have value of 0.

Example with UART interface to read channel-2 temperature data:User : 33HDT-SENSE :

The following is a C pseudo code, to use this command with I2C interface (I2C address example = E0H):

i2c_start(); // Start Conditioni2c_write(0xE0); // Write to THERMOPILE ARRAY modulei2c_write(0x33); // Read Channel 2 commandi2c_stop(); // Stop Condition

delay_ms(100); // delay 100 ms

i2c_start(); // Start Conditioni2c_write(0xE1); // Read to THERMOPILE ARRAY modulekanal2 = i2c_read(0); // Channel-2 Temperature datai2c_stop(); // Stop Condition

20

4. TESTING PROCEDURE1. Connect sensor to the servo motor so that the sensor sweep covers 180.2. Release jumper at J4 so that the power supply used is 5 VDC.3. Connect servo on SERVO1 (J10) connector.4. Connect thermopile sensor on SENSOR (J5) connector.5. Connect 5 VDC power supply to the DT-SENSE THERMOPILE ARRAY

SENSOR.6. If the DT-SENSE THERMOPILE ARRAY SENSOR module succeeds in

performing power-on reset, then the servo motor will move to its default position.

7. Place the object that has a high enough temperature compared to room temperature (for example a soldering iron, candle, an active lightbulb, etc.) with corresponding height to the sensor eye, and place it about 5 40 cm from the sensor and still in the range of the servo motor and sensor sweep.

8. Send the AUTOSCAN PEAK command via the UART TTL interface.9. DT-SENSE THERMOPILE ARRAY SENSOR module will perform the autoscan

process and after it succeeds in detecting the object then the sensor eye will be directed to the object's position.

5. APPLICATION AND PROGRAM EXAMPLESAs an application example, DT-SENSE THERMOPILE ARRAY SENSOR module is used to find the position of objects that have temperature above 50C using the I2C interface. The DT-AVR Low Cost Micro System (LCMS) module is used as master. DT-AVR LCMS is to transmit the AUTOSCAN HIGHER command, read the results, and light up the LED if the object is found. The following are the connections between modules:

DT-AVR LCNS Connected To

PORTD.2 SDA DT-SENSE THERMOPILE ARRAY SENSOR

PORTD.3 SCL DT-SENSE THERMOPILE ARRAY SENSOR

PORTD.4 Connected to active low LED

PORTD.5 Active low button (one of its pins is connected to ground)

DT-SENSE THERMOPILE ARRAY SENSOR Connected To

J5 Sensor

J10 Motor Servo

21

As a program example for the above application, there is a program named contoh_i2c.c (included in the CD/DVD) written using CodeVisionAVR 1.25.2 evaluation version.

In the program, DT-AVR LCMS will read the button condition. If the button is pressed, then DT-AVR LCMS will send AUTOSCAN HIGHER command to DT-SENSE THERMOPILE SENSOR ARRAY (address: E0H). After the autoscan process completes and it detects an object with temperature higher than 50C, then DT-AVR LCMS will send READ AUTOSCAN command and turn on the LED. After the LED lights up for 2 seconds, DT-AVR LCMS will turn off the LED and wait for another input.

As another example, DT-SENSE THERMOPILE ARRAY SENSOR module is connected to Personal Computer (PC) and will be controlled using a software. UART is used as the interface. Due to the difference of UART voltage level on DT-SENSE THERMOPILE ARRAY SENSOR module and PC, it requires a UART Level Converter device. The following are the connections between modules:

22

DT-SENSETHERMOPILE

ARRAY SENSOR(address: E0H)

SERVO MOTOR

THERMOPILE ARRAYSENSOR

DT-AVRLCMS

SDA

SCL

SENSOR

SERVO

J5

J10J8

PORTD.4

PORTD.5

LED

Button

470

5 Volt

PORTD.2

PORTD.3

As a program example for the above application, there is a program named "testTPA.exe" (included in the CD/DVD) written using Delphi 7.

After DT-SENSE THERMOPILE ARRAY SENSOR module connected to PC and power supply is powered on, run the software "testTPA.exe" on PC.

Press "COM Settings" to set serial communication configuration. Select the COM port used on PC and set configurations to 38400 bps, 8 data bits, 1 stop bits, no parity, no flow control. To start testing the functions of DT-SENSE THERMOPILE SENSOR ARRAY, press "Connect" button.

To test the servo configuration function on the SERVO1 connector, slide the SERVO 1 control slider to the left or right. Likewise, to test the servo configuration function on the SERVO 2 connector, slide the SERVO 2 control slider to the left or right.

To test the thermopile sensor, press the "Read Temperature" button. If the sensor and the connection is working properly, then the ambient temperature display will show the surrounding temperature and each temperature channel will display the temperature data obtained by the sensors (if there is no hot object in front of the sensor, then the data value of each channel will be similar to the surrounding temperature).

23

SERVO MOTOR DT-SENSETHERMOPILE

ARRAY SENSOR(address: E0H)

THERMOPILE ARRAYSENSORJ5

J10

J3

SENSOR

SERVO

RS232LEVEL

CONVERTER

(UA

RT R

S232

)

SERI

AL

PORT

PC

UARTTTL

Thank you for your confidence in using our products, if there are difficulties, questions or suggestions regarding this product please contact our technical support:

[email protected]

24

COM Port connection

button

Servo 1control slider

Servo 2 control slider

COM port setting button

Read I2C address button

Read temperature

button

ATTACHMENT A.DT-SENSE THERMOPILE ARRAY SENSOR Schematic

25