Go to Post Cue all the jokes about natural selection in the Darwin division - TDav540 [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-01-2011, 21:37
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Line Sensors

Our team is trying to wire up the line sensors and get them to work. My main question is how do you wire the line sensors? I have already tried looking at the other threads but I am awful with technical speak. I was wondering if anybody has found a diagram or made a diagram that very clearly shows how to wire these. Thank You for any and all help.
__________________
  #2   Spotlight this post!  
Unread 17-01-2011, 22:09
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 317
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
Re: Line Sensors

You should find 4 wires coming out of the line/light sensor cable. If you read the data sheet inside, you'll see what each wire is for. In short, you give it supply voltage and ground on the appropriate wires (black for ground, brown? for supply), and the other two wires give you a complimentary output on NPN transistors that works with the digital I/O pins on the digital sidecar. (Don't quote me on the wire colors, check that datasheet.)

That means you should see 01 or 10 for the light and dark conditions (which is which depends on how you plug them into the sidecar, and how you write your program). If you ever see 00 or 11 you've got a fault of some sort. You should be able to do the entire hook up with 2 of the many 3 wire cables that came in the kit, a soldering iron, and some heat shrink tubing.
__________________

2013 Alamo Regional Woodie Flowers Finalist Award Winner
2012 Texas Robot Roundup Volunteer of the Year
Texas Robot Roundup Planning Committee, 2012-present
FRC 6357 Mentor, 2016-
FRC 2789 Mentor, 2009-2016 -- 2 Golds, 2 Silvers, 8 Regional Elimination Appearances

FRC 41 Mentor 2007-2009
FLL Mentor 2006
FRC 619 Mentor 2002
FRC 41 Student 1998-2000

Last edited by jee7s : 17-01-2011 at 22:19. Reason: grammar, corrected colors
  #3   Spotlight this post!  
Unread 17-01-2011, 23:30
KHall KHall is offline
KHall - 2171 Crown Point IN
FRC #2171 (RoboDogs)
Team Role: Mentor
 
Join Date: Mar 2008
Rookie Year: 2008
Location: Crown Point IN
Posts: 67
KHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud ofKHall has much to be proud of
Re: Line Sensors

The sensors we received in our KOP actually have the wiring diagram printed on the back of each sensor. On ours, Blue and Brown go to the 12V PDB. Black and white are signal. Found out that if you hook up the power wires backwards, it doesn't hurt the sensor, it just does not work.

Connect the white and black wires to a DIO port on the sidecar. Each sensor acts like a simple switch. As a switch, the signal wires must connect to the outside two pins of a DIO port. (One sensor per DIO port). And since it is just a switch (on / off ) it doesn't matter which color (black or white) goes to which of the two pins on the DIO port.

That's it -- no resistors, transistors or anything else are needed. We bench tested this yesterday with an additional six feet of copper wire and it worked fine. We next need to test it under different lighting conditions to see what, if anything, might be needed or helpful to increase range and reliability.

One last thought. I've seen some talk about connecting cables to reduce overall wiring. If you take that path, be sure to leave yourself some way to quickly replace a sensor in case of accidental damage. Just remember, old Murphy is always sitting in the first row at every regional event. Yep, Murphy is a big fan of FRC.

Have fun!

KHall
  #4   Spotlight this post!  
Unread 18-01-2011, 05:40
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: Line Sensors

Quote:
Originally Posted by KHall View Post
Connect the white and black wires to a DIO port on the sidecar. Each sensor acts like a simple switch. As a switch, the signal wires must connect to the outside two pins of a DIO port. (One sensor per DIO port). And since it is just a switch (on / off ) it doesn't matter which color (black or white) goes to which of the two pins on the DIO port.
We found that since the two signal wires (white and black) are just logically oposite that only wiring one was required. Just be sure you keep it consistent between the sensors you used otherwise your code will be more difficult to follow.

In our initial tests yesterday we tracked white masking tape on a grey floor and later duct tape on a white floor so between those we had to adjust our code to flip the value we got since the contrast was backwards.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
  #5   Spotlight this post!  
Unread 18-01-2011, 08:29
dmitch's Avatar
dmitch dmitch is offline
Chief Head Electrical Guy
AKA: Daniel Mitchell
FRC #1997 (Stag Robotics)
Team Role: Programmer
 
Join Date: Feb 2010
Rookie Year: 2010
Location: Bishop Miege High School
Posts: 142
dmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the roughdmitch is a jewel in the rough
Re: Line Sensors

Ok thanks for these they are all really helpful and good luck to your teams!
__________________
  #6   Spotlight this post!  
Unread 18-01-2011, 10:10
JohnHorton's Avatar
JohnHorton JohnHorton is offline
Shock Test Dummy
FRC #1100 (Tomahawks)
Team Role: Electrical
 
Join Date: Nov 2010
Rookie Year: 2003
Location: Worcester, MA
Posts: 21
JohnHorton will become famous soon enough
Re: Line Sensors

