UVTron Hamamatsu




For English


The Hamamatsu UVTron flame detector (available from www.acroname.com) is commonly used in the Trinity Firefighting contest to detect the presence of a candle.  It is most commonly used just to determine whether a candle exists in the room being inspected; less often used to determine the direction of the candle.
It senses ultraviolet light which is emitted in the candles flame. Ultraviolet is apparently not emitted from other sources which may be expected at the contest. Including, I assume, camera range detectors (which use IR) and the sodium vapor lights which are used to light the gymnasium at Trinity. I am using it successfully in a room which has plenty of indirect sunlight, occasionally direct sunlight or incandescent light. (Flash photography is another light source which is an issue at Trinity. I don’t know if it emits UV or not.)
Characteristics of the UVTron are that it can detect a candle quite reliably at the distances necessary in the contest (up to 4 or 5 feet). It is even able to detect a candle by reflected light off the room walls when the candle is not in direct view. My own experience is that it can always detect a candle in direct view. It seems able to detect a candle where direct view is blocked by a piece of "furniture"; in this case, the reflection is off walls that are close to the candle and probably result in a good reflection. (the candle is usually in a corner, with the furniture nearby between the candle and the doorway). If the candle light must travel to a far wall (3 feet away) and then reflect back to the sensor, the probability of getting a detection becomes less.
The UVTron provides an output consisting of 10 msec pulses (either from ground to +5, or +5 to ground, or open collector…you pick). The rate of these pulses indicates the strength of the signal.  However, rate isn’t as useful as it might be as the pulses will be output at a minimum interval of 160 msec. And since you don’t want to spend too much time waiting to see if there is a detection , you can’t expect more than 6 pulses in a one second inspection.
A weak candle signal may take a whole second to show up. And, by the way, the UVTron apparently has some logic built in such that if it doesn't get 3 detections over 2 seconds, the board will ignore the detections. My interpretation of this is that if you get one pulse out of the sensor, there have been 3 detections in the last 2 seconds…which sounds like a good detection level.
The UVTron is not commonly used for candle direction. I believe this is due to two factors: one is the slow output pulse rate which would make scanning the room a very slow operation; and second, the ability to pick up reflections might cause uncertainty as to whether the candle or a reflection is being detected. A sensor with signal strength output is better for sensing direction. (e.g. the Eltek pyrosensor described elsewhere)
The UVTron is most sensitive over about a 90 degree arc straight ahead (+/- 45 degrees). Hence, aiming it at one direction in the room may not detect a candle located 90 degrees to the side.  I dealt with this by having the robot enter the room and do a 1 second 180 degree pivot to point out of the door again.  This allowed enough time for a reliable detection, pointed the UVTron all over the room during the pivot, and left the robot aimed to depart if a candle was not detected.  During the pivot, the robot also scanned the room with the Eltek sensor; and if the UVtron reported a flame in the room, the robot would quickly orient to the direction in which the Eltek had detected the strongest heat source


For Indonesian
Dalam kompetisi fire fighting robot seperti Trinity College Fire Fighting Robot Contest (atau kalau di Indonesia adalah KRCI), umumnya robot akan menjelajahi empat ruangan dan mengecek apakah ada lilin atau tidak. Jika kita menggunakan satu UV Tron yang sudah diberi pelindung tentu akan memakan waktu men-scanning posisi absolut lilin di setiap ruangan. Umumnya pemain lama menggunakan 2 UV Tron. Satu UV Tron dengan pelindung untuk menemukan posisi absolut lilin dan satu lagi UV Tron tanpa pelindung untuk mengecek ada tidaknya lilin di ruangan (Biasanya disebut UV Tron global. Jadi robot cukup berada dekat pintu dan mengecek UV Tron global untuk mengetahui apakah ada nyala lilin, dan jika ada baru gunakan UV Tron dengan pelindung untuk mengetahui posisi absolut lilin).
Sekarang saatnya menghubungkan UV Tron dengan AVR. Pastinya Anda beli UV Tron (yang seperti bola lampu) dengan board pengaturnya kan (C3704)? Hubungkan anoda UV Tron (yang kakinya lebih panjang) dengan lubang di C3704 dengan tanda A dan katoda (kaki lebih pendek) dengan lubang bertanda K.
UV Tron yang terpasang di C3704

