Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] Line tracking with camera & PIC controller

Status
Not open for further replies.

Ranbeer Singh

Full Member level 5
Joined
Jul 30, 2015
Messages
259
Helped
22
Reputation
44
Reaction score
22
Trophy points
1,298
Location
Faridabad India
Activity points
3,266
Hello experts,

I am trying to make a line tracking robot by pic18 series controller and camera module. I have think to control the robot by 2 or 3 sensors...It will work fine but when robort will reach at 90 degree turn. It will misbehave or bowl because it had high speed. Actually i want to know turn distance by camera. When camera found turn controller will reduce the robot speed.
I found OV7670 CMOS image sensing camera. I want to know RGB color value handling.
http://www.voti.nl/docs/OV7670.pdf
 

Unless you want colour discrimination, I would just sum them to provide a dodgy Y. Your robot will only corner properly if the camera can see the corner before the robot gets to it. So the position of the line at the bottom and the middle of the screen will be where the line is closest to the robot. If the line at the top of the screen is not in line with the other two samples then a corner is approaching.
Frank
 

Yes...

I want to find corner before reach (approximately 1mtr before). When all the right camera will send same RGB values again& again. I will save values if two or three values will be same. When these values will change controller will reduce robot speed.

But i am in confusion...What camera will suitable for my application?
 

The RGB values will only give the mean picture brightness, you need to know where the bright bit is (the line) with respect to the direction the camera is facing.
If you want to see the corner/bend 1m ahead then this must be in the cameras field of view, though it need not be perfectly in focus.
If your line is sharply defined (i.e. white against a black background) then you could use a rate of change detector (differentiation circuit) to detect where the edges of the line are.
As you are looking at a white on black, then the camera type is not important but its field of view is. You have not said what size your robot is, but to see 1m ahead means that the camera must be mounted quite high (> .5m?) and the line width will vary down the picture due to perspective which has to be allowed for.
So blank out the video giving three samples (top, middle and bottom of picture). pass the video through a clipper to remove dark bits of the picture, then an exponential amp to stretch the white bits then a squarer. measure the time to the leading edge of each pulse. If the times are all the same then the robot is on the line and is straight. If the times are different then the steering needs adjusting. If the top sample is a lot wider then the other samples then a corner is coming up.
Frank
 

    V

    Points: 2
    Helpful Answer Positive Rating
Super....Frank

No matter for distance. My robot capacity will be approximately to carry 40 to 50 kg material so definitely it will be appropriate height. I am using 24v/4A BLDC gear motors for it. I was tying to write code for my subject algorithms. But at this time i am not understanding it.
Can you explain me how camera will send RGB values?
 

RGB signals will be either .7V or 1V for peak saturation. Depending on the camera they will have a band width of DC to up up 10 MHZ, though it is more likely that the camera you can afford would be only up to 2 MHZ.
For what you want a Y output would be best, this is a black and white signal, giving the brightness of the scene.
Frank
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top