We also found that the voltage swing in ours was not enough to swing the DIO port, as the white wire went from 0.4v to 0.7v. To fix this, we just boosted it with a power line to the white wire terminal through a 150k resistor. So, assuming the blue and brown wires are already connected to 12v, we ran the negative pin on the DIO to the negative (blue) wire, the PWR pin on the DIO through a 150k resistor and to the white wire, and the white wire returned to the Signal pin. It gave us far more consistent results. It could detect the retroreflective tape eight feet away.
__________________

The tall guy in the camouflage hat.
John Horton
  #7   Spotlight this post!  
Unread 18-01-2011, 10:30
wilsonmw04's Avatar
wilsonmw04 wilsonmw04 is offline
Coach
FRC #1086 (Blue Cheese)
Team Role: Teacher
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Midlothian, VA
Posts: 1,887
wilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond repute
Re: Line Sensors

Quote:
Originally Posted by JohnHorton View Post
It could detect the retroreflective tape eight feet away.
Why would you want it to do that? At 8 feet the cone of the beam would be far too wide to be useful wouldn't it? The lines on the floor are the normal white gaffers tape if I remember correctly. 2 inches seems to be more of a reasonable distance don't you think?
__________________
Currently: Coach FRC 1086/FTC 93
2006-2011 Coach FRC 2106/FTC 35
If you come to a FRC event to see a robot competition, you are missing the point.
  #8   Spotlight this post!  
Unread 18-01-2011, 10:43
JohnHorton's Avatar
JohnHorton JohnHorton is offline
Shock Test Dummy
FRC #1100 (Tomahawks)
Team Role: Electrical
 
Join Date: Nov 2010
Rookie Year: 2003
Location: Worcester, MA
Posts: 21
JohnHorton will become famous soon enough
Re: Line Sensors

Quote:
Originally Posted by wilsonmw04 View Post
Why would you want it to do that? At 8 feet the cone of the beam would be far too wide to be useful wouldn't it? The lines on the floor are the normal white gaffers tape if I remember correctly. 2 inches seems to be more of a reasonable distance don't you think?
Well, yeah, we aren't going to use it at eight feet, we'll be using it for the gaffer's tape. However, we all thought it was pretty cool that it could do that.
__________________

The tall guy in the camouflage hat.
John Horton
  #9   Spotlight this post!  
Unread 18-01-2011, 11:04
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Line Sensors

Quote:
Originally Posted by JohnHorton View Post
We also found that the voltage swing in ours was not enough to swing the DIO port, as the white wire went from 0.4v to 0.7v.
That suggests your Digital Sidecar is not functioning properly. What is the voltage on its signal pin when nothing is connected to it? It should be 5 volts. The resistor you've added just duplicates what the DS is supposed to have present already.

Quote:
It could detect the retroreflective tape eight feet away.
While that's impressive, it might confuse others reading this thread. Keep in mind that the gaffer's tape on the floor is not retroreflective.
  #10   Spotlight this post!  
Unread 18-01-2011, 11:10
wilsonmw04's Avatar
wilsonmw04 wilsonmw04 is offline
Coach
FRC #1086 (Blue Cheese)
Team Role: Teacher
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Midlothian, VA
Posts: 1,887
wilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond repute
Re: Line Sensors

Quote:
Originally Posted by JohnHorton View Post
Well, yeah, we aren't going to use it at eight feet, we'll be using it for the gaffer's tape. However, we all thought it was pretty cool that it could do that.
I guess the real question I have is why did you need the 150k resistor? We hooked ours up to a cardboard box on last years robot. We were able to see the signal without changing a thing. I would check your Sidecard to make sure it's working properly.
__________________
Currently: Coach FRC 1086/FTC 93
2006-2011 Coach FRC 2106/FTC 35
If you come to a FRC event to see a robot competition, you are missing the point.
  #11   Spotlight this post!  
Unread 18-01-2011, 11:39
Dale's Avatar
Dale Dale is offline
Head Coach & Mentor
AKA: Dale Yocum
FRC #1540 (Flaming Chickens)
Team Role: Coach
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Portland, OR
Posts: 504
Dale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud ofDale has much to be proud of
Re: Line Sensors

Just for the record the manual states the line on the floor is GRAY gaffer's tape. I'm suprised they didn't use white but there you have it.
__________________
2016 PNW Championship Chairman's; 2016 Winner Oregon City District, 2015 PNW Championship Chairman's; 2015 PNW District Engineering Inspiration; 2015 PNW District Finalist; 2014 PNW Championship Chairman's; 2014 Championship Innovation in Controls; 2013 Chairman's (Oregon); 2013 Finalist (OKC); 2012 Winner (OKC); 2012 Chairman's (OKC); 2012 Woody Flowers (Oregon); 2011 Volunteer of the Year (Oregon); 2011 Finalist & Captain (San Diego); 2011 Innovation in Control (San Diego); 2010 & 2007 Chairman's (Oregon); 2010 Regional Champions (Colorado); 2010 Innovation in Control (Colorado); 2009 & 2008 Engineering Inspiration (Oregon); 2008 Regional Champions (Oregon); 2007 Regional Finalist (Oregon); 2005 Rookie Inspiration (PNW)
  #12   Spotlight this post!  
