Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Sensors (http://www.chiefdelphi.com/forums/forumdisplay.php?f=173)
-   -   Line Tracking Photoswitch Info and Demo Video (http://www.chiefdelphi.com/forums/showthread.php?t=89840)

riptide 22-01-2011 20:56

Line Tracking Photoswitch Info and Demo Video
 
1 Attachment(s)
Info gathered from other threads for one stop shopping.

Brown +
Blue -
White (sig) to digital side car
Black nothing

If the Sensor is Green: Sensor is powered but does not sense reflection. no output on blk or wht.

If sensor is Orange: ON sensor is recieving at least 2.5 times the signal strength needed to trigger an output and green will turn off. May have to adjust the sensitivity adjustment on top of the sensor to get an orange on if already mounted. Do this by placing over reflective surface and adjust until it comes on. Sensitivity is the screw on top. If orange is not on there will be no output on blk or wht.

If sensor is Yellow: the output has been energized meaning it sensed a reflective object. be careful most bright objects can be sensed regardless of color.

Typical sensor indication is the following
Green ON, Orange OFF, Yellow OFF over dull none reflective surface wht low and blk high
Green OFF, Orange ON and Yellow ON over bright reflective surface wht high and blk low

If you have a flashing LEDs, the sensor has gone in to short circuit protection mode becasue one of the outputs is shorted to ground or it is not wired up correctly. Make sure the black wire is not connected ianything. Make sure the white is connected to the signal pin on the digital side car pwm input and not the + or -. Best way to prevent the shorting out of the black wire is to clip the stripped wire and then wrap it with electrical tape. Inspect the sensor cable for any nicks. I will try and post a quick video by the end of today to show how it works and how to connect it.

Demo 1 01-22-2011
http://www.youtube.com/watch?v=t7pf-yWae0k

Demo 2 01-22-2011
http://www.youtube.com/watch?v=algLRT4Tawc


Hope this helps...

Belly 23-01-2011 12:32

Re: Line Tracking Photoswitch Info and Demo Video
 
Hey do you have or know where I can get a working Java code for the Photoswitches? I have 3 of them connected to the DIO. I dont mind switching my hardware configuration to be compatible with yours if it is not already.
Narcisse- 1340

riptide 23-01-2011 21:04

Re: Line Tracking Photoswitch Info and Demo Video
 
I'm sorry Belly, but I don't. If I come across something I'll keep you in mind.

pigpc1993 25-01-2011 17:42

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by Belly (Post 1006382)
Hey do you have or know where I can get a working Java code for the Photoswitches? I have 3 of them connected to the DIO. I dont mind switching my hardware configuration to be compatible with yours if it is not already.
Narcisse- 1340

My programming team is also having trouble finding example code. If you find anything could you let us know two?

Joe Ross 25-01-2011 18:54

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by Belly (Post 1006382)
Hey do you have or know where I can get a working Java code for the Photoswitches? I have 3 of them connected to the DIO. I dont mind switching my hardware configuration to be compatible with yours if it is not already.
Narcisse- 1340

Did you look at the LineTracker Sample Project in netbeans?

Ethan Spitz 27-01-2011 18:51

Re: Line Tracking Photoswitch Info and Demo Video
 
We have ours tracking the line as well with 2 or 3 sensors:

http://www.youtube.com/watch?feature...&v=PBG5g8geATw (3 sensors)

http://www.youtube.com/watch?v=06FPQ...er_profilepage (2 sensors)

Ethan

wazcodez 29-01-2011 18:24

Re: Line Tracking Photoswitch Info and Demo Video
 
we can't get code working in labview ? does any one have custome code rather than .. default which is too hard to understand .. we are rookie

Ethan Spitz 29-01-2011 18:27

Re: Line Tracking Photoswitch Info and Demo Video
 
I would start out by making a handwritten flow chart saying what you want it to do when each sensor is triggered. For example, when the left sensor is triggered, make it go right, and when the right sensor is triggered, go left. When neither are triggered, go straight.

Just use nested case statements and use the DIO ins to be the input for the case statements

Ethan

wazcodez 29-01-2011 20:39

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by Ethan Spitz (Post 1011291)
I would start out by making a handwritten flow chart saying what you want it to do when each sensor is triggered. For example, when the left sensor is triggered, make it go right, and when the right sensor is triggered, go left. When neither are triggered, go straight.

Just use nested case statements and use the DIO ins to be the input for the case statements

Ethan

Thanks for replying, should i control motor inside the nested loop or change the value for x or y inside the loop ? which will be sufficient enough and how do i know tht i have reached the "Y" part, i just started the programming ... ?

thanks for your help, will lwt you know if i have any problems ... thanks

Ethan Spitz 29-01-2011 20:41

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by wazcodez (Post 1011376)
Thanks for replying, should i control motor inside the nested loop or change the value for x or y inside the loop ? which will be sufficient enough and how do i know tht i have reached the "Y" part, i just started the programming ... ?

thanks for your help, will lwt you know if i have any problems ... thanks

I put the set output inside the loop because its less cluttered, but you could just put the value inside, that would work just as well.

You know it gets in there when the desired thing happens when you try it with the robot.

wazcodez 29-01-2011 21:08

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by Ethan Spitz (Post 1011378)
I put the set output inside the loop because its less cluttered, but you could just put the value inside, that would work just as well.

You know it gets in there when the desired thing happens when you try it with the robot.

i will follow your advise

tht's wht i did now ...



any suggestion and yea how do i make robot turn slowly !!!

thanks again

Ethan Spitz 29-01-2011 21:11

Re: Line Tracking Photoswitch Info and Demo Video
 
I seriously hope you're trying to be funny, becuase you have to put set motor output in there....

don't use the arcade drive module use the set motor output module

and to make it turn slowly, just use (to go right for example) right motor output at .1 and left motor output at .2 with them both going forward

Ethan

wazcodez 29-01-2011 21:38

Re: Line Tracking Photoswitch Info and Demo Video
 


Does this look proper ?

or beacuse of having arcade drive module, the value from (set motor output) would not matter, right ?

should i keep it like this ?

if tht's not the case then should i create new drive system (tank...) just for the autonomous and then switch it back to arcade ? OMG !!!

thanks man ! you have been greatly helpful

Ethan Spitz 29-01-2011 21:42

Re: Line Tracking Photoswitch Info and Demo Video
 
Ive never used the tank or arcade module so I wouldn't know :P

Should I assume you got it?

If so, congrats, and you're very welcome, feel free to message me or email me whenever you need help

Ethan

Ethan Spitz 29-01-2011 21:44

Re: Line Tracking Photoswitch Info and Demo Video
 
I do have one problem with your code however. You need to open everything up in your begin.vi or you are going to run into a lot of problems. Also make sure you close everything in your final.vi

Ethan


All times are GMT -5. The time now is 08:04.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi