PDA

View Full Version : Line follower sensor dilemna



neo01124
10-11-2007, 03:47 PM
Hi y'all!! This is my first post
Well i finally got down to building a line follower and worked on it for two weeks non stop. Made a pretty neat analog logic unit(using gates, k maps etal) and in the initial stages(breadboard) the sensor arrangement(LED+LDR) had given a good resolution between white and black but on the day we assembled everything onto the body whoosh no resolution!!
Then we moved onto ir led+reciever arrangement and made it exactly according to data at[/img]http://www.roboticsindia.com/modules.php?name=News&file=article&sid=71
but it also didnt work for some strange reason then in a last ditch attempt we resorted to reflective modules(on2509) but they seemed to work only at a particular distance from the surface and such an arrangement isnt possible on our chassis.And so my line follower is stalled for the moment!!
Guys i need some serious help quickly with regards to this.Thanks in advance!!

allbits
10-11-2007, 05:54 PM
had given a good resolution between white and black but on the day we assembled everything onto the body whoosh no resolution!!

1)
Hmmm.... it has to be the ambient light!!! (if everything else is right
:D )

Cover up the LDRs!! so that only light which is perpendicular to the LDR disk reaches it. I would suggest you use the LED holders (if your LDRs are small enoughto get into them). Otherwise you will have to improvise something.

2)
Adjust the POT and see if there is any difference.



had given a good resolution between white and black but on the day we assembled everything onto the body whoosh no resolution!!

Check your batteries!! one way would be to see if the LEDs have gone dim!!

good luck!

neo01124
10-11-2007, 07:41 PM
even v thought it was ambient light until we switched off all the lights and even then v had the same reading on the multimeter, tested the ir rx tx sensor once again hell they are just not workin looks like god of sensors is just not happy with us!! shall try covering the ldrs!! thanks

rao
10-12-2007, 06:23 AM
personally speaking , I am not a fan of LDRs, they are slow..

The Photodiode and LED combination is great.. You say that your circuit was working on the breadboard and not when you made a PCB?? I would suggest you carefully go through your circuit on the PCB.

Because I still end up making silly mistakes on my final circuits and find out a week later on some depressed night and go "duuhhh"... Check the grounds..

Check if the angle is right between the photo diode and led because reflection is quite particular, at the right angle precision is just awesome.. parallel placing of the LED and Photodiode just lets a little share of the reflected beam to fall on the sensor..

Not saying you are wrong, just saying you cant be perfect..

Rao

docel
10-12-2007, 09:55 AM
...people ALWAYS forget the School lessons: Angle of incidence = angle of reflection........
In spite of explaining this, I always wonder, how students STILL make the mistake of placing the sensor emitters at an angle AWAY from each other :lol: :lol: :lol:

kartikmohta
10-14-2007, 10:49 PM
@docel: You need not always measure the reflected light, you can measure the diffused light which doesn't require the angles to be the same. Although for the line follower, it would be better to measure the reflected beam.
--
Kartik Mohta
http://www.ee.iitb.ac.in/uma/~kartikmohta

allbits
10-15-2007, 01:37 AM
you can measure the diffused light which doesn't require the angles to be the same

Yes, we can measure, but the point was to follow lines!!

docel
10-20-2007, 06:56 PM
Well! ??

...and you know...

NONE of the IR sensors worked at Techtathva07, NITK --
except the Hosts' own LDR circuits.... 8O
The WHOLE stupid black Line (and the White) was glowing like the Summer Sun....

And why should diffused light have NO angle of reflection. ???
This is more tricky with the IR, what with the surfaces having unknown IR reflective/Transmissive/absorbent properties. :!:

kartikmohta
11-21-2007, 05:45 PM
The diffuse light would not have any angle of reflection because it is the "diffused" beam not the reflected beam. see: http://www.ogre3d.org/wiki/index.php/Diffuse_(Light). Of course, it would be a very small proportion of the total light, but enough to detect whether there is something there.
And I guess that the diffusion by black would almost be negligible even though it might reflect some amount of light, which might allow you to better judge whether the line is there or not.

docel
11-21-2007, 09:27 PM
kartikmohta !!

After saying this :arrow:


@docel: You need not always measure the reflected light, you can measure the diffused light which doesn't require the angles to be the same. Although for the line follower, it would be better to measure the reflected beam.
--
Kartik Mohta
http://www.ee.iitb.ac.in/uma/~

