![]() |
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. |
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. |
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!
|
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! |
Re: How should we wire the photoswitchs?
The Line sensors given to us in the KOP are model: 42EF-D1MNAK-a
|
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?
|
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. |
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. |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Oh, okay. That's why they gave us NPN then. Cool!
|
Re: How should we wire the photoswitchs?
Quote:
|
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. |
Re: How should we wire the photoswitchs?
Quote:
Quote:
Quote:
|
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.
|
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? |
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. |
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. |
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 |
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. |
Re: How should we wire the photoswitchs?
Quote:
Quote:
Quote:
Quote:
|
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 |
Re: How should we wire the photoswitchs?
Quote:
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. |-|-|-| |
Re: How should we wire the photoswitchs?
Quote:
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. |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Quote:
- Bryce |
Re: How should we wire the photoswitchs?
Quote:
I've seen good tutorials and training given by WPI, on the ThinkTank site, and by some teams. Greg McKaskle |
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. |
Re: How should we wire the photoswitchs?
Quote:
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. |
Re: How should we wire the photoswitchs?
Quote:
- Bryce |
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.
|
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.
|
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. |
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. |
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. |
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? |
Re: How should we wire the photoswitchs?
Quote:
|
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. |
Re: How should we wire the photoswitchs?
1 Attachment(s)
Quote:
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 |
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) |
Re: How should we wire the photoswitchs?
1 Attachment(s)
Quote:
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 |
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. |
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. |
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?
|
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! |
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. |
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. |
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. |
Re: How should we wire the photoswitchs?
Quote:
Quote:
|
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.
|
Re: How should we wire the photoswitchs?
Quote:
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. |
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. |
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. |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Quote:
Thanks for the feedback! Sean |
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 |
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?
|
Re: How should we wire the photoswitchs?
Quote:
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. |
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. |
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. |
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. |
Re: How should we wire the photoswitchs?
does this mean the black cable doesnt get connected to the dsc?:confused:
|
Re: How should we wire the photoswitchs?
Quote:
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 !!! |
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. |
Re: How should we wire the photoswitchs?
Quote:
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. |
Re: How should we wire the photoswitchs?
Quote:
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. |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Quote:
|
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. |
Re: How should we wire the photoswitchs?
Quote:
Could you be connecting them to the PWM side (all white connectors)? |
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. |
Re: How should we wire the photoswitchs?
Quote:
Do not use a jumper to short those. The Digital I/O was shorted out by that... |
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? |
Re: How should we wire the photoswitchs?
Quote:
|
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. |
Re: How should we wire the photoswitchs?
We used the robot framework with game code.
|
Re: How should we wire the photoswitchs?
Quote:
Quote:
|
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. |
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 |
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?
|
Re: How should we wire the photoswitchs?
Quote:
|
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.
|
Re: How should we wire the photoswitchs?
Thanks for the help guys. Turns out that one of our wires was not fully connected
|
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 |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Quote:
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. |
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. |
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.
|
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. |
Re: How should we wire the photoswitchs?
Quote:
Calibrate the sensors on an appropriate section of floor after putting in fresh batteries. |
Re: How should we wire the photoswitchs?
Quote:
|
Re: How should we wire the photoswitchs?
Quote:
|
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.
|
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.
|
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 |
Re: How should we wire the photoswitchs?
Richard,
I will slide you over to the success column. Good luck! |
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:
|
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 |
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:
|
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 |
Re: How should we wire the photoswitchs?
Quote:
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