laggy movement
Hi!
I'm using a Boe-Bot with BS2. I would like to do a line follower robot, but i got a problem. I use QRD1114 sensors, to recognize the line (i've made the correct circuit). Then i wrote a small and simple program, for the first trying.
I store the sensor's value, and make if statments, to control the motors. My problem is, the movement of the robot is very laggy. Like, i can see each circle of the program. It's movement isn't continuos.
Then is looked after on youtube, and found this: http://www.rabsoft.co.uk/robot.html (on the left, click to the Line follow 3 QTRs) The video shows that the movement is continuos. So i downloaded this program, and I wrote it to my configuration, but it wasn't working. My robot's move was very laggy again.
So, can you help me, how can i fix this problem?
Thanks!
I'm using a Boe-Bot with BS2. I would like to do a line follower robot, but i got a problem. I use QRD1114 sensors, to recognize the line (i've made the correct circuit). Then i wrote a small and simple program, for the first trying.
I store the sensor's value, and make if statments, to control the motors. My problem is, the movement of the robot is very laggy. Like, i can see each circle of the program. It's movement isn't continuos.
Then is looked after on youtube, and found this: http://www.rabsoft.co.uk/robot.html (on the left, click to the Line follow 3 QTRs) The video shows that the movement is continuos. So i downloaded this program, and I wrote it to my configuration, but it wasn't working. My robot's move was very laggy again.
So, can you help me, how can i fix this problem?
Thanks!
Comments
Here is the video: https://www.dropbox.com/s/t332516zkeiy9z4/VID_20121227_001325.mp4
I attach my code (i know it's not so complicated and got faults)
Maybe the light condition is too bad? If i put a lamp closer to the path, the movement is faster. I use 0.01uF capacitor.
+1
It doesn't help
agfa
IMO you're better off using your sensors as high/low digital sensors (requires proper resistor and contrast values) instead of analog sensors. Much faster read for 3 sensors.
I don't use ServoPal. I didn't notice, that he uses it.
One of my friend created the circuit, but it is the same like this: (except we got 4 QRD1114) http://profmason.com/wp-content/uploads/2007/02/qtilinefollow.pdf
The values of the resistors and capacitors are the same, like in the pdf.
I tried to put the 10kOhm resistance, between the white and red outlet (to convert it into digital) but it didn't work. So I use it without the 10kOhm resistance, and use RCtiming.
If i put a lamp close to the QRD1114 sensors, the movement becomes faster. Maybe the 0.01uF capacitor is too big, and it takes too much time to discharge it (in normal light conditions)? But if QRD1114's phototranzistor detect much more light, it's resistance become less, so discharge the capacitor takes lesser time?
Also, since you are using bare QRD1114 sensors, you are not married to that particular QTI circuit you reference. You can optimize it for digital read and your particular conditions. You can change the IR LED's series resistor, and you could also change the phototransistor so that it's on the "top" of the voltage divider instead of the bottom, if that gives you a larger voltage range for your line/lighting conditions.
http://www.goldmine-elec-products.com/prodinfo.asp?number=G18740
It's just a matter of getting the right resistor values for your particular line conditions, as I noted here: http://forums.parallax.com/showthread.php?144156-CONTEST-Hack-The-Halls!&p=1152269&viewfull=1#post1152269 The sensor outputs an analog signal in response to the amount of reflected IR, and you adjust that range to suit the Stamp's transition voltage (~1.4V) between high & low. This method uses the Stamp as a free comparator.
Something's wrong. Polarity or maybe you have the LED pins instead of the ptx. Take a bare QRD1114 sensor and use a multimeter in ohms mode (200K or so) to find the two pins that give you a variable resistance in response to light (point sensor at a light bulb). Then report back.
Specs at http://www.sparkfun.com/datasheets/BOT/QRD1114.pdf
BTW, any chance you blew your LED with too much current (5V without resistor)?
I have to rebuild the circuit, because the guy who created it switched the polarty of the transistor. When i got the circuit, and checked it, i didn't realize this.
The movement during line following becomes continous.