Line Following Robot

Ask questions about projects relating to: computer science or pure mathematics (such as probability, statistics, geometry, etc...).

Moderators: AmyCowen, kgudger, bfinio, MadelineB, Moderators

Locked
TroubledStudent
Posts: 1
Joined: Sat Dec 06, 2014 4:17 pm
Occupation: Student 8th Grade
Project Question: I am building a robot that uses LED sensors to follow a black line.
Project Due Date: 12/10/14
Project Status: I am conducting my experiment

Line Following Robot

Post by TroubledStudent »

I am an 8th grade student that is building the line following robot with two LED sensors for a science fair project due on 12/10/14. The sensors that are supposed to recognize a line and make the robot follow it don't work at all. When you place the robot on a flat surface it just starts going automatically, whether there is a line or not. We checked all the wiring to make sure it all goes in the right places but the problem persists. .I really need help. Please reply ASAP!!!
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Line Following Robot

Post by HowardE »

Sorry to hear you're having a problem. You didn't say which project you're working on - whether it was https://www.sciencebuddies.org/science- ... p021.shtml or https://www.sciencebuddies.org/science- ... p023.shtml or some other. The two above use essentially the same electronics anyway. I'm going to refer to the first one, since it shows the schematic and explains a bit more about how things are connected.

1) First, are the LEDs lit? They're part of the integrated sensor and they're infrared so you can't see them with your eye. Most digital cameras can see them though. Remove the batteries from the robot and look at the sensor. You should not see any light. Put the batteries back and and you'll see it brightly lit when you look through the digital camera. That's the first step. It can be hard to tell which pin is which on that sensor, so make double and triple sure that you have the right wires in the right place on that sensor.

2) With the sensor pointing into the air or completely away from any reflective surface the motors should be stopped. If you slowly move something light colored (a blank piece of paper) closer to the sensor, the motor should begin to turn. Look at how far away from the sensor you have to place the piece of paper. That's how far you need to place the sensors from the floor. It could simply be that you have them too close.

3) If the motors simply turn all the time, you have a wiring problem. Referring to the schematic drawing, U1 is the sensor for one side of the robot. Q1 is the corresponding power transistor. Disconnect the wire that goes from 'E' on U1 to 'B' on Q1. The motor should stop. If it doesn't, then you have a problem with how Q1 is wired.

4) To dig into things further you will need access to a multimeter. You can measure the voltages at various points and that will help you figure out what the problem is. The output of the sensor is pin 'E'. When IR light is reflected back into the sensor, you will see a voltage near 4.5 or 6V at that pin. When it's pointing away from any surface or light source, it will have no voltage on it. The 'B' (base) pin of Q1 is what controls the switch function of the transistor. If it has a positive voltage on it, it turns on and allows the motor to run. If it has no voltage (sensor is off or you disconnected the wire) it turns off the motor.

If I had to guess, I'd say you may have the sensor turned around and have the wires attached to the wrong pins. The digital camera test might tell you that right away.

Howard
victtran
Posts: 5
Joined: Sat Dec 13, 2014 7:49 pm
Occupation: Student 9th grade
Project Question: Line following robot
Project Due Date: Tuesday December 16, 2014
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by victtran »

I'm also having difficulty with my sensor. I had my board wired to where the motor would run constantly then I rewired my transistor so that U1 E should connect with Q1 B and the motor just stopped working. Should the transistor's side with the number be facing the wrong way? I checked my sensor and it is connected because I can still see the infrared light on. What do I troubleshoot at this point??? Please help.
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Line Following Robot

Post by HowardE »

Looking at the MOSFET (Q1 & Q2) so that the printing that says "TIP102" is facing you and the pins are pointing down, the pin on the left is B (Base), the middle is C (Collector) and the right is E (Emitter). The Base (B) will be connected to the emitter of U1 or U2, the Collector (C) is connected to the motor and the diode, and the Emitter (E) is connected to ground. If you now have it correctly wired but had it wrong before, I'd have to know what you did but I'll guess that you fried the transistor. If you have a spare, try swapping it out. Double and triple check that you have it wired correctly AND that you don't have the battery polarity backwards (red = positive, black = negative). The fact that you're seeing the IR part of the sensor working is a good indication that the battery is correct. If the phototransistor portion of the sensor (U1 & U2) is also wired correctly, there isn't a lot that can go wrong. But there are definitely wiring errors that can burn out the transistors.
victtran
Posts: 5
Joined: Sat Dec 13, 2014 7:49 pm
Occupation: Student 9th grade
Project Question: Line following robot
Project Due Date: Tuesday December 16, 2014
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by victtran »

