Hi,
we just got our 2011 kit, and in that kit were three Photoswitch sensors. None of us has ever used this kind of sensors so I’d really appreciate if you could explain how it works, how we should wire it and where to.
Thanks.
Hi,
we just got our 2011 kit, and in that kit were three Photoswitch sensors. None of us has ever used this kind of sensors so I’d really appreciate if you could explain how it works, how we should wire it and where to.
Thanks.
Itamar,
There is a section on the First Website under Competition Docs that explains the sensors. I believe it is under the KOP section. I just tried to log on but the site looks a little busy.
Here is what I had downloaded from the FIRST website. Hope it helps. They are photoswitches and will give you a digital response. Follow the wiring diagrams carefully!
42ef-in005_-en-p.pdf (100 KB)
42ef-in003_-en-p.pdf (164 KB)
42ef-in005_-en-p.pdf (100 KB)
42ef-in003_-en-p.pdf (164 KB)
http://usfirst.org/roboticsprograms/frc/content.aspx?id=18530
This page contains, among other things, links to the datasheets for a lot of the KOP items. I believe the sensors your referring to are the “Rockwell Automation Line Sensors”:
http://www.ab.com/sensors/photoelectric/general/42ef.html
The links on the right side of the page to the catalog and installation PDF’s are probably the most help… although I don’t know the specific part we got in the KoP, and the checklist doesn’t have a part number! Without those, I can’t give too much useful information… although your questions are exactly those I know my students will be asking me!
The Line sensors given to us in the KOP are model: 42EF-D1MNAK-a
ok, so we’ve looked at the wiring diagrams, and I have to say, it’s not helping us very much. Under the 10.8 - 30V DC Sensors, there are 6 different configurations. Does the ‘Load’ mean that we have to use resistors in the circuit? I’m gonna display my ignorance here - how do we wire them to the robot? Is the digital sidecar involved here?
I don’t have the datasheet handy, so I’m going from memory.
DO is the “Dark Output”. It is active (i.e. connected to ground) when the sensor is looking at “dark”, and inactive (i.e. allowed to float) when the sensor sees “light”.
LO is the “Light Output”. It is active when the sensor is looking at “light”, and inactive when the sensor sees “dark”.
Connect ground to ground, power to +12 volts, and either LO or DO to a digital input pin on the Digital Sidecar. The input pin will read a logic 1 when the signal is inactive, and a logic 0 when it is active.
We need to put a resistor in series, don’t we? The 9403 can withstand a 30v signal, but use at this voltage will degrade the life of the module.
The standard voltage it specs is -0.5v to 5.25v.
If possible, I’d prefer to use an inline resistor, instead of a voltage divider. At 250 micro-amps, it would take a 34k resistor to drop the voltage from 12v to about 5v.
It looks like the output of the sensors is just like a Banner sensor’s NPN output. It supplies no power. It is effectively an on/off switch that either connects the output to ground or leaves it open. The Digital Sidecar’s inputs will happily take that input without modification; it’s basically what they were designed for.
Oh, okay. That’s why they gave us NPN then. Cool!
Just as a sanity check… Looking at the Wiring Diagrams for the NPN ouputs: Dark Output is the Black line and Light Output is the White line. Is that a correct statement?
Lets be very careful with those ‘line sensors’ and the electrical hookup.
Some facts that we do know. The sensor will work just fine on 12 volts DC which generally means at the output (ie: LO,DO ) MAY have a voltage range from 0VDC to 12VDC. The Digital sidecar does have a ‘general purpose’ I/O lines which opearte in the 0VDC to 5VDC range!!!
That means if the sensor sources a 12VDC level you can kiss your digital sidecar goodbye as the blue smoke comes out. NO, a series resistor will only limit the current, not the voltage and either or both will kill a digital sidecar.
To be on the safe side I would use the analog sidecar to input the sensors.
I have not looked at the sensors tech sheets yet but will sure err on the side of caution.
Of course one way to find out is to look at the ‘sample code’ and see where the information for the sensors is read.
The sensor outputs do not source anything. They will never have a voltage greater than what they are connected to. If you connect LO or DO to the Digital Sidecar, it will either have 5 volts (when inactive) or zero volts (when active) on the output.
I have not looked at the sensors tech sheets yet but will sure err on the side of caution.
If you haven’t looked at the documentation, you shouldn’t be giving advice about how to use things.
Of course one way to find out is to look at the ‘sample code’ and see where the information for the sensors is read.
It reads it from the Digital Sidecar DIO pins.
The light sensor outputs will provide a closure to power common or will remain open circuit. The digital side car digital inputs have pullup resistors to +5 volts. So when the sensor is open, the output will be pulled up to 5 volts through the DSC and when the sensor is closed, the output will be pulled down zero volts through the NPN transistor in the sensor. No other components are needed. The 12 volt input is required to power the emitter and other internal electronics.
The original question is quite direct, but to rephrase it:
What should be connected to:
We have read all of the Allen Bradley docs.
They seem to show that once the two bleeder resistors are in place that the unit has two leads left.
Since one is supply at 11-30 volts DC and the other must be common, there are no leads left to serve as the output.
Where and how does the output signal get connected to the CRIO I/O?
Charlie,
The Brown lead is connected to a positive (+12 V) output of the PD through a 20 amp breaker. The Blue lead is connected to the associated negative output of the PD. The White Lead and the Black Lead should be connected to two different digital inputs on the Digital Side Car depending on how you choose to use the device. If you choose to use a PWM cable to connect to the DSC, please cut the red wire as close to the PWM connector as you can, pull back the red wire back at least one inch and cut off the end. You may then cutoff the other end of the PWM cable, connect the black wire of the PWM to the negative wiring (Blue & Black) of the power and sensor. The white or signal wire in your PWM cable can then be connected to the White or Black lead on the sensor. The resistor loads shown in the drawing are not needed as they are provided internal to the digital inputs on the Digital Side Car. You may connect several sensors in parallel to share power supply connections only. All connections need to be insulated and soldering is recommended to keep wiring together.
The loads shown on the Rockwell drawing are indicative of relays or solenoids that are part of a control system and operate at the same voltage as the power supply, in this case 12 volts.
I’ve wired the sensor with:
Blue: +12v from PDB
Brown: Ground on PDB
White: a DS signal pin
Black: another DS signal pin
When it receives power the orange and yellow lights alternate. Is there any documentation about the status lights? I read the document regarding Teach mode but I don’t think that applies to our sensor (no push-button that I can find).
I think my code is correct but I’d like to see example code (Didn’t they specifically mention that in the kickoff broadcast?). I can’t find any bundled with WindRiver.
There are some tutorials on the lower right of http://decibel.ni.com/content/docs/DOC-8923. The line following one will review how the LEDs and trim knob are used.
Greg McKaskle
When the photoswitch is wired accourding to schematics that come with it the DO and LO signal lines will give out either a 0volt or 12volt signal. This was CONFIRMED last night during a bench test.
Bench test hookup as per instructions;
Brown wire to + 12 volts (VCC) from the power distrabution board.
Blue wire to 0 volts (Ground) from PD board.
Two 10K (10,000) ohm resistors (load), have one end connected to VCC.
The other end of one resistor goes to the White wire, call this TP1 and then the last free end of the other resistor goes to the Black wire, call this TP2
Testing;
With a voltmeter set at 20VDC range;
Results;
WHITE wire at resistor junction will show;
BLACK wire at resistor junction will show;
So wiring the photowitch as per the instructions WILL give 0 to 12 volt signals which will kill a digital side car.
With that said IT SHOULD be possible to referance the LOAD resistors to +5 volts via the digital side car GPI/O pins. This is for a later test, unless someone else would like to try it.
What are the “schematics that come with it”?
Bench test hookup as per instructions;
Brown wire to + 12 volts (VCC) from the power distrabution board.
Blue wire to 0 volts (Ground) from PD board.
Two 10K (10,000) ohm resistors (load), have one end connected to VCC.
The other end of one resistor goes to the White wire, call this TP1 and then the last free end of the other resistor goes to the Black wire, call this TP2
Nobody gave any instructions to put resistors to +12 on the outputs. You’re not reading what we’re saying: just connect the outputs to the Digital Sidecar.
So wiring the photowitch as per the instructions WILL give 0 to 12 volt signals which will kill a digital side car.
Why are you so sure that a 12 volt signal will do fatal damage? Have you looked at the Digital Sidecar design?
With that said IT SHOULD be possible to referance the LOAD resistors to +5 volts via the digital side car GPI/O pins. This is for a later test, unless someone else would like to try it.
Why are you using “LOAD resistors”? They’re not necessary. The Digital Sidecar inputs provide the necessary pullup to 5 volts.