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)

Itamar 09-01-2011 15:33

How should we wire the photoswitches?
 
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.

Al Skierkiewicz 10-01-2011 14:57

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

Jon236 10-01-2011 15:23

Re: How should we wire the photoswitchs?
 
2 Attachment(s)
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!

Jon Stratis 10-01-2011 15:36

Re: How should we wire the photoswitchs?
 
http://usfirst.org/roboticsprograms/....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/photoelect...eral/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!

Bot190 10-01-2011 16:29

Re: How should we wire the photoswitchs?
 
The Line sensors given to us in the KOP are model: 42EF-D1MNAK-a

mutantblond 10-01-2011 18:05

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

Alan Anderson 10-01-2011 20:35

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

kamocat 10-01-2011 21:02

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

Alan Anderson 10-01-2011 21:19

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by kamocat (Post 996153)
We need to put a resistor in series, don't we?

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.

kamocat 10-01-2011 21:29

Re: How should we wire the photoswitchs?
 
Oh, okay. That's why they gave us NPN then. Cool!

bakketti 10-01-2011 22:03

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Alan Anderson (Post 996110)
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".

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?

Tem1514 Mentor 11-01-2011 14:02

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

Alan Anderson 11-01-2011 14:30

Re: How should we wire the photoswitchs?
 
Quote:

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

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.

Quote:

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.

Quote:

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.

Al Skierkiewicz 11-01-2011 14:50

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

caffel 11-01-2011 21:08

Re: How should we wire the photoswitchs?
 
The original question is quite direct, but to rephrase it:

What should be connected to:
1. White
2. Black
3. Blue
4. Brown.

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?

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.

Amanda_Theilman 13-01-2011 18:00

Re: How should we wire the photoswitchs?
 
i am finding the same problem. i have no idea how to set this up and i have teammates wanting to start toying around with thte code. if any one can help out please do. im not one to toy around and try new connections because last time i did that i kind of blew our camera.

Liu_yiang 13-01-2011 18:38

Re: How should we wire the photoswitchs?
 
Hey Amanda, here's how I ended up getting it working:

Take the signal wire from the switch (it's gonna be white or black) and connect it to the white part of a PWM cable, then plug it into the Digital I/O like any other switch.

The brown wire should go to the red opening of the power distribution board.

The blue wire should go to the black opening of the power distribution board.

Put a 20 amp breaker (Might be 30, I'm not sure) in the slot above where you plugged it in, and off you go!

So you know: When the black wire from the switch is connected, it means there'll be a "true" reading when it's on a black surface. It'll turn "false" when it goes onto the surface or another lighter source.

Al Skierkiewicz 13-01-2011 18:59

Re: How should we wire the photoswitchs?
 
Liu,
The WAGO terminals really don't do well on small wire. It is best to splice to #18 and use that to insert into the PD. Use a 20 amps please.

caffel 13-01-2011 21:54

Re: How should we wire the photoswitchs?
 
Success !
Runs good.
Thanks in part to Al S. and Tem1514's direct and succinct answers.

I like the simplicity of the 12 supply, but the one problem that we had during our evening of testing turned out to be due to supply voltage drop as the battery went down. For a while we thought that we had broken the sensor.
The unit draws from 11 ma to 50 ma in our tests.
Since we have no plans (yet) for them after autonomous, I've decided to hold off on devising extreme measures to stabilize their supply voltage.

Still toying with a stratagem that says if three's good then five's better.

Al Skierkiewicz 13-01-2011 22:15

Re: How should we wire the photoswitchs?
 
Charlie,
Were you using the robot battery or some other 12 volt source? Did you happen to measure the battery when you started to experience problems? Were there any changes in the LEDs on the photoswitch?

Alan Anderson 14-01-2011 00:02

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Al Skierkiewicz (Post 999389)
Liu,
The WAGO terminals really don't do well on small wire. It is best to splice to #18 and use that to insert into the PD.

If you don't feel confident in your splicing ability, you can use a section of the BM-M092CS terminal blocks that came in the Kit of Parts instead.

Tem1514 Mentor 14-01-2011 09:01

Re: How should we wire the photoswitchs?
 
Since you have three of the sensors in the KOP the easy way to get power to them is by using the BM-M092CS terminal blocks that came in the Kit of Parts as Alan has indicated.

The wiring rules for the power distribution (PD) board state that only one wire may be inserted into the PD connector. But you are allowed to “splice” into power leads from the PD board to feed multiple custom devices like the sensors. This is where the terminal block will come in very handy. Just simply run a red (plus 12 volt) and black (negative) wire from the PD board down to the terminal block. At the terminal block daisy chain the power wires as needed to each of sensor(s). You may also use the terminal block to make the electrical connection from the sensor to the PWM cable.

This would make a nice neat installation, which would be easy to trace and trouble shot.

Hugh Meyer 14-01-2011 09:43

Re: How should we wire the photoswitchs?
 
1 Attachment(s)
Quote:

Originally Posted by Al Skierkiewicz (Post 998293)
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.

Al,

Attached is a graph showing battery voltage logged during a match. This is typical when everything is working correctly. It is worse if there are problems. The horizontal data is in 50 millisecond increments.

I would feel much better if there was some boost in that circuit. Please feel free to give this graph to Kate.

I have looked at a few regulators and most seem to cut off around this same voltage.

We were not using the 24 volt solenoid module. The sensor we had connected was low current, so we were within the current ability of the regulator.

According to the data sheet these line sensors draw 35 ma. With three sensors that will make a total draw of 105 ma. It should be interesting...I suspect it will be an issue. As you said we will just need to wait and see.

-Hugh

caffel 14-01-2011 13:30

Re: How should we wire the photoswitchs?
 
This is to Al S. and Hugh.
Thanks for keeping this idea alive.
In our tests we were using a FRC battery on a test robot. We did not pay any attention to the battery level at the beginning of the tests and immediately after the sensor started to work they blocked the wheels off the ground and started testing how the sensor code effected the drive motors (new loads).

Hugh has shown quite graphically that we may need stabilization. Our IR sensors start to fail at about 10v.
Hugh, do you have any graphs or history of current on that machine ?
What was the measurement point ? (CRIO's output of voltage I'm assuming)

Hugh Meyer 14-01-2011 14:25

Re: How should we wire the photoswitchs?
 
1 Attachment(s)
Quote:

Originally Posted by caffel (Post 999990)
This is to Al S. and Hugh.
Thanks for keeping this idea alive.
In our tests we were using a FRC battery on a test robot. We did not pay any attention to the battery level at the beginning of the tests and immediately after the sensor started to work they blocked the wheels off the ground and started testing how the sensor code effected the drive motors (new loads).

Hugh has shown quite graphically that we may need stabilization. Our IR sensors start to fail at about 10v.
Hugh, do you have any graphs or history of current on that machine ?
What was the measurement point ? (CRIO's output of voltage I'm assuming)

Hi Charlie,

The voltage is measured at the input to a Jaguar. Attached is the current from the same match. The current data is from the # 2 left motor in our drive train so this only shows one motor. I don't have current for the entire robot. This data is returned on the CAN bus, shipped to the driver station, then logged in a file by the dashboard software.

-Hugh

caffel 14-01-2011 14:49

Re: How should we wire the photoswitchs?
 
Thanks Hugh for the current history.

This seems typical to me and helps me with my current measurement theme with the kids (leading up to current management, I think).

The logical conclusion is that once noise is also taken into account, then we need another entire thread on how to power sensitive devices and which of our existing components are already being taken for granted.

Al Skierkiewicz 15-01-2011 01:06

Re: How should we wire the photoswitchs?
 
Hugh,
Your voltage graph is pretty typical of the kind of short duration spikes that occur on the robot. In our experience, the voltage falls actually much lower on occasion. It is not uncommon for it to go down to 4 volts at the input of a speed controller that is pulling a lot of current. It is a good reason to use #10 AWG for drive motors instead of #12 or #14 where the voltage drop across the wire is higher. I will check and see if I can find any data from the manufacturer on how low these sensors actually can operate.

Da Kid 15-01-2011 12:19

Re: How should we wire the photoswitchs?
 
What gauge wires should we use to connect the sensors to the power distribution board. and does it need to be the white wire or can you use the black and red wires also so i don't use up all of our pwm cables?

iambujo 15-01-2011 17:02

Re: How should we wire the photoswitchs?
 
So I worked with the students today to explore the sensor for wiring and sensitivity. Long story short I read this thread prior to attempting any wiring. When we looked at the the voltage at the DSC inputs with a DC volt meter, the sensor appears to sit at ~.7V for logic low and 3.99V for logic high.

Anyone else see this? I honestly don't know if this is expected. With the pull-up built into the DSC I wouldn't have expected so much voltage drop for the high.

At first I assumed we would have to build a circuit for pull-up/pull-down, but after reading the thread about the open collector and DSC built in pull-up I followed the logic. (the data sheet that wasn't too descriptive)

So, does .7 and 4V make sense? Are they within the tolerances for digital high and digital low in the DSC and cRIO? I am assuming if we had been able to sync up with software today they would have just been able to use the VI and be on their merry way. But we probed the values, and then got to thinking. And then that took us on tangents. :)

Thanks!

Al Skierkiewicz 16-01-2011 16:00

Re: How should we wire the photoswitchs?
 
Iam,
Those numbers are normal for this device. The switching on the DSC will operate with those levels.

Al Skierkiewicz 16-01-2011 16:07

Re: How should we wire the photoswitchs?
 
Hugh,
Could you try wiring an electrolytic cap across the power input to the photoswitch? Say 500mmfd? As of now this is an illegal addition, but if it works, we may be able to get the rules changed. Let me know if you are someone else has tried it and the mod works.

kstl99 16-01-2011 22:04

Re: How should we wire the photoswitchs?
 
I have two questions. Our three sensors were powered with the black and white wires tied together. Can this destroy them? One does not seem to work properly.

After this error was found we bench tested two of them. We hooked one lead of a digital multimeter and the sensor's brown wire to +12 from the PDB. The sensor's blue wire was connected to the - of the PDB. The other lead of the meter was connected to the sensor's black wire. One showed +12 when the sensor saw or did not see the target although the indicator lights reacted, apparently bad. The second sensor we tested went from +12 to a reading of about 3 volts that drifted up to about 8 volts. Could the second one's strange reading be a result of using the meter as a load? We will test it on the sidecar tomorrow but I am curious about the reading.

Alan Anderson 17-01-2011 01:18

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by kstl99 (Post 1001484)
I have two questions. Our three sensors were powered with the black and white wires tied together. Can this destroy them?

This should not have caused any damage. Since one output is switched to ground when the sensor is active, and the other output is switched to ground when the sensor is inactive, the combined wires would always have been grounded. Fortunately, grounding an NPN output has no lasting effects.

Quote:

After this error was found we bench tested two of them. We hooked one lead of a digital multimeter and the sensor's brown wire to +12 from the PDB. The sensor's blue wire was connected to the - of the PDB. The other lead of the meter was connected to the sensor's black wire. One showed +12 when the sensor saw or did not see the target although the indicator lights reacted, apparently bad. The second sensor we tested went from +12 to a reading of about 3 volts that drifted up to about 8 volts. Could the second one's strange reading be a result of using the meter as a load? We will test it on the sidecar tomorrow but I am curious about the reading.
Did you have anything else connected to the sensor's output? The black and white wires do not supply current; they can only sink it. The voltage will read zero when the output is active. However, without a pullup resistor (which the Digital Sidecar pins provide), the signal will float to an indeterminate voltage when inactive.

Al Skierkiewicz 17-01-2011 07:39

Re: How should we wire the photoswitchs?
 
I agree with Alan that there should have been no damage to the sensor outputs. I would recommend you retest the sensors but instead use the ohm meter function and measure between the blue wire and the outputs. When triggered, this should measure low resistance and when not triggered it should measure high resistance. If they do not match the changes indicated by the LEDs on the sensor then they are defective.

Jon236 17-01-2011 08:02

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1000480)
Hugh,
Your voltage graph is pretty typical of the kind of short duration spikes that occur on the robot. In our experience, the voltage falls actually much lower on occasion. It is not uncommon for it to go down to 4 volts at the input of a speed controller that is pulling a lot of current. It is a good reason to use #10 AWG for drive motors instead of #12 or #14 where the voltage drop across the wire is higher. I will check and see if I can find any data from the manufacturer on how low these sensors actually can operate.

Al,

The supply voltage requirements are 10.7 v to 30 v; hence the performance fluctuations with PDB output when the motors are running under load. Our team posted a question as to whether the rules can be changed to allow use of the regulated 12 v (or 24 v) outputs.

Al Skierkiewicz 17-01-2011 08:04

Re: How should we wire the photoswitchs?
 
Jon,
All I can tell you is that we are in the early stages of discussing the problem at this point. More to follow.

spooncwru 17-01-2011 08:27

Re: How should we wire the photoswitchs?
 
We connected the brown and blue wires to the 12V out on the PD board and the black and white wires (in turn) to the DSC with no results. The voltage output from the sensor is 0.38V for off and 0.76V for on (or vice versa, depending on which wire you use), and doesn't seem to be a big enough difference for the DSC to distinguish.

What we're going to try next is to pull in a relay when the load shifts that will send the 5V supply from the DSC back to the 5V signal. I'll post an update if this works.

Al Skierkiewicz 17-01-2011 08:31

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by spooncwru (Post 1001772)
We connected the brown and blue wires to the 12V out on the PD board and the black and white wires (in turn) to the DSC with no results. The voltage output from the sensor is 0.38V for off and 0.76V for on (or vice versa, depending on which wire you use), and doesn't seem to be a big enough difference for the DSC to distinguish.

What we're going to try next is to pull in a relay when the load shifts that will send the 5V supply from the DSC back to the 5V signal. I'll post an update if this works.

I have to ask, did you connect the sensor output to a signal input on the DSC? If the robot is powered on and the sensor connection at the DSC is removed, does the pin read 5 volts? If it does not, you may not have power feeding the DSC, you may not be on an input pin, or you may have a wiring error.

spooncwru 17-01-2011 09:29

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1001776)
I have to ask, did you connect the sensor output to a signal input on the DSC? If the robot is powered on and the sensor connection at the DSC is removed, does the pin read 5 volts? If it does not, you may not have power feeding the DSC, you may not be on an input pin, or you may have a wiring error.

