Skip to main content

IR Sensor interface with Arduino

IR Sensor :- Infrared  sensor is an Electronics devices that works by using a specific light sensors. It detects the specific Wavelength of light in IR spectrum.

Working Principle of  IR Sensor.

  • Infared spectrum
  • Transmitter
  • Receiver
  • Reflection By object
  • Voltage level
Whenever the Ray is reflected by an object is receive by an receiver it generates the voltage level across its terminal that voltage level depend on the intensity of the light which is reflected by a object.



When light Emits from the transmitter (i.e LED) on  the White surface it reflect the light backwards so receiver get the reflected intensity of light from the surface, but absorbs all the ray when it is strike in the  black colored surface.so, Receiver didn't get any message when light emits on black colored surface.


IR Sensor Interface with Arduino:-
Component Required :
  1. IR Sensor 
  2. LED
  3. Arduino 
  4. PC
Circuit Diagram
                                                          Fig:- Circuit Diagram
Connect VCC of sensor to 3.5V and GND pin To GND of Arduino and VOUT pin to digital 7-Pin of arduino.Connect the LED to 12 pin of Arduino.

CODE
int led = 12;
int sensor = 7;
void setup() 
{
pinMode (led,OUTPUT);
pinMode(sensor,INPUT);
Serial.begin(9600);// put your setup code here to run once:

}

void loop()
{
  int value = digitalRead(sensor);
  Serial.println(value);
  {
    if (value== HIGH)
    {
    digitalWrite(led,HIGH);
    }
    else 
    {
      digitalWrite(led,LOW);
    }
}
}

Conclusion:
When the sensor value is HIGH  then the LED Will glows and When sensor value is low  the led will remain off....

Popular posts from this blog

warm clothes distribution program

‘ Small step can make a big difference ’ Rural Women Development Centre from morang,Nepal distributed the warm clothes to the needy people. They manage it possible by collecting fund from working staffs and management committe. Here is the video link of the distribution program. https://youtu.be/AxaHbivcQUM

SMPS of computer

                                            fig:- working principle of SMPS       fig :- SMPS of computer From the above figure, we came to know that the function of SMPS in computer which is to convert  the high 220V-AC to 0-12V DC.SMPS contain several color of wires which carry the different voltage to the different parts of the computer.The following table shows the different color cables and its carrying voltage.      

Multiple mcp23017 interfacing with Arduino

MCP23017 is the I/O port extender that runs on 12C. It is 16-bit I/O expender.in this tutorial we are going to interface the single and multiple  mcp23017 with arduino.  fig:- mcp32017 module IT has 16 I/O ports from PA0 to PA7 and PB0 to PB7. first of all we are going to interface the single mcp23017 with Arduino. For this  connect the circuit as shown on figure. Download the library for mcp23017  from  sketch-- include library -- manage libraries.