Go to Post the truth is that a 'bot is only as complicated as you make it. - RogerR [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 07-01-2002, 21:16
zorro zorro is offline
Registered User
#0292 (PantherTech)
 
Join Date: Jan 2002
Location: Kokomo, IN
Posts: 21
zorro is an unknown quantity at this point
Send a message via AIM to zorro
Question Quick Optical Sensor Question

I was playing around with an optical sensor today and am curious why they require two digital inputs. When I hooked one up today and observed its behavior, I noticed that when a reflection was detected the two values of the inputs were swapped (the 1 became a 0 and the 0 became a 1). I could not get only one value to change at a time nor both the values to become equal. It seems to me that the use of two sensor inputs is a waste if this is the case. Can anybody confirm that this behavior is what is expected? If not, could you please explain how to elicit a different reaction?

Thanks in advance,
Greg Szorc
  #2   Spotlight this post!  
Unread 07-01-2002, 21:47
Joe Johnson's Avatar Unsung FIRST Hero
Joe Johnson Joe Johnson is offline
Engineer at Medrobotics
AKA: Dr. Joe
FRC #0088 (TJ2)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1996
Location: Raynham, MA
Posts: 2,648
Joe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond reputeJoe Johnson has a reputation beyond repute
Not sure but it could be a way of letting one sensor work for either folks that want a 0 or folks that want a 1 when they see a desired signal.

It may sound like a trivial thing but there is a lot of legacy code in industrial automation. In order to keep from making 2 different models of sensors (and from plants around the country from having to stock 2 different sensors in their parts cribs), they could offer one an have it work with either normally ON or normally OFF controllers.

Just a thought.

Joe J.
  #3   Spotlight this post!  
Unread 08-01-2002, 00:34
s_alaniz s_alaniz is offline
Registered User
#0057 (Leopards)
 
Join Date: Jun 2001
Location: Houston, Tx
Posts: 73
s_alaniz is an unknown quantity at this point
If you look at the documentation appendix g on page g-12, there is a diagram at the top of the page that gives the logic of the sensor. It was intended for positive or negative logic and outputs both a positive and negative signal so the user can choose whichever meets the needs of the system. The bottom line is that the outputs will always be opposite unless your sensor is broken. You are correct in saying that it wastes a digital input but only if you've reprogrammed the controller. The way it is set up for the default program, and the example of pins 15 and 16 there is an assumption that the condition of the sensor either disables relay 2's forward bias of the voltage or reverse voltage bias of the voltage depending on the state of the sensor. This assumes that you will always want to disable one condition and allow the other. Reprogramming the controller would be necessary to allow disabling relay 2 for either forward or backwards bias OR enabling forward AND reverse biasing at the same time.
OK, final point, referring to the diagram on g-12. The reason for connecting both outputs...if the outputs have little output resistance, you risk shorting the power supply to ground which means your sensor becomes an odd shaped fuse and burns out. However, you've asked a good question and it's probably one that you could forward to F.I.R.S.T.... just be sure to insulate the unused output.
  #4   Spotlight this post!  
Unread 08-01-2002, 00:35
Patrik Patrik is offline
Registered User
no team
 
Join Date: Jan 2002
Location: Hampton, Va, USA, Earth, The Matrix
Posts: 15
Patrik is an unknown quantity at this point
Send a message via ICQ to Patrik Send a message via AIM to Patrik
Me and Stephen(srawls) fooled around with the sensor today and found out that one output is given for sensed and one for unsensed, but they are both the same polarity. It seemed to me that it was done this way to replace an old fashioned switch. It might harken back to the days before people had fancy programs. In fact it would seem one could just put it right into an electrical circuit without any sort of PIC to read the output, and just use the output to drive a relay of some sort. Of course I am not an electrical engineer so I might be wrong.

This is what we observed this afternoon
blue -vdc ground
black +vdc when sensed
white +vdc when nothing sensed
brown +vdc input
__________________
Patrik
To iterate is human, to recurse, divine. -- Robert Heller

Last edited by Patrik : 09-01-2002 at 00:21.
  #5   Spotlight this post!  
Unread 08-01-2002, 21:21
zorro zorro is offline
Registered User
#0292 (PantherTech)
 