It's a great question, those things should always be checked first. We connected the sensor output to the DIO signal input of the DSC. The DSC has 12V power (verified). We didn't verify the 5V from the power pin of the DIO breakout, but we will tonight. For what it's worth, we're running several speed controllers and servos from that DSC, so we didn't think about checking the DIO power.

Thanks for the feedback!

Sean

Al Skierkiewicz 17-01-2011 12:03

Re: How should we wire the photoswitchs?
 
Sean,
The DSC is just a pass through for the DIO module NI9403 but does contain pullup resistors on each line. However, the individual lines are configurable as either input or output in Crio software. i.e. you have to configure as input to receive data. If configured as an output, and the output is low, you may measure the values you stated above. The 9403 is a TTL I/O.

This is from the 9403 data sheet.

Input Voltage –0.25 to 5.25 V

High, VIH 2.2 V min

Low, VIL 0.8 V max

Hysteresis, VH 0.2 V min

lu190034052 17-01-2011 14:18

Re: How should we wire the photoswitchs?
 
could i connect all of the 3 wires(brown, blue, black/white) into the sidecar? which means use the whole pwm cable instead of connect the power wires to the PDB. And how can i check if the signal is back? if there a basic labview VI to check it?

Al Skierkiewicz 17-01-2011 15:18

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by lu190034052 (Post 1002022)
could i connect all of the 3 wires(brown, blue, black/white) into the sidecar? which means use the whole pwm cable instead of connect the power wires to the PDB. And how can i check if the signal is back? if there a basic labview VI to check it?

No,
The sensor requires 12 volts and the DSC will only give you 5 volts at the PWM connector array. If you choose to use PWM cable to connect signals to the DSC, I recommend you snip the red wire (+5 volts) at the cable mounted PWM cable connector, pull the wire back an inch up the ribbon and cut it off. Better still is to remove the +5 pin in the cable mounted PWM connector and pull the wire back an inch and cut it off.

Matt Krass 17-01-2011 17:49

Re: How should we wire the photoswitchs?
 
In lieu of the general confusion there seems to be (or has been) with the way the NPN output on the photoswitch works with the digital side car, I thought this little guide I wrote a while ago may be of some help.

http://www.mattkrass.com/?page_id=763

It explains the use of pull-up resistors (such as used in the digital side car) with sensor outputs like this, as well as pull-down resistors for other uses. While not very specific to this situation, I hope it can be of some help.

If there is interest I can expand on this material and write up a whitepaper on Digital I/O as a primer for teams.

Al Skierkiewicz 18-01-2011 07:17

Re: How should we wire the photoswitchs?
 
Matt,
Nice tutorial. It should be of use to anyone who is wondering what pullup resistors do and what logic levels are needed to for the DSC.

PhilBot 19-01-2011 21:56

Re: How should we wire the photoswitchs?
 
Since I have now sucessfully got the Auto Mode line tracker working I thought I'd just clarify one thing...
We know there are two outputs fom the sensor Normally Open (Black) and Normally Closed (White).

I've found that the Sample Auto code that comes with the Robot template assumes a Normally Closed input, so if possible, wire the sensor's White wire to the White PWM wire (makes sense in hindsight).

If you connect the Black wire instead, then the logic in the sample program is inverted and there is no way for it to track. In my case, this is what I had, so I just inverted the logic inside the code and it works fine.

So:

Sensor Brown +12V
Sensor Blue 0V (GND)
Sensor White PWM White to DSC
Sensor Black No Connect.

Phil.

I also verified that the Flashing Orange LED means you have an output connected to a power source (in my case the PWM cable was offset by one pin and incorrectly connected to the +5V pin instead of the input pin). Smart little sensors those.

jsasaki 20-01-2011 00:07

Re: How should we wire the photoswitchs?
 
does this mean the black cable doesnt get connected to the dsc?:confused:

PhilBot 20-01-2011 09:44

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by jsasaki (Post 1004035)
does this mean the black cable doesnt get connected to the dsc?:confused:

The Black and the White wire provide the same information, just with opposite logic. When one is on, the other is always off.

No point connecting both.

Note: The colors were NOT chosen to be compatible with FIRST robots, so don't assume that black is GND. It's NOT !!!

JDM 21-01-2011 08:18

Re: How should we wire the photoswitchs?
 
The sensors have 22AWG wire, but they must be connected to a 20-amp circuit on the PDB. By the rules, this requires 18AWG wire. Is there an exemption somewhere I am missing?

If not, I will bring this to the Q&A later today.

Jon236 21-01-2011 08:40

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by JDM (Post 1004864)
The sensors have 22AWG wire, but they must be connected to a 20-amp circuit on the PDB. By the rules, this requires 18AWG wire. Is there an exemption somewhere I am missing?

If not, I will bring this to the Q&A later today.


If you splice the sensor power leads or use a connection block, they will need to connect to 18 AWG before terminating in the PDB. That will satisfy the wiring rules.

Alan Anderson 21-01-2011 10:26

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by JDM (Post 1004864)
The sensors have 22AWG wire, but they must be connected to a 20-amp circuit on the PDB. By the rules, this requires 18AWG wire. Is there an exemption somewhere I am missing?

If not, I will bring this to the Q&A later today.

There's no explicit exemption. Sensors and custom circuits are typically not given as much scrutiny by the inspectors as are motor and relay power circuits, so they usually pass inspection even though they don't strictly follow the wire gauge rules, but you're right to be concerned.

A couple of years ago we used a small-valued inline fuse on a power branch that was going to a single Banner sensor (very much like the photoswitches in the Kit this year). That practice is mentioned in the wiring rules for custom circuits.

DFZXA 21-01-2011 11:18

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by andreboos (Post 997639)
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.

Did you ever fix the alternating orange and yellow alternating lights? We have two sensors working properly just one does this weird alternating thing

Alan Anderson 21-01-2011 11:30

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by DFZXA (Post 1004964)
Did you ever fix the alternating orange and yellow alternating lights? We have two sensors working properly just one does this weird alternating thing

Yes, he did.

tommy0019 21-01-2011 15:28

Re: How should we wire the photoswitchs?
 
we are trying to get our line sensors to work. we have it wired as:

sensor blue- 0v
Sensor brown- +12v
Sensor white- white pwm to signal pin on digital i/o section of the DSC.
sensor black- nothing

we were trying to run the autonomous mode from a new robot code project and it only runs a pre-programmed drive and doesn't respond to the sensors. then we put a jumper on the 2 power pins for the digital i/o side and when we enabled the autonomous mode nothing happened at all.

a note: our sensors are showing green when not by anything and orange and red when over the reflective tape. i heard the red meant it was over it's threshhold. what threshhold is that and is it fixed with the sensitivity knob or not?

I am asking if anyone could give any advice so we can get our line sensors working correctly.

Mark McLeod 21-01-2011 15:35

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by tommy0019 (Post 1005112)
then we put a jumper on the 2 power pins for the digital i/o side...

The Digital I/O side doesn't have 2 power pins or use jumpers.

Could you be connecting them to the PWM side (all white connectors)?

tommy0019 21-01-2011 16:04

Re: How should we wire the photoswitchs?
 
The side of the DSC that is labeled Digital i/o has 14 sets of 3 pins(sig, pwr, -) we have the sensors connected as so all with the white pwm cables.

right to digital i/o 3
center to digital i/o 2
left to digital i/o 1

There is a set of two pins right next to those 14 that are labeled pwr and (-). i am guessing that they supply power to the digital i/o pins. we put a volt meter on the pins and the supplied power when the jumper was connected.

Mark McLeod 21-01-2011 16:11

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by tommy0019 (Post 1005139)
There is a set of two pins right next to those 14 that are labeled pwr and (-). i am guessing that they supply power to the digital i/o pins. we put a volt meter on the pins and the supplied power when the jumper was connected.

Those pins are only an extra ground/5v set for devices that just need power.
Do not use a jumper to short those.

The Digital I/O was shorted out by that...

tommy0019 21-01-2011 16:15

Re: How should we wire the photoswitchs?
 
those are the correct place to put them, right(without the jumper)?

do you have any ideas as to why our robot isn't responding to the sensors?

DFZXA 21-01-2011 16:25

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Alan Anderson (Post 1004969)
Yes, he did.

So what'd he do then? Our robot just turns randomly in a cricle when we start the program and I'm not sure if this is the problem.

Mark McLeod 21-01-2011 16:27

Re: How should we wire the photoswitchs?
 
The digital signal inputs sound good, as well as, the rest of the wiring.
The jumper would have disabled all the digital inputs while it was in place, but they should start working again after it's taken off.
It also sounds like the sensors are working just fine too.

I'd look at the code next.

Which edition of the Framework are you using?
Since there are two that do different things it may just be that you have the one that just drives rather than the one that follows a line.

If you use the Run button on Robot Main.vi in LabVIEW (assuming LabVIEW) you can probe the values coming back from the sensors.

tommy0019 21-01-2011 16:34

Re: How should we wire the photoswitchs?
 
We used the robot framework with game code.

Alan Anderson 21-01-2011 16:39

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by tommy0019 (Post 1005145)
those are the correct place to put them, right(without the jumper)?

It sounds like you put the sensor input on the right pins.

Quote:

do you have any ideas as to why our robot isn't responding to the sensors?
It might be a programming issue. Do you see the inputs changing on the Dashboard display when the sensors activate?

tommy0019 21-01-2011 16:59

Re: How should we wire the photoswitchs?
 
Yes, the gpio state on the dashboard slot 4 changes when the sesor is over the tape. we just created a whole new robot project with the "robot framework with game code" and it did a pre progammed drive. then we did it it just the "robot framework" and it just did nothing at all.

be back tomorrow. i have to go play in a bsketball game now.

riptide 21-01-2011 18:28

Re: How should we wire the photoswitchs?
 
Brown +
Blue -
White (sig) to digital side car
Black nothing

If the Sensor is Green: Sensor is powered, but is to far away to sense. no output on blk or wht.

If sensor is Orange: ON sensor is recieving at least 2.5 times the signal strength needed to trigger and output and green will turn off. May have to adjust the sensitivity adjustment on top of the sensor to get an orange on if already mounted. Do this by placing over reflective surface and adjust until it comes on. Sensitivity is the screw on top. If orange is not on there will be no output on blk or wht.

If sensor is Yellow: the output has been energized meaning it sensed reflective object. becareful most bright objects can be sensed regardless of color.

Typical sensor indication is the following
Green OFF, Orange ON, Yellow OFF over dull surface wht low and blk high
Green OFF, Orange ON and Yellow ON over bright surface wht high and blk low

Hope this helps

DFZXA 21-01-2011 22:06

Re: How should we wire the photoswitchs?
 
Does that make alternating orange and yellow does that mean that sensor is going on and off or what?

Alan Anderson 22-01-2011 00:10

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by DFZXA (Post 1005384)
Does that make alternating orange and yellow does that mean that sensor is going on and off or what?

Pay attention. It means that you have probably miswired one of the outputs to a power pin.

riptide 22-01-2011 07:12

Re: How should we wire the photoswitchs?
 
If you have a flashing LED, the sensor has gone in to short circuit protection mode becasue one of the outputs is shorted to ground or it is not wired up correctly. Make sure the black wire is not connected ianything. Make sure the white is connected to the signal pin on the digital side car pwm input and not the + or -. Best way to prevent the shorting out of the black wire is to clip the stripped wire and then wrap it with electrical tape. Inspect the sensor cable for any nicks. I will try and post a quick video by the end of today to show how it works and how to connect it.

DFZXA 23-01-2011 02:06

Re: How should we wire the photoswitchs?
 
Thanks for the help guys. Turns out that one of our wires was not fully connected

rsisk 23-01-2011 23:59

Re: How should we wire the photoswitchs?
 
Brown + (connected to red power connector on PDB)
Blue - (connected to black power connector on PDB)
White to the white wire of a PWM connected to the digital side car
Black nothing

The green LED is on.

No matter where we place the sensor in relation to the gaffer tape, and no matter how we turn the adjustment screw, we never see an orange LED on the sensor.

I've read all the posts in the thread and I think I am doing everything right. Not sure what to try next. Any ideas would be appreciated.

Thanks

Al Skierkiewicz 24-01-2011 07:40

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by rsisk (Post 1006971)
we never see an orange LED on the sensor.
Thanks

That is a good thing. Orange means short circuit protection is coming on. It is possible that you have a defective yellow LED. Check by measuring the white pin as it enters the DSC. It should normally be 5 volts. If not, you may have not powered the DSC. All three LEDs on the DSC need to be on and bright. Have you checked the black output of the sensor?

PhilBot 24-01-2011 08:51

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by rsisk (Post 1006971)
Brown + (connected to red power connector on PDB)
Blue - (connected to black power connector on PDB)
White to the white wire of a PWM connected to the digital side car
Black nothing

