How to Build a Circuit to Detect a White Line?

  • Thread starter Thread starter rusty009
  • Start date Start date
  • Tags Tags
    Circuit Line
Click For Summary

Discussion Overview

The discussion revolves around building a circuit to detect a white line on various background surfaces, particularly in the context of a line-following robot. Participants explore different technologies and methods for achieving reliable detection, considering factors such as surface color and sensor types.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant notes that IR technology detects various colors but struggles with black surfaces, prompting a search for alternative solutions.
  • Another suggests that detecting only a white line may require color detection, proposing the use of a color camera or RGB sensors to compare outputs.
  • A participant expresses budget constraints and seeks a cheaper solution for detecting a white line specifically.
  • Discussion includes the common practice of using a simple photocell to detect changes in brightness, with suggestions for software strategies to maintain line detection.
  • Concerns are raised about detecting a white line on colored surfaces, with one participant noting successful detection on black surfaces but not on blue or red carpets.
  • Another participant emphasizes the importance of sensitivity to brightness changes, suggesting that a more sensitive light detector or improved electronics may be necessary.
  • One participant inquires about adapting the robot's digital signal processing to detect desired brightness levels, indicating the need for a method to convert analog signals to digital.
  • Another suggests using a Schmidt trigger or comparator to convert the analog output of the light sensor into a digital signal.
  • A later reply shares an experience from a robotics class using infrared sensors, highlighting their effectiveness in distinguishing between black and white surfaces based on reflection differences.

Areas of Agreement / Disagreement

Participants express a range of ideas and approaches, with no consensus reached on a single solution. Multiple competing views on sensor types and methods for detecting a white line on various surfaces remain evident throughout the discussion.

Contextual Notes

Limitations include the dependency on specific surface colors and the effectiveness of different sensor technologies. The discussion does not resolve the challenges posed by varying background colors or the optimal configuration for detection.

Who May Find This Useful

This discussion may be useful for hobbyists, students, or engineers interested in robotics, sensor technology, and circuit design for line detection applications.

rusty009
Messages
68
Reaction score
0
Hey, I need to be build a circuit to detect a white line on any background surface. I have researched and tested with IR technology it detects every colour ( ex red, green, brown ) except black, does anyone have any ideas ? Thanks in advance
 
Engineering news on Phys.org
Do you specifically need to follow only a white line?

Usually in line following robot projects you just have a single high contrast line.
If you want to follow only white then you have to work in color.
Either use a color camera or in place of the normal photocell you will need a set of red/green/blue cells and compare the outputs.
 
Hey, thanks for the reply, the robot will need to drive forward until it reaches a white line, then it will perform a function. I don't have the budget to buy a color camera, is their a cheap solution ?
 
Normally the line is the only thing on the floor. A black line on a white floor is more common - but only because most classroom floors are white! White on black is the same principle.
I thought this was an advanced version where you had a whole mess of multi colored lines (lie a subway map) and you had to follow the white one.

The usual method is to have a simple photocell (light dependent, resistor, photodiode, silicon-cell, phototransistor or whatever) mounted on the front of the robot to detect the change in brightness of either the reflected room lights - or a flashlight beam on the front of the robot.

The software is pretty simple - if you are steering to the left and signal drops then steer to the right, and vice-versa. Then you need a strategy in case you loose the line completely (go around in a circle?) A more advanced solution is to have two detectors either side of the line - then you know which direction you have gone off.

But is sounds like you are just going in a straight line until you 'see' a mark - that should be easy.
 
But the thing is the carpet of the floor will either be blue or red, that's why I'm having troubles. I have detected a white line on a black surface, but only on a black surface, is there nay possible way to detect a white line on an any colour surface?
 
The color doesn't matter you just have to be sensitive to the change in brightness.
Obviously white/black or black/white gives you biggest change, black on gray will give a much smaller one - so you might need either a more senstive light detector or better electronics.
If you are using a simple photocell and a comparator you will have to position the cell over the floor and over the line, measure the output at each and set the detection level halfway between.
 
I was thinking of that idea as well, but the robot only takes in digital signals ie 1 or a 0, 1 for reflective 0 for non-reflective, how could I change the response to detect my desired brightness ? Thanks.
 
You can't just run the output of the analog light sensor into the digital input, it will just switch by chance at some unknown level.
You need to compare the analog output with some adjustable reference level and then have a circuit which switches to a digital 1 or 0.
Look up "Schmidt trigger" and "comparator"
 
Thanks for all the help, so I should measure the output current when the sensor is over the white line then get the accompanying schmitt triger to turn it into a 1 when it reaches that current magnitude ?
 
  • #10
we did this in my robotics class by using infrared sensors, since it returns higher values for black and much lower values for white because of the way the infrared light is reflected off of black surfaces compared to white surfaces.
 

Similar threads

Replies
0
Views
2K
Replies
7
Views
8K
  • · Replies 14 ·
Replies
14
Views
5K
Replies
29
Views
5K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
2K
  • · Replies 33 ·
2
Replies
33
Views
6K
  • · Replies 24 ·
Replies
24
Views
5K