Chief Delphi

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

Al Skierkiewicz 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.


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