The green LED is on.

No matter where we place the sensor in relation to the gaffer tape, and no matter how we turn the adjustment screw, we never see an orange LED on the sensor.

Based on your description, it would appear that the sensor is bad. With just the brown and blue wired you should be able to get the orange light to come on by spinning the adjustment screw.

My question is: have you tried the other two sensors? One bad sensor is possible, two bad sensors is highly unlikely. Just hook up Brown and Blue and mount them looking down. Ensure the lights change before hooking up the white.

rsisk 24-01-2011 10:41

Re: How should we wire the photoswitchs?
 
Thanks Al and Phil,

My next access to the robot will be Wednesday, will check out both of your suggestions.

koo_04 26-01-2011 23:06

Re: How should we wire the photoswitchs?
 
Okay, so I am here with rsisk. When we got to the robot and turned it on, poof! The sensors were giving me an orange light, then went green with distance. Like it is supposed to. After being excited and happy. I notice that after a power restart of the robot, they stopped going orange. Any ideas or reasons why? Nothing had changed from the previous weekend when we first wired them up and nothing changed after giving it that power restart. I am completely stumped on what is going on. No shorts, no PWM connections. Just the power is hooked up.

Al Skierkiewicz 26-01-2011 23:38

Re: How should we wire the photoswitchs?
 
Anyone notice in Team update 5 this addition?
<R60> Solenoid Breakout outputs shall be connected to pneumatic valve solenoids or photoelectric sensors, PN 42EF-D1MNAK-A2 only. No other devices shall be connected to these outputs.
Thanks to some of the discussion here, it was noted that sagging batteries would cause a brown out condition on the sensors. R60 now allows a team to add a 9472 solenoid module connected to the +24 volt output of the PD to power the line following sensors with a regulated +24 volts. Thank You FIRST Engineering for the great find and fix.

PhilBot 26-01-2011 23:46

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by koo_04 (Post 1009383)
Okay, so I am here with rsisk. When we got to the robot and turned it on, poof! The sensors were giving me an orange light, then went green with distance. Like it is supposed to. After being excited and happy. I notice that after a power restart of the robot, they stopped going orange. Any ideas or reasons why? Nothing had changed from the previous weekend when we first wired them up and nothing changed after giving it that power restart. I am completely stumped on what is going on. No shorts, no PWM connections. Just the power is hooked up.

Did you calibrate the sensors? If not, maybe it's just changing light conditions or where you have the robot located.

Calibrate the sensors on an appropriate section of floor after putting in fresh batteries.

koo_04 27-01-2011 15:03

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by PhilBot (Post 1009416)
Did you calibrate the sensors? If not, maybe it's just changing light conditions or where you have the robot located.

Calibrate the sensors on an appropriate section of floor after putting in fresh batteries.

I would expect that the light condition shouldn't matter. These are very sensitive sensors. I am going to look into the post before this one. I think that might be the key.

koo_04 27-01-2011 15:06

Re: How should we wire the photoswitchs?
 
Quote:

Originally Posted by Al Skierkiewicz (Post 1009408)
Anyone notice in Team update 5 this addition?
<R60> Solenoid Breakout outputs shall be connected to pneumatic valve solenoids or photoelectric sensors, PN 42EF-D1MNAK-A2 only. No other devices shall be connected to these outputs.
Thanks to some of the discussion here, it was noted that sagging batteries would cause a brown out condition on the sensors. R60 now allows a team to add a 9472 solenoid module connected to the +24 volt output of the PD to power the line following sensors with a regulated +24 volts. Thank You FIRST Engineering for the great find and fix.

Thanks a ton! I will try this tonight. If it works, I will report back.

Al Skierkiewicz 27-01-2011 15:14

Re: How should we wire the photoswitchs?
 
In general light conditions should not matter since these have their own IR source, however, if your lighting conditions have a significant IR output or there are night vision security cameras, you may have a problem with ambient light.

rsisk 28-01-2011 22:42

Re: How should we wire the photoswitchs?
 
@Al and @Phil, just wanted to let you know we got the sensors working thanks to your inputs. It was mostly just a matter of getting them calibrated correctly.

wazcodez 29-01-2011 09:26

Re: How should we wire the photoswitchs?
 
I tried to run example code given by ni !

we had sensors lined up exactly as document, we ran the robot, and wheels were turning it in opposite direction !

and driver station gave an error

:: too many loops

another thing tht when when we put tape on the sensors they led changed the color !

robot was way too fast almost caused injury any idea how to slow it down ?

if u guys programed, can someone send me the code ... bec. i can't understand the example code provided to make changes

thanks

