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)

StevenB 30-01-2011 00:32

Re: Line Tracking Photoswitch Info and Demo Video
 
1 Attachment(s)
Just a couple additional notes, since I'm an electrical engineering student and happened to be wiring the sensor up today.
  • The sensor acts like a switch that closes when it sees a white object. It's using transistors inside rather than a mechanical switch, but as far as the wiring is concerned it acts just like a limit switch (except that it needs +12V power). Like a limit switch, it has a "normally open" and "normally closed" output; one output will be high when it sees a light object, the other will be high when it sees a dark object. Look at the sensor datasheet for all the gory details.
  • The digital sidecar has built-in pullup resistors, which means that unless you connect the GPIO pin to ground, it will have a value of 5V. This means you don't need any additional circuitry to hook up the photoswitches. See the Digital Sidecar datasheet for more information.
  • The attached schematic tries to show the whole picture. Note that you could just as easily connect the black wire to the GPIO pin, it's just a matter of whether you get a "1" for dark or a "1" for light. (My apologies if I mixed up LO and DO on the schematic. Let me know and I'll fix it.)
  • The part number is 42EF-D1MNAK-A(2). The 2 isn't given, but it's apparently part of the number based on Rockwell's part selection tool. If you haven't found it already, a CAD model (STEP) is available on Rockwell's site.
To those wondering how you program these things: it's a switch - a digital input - a 1 or a 0. Once you calibrate it, it will have one value when it's over the carpet and the other value when it's over the tape. All you have to do is read the sensor value to determine if you're on the tape or not.
If you have questions about how to follow a line, look at this white paper from NI, or ask an FLL student.

SHH 09-02-2011 21:03

Re: Line Tracking Photoswitch Info and Demo Video
 
We have hooked the photoswitch up to the power distribution board and to the signal pin on the DSC, but we only recieve "true" when we use the DigitalInput get() method, no matter what surface the photoswitch is directed at. Any help would be greatly appreciated.

kinganu123 09-02-2011 21:59

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by SHH (Post 1019515)
We have hooked the photoswitch up to the power distribution board and to the signal pin on the DSC, but we only recieve "true" when we use the DigitalInput get() method, no matter what surface the photoswitch is directed at. Any help would be greatly appreciated.

I found that initializing Victors (doesn't matter if they are really there or not) solved my problem. The DB37 cable apparently needs to send more power and this is only possible by creating more "sensors" in the DSC
But before you do that, do your lights change color? Green when it sees nothing and orange and yellow when it does?

Alan Anderson 09-02-2011 22:53

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by kinganu123 (Post 1019561)
I found that initializing Victors (doesn't matter if they are really there or not) solved my problem. The DB37 cable apparently needs to send more power...

Ack! You need to make sure that you are properly supplying battery power to the Digital Sidecar's small white Wago power connector. The power should come from a 20 Amp circuit on the Power Distribution board.

Nicandy 14-02-2011 14:09

Re: Line Tracking Photoswitch Info and Demo Video
 
What did you use to connect the white sensor wire to connect the photoswitch to the I/O on the digital sidecar? :confused:
Sorry for posting such a basic question on a month old thread, but any help would be greatly appreciated. :o

Alan Anderson 14-02-2011 15:20

Re: Line Tracking Photoswitch Info and Demo Video
 
Quote:

Originally Posted by Nicandy (Post 1022744)
What did you use to connect the white sensor wire to connect the photoswitch to the I/O on the digital sidecar? :confused:

Cut one of the three-wire PWM extension cables in half. One half will have the appropriate connector for the Digital Sidecar's I/O pins. Carefully tuck the cable's black and red wires out of the way, covering the ends with electrical tape so they don't contact anything. Splice the cable's white wire to the sensor's signal.

Or you can do what we typically do and make your own connector. Crimp the appropriate kind of female pin onto the sensor's signal wire and insert it into the appropriate kind of servo-style connector housing. We're running low on parts and should probably order more from a place like Hansen Hobbies.


All times are GMT -5. The time now is 21:53.

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