Unit ketiga yang hendak dikemukakan yang bisa dengan mudah dipergunakan untuk mengendalikan daya adalah unit modul triac (thyristor). Sebelumnya sudah disampaikan penggunaan SSR, relay shield, dan modul dua relai. Modul yang akan dipergunakan adalah seperti yang terlihat di Gambar 1, Gambar 2 dan Gambar 3. Modul ini diproduksi oleh RobotDyn dan sudah bisa dibeli di toko online di lokal Indonesia.
Gambar 1. [sumber]
Gambar 2. [sumber]
Gambar 3. [sumber]
Di modul/papan ini sudah terdapat beberapa komponen pendukung selain komponen utama berupa triac BTA-16 600B, yang terpenting adalah MOC3042. Komponen ini adalah 6-Pin DIP Zero-Cross Optoisolators Triac Driver Output, artinya papan ini hanya bisa bekerja mengikuti pengaturan zero crossing. Salah satu diskusi mengenai mengapa fasilitas zero cross dipergunakan ada di electronics.stackexchange.com.
Gambar 4. [sumber]Gambar 5. [sumber]
Dikutip dari halaman RobotDyn:
[/su_panel] [su_panel border=”3px solid #30C0F0″ radius=”10″]If you need to control the AC power (lights, home equipment’s), a thyristor is what you need. This is a very common thyristor module with very low on-resistance and a control voltage, that is compatible with any 3.3V or 5V micro-controller or mechanical switch. This allows you to control high-power devices with very low-power control mechanisms.
This board has an optoisolator to protect your micro-controller from high AC currents.
We also left more space, if you need to install the heat sink for thyristor.
- GND to GND
- Signal (VCC) to Digital I/O, or 3.3V~5V
Pengujian dengan Arduino Uno.
const uint8_t IND_LED_PIN = LED_BUILTIN; const uint16_t DELAY02 = 2000; #define BLINK_DELAY 500 #define TRIAC_ON HIGH #define TRIAC_OFF LOW #define LED_PORT PORTD #define LED_ARRAY_GND 6 #define LED_ARRAY_LAST (LED_ARRAY_GND-6) #define LD1 (LED_ARRAY_GND-1) #define LD2 (LED_ARRAY_GND-2) #define LD3 (LED_ARRAY_GND-3) #define LD4 (LED_ARRAY_GND-4) #define LD5 (LED_ARRAY_GND-5) #define LD6 (LED_ARRAY_GND-6) #define KY1 13 #define KY2 (LED_ARRAY_GND-1) #define KY3 (LED_ARRAY_GND-2) #define KY4 (LED_ARRAY_GND-3) #define SIG A0 int buttonState = 0; // variable for reading the pushbutton status uint8_t btn1, btn2, btn3, btn4; void buttonSafeInit(void) { for (int i = KY1; i >= KY4; i--) { pinMode(i, INPUT); delay(1); } for (int i = KY1; i >= KY4; i--) { digitalWrite(i, HIGH); delay(1); } } void ledArrayInit(void) { // Urutan (eksekusi) kode dalam fungsi ini jangan ditukar; digitalWrite(LED_ARRAY_GND,HIGH); for (int i = LD1; i >= LD6; --i) { digitalWrite(i, LOW); delay(1); } for (int i = LED_ARRAY_GND; i >= LED_ARRAY_LAST; --i) { pinMode(i, OUTPUT); } // LOW yang kedua for (int i = LED_ARRAY_GND; i >= LED_ARRAY_LAST; --i) { digitalWrite(i, LOW); } } void ledBlinkTest(void) { for (int i = LD1; i >= LED_ARRAY_LAST; --i) { digitalWrite(i, HIGH); delay(100); } delay(500); for (int i = LD1; i >= LED_ARRAY_LAST; --i) { digitalWrite(i, LOW); delay(100); } } void safeTRIACinit(void) { digitalWrite(SIG, LOW); delay(100); pinMode(SIG, OUTPUT); } void triacTest001(void) { digitalWrite(SIG, LOW); delay(2000); digitalWrite(SIG, HIGH); delay(2000); } void triacTest002(void) { digitalWrite(SIG, TRIAC_ON); delay(DELAY02); digitalWrite(SIG, TRIAC_OFF); delay(DELAY02); } void triacTest003(void) { digitalWrite(SIG, TRIAC_ON); LED_PORT |= (0b00111111); delay(DELAY02 * 2); digitalWrite(SIG, TRIAC_OFF); LED_PORT &= ~(0b00111111); delay(DELAY02); } void setup(void) { safeTRIACinit(); // delay(2); buttonSafeInit(); // delay(2); ledArrayInit(); // delay(2); pinMode(IND_LED_PIN, OUTPUT); digitalWrite(IND_LED_PIN, LOW); delay(200); } void loop(void) { delay(1000); digitalWrite(IND_LED_PIN, HIGH); delay(1000); // ledBlinkTest(); triacTest003(); digitalWrite(IND_LED_PIN, LOW); }[/su_panel] [su_panel border=”3px solid #FF6666″ radius=”10″] [/su_panel] [su_panel color=”#010101″ border=”0px none #cccccc” shadow=”0px 0px 0px #ffffff” text_align=”center”]
BTA16 600B en.CD00002265 by Sunu Pradana on Scribd
[/su_panel] [su_panel border=”3px solid #990066″ radius=”10″]
[/su_panel]