Nah untuk input tegangan, banyak referensi yang cukup membingunkan. Menurut spesifikasi, board C3704 membutuhkan input tegangan 10 - 30V DC. Sebenarnya input tersebut tetap diregulasi oleh C3704 menjadi 5V. Kita bisa melewati regulator pada C3704 dengan memberikan langsung tegangan 5 V ke kaki output regulator C3704. Regulator pada C3704 merupakan regulator 7805 dengan tanda ICI. Ada 4 lubang (3 digunakan oleh regulator) dengan tanda O (output), G (ground), I(input) dan 0 (output). Lubang ke-4 yang bertanda “0″ tidak digunakan dan bisa digunakan sebagai input tegangan 5 V. Perhatikan gambar di bawah ini:


Hubungan sumber tegangan C3704
Jika Anda menggunakan sumber tegangan 10 - 30V DC, bisa disambungkan ke lubang dengan tanda “+” dan groundnya tetap ke lubang bertanda “-”. Oh iya, perhatikan seri boardnya! Jika C3704 maka penjelasan di atas dapat diterapkan (seri ini yang saya gunakan), jika C3704-2 maka inputnya bisa langsung 5V, jika C3704-3 inputnya antara 6 - 9V. Hubungan ke AVR adalah melalui lubang Q (lubang dengan tanda 1) dan Q bar (lubang dengan tanda 2). Lubang 1 dan 2 ini merupakan sinyal output berupa pulsa high atau low. Jika diingikan uC untuk membaca masukkan 5v, maka pin uC dihubungkan dengan lubang Q. Jika diinginkan uC untuk membaca kondisi low, maka hubungkan dengan lubang Q bar. Lebar pulsa saat mendeteksi adanya nyala lilin adalah 10ms (tanpa adanya penggunaan kapasitor pada lubang Cx - lihat datasheetnya). Di board C3704 juga terdapat setting jumper berlabel 3, 5, 7 dan 9 (atau disebut setting background cancel level). Jika merasa banyak pancaran cahaya natural bisa diset jumpernya ke 9, defaultnya adalah 3. Jadi saat UV Tron memberikan 3 sampai 9 pulsa ke board dengan interval waktu 2 detik atau kurang, rangkaian pemroses sinyal baru akan memberikan output pulsa yang selebar 10 ms itu (nah banyak pulsa dari UV Tron yang diinginkan bisa diset melalui jumper ini).
Lihat gambar 4. Katakanlah IO line (Q bar) dari C3704 saya hubungkan dengan pin INT2 AVR. Sebenarnya kalau untuk mengetes pulsa output dari C3704 bisa langsung menggunakan logic probe. Tapi saya coba iseng tes pakai AVR dan menampilkannya di LCD. Pertama-tama set waktu lama pembacaan. Lalu set INT2 dengan falling edge (karena kita menggunakan Q bar untuk membaca pulsa output saat low). Rutin INT2 hanya menaikkan variabel (yang menyatakan banyaknya pulsa yang masuk). Lalu tampilkan di LCD variabel tersebut setelah waktu pembacaan selesai. Kurang lebih kodenya seperti berikut:

#include <mega8535.h>
#include <delay.h>
Module functions #asm .equ __lcd_por
// Alphanumeric LCD t=0x1B ;PORT A #endasm #include <lcd.h> int photon_c;
NT2] void ext_int2_isr(void) { photon_c
// External Interrupt 2 service routine interrupt [EXT_ I++; } void scan_candle(void unsigned int time) { photon_c = 0; //enable int2 falling edge
dat) { unsi
GICR|=0x20; //wait delay_ms(time); //disable int2 GICR&=0xdf; } void tampil(unsigned char gned char data; data = dat / 100; data+=0x30; lcd_putchar(data); dat%=100; data = dat / 10;
d) { int nu
data+=0x30; lcd_putchar(data); dat%=10; data = dat + 0x30; lcd_putchar(data); } void main(vo im; GICR|=0x00; MCUCR=0x00; MCUCSR=0x00; GIFR=0x00; lcd_init(16); #asm("sei") num = 0; photon_c = 0;
delay_ms(1
while (1) { num++; scan_candle(1000); lcd_gotoxy(0,0); tampil(num); lcd_putchar(0x20); tampil(photon_c) ;000); }; }
Kalau tidak mau ambil pusing, bisa saja cek apakah PIN.X pada AVR bernilai low atau high. Jika terhubung dengan Q bar dan PIN.X membaca low, maka dapat dinyatakan UV Tron mendeteksi adanya nyala lilin. Kalau dibuat sederhana, kodenya dapat diubah menjadi seperti ini:
...
#define flame PINB.0
...
ned char banyaknya; whil
unsi ge (1) { if (flame==0) {
nya>=3) { lc
banyaknya++; } if (banya kd_putsf("ada lilin"); banyaknya=0; } }
Referensi dari : http://gedex.web.id/archives/2008/05/26/hamamatsu-uv-tron-dan-avr/