You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old April 15th, 2019, 01:03 PM   #1
sparkie
Lifetime Supporting Member
United States

sparkie is offline
 
Join Date: Nov 2014
Location: KS
Posts: 978
Line Follower - Need Help - Details Inside

Image of Line Follower


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?
  Reply With Quote
Old April 15th, 2019, 01:05 PM   #2
jaden
Member
United States

jaden is offline
 
Join Date: Sep 2009
Location: Pleasant Dale, Nebraska
Posts: 158
What kind of sensors are you using?
  Reply With Quote
Old April 15th, 2019, 01:14 PM   #3
sparkie
Lifetime Supporting Member
United States

sparkie is offline
 
Join Date: Nov 2014
Location: KS
Posts: 978
Quote:
Originally Posted by jaden View Post
What kind of sensors are you using?
https://katalog.we-online.com/led/da...120YS75300.pdf

They are analog sensors. So they will be able to measure the variance in either direction. I would think that I would need to set up some kind of span for each way, with right on top of the line being my zero point, though. I feel like I need to superimpose a coordinate axis on here.

Last edited by sparkie; April 15th, 2019 at 01:19 PM.
  Reply With Quote
Old April 15th, 2019, 05:51 PM   #4
James Mcquade
Member
United States

James Mcquade is offline
 
Join Date: Oct 2007
Location: Tennessee
Posts: 2,470
tracking all depends in my experience with the conveyor
being at least 4 times longer than it is wide.


james
  Reply With Quote
Old April 15th, 2019, 05:53 PM   #5
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 5,692
The catalog you have linked to shows LEDs, not an analogue sensor.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old April 15th, 2019, 06:16 PM   #6
sparkie
Lifetime Supporting Member
United States

sparkie is offline
 
Join Date: Nov 2014
Location: KS
Posts: 978
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 by sparkie; April 15th, 2019 at 06:22 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
ABB ACS800 drive MASTER FOLLOWER via fiber optics line Hasitha LIVE PLC Questions And Answers 2 December 4th, 2017 08:27 AM
Line filters control panels with PLC equipment irondesk40 LIVE PLC Questions And Answers 0 October 26th, 2017 10:41 AM
FIFE Line Guide sensor interfaced with plc not4u2c LIVE PLC Questions And Answers 1 March 17th, 2010 04:39 PM
Bit shifting? tlvaun LIVE PLC Questions And Answers 17 December 5th, 2002 10:51 PM
EZText 220P Messages Line 2 Question sreev LIVE PLC Questions And Answers 2 November 16th, 2002 08:41 PM


All times are GMT -5. The time now is 12:35 AM.


.