Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Electrical (http://www.chiefdelphi.com/forums/forumdisplay.php?f=53)
-   -   How should we wire the photoswitchs? (http://www.chiefdelphi.com/forums/showthread.php?t=88548)

Al Skierkiewicz 11-01-2011 21:24

Re: How should we wire the photoswitchs?
 
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.

andreboos 11-01-2011 23:32

Re: How should we wire the photoswitchs?
 
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.

Greg McKaskle 12-01-2011 01:45

Re: How should we wire the photoswitchs?
 
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

Tem1514 Mentor 12-01-2011 08:28

Re: How should we wire the photoswitchs?
 
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;
- connect the meter negitive lead to Ground and then one-at-a-time measure the voltage at TP1 or TP2 with the positive lead of the voltmeter.

Results;
WHITE wire at resistor junction will show;
- 0 volts when sensor is OPEN
- +12 volts (VCC) when sensor SEEs an object

BLACK wire at resistor junction will show;
- 0 volts when sensor is OPEN
- +12 volts (VCC) when sensor SEEs an object

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.

Alan Anderson 12-01-2011 09:07

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Tem1514 Mentor (Post 997875)
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.

What are the "schematics that come with it"?

Quote:

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.

Quote:

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?

Quote:

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.

Hugh Meyer 12-01-2011 12:12

Re: How should we wire the photoswitchs?
 
Hi Al and Alan,

The data sheet says the low end of the power supply range is 10.8 volts. We often log voltages below that value when the robot is running. Do you think this would be an issue. I was thinking about a converter that would maintain 12 or 24 volts, similar to what is inside the PD board. Alternatively it would be nice to be able to connect it to the 24 VDC that runs the cRio. We tried that last year with some optical sensors and it got called out as illegal by Andy's inspection crew.

Any thoughts on this?

-Hugh

Bryscus 12-01-2011 12:54

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Tem1514 Mentor (Post 997875)
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

Tem1514 Mentor,

I have starred the issues above. The Rockwell sensors use what's called an open-collector output.

http://en.wikipedia.org/wiki/Open_collector

I won't go into the gory details. However, the way it works is that it has only two output states - high impedance (or disconnected) and low. What this means is that a pull-up resistor to any (reasonable) voltage may be used to pull up the signal when outputting a "high" (which is the output's high impedance state). In the case of a low, the output will drive the signal low. This allows devices running at different voltages to "talk" to one another.

What others have been trying to say is that this pull-up resistor is included for each input of the digital side car. Thus, one could (conceivably) use any open-collector output source to connect to the DSG regardless of the core voltage the device uses to operate. An extra external pull-up resistor (or "Load" in the datasheet) is not required.

I hope I have shed some light on the situation that has been causing some distension between FIRST participants. Thanks.

- Bryce

P.S. For a BJT (transistor type), the output is called open-collector. It's MOSFET (transistor type) counterpart is called an open-drain output.

|-|-|-|

sircedric4 12-01-2011 13:29

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Greg McKaskle (Post 997787)
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

Is there an equivalent version of these tutorials for Windriver C++ programming? I tried to find something similar to this nice really concise list of lessons on the WPI website but my net-fu may just be weak.

Also is there an example code using Windriver to do the line following? I saw the question asked earlier but not answered and just wanted to re-ask it.

Alan Anderson 12-01-2011 14:20

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Bryscus (Post 998033)
P.S. For a BJT (transistor type), the output is called open-collector. It's MOSFET (transistor type) counterpart is called an open-drain output.

For a mechanical switch, it's called a switch. :) They all work the same way as far as the Digital Sidecar input is concerned.

Bryscus 12-01-2011 14:45

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Alan Anderson (Post 998118)
For a mechanical switch, it's called a switch. :) They all work the same way as far as the Digital Sidecar input is concerned.

Word. :)

- Bryce

Greg McKaskle 12-01-2011 16:33

Re: How should we wire the photoswitchs?
 
Quote:

Is there an equivalent version of these tutorials for Windriver C++ programming?
The paper on line following and vision are not language specific. Many of the other tutorials are. But you are welcome to watch them anyway.

I've seen good tutorials and training given by WPI, on the ThinkTank site, and by some teams.

Greg McKaskle

Tem1514 Mentor 12-01-2011 16:37

Re: How should we wire the photoswitchs?
 
I’ll be brief here and skip all the electronic information as how it works and what is required to make it work

To connect the photo sensor to the Digital I/O inputs

Wire colors on the sensor are
Brown wire to + 12 volts from the power distribution board (PD).
Blue wire to 0 volts (Ground/Negative ) from PD board.

You now need the White wire on a PWM cable. The Red and Black wire on the PWM cable you do not need so either remove them or insulate so they can not short to anything.

With the White wire in the PWM cable connect it to EITHER the White OR Black wire on the sensor. Plug the PWM cable into the Digital Sidecar (general purpose I/O) side.

The cRIO will now be able to read the sensor as a logical 1 or 0 that may be used as required by your software. You will even be able to see the sensor state on the Classmate diagnostic screen.

Al Skierkiewicz 12-01-2011 16:40

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Hugh Meyer (Post 997993)
The data sheet says the low end of the power supply range is 10.8 volts. We often log voltages below that value when the robot is running.

Any thoughts on this?

-Hugh

Hugh,
You are correct that the power does sag during a match. However, these are generally short duration pulses. I would expect that the sensors have some power supply immunity built in that will allow them to survive the short pulses. Since I have no robot system experience with these yet, I cannot tell for sure if we will see problems. We can only wait and see what teams report. I will check with Kate this weekend and see if she did any testing.
Andy was correct in calling you on the 24v power. The rules are specific that the 24 volt output can only be used for the Crio and one 24 volt solenoid module. that about maxes out the current ability of the regulator.

Bryscus 12-01-2011 16:49

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Tem1514 Mentor (Post 998288)
The Red and Black wire on the PWM cable you do not need so either remove them or insulate so they can not short to anything.

Yeah, you COULD do that, but I would still connect ground (black wire) on the PWM cable to the blue wire (if for no other reason than mechanical robustness of the PWM cable). Technically the PDB and DSG share a common ground, but there are slight differences that may give you weird effects. I would connect the ground to the DSG as well just to be on the safe side.

- Bryce

andreboos 12-01-2011 22:55

Re: How should we wire the photoswitchs?
 
I solved my problem. I was wiring the black and white wires to the middle (power) pins on the digital inputs. That was probably causing the flashing yellow/orange light issue I was experiencing before. Works as expected when powered.


All times are GMT -5. The time now is 07:26.

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