What are you trying to say...... now :?: :?:


The diffuse light would not have any angle of reflection because it is the "diffused" beam not the reflected beam. see: http://www.ogre3d.org/wiki/index.php/Diffuse_(Light). Of course, it would be a very small proportion of the total light, but enough to detect whether there is something there.
And I guess that the diffusion by black would almost be negligible even though it might reflect some amount of light, which might allow you to better judge whether the line is there or not.

This makes very little sense to me :?

kartikmohta
11-21-2007, 09:35 PM
Just trying to say that for a line follower it is not always necessary to keep the sensors aligned with the angle of reflection. We can use the diffuse light to detect the line too.

allbits
11-21-2007, 09:55 PM
Just trying to say that for a line follower it is not always necessary to keep the sensors aligned with the angle of reflection. We can use the diffuse light to detect the line too.


c'mon man!!!

You cant just ask the sensor to "see" the diffused light!!!

The sensor is not intelligent, it doesn't know if what comes in is reflected or diffused!!

It gives an output proportional to the vector sum of all the lights, which includes the directional reflected light, + the sum of all other light rays, which you call "diffused"

How can a sensor know if its a line, its a reflected light, if its a diffused light, a combination, and a score of other combinations????

and ever thought what a sensor sees when it does a curve? or when half of it is on the line??

Line following is NOT easy as it seems, when it comes to sharp turns, acute angle turns !!!

kartikmohta
11-21-2007, 10:14 PM
I definitely don't mean to say that line-following (especially with acute turns) is easy.
The point is that you can align your sensors such that you see mainly the reflected light or align them to not see the reflected light when it can use the diffuse light (I assume here that the floor is flat so that once aligned, the sensor will see only reflected or diffused light, whatever the case may be). There are advantages and disadvantages of both methods and it is upto the user to choose between these.

docel
11-22-2007, 12:17 AM
....as the IITs say " dont assume anything..." - the floor is certainly NOT flat. Not to the sensor.

When you set the sensor gain for the 'diffused' light, very small changes will produce wrong triggering. The diffused light will further be corrupted by ambient light, as the sensor -emitter pair has to be angled forward.
The ratio of ON to OFF must be several orders or the LFR will lose track. This is all the more important with IR.
You have some practical technique but you are not able to explain in the proper manner, but aligning the sensor to the 'diffused' light is not correct. Unless it is modulated....

Lets not confuse the beginners with ambiguity: Using the 'diffused' light is NOT correct.

kartikmohta
11-22-2007, 05:37 PM
Ofcourse for beginners it almost makes no sense to use the diffused light, you'll have to have a way to filter out the ambient light from that which can become a big issue.
But using the diffused light you can do better stuff like get an idea of the position of the robot wrt the line (not just the digital value, but the approx. dist from center) and hence have smoother turns etc. To do this using digital sensors would require around 4-5 sensors atleast.

allbits
11-22-2007, 06:35 PM
But using the diffused light you can do better stuff like get an idea of the position of the robot wrt the line (not just the digital value, but the approx. dist from center)

If you cant get the position of robot wrt line, you cant make a line follower!!! ???, yes, I am talking about fast followers which can turn acute angles. We need to know exactly where the bot is, and for that we need good ratio, as doc said!!

and how does diffused light (I am still confused with the usage of term "diffused") do better than a reflected one?? - or what can diffused do what reflected cant do??

(reflected in the sense - using an emitter, and getting back the reflected light)


we all love arguments, dont we?? :D

kartikmohta
11-22-2007, 06:47 PM
With reflected light, mostly you'll get a sort of digital reply, whether the sensor is on the line or off the line.

With diffused light, you can probably get a value which is some base value when your sensor is over the black surface and the value increases as you move the sensor closer to the white line and then it saturates to some value when the sensor is somewhere inside (on the line).

With reflected light the slope of this curve would be very high, which makes it useful for beginners since it behaves almost like a digital sensor. Using diffused light, you can do proper calibration and get your actual position on the line, as in the distance from the edge of the line instead of just whether the sensor is over the line or off it.

allbits
11-22-2007, 06:58 PM
Having said all this...

Can you explain,what you mean by a diffused light??

I meant, diffused light when it comes to a line follower, and if you have an emitter in your proposed arrangement, if you plan to cover your sensor, or your sensor array.

kartikmohta
11-22-2007, 07:17 PM
By diffused light, I mean the uniform diffused light in the image below.

