Jump to content
Arduino.lk Community Sri Lanka

Team Arduino.lk

Members
  • Content count

    30
  • Joined

  • Last visited

Posts posted by Team Arduino.lk


  1. Description

    Arduino IR receiver module KY-022, reacts to 38kHz infrared light.

    KY-022_infrared_receiver_module-240x240.KY-022 Specifications

    This module consists of a 1838 IR receiver, a 1kΩ resistor and a LED. It works together with the KY-005 IR transmitter module. Compatible with popular electronic platforms like Arduino, Raspberry Pi and ESP8266.

     
    Operating Voltage 2.7 to 5.5V
    Operating Current 0.4 to 1.5mA
    Reception Distance 18m
    Reception Angle ±45º
    Carrier Frequency 38KHz
    Low Level Voltage 0.4V
    High Level Voltage 4.5V
    Ambient Light Filter up to 500LUX

    KY-022 Connection Diagram

    Connect the Power line (middle) and ground (-) to +5 and GND respectively. Connect signal (S) to pin 11 on the Arduino. Line un IR receiver and transmitter.

    Arduino_KY-022_Keyes_Infrared_Receiver_m

     
    KY-012 Arduino
    S Pin 11
    middle +5V
    GND

    KY-022 Arduino Code

    The following Arduino sketch uses the IRremote library to receive and process infra-red signals. Use the KY-005 IR transmitter module to serially send data to this module.

    Links to the required libraries for KY-022 Arduino example sketch can be found in the Downloads section below.

    #include <IRremote.h>
    
    int RECV_PIN = 11; // define input pin on Arduino 
    IRrecv irrecv(RECV_PIN); 
    decode_results results; // decode_results class is defined in IRremote.h
    
    void setup() { 
      Serial.begin(9600); 
      irrecv.enableIRIn(); // Start the receiver 
    } 
    
    void loop() { 
      if (irrecv.decode(&results)) {
        Serial.println(results.value, HEX); 
        irrecv.resume(); // Receive the next value 
      }
      delay (100); // small delay to prevent reading errors
    }

     

    View the full article


  2. Description

    Arduino IR receiver module KY-022, reacts to 38kHz infrared light.

    KY-022_infrared_receiver_module-240x240.KY-022 Specifications

    This module consists of a 1838 IR receiver, a 1kΩ resistor and a LED. It works together with the KY-005 IR transmitter module. Compatible with popular electronic platforms like Arduino, Raspberry Pi and ESP8266.

     
    Operating Voltage 2.7 to 5.5V
    Operating Current 0.4 to 1.5mA
    Reception Distance 18m
    Reception Angle ±45º
    Carrier Frequency 38KHz
    Low Level Voltage 0.4V
    High Level Voltage 4.5V
    Ambient Light Filter up to 500LUX

    KY-022 Connection Diagram

    Connect the Power line (middle) and ground (-) to +5 and GND respectively. Connect signal (S) to pin 11 on the Arduino. Line un IR receiver and transmitter.

    Arduino_KY-022_Keyes_Infrared_Receiver_m

     
    KY-012 Arduino
    S Pin 11
    middle +5V
    GND

    KY-022 Arduino Code

    The following Arduino sketch uses the IRremote library to receive and process infra-red signals. Use the KY-005 IR transmitter module to serially send data to this module.

    Links to the required libraries for KY-022 Arduino example sketch can be found in the Downloads section below.

    #include <IRremote.h>
    
    int RECV_PIN = 11; // define input pin on Arduino 
    IRrecv irrecv(RECV_PIN); 
    decode_results results; // decode_results class is defined in IRremote.h
    
    void setup() { 
      Serial.begin(9600); 
      irrecv.enableIRIn(); // Start the receiver 
    } 
    
    void loop() { 
      if (irrecv.decode(&results)) {
        Serial.println(results.value, HEX); 
        irrecv.resume(); // Receive the next value 
      }
      delay (100); // small delay to prevent reading errors
    }

     

    View the full article


  3. Description

    KY-016 Arduino full color 5mm RGB LED, different colors can be obtained by mixing the three primary colors

    KY-016_Keyes_RGB_full_color_LED_module-2Specifications

    This module consists of a 5mm RGB LED and three 150Ω limiting resistors to prevent burnout. Adjusting the PWM signal on each color pin will result on different colors.

     
    Operating Voltage 5V
    LED drive mode Common cathode driver
    LED diameter 5 mm

    KY-016 Connection Diagram

    Connect the red pin (R) on the KY-016 to pin 11 on the Arduino. Blue (B) to pin 10, green (G) to pin 9 and ground (-) to GND. Notice that you do not need to use limiting resistors since they are already included on the board.

    Arduino_KY-016_Keyes_RGB_full_color_LED_

     
    KY-016 Arduino
    R Pin 11
    B Pin 10
    G Pin 9
    GND

    KY-016 Example Code

    The following Arduino sketch will gradually increase/decrease the PWM values on the red, green and blue pins causing the LED to cycle through various colors.

    int redpin = 11; // select the pin for the red LED
    int bluepin =10; // select the pin for the  blue LED
    int greenpin =9; // select the pin for the green LED
    
    int val;
    
    void setup() {
      pinMode(redpin, OUTPUT);
      pinMode(bluepin, OUTPUT);
      pinMode(greenpin, OUTPUT);
      Serial.begin(9600);
    }
    
    void loop() {
      for(val = 255; val > 0; val--)
      {
        analogWrite(11, val);
        analogWrite(10, 255 - val);
        analogWrite(9, 128 - val);
    
        Serial.println(val, DEC);
        delay(5); 
      }
      for(val = 0; val < 255; val++)
      {
        analogWrite(11, val);
        analogWrite(10, 255 - val);
        analogWrite(9, 128 - val);
        
        Serial.println(val, DEC);
        delay(5); 
      }
    }

     

    View the full article


  4. Description

    KY-016 Arduino full color 5mm RGB LED, different colors can be obtained by mixing the three primary colors

    KY-016_Keyes_RGB_full_color_LED_module-2Specifications

    This module consists of a 5mm RGB LED and three 150Ω limiting resistors to prevent burnout. Adjusting the PWM signal on each color pin will result on different colors.

     
    Operating Voltage 5V
    LED drive mode Common cathode driver
    LED diameter 5 mm

    KY-016 Connection Diagram

    Connect the red pin (R) on the KY-016 to pin 11 on the Arduino. Blue (B) to pin 10, green (G) to pin 9 and ground (-) to GND. Notice that you do not need to use limiting resistors since they are already included on the board.

    Arduino_KY-016_Keyes_RGB_full_color_LED_

     
    KY-016 Arduino
    R Pin 11
    B Pin 10
    G Pin 9
    GND

    KY-016 Example Code

    The following Arduino sketch will gradually increase/decrease the PWM values on the red, green and blue pins causing the LED to cycle through various colors.

    int redpin = 11; // select the pin for the red LED
    int bluepin =10; // select the pin for the  blue LED
    int greenpin =9; // select the pin for the green LED
    
    int val;
    
    void setup() {
      pinMode(redpin, OUTPUT);
      pinMode(bluepin, OUTPUT);
      pinMode(greenpin, OUTPUT);
      Serial.begin(9600);
    }
    
    void loop() {
      for(val = 255; val > 0; val--)
      {
        analogWrite(11, val);
        analogWrite(10, 255 - val);
        analogWrite(9, 128 - val);
    
        Serial.println(val, DEC);
        delay(5); 
      }
      for(val = 0; val < 255; val++)
      {
        analogWrite(11, val);
        analogWrite(10, 255 - val);
        analogWrite(9, 128 - val);
        
        Serial.println(val, DEC);
        delay(5); 
      }
    }

     

    View the full article


  5. Quote

    WARNING: Mishandling or incorrect or improper use of relays could result in

    serious personal injury or DEATH

    possible physical damage of the product

    faulty operation

    or create serious/dangerous hazards.

    Please make sure that you read and understand how your relay/relay module board works, the voltage and current it is rated for, and the risks involved in your project BEFORE you even attempt to start putting it together. Seek professional and qualified assistance BEFORE you undertake ANY high power projects.

    If you choose to follow the instructions in this tutorial, you do so at your own risk. I am not an electrician, and am not a qualified electrical engineer - so please do your research and seek advice BEFORE undertaking a project using a relay. Please check your connections and test them BEFORE turning the power on.

    I accept no responsibility for your project, or the risk/damage/fire/shock/injury/death/loss that it causes. You take full responsibility for your actions/project/creation, and do so at YOUR OWN RISK !!!

    Please note: It is illegal in some countries to wire up a high power project without an electrician. Please check your country's rules/laws/regulations before you undertake your project. If you have any doubts - don't do it.

    What is a relay

    A Relay is an electrically operated switch. Many relays use an electromagnet to mechanically operate the switch and provide electrical isolation between two circuits. In this project there is no real need to isolate one circuit from the other, but we will use an Arduino UNO to control the relay. We will develop a simple circuit to demonstrate and distinguish between the NO (Normally open) and NC (Normally closed) terminals of the relay. We will then use the information gained in this tutorial to make a much more exciting circuit. But we have to start somewhere. So let's get on with it.

    Parts Required:

    • Arduino UNO compatible board
    • 4 Channel Relay Module
    • 2x LEDs
    • 2x 330 ohm resistors
    • Jumper Wires (male to male)
    • Jumper Wires (female to male)

    Fritzing Sketch

    Relay_LED_Circuit_with_Arduino.png

    Table of Connections

    Fritzing_TableOfConnections.png

    Arduino Sketch

    /* 
      Connect 5V on Arduino to VCC on Relay Module
      Connect GND on Arduino to GND on Relay Module 
      Connect GND on Arduino to the Common Terminal (middle terminal) on Relay Module. */
     
     #define CH1 8   // Connect Digital Pin 8 on Arduino to CH1 on Relay Module
     #define CH3 7   // Connect Digital Pin 7 on Arduino to CH3 on Relay Module
     #define LEDgreen 4 //Connect Digital Pin 4 on Arduino to Green LED (+ 330 ohm resistor) and then to "NO" terminal on relay module
     #define LEDyellow 12 //Connect Digital Pin 12 on Arduino to Yellow LED (+ 330 ohm resistor) and then to "NC" terminal on relay module
     
     void setup(){
       //Setup all the Arduino Pins
       pinMode(CH1, OUTPUT);
       pinMode(CH3, OUTPUT);
       pinMode(LEDgreen, OUTPUT);
       pinMode(LEDyellow, OUTPUT);
       
       //Provide power to both LEDs
       digitalWrite(LEDgreen, HIGH);
       digitalWrite(LEDyellow, HIGH);
       
       //Turn OFF any power to the Relay channels
       digitalWrite(CH1,LOW);
       digitalWrite(CH3,LOW);
       delay(2000); //Wait 2 seconds before starting sequence
     }
     
     void loop(){
       digitalWrite(CH1, HIGH);  //Green LED on, Yellow LED off
       delay(1000);
       digitalWrite(CH1, LOW);   //Yellow LED on, Green LED off
       delay(1000);
       digitalWrite(CH3, HIGH);  //Relay 3 switches to NO
       delay(1000);
       digitalWrite(CH3,LOW);    //Relay 3 switches to NC
       delay(1000);
     }

    The Red light on the Relay board turns on when power is applied (via the VCC pin). When power is applied to one of the Channel pins, the respective green light goes on, plus the relevant relay will switch from NC to NO. When power is removed from the channel pin, the relay will switch back to NC from NO. In this sketch we see that power is applied to both LEDs in the setup() method. When there is no power applied to the CH1 pin, the yellow LED will be on, and the Green LED will be off. This is because there is a break in the circuit for the green LED. When power is applied to CH1, the relay switches from NC to NO, thus closing the circuit for the green LED and opening the circuit for the yellow LED. The green LED turns on, and the yellow LED turns off.

    I also show what happens when you apply power to a channel (eg. CH3) when there is nothing connected to the relay terminals. The respective onboard LED illuminates. This is useful for troubleshooting the relays, and knowing what state the relay is in (NC or NO). NC stands for Normally closed (or normally connected) NO stands for Normally open (or normally disconnected)

     


  6.  

    Arduino Board is a circuit board, which integrates micro controller, input, output interface and etc. Arduino
    Board can use the sensor to sense the environment and receive user’s operation to control LED, motor rotation,
    etc. We just need to assembly circuit and write the code

    Currently, Arduino Board has several models, and the code between boards of different types is universal
    (some boards may not be completely compatible because of the differences in hardware). Popular boards
    include:

    uno.png

    mega.png

    Diagram of Arduino UNO board is shown below:

    unodigram.png

    Digital I/O ports is used to connect to other components or modules, to receive an input signal, or to send a control signal. Usually, we name it by adding a “D” in front of the number, such as D13.

    • USB interface is used to provide power, upload code or communicate with PC.
    • LED L is connected to digital I/O port 13 (D13).
    • LED TX, RX is used to indicate the state of the serial communication.
    • DC interface is connected DC power to provide power for the board.
    • Power ports can provide power for electronic components and modules.
    • Analog I/O ports can be used to measure analog signals.
    • LED ON is used to indicate the power state.

     

    View the full article


  7.  

    Arduino Board is a circuit board, which integrates micro controller, input, output interface and etc. Arduino
    Board can use the sensor to sense the environment and receive user’s operation to control LED, motor rotation,
    etc. We just need to assembly circuit and write the code

    Currently, Arduino Board has several models, and the code between boards of different types is universal
    (some boards may not be completely compatible because of the differences in hardware). Popular boards
    include:

    uno.png

    mega.png

    Diagram of Arduino UNO board is shown below:

    unodigram.png

    Digital I/O ports is used to connect to other components or modules, to receive an input signal, or to send a control signal. Usually, we name it by adding a “D” in front of the number, such as D13.

    • USB interface is used to provide power, upload code or communicate with PC.
    • LED L is connected to digital I/O port 13 (D13).
    • LED TX, RX is used to indicate the state of the serial communication.
    • DC interface is connected DC power to provide power for the board.
    • Power ports can provide power for electronic components and modules.
    • Analog I/O ports can be used to measure analog signals.
    • LED ON is used to indicate the power state.

     

    View the full article


  8. මේ සොෆ්ට්වෙයා එක භාවිතා කරලා ඔයාලට circuits design කරනගන්න පුළුවන්. මේක Arduino Support කරන නිසා ඔයාලගේ project වලට යොදාගන්න පුලුවන්.  (there are Arduino models for the Duemilanove. Mini, Nano, Mega).  මේක ඕපන් සෝස් සොෆ්ට්වෙයා එකක්. මේක නිර්මාණය කරලා තියෙන්නේ University of Applied Sciences Potsdam, Germany.

    මේ සොෆ්ට්වෙයා එක වින්ඩෝස්, ලිනක්ස්, මැක් ඕනෑම ඔපරේටින් සිස්ටම් එකක් එක්ක use කරගන්න පුළුවන්

    මේ ලින්ක් එකෙන් ඔයාලට පුළුවන් fritzing ඩවුන්ලෝඩ් කරගන්න : http://fritzing.org/download/?donation=0

     

    allows you to draw breadboard connections, and automatically route the schematics, and the PCB layout. You can then export the gerber files, or order directly from Fritzing Lab. The software is not exactly new, but it’s the first time I’ve come across it.

    I’ve decided to connect an LED on the breadboard, and control it with an Arduino Leonardo board to try the software. Alternatively, you could also play around with one of the examples accessible via File->Open Example. The software provides three views: Breadboard, Schematics and PCB that you can select in the top right window.

    Fritzing_Arduino_Leonardo_Breadboard_LED

    The Breadboard view starts with a lone breadboard, but you can select several board and components from the library (mainly from Sparkfun) to add to the view. I added Arduino Leonardo, an LED, and a resistor, and connected the LED to D4 pin. Time to move to the Schematics view.

    Fritzing_Arduino_Breadboard_LED_640px.jp

    I’ve just clicked on AutoRoute to let the software do the job automatically. The result is not really pretty, but it works. Time for the PCB view!

    Fritzing_Arduino_Leonardo_LED_Schematics

    View the full article


  9. මේ සොෆ්ට්වෙයා එක භාවිතා කරලා ඔයාලට circuits design කරනගන්න පුළුවන්. මේක Arduino Support කරන නිසා ඔයාලගේ project වලට යොදාගන්න පුලුවන්.  (there are Arduino models for the Duemilanove. Mini, Nano, Mega).  මේක ඕපන් සෝස් සොෆ්ට්වෙයා එකක්. මේක නිර්මාණය කරලා තියෙන්නේ University of Applied Sciences Potsdam, Germany.

    මේ සොෆ්ට්වෙයා එක වින්ඩෝස්, ලිනක්ස්, මැක් ඕනෑම ඔපරේටින් සිස්ටම් එකක් එක්ක use කරගන්න පුළුවන්

    මේ ලින්ක් එකෙන් ඔයාලට පුළුවන් fritzing ඩවුන්ලෝඩ් කරගන්න : http://fritzing.org/download/?donation=0

     

    allows you to draw breadboard connections, and automatically route the schematics, and the PCB layout. You can then export the gerber files, or order directly from Fritzing Lab. The software is not exactly new, but it’s the first time I’ve come across it.

    I’ve decided to connect an LED on the breadboard, and control it with an Arduino Leonardo board to try the software. Alternatively, you could also play around with one of the examples accessible via File->Open Example. The software provides three views: Breadboard, Schematics and PCB that you can select in the top right window.

    Fritzing_Arduino_Leonardo_Breadboard_LED

    The Breadboard view starts with a lone breadboard, but you can select several board and components from the library (mainly from Sparkfun) to add to the view. I added Arduino Leonardo, an LED, and a resistor, and connected the LED to D4 pin. Time to move to the Schematics view.

    Fritzing_Arduino_Breadboard_LED_640px.jp

    I’ve just clicked on AutoRoute to let the software do the job automatically. The result is not really pretty, but it works. Time for the PCB view!

    Fritzing_Arduino_Leonardo_LED_Schematics

    View the full article


  10. NodeMCU කියන්නේ අර්ඩුයිනෝ වගේම Development Board එකක්. අපි අද කතා කරන්න යන්නේ ඒ ගැන. NodeMCU Board එක IOT සමග ගොඩක් වැඩ කරගන්න පුළුවන්  Board එකක්. මෙහි Inbuild Wifi තියෙන නිසා පහසුවෙන් internet එකට connect කරගන්න පුළුවන්. ඒ වගේම හොද Innovation products අලුතෙන් අලුතෙන් නිර්මාණය කරන්න මේක ගොඩක් උදව් වෙනවා.

    NodeMCU ඔපෙන් Source firmware එකක්. මේක නිර්මාණය කරලා තියෙන්නේ LUA  Core එක භාවිතා කරලා මේක Programming Language එකක්.

    මෙය ප්‍රෝග්‍රෑම් කිරීමට Arduino, nodejs, Phython වලට අනුකුල වන ආකාරයට code කිරීමේ හැකියාව තිබේ. Arduino Core එක භාවිත කරන්න පුළුවන් නිසා අපිට මේකෙන් ගොඩක් වැඩ ගන්න පුළුවන් හැකියාව තියෙනවා. මෙහි  code අප්ලෝඩ් කරන්නේ ESP8266 MicroChip එකට ඒ ගැන අපි පසුව කතා කරමු.

    NodeMCU එක මුලින්ම නිර්මාණය කලේ 2014 දී. මුලින්ම අවේ v0.9 විදියට ඊට පස්සේ 2015 දී v1.0 අවා.

    දැන් අපි මෙහි PIN ටික ගැන කතා කරමු.

    pinout.png

    මෙහි Digital Pin 13 ක් ගන්න පුළුවන්.  Analog Pin එකක් තියෙනවා තව RX,  TX serial  Communication Pin 2ක තියෙනවා.

    තව

    1. ESP8266 : It is main chip which with inbuilt wifi
    2. USB to UART convertor : This chip will convert usb data to UART data which main chip can understand
    3. Voltage regulators 
    4. Status LED : This LED is basically used to show current status like flashing/booting
    5. MicroUSB port : Connect board to Computer for programming and powering  the board.
    6. Reset/Flash buttons : Perform actions on board.
    7. GPIO pins : To connect board with other peripherals.

    ඉදිරියේදී අපි මේ ගැන දිග පාඩම් මාලාවක් ලබා දෙන්න බලාපොරොත්තු වෙනවා. ප්‍රශ්න ගැටළු තියෙනවනම් මෙහි කමෙන්ට් එකක් දන්න.

    View the full article


  11. NodeMCU කියන්නේ අර්ඩුයිනෝ වගේම Development Board එකක්. අපි අද කතා කරන්න යන්නේ ඒ ගැන. NodeMCU Board එක IOT සමග ගොඩක් වැඩ කරගන්න පුළුවන්  Board එකක්. මෙහි Inbuild Wifi තියෙන නිසා පහසුවෙන් internet එකට connect කරගන්න පුළුවන්. ඒ වගේම හොද Innovation products අලුතෙන් අලුතෙන් නිර්මාණය කරන්න මේක ගොඩක් උදව් වෙනවා.

    NodeMCU ඔපෙන් Source firmware එකක්. මේක නිර්මාණය කරලා තියෙන්නේ LUA  Core එක භාවිතා කරලා මේක Programming Language එකක්.

    මෙය ප්‍රෝග්‍රෑම් කිරීමට Arduino, nodejs, Phython වලට අනුකුල වන ආකාරයට code කිරීමේ හැකියාව තිබේ. Arduino Core එක භාවිත කරන්න පුළුවන් නිසා අපිට මේකෙන් ගොඩක් වැඩ ගන්න පුළුවන් හැකියාව තියෙනවා. මෙහි  code අප්ලෝඩ් කරන්නේ ESP8266 MicroChip එකට ඒ ගැන අපි පසුව කතා කරමු.

    NodeMCU එක මුලින්ම නිර්මාණය කලේ 2014 දී. මුලින්ම අවේ v0.9 විදියට ඊට පස්සේ 2015 දී v1.0 අවා.

    දැන් අපි මෙහි PIN ටික ගැන කතා කරමු.

    pinout.png

    මෙහි Digital Pin 13 ක් ගන්න පුළුවන්.  Analog Pin එකක් තියෙනවා තව RX,  TX serial  Communication Pin 2ක තියෙනවා.

    තව

    1. ESP8266 : It is main chip which with inbuilt wifi
    2. USB to UART convertor : This chip will convert usb data to UART data which main chip can understand
    3. Voltage regulators 
    4. Status LED : This LED is basically used to show current status like flashing/booting
    5. MicroUSB port : Connect board to Computer for programming and powering  the board.
    6. Reset/Flash buttons : Perform actions on board.
    7. GPIO pins : To connect board with other peripherals.

    ඉදිරියේදී අපි මේ ගැන දිග පාඩම් මාලාවක් ලබා දෙන්න බලාපොරොත්තු වෙනවා. ප්‍රශ්න ගැටළු තියෙනවනම් මෙහි කමෙන්ට් එකක් දන්න.

    View the full article

×