optical sensor

Posted by joe frick at 03/27/2001 12:14 PM EST

Engineer on team #466, bartram braves, from john bartram high school and sheet metal workers local union 19.

could anyone help me with the optical sensor?
i want to use it as a limit switch how do i hook it up to digital imputs to control PWM 3 what i need is something that lets me start a match in a down position but prevent our robot from returning to this position during a match, so the switch would have to allow our robot to go up but not down. any help wou;ld be appreciated

Posted by Lloyd Burns at 03/27/2001 4:58 PM EST

Engineer on team #188, Woburn Robotics, from Woburn Collegiate and TorDistSchoolBrd, ScotiaBank. OntPwrGen, Enbridge.

In Reply to: optical sensor
Posted by joe frick on 03/27/2001 12:14 PM EST:

: could anyone help me with the optical sensor?
: i want to use it as a limit switch how do i hook it up to digital imputs to control PWM 3

’ see the connection diagram on the case, and the listing of the pinouts in the Innovation First manual.
One of the wires goes to ground, one to the +5 V pin, and one (of the two outputs) to the signal pin. One of the outputs is closed normally, but opens when it detects reflection; the other output closes at the same time. Closed to ground = 1 in the program.

: what i need is something that lets me start a match in a down position but prevent our robot from returning to this position during a match, so the switch would have to allow our robot to go up but not down. any help wou;ld be appreciated

’ if rc_sw# = 1 then PWM3 = 0 (or 254 depending on how you’ve wired the motor.) This could compress into
PWM3 = 127 + rc_sw# * 127 (if 254 is up, or use - to get to 0).
’ you could implement another limit switch or a timer / counter to make sure the part rose far enough, if your sensor is positioned to sense only the start.

Posted by Travis Hoffman at 03/27/2001 10:18 PM EST

Engineer on team #48, Delphi E.L.I.T.E., from Warren G. Harding High School and Delphi Automotive Systems .

In Reply to: Re: optical sensor
Posted by Lloyd Burns on 03/27/2001 4:58 PM EST:

: : could anyone help me with the optical sensor?
: : i want to use it as a limit switch how do i hook it up to digital imputs to control PWM 3

: ’ see the connection diagram on the case, and the listing of the pinouts in the Innovation First manual.
: One of the wires goes to ground, one to the +5 V pin,

The optical sensor runs on 12 VDC. Tap the power for the device from the 20A Robot Controller circuit breaker.

Travis

and one (of the two outputs) to the signal pin. One of the outputs is closed normally, but opens when it detects reflection; the other output closes at the same time. Closed to ground = 1 in the program.

: : what i need is something that lets me start a match in a down position but prevent our robot from returning to this position during a match, so the switch would have to allow our robot to go up but not down. any help wou;ld be appreciated

: ’ if rc_sw# = 1 then PWM3 = 0 (or 254 depending on how you’ve wired the motor.) This could compress into
: PWM3 = 127 + rc_sw# * 127 (if 254 is up, or use - to get to 0).
: ’ you could implement another limit switch or a timer / counter to make sure the part rose far enough, if your sensor is positioned to sense only the start.

Posted by Lloyd Burns at 03/28/2001 6:27 PM EST

Engineer on team #188, Woburn Robotics, from Woburn Collegiate and TorDistSchoolBrd, ScotiaBank. OntPwrGen, Enbridge.

In Reply to: Re: optical sensor
Posted by Travis Hoffman on 03/27/2001 10:18 PM EST:

: One of the wires goes to ground, one to the +5 V pin,

: The optical sensor runs on 12 VDC. Tap the power for the device from the 20A Robot Controller circuit breaker.

: Travis