linked sensor problem in Line Following Robot
Hey CEans!
*looks at xheavenlyx's posting template* 😛
Im working on a line following robot in a group that uses the PIC16F877A uC and the L293 motor driver.
The sensors are simply three pairs of LED and LDR in a triangle shape layout. The bottom two act as the line detectors, while the front one is used when turning 90[sup]o[/sup]. The power supply is a normal 9V battery that is regulated to around 5V, which powers both the PIC and the sensors. The line we want to detect is black, the background is yellow. All sensors share the same 5V power and GND, but seperate outputs. The pins on the uC we used for the sensors were AN0 (front) ,AN1 (left) and AN2 (right). Components used for each sensor is a standard LDR in series with 20K ohm resistor and LED in series with 1k ohm resistance. See below:
#-Link-Snipped-#
The problem arose when we wanted to calibrate the sensors to see at what level would the sensor detect the black line. The program we use to see the uC output is PICBootloader +. When we placed the front sensor on black, we get an increased reading on the left sensor as well, even though that one is on the yellow background. If we put both the front and left on black, the left registers a VERY high output, as if it was a summation of the front and left outputs. I asked a friend in the lab, he theorized it could be due to current drain or something. Basically, they are linked somehow. Ive checked the wiring and soldering, the outputs of the sensors are not touching each other. We even switched the analog ports for the uC, but still got the same problem.
Anyone has a clue on why the sensors affect each other? 😔 one thing to note is that the resistance of the front sensor is slightly larger than the left sensor, cause we couldnt get the exact resistors for each. Could this cause a problem?
*looks at xheavenlyx's posting template* 😛
Im working on a line following robot in a group that uses the PIC16F877A uC and the L293 motor driver.
The sensors are simply three pairs of LED and LDR in a triangle shape layout. The bottom two act as the line detectors, while the front one is used when turning 90[sup]o[/sup]. The power supply is a normal 9V battery that is regulated to around 5V, which powers both the PIC and the sensors. The line we want to detect is black, the background is yellow. All sensors share the same 5V power and GND, but seperate outputs. The pins on the uC we used for the sensors were AN0 (front) ,AN1 (left) and AN2 (right). Components used for each sensor is a standard LDR in series with 20K ohm resistor and LED in series with 1k ohm resistance. See below:
#-Link-Snipped-#
The problem arose when we wanted to calibrate the sensors to see at what level would the sensor detect the black line. The program we use to see the uC output is PICBootloader +. When we placed the front sensor on black, we get an increased reading on the left sensor as well, even though that one is on the yellow background. If we put both the front and left on black, the left registers a VERY high output, as if it was a summation of the front and left outputs. I asked a friend in the lab, he theorized it could be due to current drain or something. Basically, they are linked somehow. Ive checked the wiring and soldering, the outputs of the sensors are not touching each other. We even switched the analog ports for the uC, but still got the same problem.
Anyone has a clue on why the sensors affect each other? 😔 one thing to note is that the resistance of the front sensor is slightly larger than the left sensor, cause we couldnt get the exact resistors for each. Could this cause a problem?
0