ÈÈÃÅ£º 51µ¥Æ¬»ú | 24Сʱ±Ø´ðÇø | µ¥Æ¬»ú½Ì³Ì | µ¥Æ¬»úDIYÖÆ×÷ | STM32 | Cortex M3 | Ä£Êýµç×Ó | µç×ÓDIYÖÆ×÷ | ÒôÏì/¹¦·Å | ²ð»úÀÖÔ° | Arduino | ǶÈëʽOS | ³ÌÐòÉè¼Æ
jzli2019 ·¢±íÓÚ 2019-11-4 18:03 ºÇºÇ8.8 |
taotie ·¢±íÓÚ 2019-11-4 17:12 ÄãÓõÄÊÇÄĸö°æ±¾£¬ÎҸоõ¾ÍÊǰ汾²»¶Ôµ¼Öµġ£¡£¡£ |
taotie ·¢±íÓÚ 2019-11-4 17:12 ´óÀУ¬ÎÒ°Ñproteus8.7Ð¶ÔØÁËÖØÐÂ×°ÁËproteus8.9£¬ÏÖÔÚÄ£ÄâҲûÎÊÌâÁË¡£¡£¡£ºÜĪÃûÆäÃî°¡ |
°´ÄãµÄ³ÌÐò·ÂÕæÃ»µÃÎÊÌâ¡£¡£![]() |
jzli2019 ·¢±íÓÚ 2019-11-4 14:33 Arduino Dimming 230V AC |
taotie ·¢±íÓÚ 2019-11-4 10:31 Õâ¸öÀý×ÓÃû³Æ½Ðʲô£¬ÎÒÏë¿´¿´ÍêÕûÏîÄ¿ |
¼ì²âµ½¹ýÁãºóÑÓʱ5ms¿ØÖÆmoc3021¿ªÍ¨£¿£¿£¿£¿ ÓÃ10msÊÔÒ»ÊÔ~~ |
jzli2019 ·¢±íÓÚ 2019-11-4 09:37 ÕâÊÇProteus 8 ÖеÄÀý³Ì¿´Ò»¿´°É /* Main.ino file generated by New Project wizard * * Created: mer ago 22 2018 * Processor: Arduino Uno * Compiler: Arduino AVR */ int AC_LOAD = 3; // Output to Opto Triac pin int dimming = 128; // Dimming level (0-128) 0 = ON, 128 = OFF void setup() { pinMode(AC_LOAD, OUTPUT);// Set AC Load pin as output attachInterrupt(0, zero_crosss_int, RISING); // Choose the zero cross interrupt # from the table above } //the interrupt function must take no parameters and return nothing void zero_crosss_int() //function to be fired at the zero crossing to dim the light { // Firing angle calculation : 1 full 50Hz wave =1/50=20ms // Every zerocrossing thus: (50Hz)-> 10ms (1/2 Cycle) // For 60Hz => 8.33ms (10.000/120) // 10ms=10000us // (10000us - 10us) / 128 = 75 (Approx) For 60Hz =>65 int dimtime = (75*dimming); // For 60Hz =>65 delayMicroseconds(dimtime); // Wait till firing the TRIAC digitalWrite(AC_LOAD, HIGH); // Fire the TRIAC delayMicroseconds(10); // triac On propogation delay (for 60Hz use 8.33) digitalWrite(AC_LOAD, LOW); // No longer trigger the TRIAC (the next zero crossing will swith it off) TRIAC } void loop() { for (int i=5; i <= 128; i++){ dimming=i; delay(10); } } |
ûÓÐÈËÂ𣿠|
СºÚÎÝ|51ºÚµç×ÓÂÛ̳
|
¹ÜÀíÔ±QQ:125739409;¼¼Êõ½»Á÷QQȺ281945664
Powered by µ¥Æ¬»ú½Ì³ÌÍø