Sign In

Trouble In IR Obstacle Detector.

Moiz Haider Pakistan

Hardware: ATmega-328 Running At 16 Hz.(Arduino Uno) Software: Arduino Genuino 1.6.9

I am trying to make a arduino based car detector to open the gate. I'm having problem with my IR sensor. I made it at home and yeah it is working as a detector, but after uploading the code of arduino to move servo motor with respect to signal, serial monitor is showing problem with the sensor output. On sensor (a,b) it detects signal many times ,opens gate. But on sensor (c,d), according to code, the gate should close. But it does the work after a lot time, serial monitor picks gate open for many readings and makes the door open for a long period of time, unaware of sensor 2, after that long wait, monitor shows gate close and operates the motor. what should I do to perform the work in a right manner.
{
sensor_a = 1 ;
sensor_b = 1 ;
%gate open.
sensor_c = 1 ;
sensor_d = 1 ;
%gate close.
}
{
sensor_b = 1 ;
sensor_a = 1 ;
%gate close.
sensor_d = 1 ;
sensor_c = 1 ;
%gate open.
}
This layout shows that,if sensor_a is first triggered, then b is triggered, Open the gate. Whi

Images

Replies

R Avinash
2016-05-08 15:39:45
Hello,

Your problem is not quite clear. It would be helpful if you can upload the schematic of the IR sensor part. Also the type of sensors amd emitters you have used.

Are you sensing miniature model car or a real car?
0
R Avinash
2016-05-08 15:41:35
If you are referring to some website for this project you may refer the link.
0

Post a reply to Moiz Haider

Think you can help Moiz Haider ? Then post your thoughts that might help Moiz Haider. You will earn a lot of reputation in the technical community.

If your program is in multiple files, then ZIP the entire folder and attach below

Images and Screenshots

These helps other better understand your suggestion.