Unread 19-01-2011, 07:40
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is online now
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,792
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Line Sensors

Quote:
Originally Posted by JohnHorton View Post
So, assuming the blue and brown wires are already connected to 12v, we ran the negative pin on the DIO to the negative (blue) wire, the PWR pin on the DIO through a 150k resistor and to the white wire, and the white wire returned to the Signal pin.
John,
I am thinking that the DSC is not receiving power from the PD. When the DSC is connected to the Crio module, but +12v is not applied from the PD, some of the power LEDs do come on through leakage in the module. They do not, however, provide a pullup voltage for digital inputs. The first indication of a problem here is the failure of the robot signal light.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #13   Spotlight this post!  
Unread 19-01-2011, 20:34
JohnHorton's Avatar
JohnHorton JohnHorton is offline
Shock Test Dummy
FRC #1100 (Tomahawks)
Team Role: Electrical
 
Join Date: Nov 2010
Rookie Year: 2003
Location: Worcester, MA
Posts: 21
JohnHorton will become famous soon enough
Re: Line Sensors

Quote:
Originally Posted by Al Skierkiewicz View Post
John,
I am thinking that the DSC is not receiving power from the PD. When the DSC is connected to the Crio module, but +12v is not applied from the PD, some of the power LEDs do come on through leakage in the module. They do not, however, provide a pullup voltage for digital inputs. The first indication of a problem here is the failure of the robot signal light.
Hm, interesting. This may be it, because when I powered it off a bench supply, the swing was 0 to 10v, and went to the .4-.7 swing once we had wired it to the 'bot. I'll have to go poke around with a tester tomorrow. Thanks!
__________________

The tall guy in the camouflage hat.
John Horton
  #14   Spotlight this post!  
Unread 20-01-2011, 00:30
jee7s jee7s is offline
Texan FIRSTer, ex-frc2789, ex-frc41
AKA: Jeffrey Erickson
FRC #6357
 
Join Date: Nov 2007
Rookie Year: 1997
Location: Dripping Springs, TX
Posts: 317
jee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond reputejee7s has a reputation beyond repute
Re: Line Sensors

Quote:
Originally Posted by jtdowney View Post
We found that since the two signal wires (white and black) are just logically oposite that only wiring one was required.
True, this will work to detect light and dark. But, remember there are three states: light, dark, and fault. For example, how would you tell between "logical high" and "the sensor isn't working"...they both would give you +V on the DIO pin.

Quote:
Originally Posted by Al Skierkiewicz View Post
...I am thinking that the DSC is not receiving power from the PD. When the DSC is connected to the Crio module, but +12v is not applied from the PD, some of the power LEDs do come on through leakage in the module. They do not, however, provide a pullup voltage for digital inputs. The first indication of a problem here is the failure of the robot signal light.
I'd say Al's on the money here. The DSC is deceptive, as it will light up when you plug it into the cRIO, but it's not fully functional. Make sure you're attached to the power distribution board via the DSC's wago connector, and check the +6V light on the DSC. If it isn't lit, you don't have pullup.

Also, I'd suspect that 0.4-0.7V observation was an artifact of the internals of the ADC and the NPN transistor that's driving the light sensor signal line.
__________________

2013 Alamo Regional Woodie Flowers Finalist Award Winner
2012 Texas Robot Roundup Volunteer of the Year
Texas Robot Roundup Planning Committee, 2012-present
FRC 6357 Mentor, 2016-
FRC 2789 Mentor, 2009-2016 -- 2 Golds, 2 Silvers, 8 Regional Elimination Appearances

FRC 41 Mentor 2007-2009
FLL Mentor 2006
FRC 619 Mentor 2002
FRC 41 Student 1998-2000

Last edited by jee7s : 20-01-2011 at 00:31. Reason: bad markup
  #15   Spotlight this post!  
Unread 20-01-2011, 08:57
jtdowney jtdowney is offline
Boiler Up
AKA: John Downey
FRC #4302 (Robophins)
Team Role: Mentor
 
Join Date: Sep 2006
Rookie Year: 2006
Location: Chicago
Posts: 300
jtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant futurejtdowney has a brilliant future
Re: Line Sensors

Quote:
Originally Posted by jee7s View Post
True, this will work to detect light and dark. But, remember there are three states: light, dark, and fault. For example, how would you tell between "logical high" and "the sensor isn't working"...they both would give you +V on the DIO pin.
Not something I had considered but a good point. I'll bring this up with the electrical/programming team and see what they want to do.
__________________
John Downey
Lead Robot Inspector - Purdue IndianaFIRST District
Whitney Young Magnet High School/Robophins (FRC 4302) - Mentor (2013-current)
Midwest Regional Planning Committee - Member (2012-current)
Boilermaker Regional Planning Committee - Member (2011-2014)
Robot Inspector (2008-current)
Purdue FIRST Programs - Staff Advisor (2008-2011)
Lafayette-Jefferson High School/Precision Guessworks (FRC 1646) - Mentor (2006-2011)
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 09:01.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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