http://www.graphics.cornell.edu/research/globillum/BRDF.gif

allbits
11-22-2007, 07:57 PM
No more... this is my last reply to this thread!!!
:D :D

Just for info, some aspects while making a fast, efficient line follower - If you are going for an LDR or a photo transistor (not an IR pair)

1) Ambient light can be very cruel - i can come in from all directions, especially in a direction which you dont want it to come. It leaks in through the tires, it corrupts the sensors when someone moves around.

2) Implies you cover not only your sensor, you cover up your entire sensor assembly. - very little light should come and interfere with your sensor assembly.

3) Covering the entire assembly calls for light source inside. Calls for reflected light.

4) The sensors gives the SAME output when it is on the left edge or at the right edge. Calls for increased number of sensors - Its tricky when the robot does acute angles, as different robot location is possible for the same pattern.

5) When a sensor is trapped between the two darker shades of an angle, it can return unexpected value!!! (if proper ratio is not maintained between the dark and white lines)

Now coming back to the point...

Every beam of light that enters the sensor is a reflected beam. The term "diffused" is used for the sum of all light beams. The light that illuminates a room IS diffused light, because we dont see it getting reflected from a particular point.

@ kartik :

you didnt mention if you have an emitter. If you have an emitter along with the sensor, You are very much measuring the strong reflected beam, end of argument!

If you dont have an emitter, you cant see a thing with the sensor as the whole assembly needs to be covered. If you dont plan to cover the sensor array - you can never expect it to follow a line unless it is in strict lighting conditions.

You need a Good - very good demarcation between a line and the ground. If no emitters are used in a covers array, your sensors will have oscillating outputs - I agree with the slope, but a sensor is hardly stationed in the middle of the line !!! A robot is always busy, so one moment the sensor is on the middle of the line, the next moment it aint!!!

:arrow: the idea is to keep the line in the middle of the robot, and NOT the sensor on the middle of the line!!! The sensor can be on the middle, with the robot pointing at right angles to the line!!!

I read your figure, but my query was how you define a diffused light in case of a line follower !

I am not at all saying a line follower will never work with a "diffused" light, but all i say is i do not personally recommend it to anyone, nor do i prefer to use it!!


Good luck!!

kartikmohta
11-22-2007, 08:32 PM
I have an emitter but I am not measuring the specular reflection (for which the angles have to be matched), I am measuring the uniform diffused reflection. Basically I have the emitter and the sensor (photodiode) pointing at the same point, parallel to each other.

I can cover my sensors but I prefer to use modulation to reduce the effect of ambient light.

I am not keeping the sensors in the middle of the line (obviously the bot has to follow the line), I keep the sensors near the edge of the line and due to the variation of the response I know when I have moved slightly inside or outside the edge of the line (basically the error from the set position which is the edge of the line) which allows me to use a PD controller (instead of the simple ON/OFF controller) so as to be able to go faster without losing track of the line. I haven't tried with acute angles though, only tried up to right angles.

docel
11-22-2007, 11:25 PM
Karthik!!
You are saying now, ALL that you should have said in your first post.
The guy who started this thread has some serious problem. If you have a solid justified solution and suggestion, make it. It should be in a position to help the OP, since it is his thread.

You are just confusing issues without direction or anchor.
The argument about "diffused" light, in your words and justification, cannot be a reliable Line Following technique for a simple design. i have mentioned , in my reply, that it is possible only with modulated light. You own up NOW that you are using mod. light with multiple sensors. This does not add up as solution to the question in hand.
I have been using " " for "diffused" for the same reason Allbits has pointed out- because i myself dont understand your justification for the Diffused light.

Let me tell you this: your argument ignores the basic sensor response to light. Ie., the digital state. It is actually the converse of it. The sensor will see the difference between dark and light, with the source being the most intense in the surrounding area. I use LDRs for sensing and White Leds as source. This works beautifully, as the LDR attains some 100 to 5 million intermediate states and is easy to set the relevant threshold, unlike the Photodiode. Now do'nt tell us you are using Photo-transistors!!!
Besides, any sensor aligned between black and white demarkations will still give a slope, as will your "diffused" reflection (whatever that means).

The "look-forward" sensor is used to detect lines before the Robot actually touches the line- like in the Autonomous Sumo Robot. This does not apply well to Line following.
Besides, the sense range will be small and the motors will actually modulate in speed. This may be ok but is not reliable with a single sensor per side.

