How to make simple proximity sensor



Community Tested

Why choose wikiHow?
When you see the green checkmark on a wikiHow article, you know that the article has received careful review. In this case, a trusted member of the wikiHow community confirmed that the instructions worked.

How to Make a Simple Proximity Sensor Using Arduino

This article discusses how to make a simple proximity sensor constructed using LEDs and Arduino which is able to detect the distance between the sensor and the object in front of it without any physical contact. The sensor will give a range of analog signals to the Arduino which then can be seen on the computer. The speaker is optional and is not needed if you're doing a simple version of this project.

Materials Needed

  • Arduino
  • Breadboard
  • 100k resistor
  • Jumper wires
  • Electric tape
  • IR led emitters (minimum of 2)
  • IR led receivers (photodiode with 2 pins)

Steps

  1. Start off by setting aside the required materials
  2. Prepare the IR LED by cutting a small piece of the electric tape and then wrapping it around the LED to form a tube as shown above.
  3. Using the breadboard, jumper wires, resistor & LED's set up connection as follows.
    • Connect the resistor from 5v to the positive( big pin) on the IR receiver.
    • Connect all the IR LEDs to the 3.3v pin on the Arduino.
    • Connect a jumper from A0 on the Arduino to the positive leg on the IR receiver.
    • Connect all of the negatives of both the receiver and the LEDs to the GND on Arduino.
    • Make sure none of the wires or LEDs are shorting as LEDs are very sensitive and can burn.
  4. Build your code.This is a simple code that will print out the IR data on your computer screen, these variables can then be used to control almost anything. This code will allow for a simple analog read of the IR sensor. int IRreceiver = A0; // initialize int IRval; void setup() { pinMode(IRreceiver, INPUT); // declare its an input Serial.begin(9600); // speed at which the communication will happen } void loop() { int IRval= analogRead(IRreceiver); // declare data Serial.println(IRval); // print the data delay(10); } // add a delay to smoothen things out
  5. Make sure all the connections are safe and then upload the code to your Arduino.After it's uploaded bring up the serial communication.
  6. Examine the data.The data should vary as the distance between the sensor and the object varies.
  7. Finished.

Community Q&A

Search
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.

Troubleshooting

  1. When the LED's are not lighting up. recheck your setup to see if everything is connected properly.
  2. When the code is not working you will need to download the Infrared Library for the Arduino IDE and install the library in Arduino.
  • Be careful not to mix up the LED receiver with the LED emitter, they all look the same.
  • Infrared light is not visible to the naked eye, However, you can see it through a digital camera, this helps to see if the LED is working or not.
  • Use the camera on your phone to see if the IR is emitting. Make sure the camera does not filter out IR or else the camera may not capture the IR emitting.





Video: IR proximity sensor without using any transistor or IC

How to Make a Simple Proximity Sensor Using Arduino
How to Make a Simple Proximity Sensor Using Arduino images

2019 year
2019 year - How to Make a Simple Proximity Sensor Using Arduino pictures

How to Make a Simple Proximity Sensor Using Arduino forecast
How to Make a Simple Proximity Sensor Using Arduino advise photo

How to Make a Simple Proximity Sensor Using Arduino pictures
How to Make a Simple Proximity Sensor Using Arduino images

How to Make a Simple Proximity Sensor Using Arduino How to Make a Simple Proximity Sensor Using Arduino new pictures
How to Make a Simple Proximity Sensor Using Arduino new picture

pictures How to Make a Simple Proximity Sensor Using Arduino
pictures How to Make a Simple Proximity Sensor Using Arduino

Watch How to Make a Simple Proximity Sensor Using Arduino video
Watch How to Make a Simple Proximity Sensor Using Arduino video

Forum on this topic: How to Make a Simple Proximity Sensor , how-to-make-a-simple-proximity-sensor/
Discussion on this topic: How to Make a Simple Proximity Sensor , how-to-make-a-simple-proximity-sensor/ , how-to-make-a-simple-proximity-sensor/

Related News


Huda and Mona Kattan have just launched a new fragrance collection and there’s a skincare line on the way. Hooray
Breast Cancer Survivors Can Donate Blood
21 Problems Only Women With Big Boobs Understand
Men Are Now Shopping More Like Women (Except For One Key Thing)
How To Increase Height In Hindi
How to change yourself as a person
How to Communicate More Effectively with Your Healthcare Providers
Can Meditation Cure Stress and Anxiety
12 Effective Retinoid Alternatives That Are Safe for PregnantWomen
How to Buy a Digital Camera
20 Surprising Habits That Are Affecting Your Health
What Does Friends with Benefits Mean



Date: 05.12.2018, 09:51 / Views: 75382