Join Date: Jan 2002
Location: Kokomo, IN
Posts: 21
zorro is an unknown quantity at this point
Send a message via AIM to zorro
Thanks for the information.

Greg Szorc
  #6   Spotlight this post!  
Unread 15-01-2003, 19:24
crazycliffy crazycliffy is offline
Registered User
#0846
 
Join Date: Jan 2003
Location: San Jose
Posts: 11
crazycliffy is an unknown quantity at this point
Specs on sensor say:
Off-State leakage current: less than 50 uA @30V
On-State Saturation Voltage: less than 1V @10 mA, less than 1.5V @ 100mA

When you played around with the sensor,
do you recall what the actual voltage produced was
that goes into the digital input on the robot controller?

e.g. If I supplied 12 V power to the sensor...
For ON position, is voltage at output 5V or 0V ?
For OFF position, is voltage at output 5V or 0V ?


Do you know if these Banner Sensors, can detect a analog
signal, something that ranges between 0 and 5 V?

Anyone try it out?




FYI.
  #7   Spotlight this post!  
Unread 15-01-2003, 19:39
Rickertsen2 Rickertsen2 is offline
Umm Errr...
None #1139 (Chamblee Gear Grinders)
Team Role: Alumni
 
Join Date: Dec 2002
Rookie Year: 2002
Location: ATL
Posts: 1,421
Rickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant futureRickertsen2 has a brilliant future
Send a message via AIM to Rickertsen2 Send a message via Yahoo to Rickertsen2
no these sensors cannot read analog in any way. Tere are 2 outputs. one is active when white is detected and the other is active when black is detected. if u only want to use one input then either jut insulate the other or tie it to ground through a resister.
__________________
1139 Alumni
  #8   Spotlight this post!  
Unread 15-01-2003, 19:58
crazycliffy crazycliffy is offline
Registered User
#0846
 
Join Date: Jan 2003
Location: San Jose
Posts: 11
crazycliffy is an unknown quantity at this point
thanks for the quick response.
I understand, it is a "switch" type sensor.


Since from the schematics from first says
connect black wire to Switch3 and white wire
to Switch4. This means 12 V goes to Switch3,
and then 0 Volts goes to Switch4 (On State). The 12V,
goes directly to the digital input..

Does this short circuit or cause problems to the
robot control (digital input)?

I read from the Innovation's RC Reference Guide, says...

"Digital Inputs are "looking" only for ground signals
to become "active".. Do not connect positive voltage
to any switch or digital input pin, only ground"

Thanks for your advice!!
  #9   Spotlight this post!  
Unread 19-01-2003, 15:06
Dante Sparda's Avatar
Dante Sparda Dante Sparda is offline
Registered User
#0384 (Team 384)
 
Join Date: Sep 2002
Location: Richmond, Virginia
Posts: 36
Dante Sparda is an unknown quantity at this point
Send a message via AIM to Dante Sparda
So, are those all the specs and stuff for the bannersensors?
__________________
JR TUCKER SPARKY 384!!! JR TUCKER SPARKY 384!!!
Langley NASA/VCU Regional:
Judges Award winners
Regional Alliance Winners with 388 and 395 (Go 388 and 395!!!)
MAXIMUM SPARKTRAIN!! w007!
Chesapeake Regional:
Regional Alliance Winners with 306 and 134 (Go 306 and 134!!!)
  #10   Spotlight this post!  
Unread 19-01-2003, 16:27
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Quote:
Originally posted by crazycliffy
I read from the Innovation's RC Reference Guide, says...

"Digital Inputs are "looking" only for ground signals
to become "active".. Do not connect positive voltage
to any switch or digital input pin, only ground"
If you look at the schematic on FIRST's parts spec sheet page (the leftmost NPN version), you will see that one, and only one, of white and black will be connected to ground. This comports with IFI's statement that "Digital Inputs are 'looking' only for ground signals to become 'active'."
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #11   Spotlight this post!  
Unread 21-01-2003, 06:39
Jim Jim is offline
Registered User
no team (Mcibed)
 
Join Date: Feb 2002
Location: Wisconsin
Posts: 41
Jim is an unknown quantity at this point
Send a message via AIM to Jim
THink of it this way:

First you provide power to the sensor-
Brown gets 12V
Blue gets Ground