Now the worst thing is: black surfaces also "diffuse" light quite well. So :?:

We will accept your argument when you convince us about the term "diffuse" reflections with respect to the sensor. The diagram does not do this.

Why talk about "expert" solutions to a newbie with a simple problem? You are talking about multiple sensors, without saying so till the last post, as the solution to a minimum sensors scenario.

I'm not saying you are wrong, but you are'nt being correct either. We can probably thrash this out here as good as anywhere. This is a public Forum and the posts are read widely, although the participants are less. They should not go off at a tangent with some unexplained theory.

....reminds me of the old adage:
" Are you here with the solution or are you a part of the Problem..? "

kartikmohta
11-22-2007, 11:52 PM
Yeah, the solution is definitely not for newbies which I have mentioned in my earlier post.

Black surfaces diffuse light but due to their low reflectivity the amount of light diffused (which is just a form of reflection) is lower than a white surface.

Regarding the multiple sensors thing, that was an assumption at the back of my mind which I thought was obvious, so was not mentioned,

shreek1123581321
11-23-2007, 03:18 AM
if you have an emittre inside, and you only want to use the 'reflectivity' of the surface, then why do you want to use diffused light?? just put the sensor emitter in a proper direction to get the reflected beam! maximum output!!

jaabis
11-23-2007, 04:04 AM
hey i think on the turning acute part a lot will depend on the algorithm u use rather than if u using reflected or diffused light besides if the surface is too reflective bith of these techniques usually arent very reliable so i would saywe use an array to detect the path and to turn lets put our minds to developing a stronger algo which sadly in all the competitions i have been too was seriously lacking!!!




"The end is Inconsequential"

jaabis
11-23-2007, 04:12 AM
and as for ur earlier querry i would still recommend i.r. sensors though u cud check if the condns u testing ur sensors is too hot which might trigger them or u cud also try decresing the height of ur sensors from the ground so that ur pot wud be placed somewhere in the midle giving a better resolution..

kartikmohta
11-23-2007, 08:54 AM
if you have an emittre inside, and you only want to use the 'reflectivity' of the surface, then why do you want to use diffused light?? just put the sensor emitter in a proper direction to get the reflected beam! maximum output!!
With the reflected beam (specular reflection) the problem is that you get a small "cone" of high sensitivity but if something like the floor angle changes, the reflected beam no longer falls on the sensor and you loose all the sensor information.

docel
11-23-2007, 12:54 PM
With the reflected beam (specular reflection) the problem is that you get a small "cone" of high sensitivity but if something like the floor angle changes, the reflected beam no longer falls on the sensor and you loose all the sensor information.

:arrow: Kartikmohta:
This cannot happen. You are talking about what will happen with your "diffused" light. How can a 1cm round 'cone' dissappear at ANY angle seen by a Line Follower sensor :?: :?:

Have you tried this or is it just theory?

You are again confusing the issues here.

I suggest that you start a different thread for more discussions on this. I also suggest that you practically try these things out first and commit yourself in text.

:arrow: Jaabis:
It is not the Algo thats important but rather the sensor(s) placement. The bot has to simply do 'some' move for a specific sensor combo output, as a binary word. And you dont need a Microcontroller to solve OUR LFR tracks!!

shreek1123581321
11-24-2007, 01:26 AM
karthik! if your floor angle keeps changing, then your diffused light alos cannot help you! nothing can help you... we assume floor to be sufficiently smooth, and it is, in most of the competitions!

and have you ever tried using diffused light? its was such a pain to work with even reflected light, i just cannot imagine how are you going to work with diffused light coz it gives so less intensity!.

and one more point, diffused light is 'diffused'! i think at any point of time reflected beam deserves more trust than diffused... tell me if floor angle changes what will happen to your diffused beam? as diffused light also follows the angle rule, its presence is because of the roughness of the surface...now tell me if the roughness also changes what will happen? and i think roughness change is more probable than surface angle chage...
"if roughness changes all the info is gone!" in your words!

i think in line following we assume uniform surface angle...

docel
11-24-2007, 09:42 AM
...You have put that very beautifully Shreek!!

I wonder: why is Kartik bent on using a negligible ("diffuse") percentage of light when an ample ( Reflected) amount of light is available..... :?

Besides , the trigger threshold can always be set with a Preset in the voltage divider. Or with the Light..... intensity ! This has been the problem and the reason for this thread.