I've made this line follower from scratch. I'm not using the exact same transistor, motor, or breadboard but my diodes and ohm resistors are the same. Could it be that I didn't use the same materials?
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Line Following Robot

Post by HowardE »

That obviously makes it a lot harder to help you since that circuit takes advantage of those specific parts. You also didn't say if you even used the same schematic without modification - but let's say you did. You needed to use an NPN switching transistor instead of the TIP102. In many cases you also need a current limiting resistor between U1 and the base of Q1. The TIP102 is okay without one but whatever you chose may not be. The circuit as presented only had one resistor per motor and that was to limit the current through the IR LED. That won't change unless you also change the voltage. The motor will draw more or less current and it has to be within the range of what the transistor can handle. Did you check that?

I wish I could help you but changing around the major components in a rather trivial circuit makes it all rather vague. If the transistor you chose has the current handling capacity for your motor then it's certainly possible to make substitutions. You just have to make them properly.
victtran
Posts: 5
Joined: Sat Dec 13, 2014 7:49 pm
Occupation: Student 9th grade
Project Question: Line following robot
Project Due Date: Tuesday December 16, 2014
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by victtran »

Would it be better if I buy the kit and start over?
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Line Following Robot

Post by HowardE »

We obviously like it when you buy the kit but since you've already built it yourself, it would be easier to just acquire the same electronic parts and use the circuit as provided. As long as the motor is similar (3 - 6 volts, drawing approximately 200mA at 4.5V) it may be that all you need to do is drop into the MOSFET and wire it correctly. You can order just the MOSFETs from Jameco if you'd rather not buy the whole kit of parts. You said you already have the same IR sensor and a breadboard?
victtran
Posts: 5
Joined: Sat Dec 13, 2014 7:49 pm
Occupation: Student 9th grade
Project Question: Line following robot
Project Due Date: Tuesday December 16, 2014
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by victtran »

I have the correct reflective sensors but not the same breadboard.
HowardE
Posts: 496
Joined: Thu Nov 20, 2014 1:35 pm
Occupation: Science Buddies content developer
Project Question: N/A
Project Due Date: N/A
Project Status: Not applicable

Re: Line Following Robot

Post by HowardE »

The actual breadboard doesn't matter. As long as you've used your breadboard correctly (https://www.sciencebuddies.org/science- ... cuit.shtml) then you can use any that you happen to have.
victtran
Posts: 5
Joined: Sat Dec 13, 2014 7:49 pm
Occupation: Student 9th grade
Project Question: Line following robot
Project Due Date: Tuesday December 16, 2014
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by victtran »

Thank you so much for your help. I had asked my teacher and she had said that it's okay if the robot does not work. I am going to work on it more though. Again, thank you!!!
ashisha7i
Posts: 6
Joined: Mon Jan 12, 2015 7:35 pm
Occupation: Parent
Project Question: I am working on the "Line Following Robot" with my daughter using the kit from Jameco as suggested. Assembled the model and circuit as per the diagrams and instructuins online.
The robot does not move at all when we connect the batteries.Tried moving the sensors close to the surface but to no avail.
Any ideas on what could be wrong. Is there a way to trroubleshoot the components (transistor/sensor). We checked that the infra-red light on the sensor is lit (using a digital camera)
Project Due Date: 01/26/15
Project Status: I am conducting my experiment

Re: Line Following Robot

Post by ashisha7i »

Hi,

My daughter selected this project for her science fair this year.
I have been working with her for a few days now but can simply not get the robot working. (https://www.sciencebuddies.org/science- ... p021.shtml). I have bought the kit from Jameco Electronics and have assembled the robot as per the instructions. However, even after double checking the connections several times over the last 3 days - the robot simply does not move at all.
I have checked that the infra red LEDs on the optical sensor assembly are working (looking through my digital camera) and also verified the pinout of the transistor from this forum (Base, Collector, Emitter - with TIP102 printed side facing me).
Not sure about the sensor though - I am using the following config (holding it pin up and going clockwise from the blunt/flat corner - Collector (C), Emitter (E), Anode (A), Cathode (K).
Not sure on what's wrong with the circuit.
Is there any way to trouble shoot the individual components/pieces of circuit to narrow down the problem.
Prompt response will be greatly appreciated.

Thanks,
-Ashish
Locked

Return to “Grades 6-8: Math and Computer Science”