Now, you have two choices for output on the remaining 2 wires-
Light Operate
Dark Operate
(These are called complementary outputs, like NO and NC on the mechanical limit switches you got in the kit)

In this example let's say the sensor is set up so it can "see" it's own emitted light coming back from some reflective tape - i.e., Light Operate
One of the output wires wire will be a path to ground and the other wire will will "float" above Ground.
When the tape is removed, the conditions reverse (the Dark Operate wire becomes a path to ground)

The Robot Controller is looking for that "path the ground" at an input pin.

The reason it is built that way is, like you partially guessed, because good ole' mechanical switches worked that way. It also gives you flexibility in setting up a system.

Imagine that you are using the sensor to track a line - using the Light Operate wire makes the most sense (pun intended) "logically" - the condition is true when the tape is visible to the sensor.

Now imagine you are using the sensor in a factory to detect when someone walks through a door or when a box comes down a conveyor - Using Dark Operate makes themost sense "logically" the condition is true every time I get my beam blocked. . . .

The LEDs on the top of the sensor are to indicate that power is present and to indicate when the sensor "sees" its own light being reflected back.

Keep reading if still interested -

When the sensor has just enough light coming back into itself to be able to turn the LO output on, it is said to have an excess gain of (1). If you set the sensor up one foot away from a good target (like a bicycle reflector) you will have 200 times (excess gain) the light required coming back into the sensor.

You can find these datasheets (for range, beam pattern, and excess gain) at http://www.bannerengineering.com/lit...worldbeam.html

Why would you want that? Well some factories are very dirty environments - setting up your photoeyes in this fashion (with lots o'excess gain) is akin to designing something structurally "like a tank" - Designing your photoelectric set up to an excess gain of (1) is like building a bridge that can only hold itself up - it can't carry any cars or it would collapse . . .That lens better stay very clean and the alignment must remain PERFECT!

When you see the LED on the sensor that indicates LO "Flashing" the sensor is telling you that it now sees (1.5) times excess gain (Hey buddy, that reflected light is getting pretty faint!) However, even though that LED is flickering, the output wire for LO is NOT FLICKERING- it is ON "steadily" Keep that in mind.

Here is some info on the adjustment pot. on the sensor

Two examples of where you would use the 3/4 turn sensitivity adjustment on the sensor:
1) - You need to see an object pass between the sensor and its retro-target that is smaller than the beam of the sensor (the beam is roughly the size of the sensor's 18mm "snout". In this case you want to see the DO wire switch when only some of the light get's blocked. If you left it turned all the way up, the output wire would never change state.
2) - You are using the sensor as an encoder by sensing tape on on your robot's wheel. Gray or white surfaces may reflect enough light that the sensor is still above an excess gain of 1, even though the tape you put on the wheel reflects back an excess gain of 50. By turning the sensitivity down, you may be able to ignore the gray and white areas and only see the tape.

I hope this helps

PS - if you test the sensor by moving a target towards it from a distance (say a bin with tape on it) you will see that at "X" feet the sensor sees its light and the indicator light comes on - Now start backing away and it will be "X + Y" feet when the light goes off.

This is known as hysteresis

It is setup so you always get positive transitions ON and OFF - without it, you'd be able to get the box in a position that would cause the output to chatter on the edge of ON and OFF -

Imagine how you could screw up without hysteresis-
For example: if using the sensor as an encoder to sense wheel rotation and the robot was stopped, but the tape that the sensor was supposed to be seeing was right on the edge of the beam and the output was chattering -your controller would think that you are still in motion. . . (that is an important little note for any teams that build their own photoelectric encoder using parts from digi-key - be sure that the circuit has some hysteresis)
__________________
Steelkilt Lives!

Last edited by Jim : 21-01-2003 at 06:48.
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Q&A Discuss: Optical sensors with EduBot CD47-Bot Extra Discussion 2 01-03-2003 18:37
Q&A Discuss: optical sensors CD47-Bot Extra Discussion 0 15-02-2003 22:58
optical sensors acting strangely rosebud Electrical 10 03-02-2003 00:29
Find any optical sensor in catalogs? GreenDice Programming 1 13-01-2003 18:05
OPTICAL SENSORS??????????????????? NM_programming Technical Discussion 2 13-01-2002 17:41


All times are GMT -5. The time now is 22:41.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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