Line Follower - Need Help - Details Inside

sparkie

Lifetime Supporting Member
Join Date
Nov 2014
Location
KS
Posts
1,139
Image of Line Follower
mlecZy5.png


Link to video:
https://www.youtube.com/watch?v=VF5w7Ct5s8Q

Meat and bones:
Full disclosure, this is a school project. I have, however, never implemented a PID before. Also of note, is that I don't want to get lost any more than necessary into control theory. I just happened to miss this class first year, so I'm taking advantage of an opportunity to dig into the PID equation a bit, and implement it in C.

The four black squares are a sensor array. I'm going to use them to track the line. Adjustments will be made by changing the speed of the wheels, however the robot will only go forward.

I know I will need a calibration. Putting the robot on the line will enable me to get a set point pretty easily. What I'm confused on is how I will handle the drift left or right across the four sensors. I'm not really seeing how that will figure in, and I guess that is my first hurdle there. Any ideas on how to approach this from a more macroscopic level?
 
Last edited:
That is alright. The sensors (believe it or not) are completely irrelevant. They can be abstracted out. I can update a little bit with some more information:

  • Wheels are the same size.
  • Motors spin based on PWM signal and are controlled independently
  • Sensors give an analog feedback value (exact value is irrelevant)

It seems that if I lay this on top of an x-y coordinate plane, I can calibrate the "zero" or origin of the 4 sensors. This will be my setpoint that I want to maintain. The total change in x (or dx) should be about the same between the sensors(dx). So I believe that I could use the average of dx between the four sensors as my error. Thoughts on this?

Next, I'm looking at the velocities of each wheel. Now, my process variable would be the two wheels. They will always be turning "forward", which is +y, but with different speeds so as to correct for dx. This is where I'm hung up at the moment in getting an overall look at how to implement this.

Also, just for completeness, here is the correct sensor link:
https://www.onsemi.com/pub/Collateral/QRE1113-D.PDF
 
Last edited:

Similar Topics

First, I want to point out that the line follower does not need to generate the target position, velocity and acceleration. This is all...
Replies
0
Views
1,805
Dear team, i need to run ABB ACS800 two drives in master follower mode.Im using ABB RDC0-03C option kits with fiber optics lines. As they...
Replies
2
Views
2,281
I'm a newbie who started a job as a repair tech recently. I've had plenty of luck with ABBs, Allen Bradleys, and a few others, but I can't seem to...
Replies
1
Views
42
Hi. I’m trying to upload program from existing PLC S7-1200. Create new project in TIA v15.1 then upload. After upload successfully, go online but...
Replies
5
Views
145
Does anyone know of a way to detect if someone is online with the controller in ControlLogix (from logic) I'm thinking that maybe there is a CIP...
Replies
7
Views
293
Back
Top Bottom