Al Skierkiewicz 29-01-2011 09:43

Re: How should we wire the photoswitchs?
 
Richard,
I will slide you over to the success column. Good luck!

PhilBot 29-01-2011 10:03

Re: How should we wire the photoswitchs?
 
First question...

How does the robot drive in teleop? Does it go in the correct directions forward/rev, turn etc. This must be correct before auto. What about speed? Our robot is pretty fast in teleop, but still very managable in Auto.

Next: How was the robot positioned when you started auto? Were the sensors on the line etc. If not, the robot WILL turn.

>>> another thing tht when when we put tape on the sensors they led changed the color !

The fact that this surprizes you means you have not read the instruction on how to calibrate them. THIS IS IMPORTANT. Find the small sheet of paper that came with them and read what the LED's mean. Until you adjust the sensitivity to be correct, they are worthless.



Quote:

Originally Posted by wazcodez (Post 1010951)
I tried to run example code given by ni !

we had sensors lined up exactly as document, we ran the robot, and wheels were turning it in opposite direction !

and driver station gave an error

:: too many loops

another thing tht when when we put tape on the sensors they led changed the color !

robot was way too fast almost caused injury any idea how to slow it down ?

if u guys programed, can someone send me the code ... bec. i can't understand the example code provided to make changes

thanks


CaptainKemp 29-01-2011 12:06

Re: How should we wire the photoswitchs?
 
Hey,

I have looked at all of the posts so far and I have checked and my wiring looks correct for my photoswitches but one of my sensors is flashing yellow and then orange over and over. I looked it up online and it said something about a teach mode. Can anyone help me out by telling me how to teach it or if that is not what is happening?

Thanks

Morton

PhilBot 29-01-2011 12:24

Re: How should we wire the photoswitchs?
 
Flashing orange means you have probably powered your signal wire by mistake.

You say "my wiring looks correct". How did you verify it? (Looking isn't enough with electrical). When you post for help, it's no use saying "I did everything correct". We all think that. You really need to say what steps you took to verify correct wiring. That way we can suggest the ones you didn't take.

eg: Did you try unplugging the PWM cable and leaving just the power connected? This would ENSURE that you are not accidentally powering the signal line. I suspect that the blinking wil stop if you do this, which means you may have plugged the PWM cable in incorrectly. It's easy to do with the DSC cable clamps. Tripple check it. Sensor's black wire goes to WHITE PWM wire, which goes to the inner most pin (furthest from the edge) of the DSC connector.


Quote:

Originally Posted by CaptainKemp (Post 1011029)
Hey,

I have looked at all of the posts so far and I have checked and my wiring looks correct for my photoswitches but one of my sensors is flashing yellow and then orange over and over. I looked it up online and it said something about a teach mode. Can anyone help me out by telling me how to teach it or if that is not what is happening?

Thanks

Morton


CaptainKemp 29-01-2011 12:50

Re: How should we wire the photoswitchs?
 
As many people would assumed, looking correct is not just looking at it. I re-did my wiring a couple times and tried many different I/O Ports to see if I was wiring the power into the signal as many other people have said this. Reposting an old problem would be silly and thats why I didn't. The signal is going to the signal pin on the Digital IO Board (the innermost pin). The power is the same for all of the photoswitches coming from the Power Distribution Board. The white wire from the photoswitch is connected to the white signal wire on the PWM.

I was wondering if people knew anything about the teach mode because I was trying to find the calibration screw and turned the front black piece. Now when I turn it on it is always flashing between the yellow and the orange lights.

Thanks,

Morton

wazcodez 29-01-2011 17:48

Re: How should we wire the photoswitchs?
 
Quote:

First question...

How does the robot drive in teleop? Does it go in the correct directions forward/rev, turn etc. This must be correct before auto. What about speed? Our robot is pretty fast in teleop, but still very managable in Auto.

Next: How was the robot positioned when you started auto? Were the sensors on the line etc. If not, the robot WILL turn.

>>> another thing tht when when we put tape on the sensors they led changed the color !

The fact that this surprizes you means you have not read the instruction on how to calibrate them. THIS IS IMPORTANT. Find the small sheet of paper that came with them and read what the LED's mean. Until you adjust the sensitivity to be correct, they are worthless.
1. we ran the robot it in atonoumus ...
2. robot runs perfectly on tele op
3. you can see led change color as shinig tape is provided (meaning calibrarted)
4. code was used from ni (default robot frame work)



^^^^^

1. if any one has made thier own code regarding line tracker.... can you please please provide us as we only have one guy doing programming and he is new to labview as well

Thanks Phil bot for your anwser

error :: too many loop for robot drive


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