Go to Post I never wanted to be a teacher. This was the year I learned that I am one. It turns out mentors are teachers. Oops. - marshall [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 31-01-2011, 13:41
shoffing's Avatar
shoffing shoffing is offline
WINriver C++
AKA: Steve Hoffing
FRC #1647
Team Role: Programmer
 
Join Date: Feb 2009
Rookie Year: 2008
Location: Shamong, New Jersey, America
Posts: 10
shoffing is an unknown quantity at this point
Re: Trackers Returning True All the Time

Thanks for the replies, we think we found the problem. We got voltage readings from the trackers and the results were surprising. I'm not 100% sure about the precise voltages, but I think they were giving us something like 0.35 volts when they were on the line, and 0.75 volts when they were off the line. The electrical lead tried to explain why this might be the problem, but it went right over my head. He hooked up a resistor to the simple circuit he had and the voltages then changed to 0.35 when they were on and 18 when they were off. We're hoping that the reason it wasn't working was because there was such a minor difference in voltage between the 2 states.

The one thing that really bugs me (as well as our electrical subteam) is that there wasn't a single bit of documentation stating that we might need a resistor to get the trackers to work. I looked through the programming forum, and from what it looks like we were the only team experiencing this problem. Are any of you guys using a resistor with your trackers? If so, how did you realize that you needed to?

I'll get back to you guys tonight after we see if this fixed it.
__________________
---
Team 1647's Software "thing" for 2011
Death-Spin autonomous mode is my favorite.
Reply With Quote
  #2   Spotlight this post!  
Unread 31-01-2011, 15:39
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Trackers Returning True All the Time

You shouldn't need a resistor unless you wired it incorrectly. The light sensor output is an open-collector. So if you connect it to a digital input channel which is internally pulled-up (i.e. it has a built-in resistor), it should just work.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 31-01-2011, 16:26
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,112
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: Trackers Returning True All the Time

Yeah, no resistor is necessary.

You said you declared them as Digital Inputs. Did you then have them connected to Digital Inputs on the Digital Sidecar? Only the signal wire should be used; the power and ground come from a 20A circuit on the Power Distribution board.

If you didn't connect them to the proper pins (e.g. miswiring them to the Digital Sidecar ground instead of signal), you wouldn't have been able to read their state. A disconnected Digital Input always reads as true.
Reply With Quote
  #4   Spotlight this post!  
Unread 31-01-2011, 18:06
kinganu123 kinganu123 is offline
Registered User
FRC #1747
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Piscataway, NJ
Posts: 243
kinganu123 is on a distinguished road
Re: Trackers Returning True All the Time

Quote:
Originally Posted by Alan Anderson View Post
You said you declared them as Digital Inputs. Did you then have them connected to Digital Inputs on the Digital Sidecar? Only the signal wire should be used; the power and ground come from a 20A circuit on the Power Distribution board.
Don't mean to thread steal, but I have an exact setup here. However, the line tracker flashes true and then stays false.
I have calibrated the sensors already.
Any suggestions?
__________________
Reply With Quote
  #5   Spotlight this post!  
Unread 18-03-2011, 16:14
AlDee AlDee is offline
Registered User
FRC #1099
 
Join Date: Mar 2011
Location: Connecticut
Posts: 31
AlDee is an unknown quantity at this point
Re: Trackers Returning True All the Time

Quote:
Originally Posted by shoffing View Post
Thanks for the replies, we think we found the problem. We got voltage readings from the trackers and the results were surprising. I'm not 100% sure about the precise voltages, but I think they were giving us something like 0.35 volts when they were on the line, and 0.75 volts when they were off the line. The electrical lead tried to explain why this might be the problem, but it went right over my head. He hooked up a resistor to the simple circuit he had and the voltages then changed to 0.35 when they were on and 18 when they were off. We're hoping that the reason it wasn't working was because there was such a minor difference in voltage between the 2 states.

The one thing that really bugs me (as well as our electrical subteam) is that there wasn't a single bit of documentation stating that we might need a resistor to get the trackers to work. I looked through the programming forum, and from what it looks like we were the only team experiencing this problem. Are any of you guys using a resistor with your trackers? If so, how did you realize that you needed to?

I'll get back to you guys tonight after we see if this fixed it.
Sounds like your wiring is off. I will try to explain in simple terms.

The signal output pin of the sensor is a transistor used as a switch which effectively connects the pin to ground. Under normal circumstances, it would require a "pullup" resistor to a positive voltage so that it can pull down to ground when it is activated. (Does that make sense? In Active state it pulls the signal to ground, in off state the resistor would pull the signal to positive.)

As I've learned from poking around this forum, the digital side car doesn't need a pullup because it has this functionality built in. Just connect the signal directly to the signal input on the digital sidecar.

Now the fact that your reading 18V troubles me. I'm guessing you chose to use the 24V supply, and it sounds like your electrical lead chose to tie a pullup to the higher voltage. I'm not sure what the input signal limit is but a high voltage like that might cause damage. If you were going to use a pullup at all, it should be to the 5V, but it's not neccessary.

I agree, the wiring could have been better documented, But here is what I've gathered on the sensor wiring:

The sensors can either be powered by 12 or 24V. If 24, you need to go through a solenoid breakout, supply it from the 24V ouput, and then supply the sensor power through a solenoid output. (requires programming to turn on the sensors) Or you can splice the power lines together and feed them through a 20 amp breaker, just make sure battery voltage doesn't dip below 10.4V.

The signal outputs should each go to a Digital input on the sidecar, no pullup needed. Lastly, check the configuration of the digital inputs on the driver station. They can be configured to run pull-up, pull-down, or floating input. make sure the are set to pull-up.

I tested ours and the readings are .7V when it's on the tape, and 4.0 V when it's on the carpet.

Good Luck!
Reply With Quote
Reply


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 13:39.

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