Go to Post The problem is though, as long as the teams are allowed to work on their robots on Thursday, they will, and they'll never learn to finish it before the event. - sanddrag [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 23-02-2004, 08:25
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Exclamation Digital Inputs interfering with each other

Edit2: This problem has probably been solved, all you heroic problem solvers can go save some other team at the last moment.

Edit: When I say compressor in the below paragraph, I am talking about the pressure switch. Sorry for the bad writing, I guess it comes off as me saying the compressor is wired directly to the RC. This is not the case.

Basically, the title is my problem.

We have our digital inputs set up like this:
1: Right infrared sensor
2: Middle infrared sensor
3: Left infrared sensor

5: A little pressure switch (just installed)
6: Compressor pressure switch (was working)

Before we installed the little pressure switch, we were having problems, but it made them worse. Before, when the compressor switch was on (value=0), none of the infrared sensors would pick up anything. Once the compressor switch turned off (value=1), they would act normally. When we put on this little switch, things got worse. The compressor switch would still go on (value=0) and off (value=1) normally, but whenever the switch was pressed, it would cause rc_dig_in06 to change to 0, causing the compressor to turn on. rc_dig_in06 would operate in complete opposition to rc_dig_in05. So, in an effort to debug the problem, we moved the compressor switch to rc_dig_in10, while monitoring rc_dig_in06. When we put the compressor on the 10th one, it would continue to act in opposition of the switch, while rc_dig_in06 was acting quite normally, in that it was always 1, never changing (as it had nothing hooked up to it)

In summary, here is our wierdness:
1. rc_dig_in01 = rc_dig_in02 = rc_dig_in03 = 1 when the compressor is running, but act properly when it is off.
2. Compressor pressure switch = !little switch (that's a NOT operator). When compressor switch is moved to different input, problems persist.
3. When the switch is taken off, all is well (although problem #1 persists)


Our compressor pressure switch is wired so that we have the yellow and white wires (signal and middle of PWM cable) on one side, and the black wire on the other side. We never quite figured out how we were supposed to wire it, but that configuration seemed to be working fine.

Last edited by Bongle : 23-02-2004 at 09:31.
  #2   Spotlight this post!  
Unread 23-02-2004, 08:33
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: Digital Inputs interfering with each other

woh, dont run spikes on the digital in/outs! run them on the relays!
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #3   Spotlight this post!  
Unread 23-02-2004, 08:52
velocipenguin velocipenguin is offline
Registered User
#0246 (Overclocked)
Team Role: Programmer
 
Join Date: Feb 2004
Location: Boston, MA
Posts: 77
velocipenguin is on a distinguished road
Send a message via AIM to velocipenguin
Re: Digital Inputs interfering with each other

Quote:
Originally Posted by Bongle
Our compressor pressure switch is wired so that we have the yellow and white wires (signal and middle of PWM cable) on one side, and the black wire on the other side. We never quite figured out how we were supposed to wire it, but that configuration seemed to be working fine.
That won't work. The RC digital inputs have an internal pullup to 5 volts, so you need to connect switches between the signal and ground pins.
  #4   Spotlight this post!  
Unread 23-02-2004, 09:05
Kevin Karan's Avatar
Kevin Karan Kevin Karan is offline
Linux Guy
AKA: maxdamage
None #0174 (Arctic Warriors)
Team Role: Alumni
 
Join Date: Jan 2003
Location: Liverpool, NY
Posts: 141
Kevin Karan will become famous soon enoughKevin Karan will become famous soon enough
Send a message via AIM to Kevin Karan
Re: Digital Inputs interfering with each other

I wouldent be suprised if the entire problem was due to the huge power drain on your controler. You may have even damaged it. The way you power the pump is via a spike/relay. You wire the pump so its powered by the spike and then you wire a control wire to a relay output.
__________________
It isnt ALWAYS the programmers falt!
2004: Buckeye team website award
2002: Rutgers semi-finalists
2001: National semi-finalists
2001: Rutgers semi-finalists
1998: Manchester Rookie All-Star Award
  #5   Spotlight this post!  
Unread 23-02-2004, 09:13
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Digital Inputs interfering with each other

Quote:
Originally Posted by Kevin Karan
I wouldent be suprised if the entire problem was due to the huge power drain on your controler. You may have even damaged it. The way you power the pump is via a spike/relay. You wire the pump so its powered by the spike and then you wire a control wire to a relay output.
No, no. The compressor is powered properly, from the breaker panel. The pressure switch, that turns off at 115psi, and turns on at 95psi is wired to the RC. Then, a signal goes out the relay output to the spike.

In the interest of clarification, here is a simplified picture of our wiring


Not pictured: Breaker Panel, fuses, etc. Assume that the compressor receives it's power properly.


Edit:
Quote:
That won't work. The RC digital inputs have an internal pullup to 5 volts, so you need to connect switches between the signal and ground pins.
I'll pass that on. So we shouldn't have all three wires connected, only 2?

Last edited by Bongle : 23-02-2004 at 09:16.
  #6   Spotlight this post!  
Unread 23-02-2004, 09:17
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Digital Inputs interfering with each other

Im not sure what you might have wrong with your wiring - some things to check:

1. switches only need to be connected between the ground pin and the signal pin - the black and white wires on the pwm cables if thats what you are using which goto the outside pins on the 3 pin digital input connector. If you connect a switch across the red and black wires (+5V and Gnd) that would tend to make the whole digital input section wack out.

2. the IR sensors - are you talking about the banner sensors (yellow and black box with 4 wires) or the little 3 pin photodetector for tracking the beacon? The photodetectors dont goto the digital inputs - they must be used with interrupt because they pulse on and off when they see the beacon (low for 1 or 2mS and high for 9 or 8 mS) - they have to be on the interrupts pins so the transisition from H to L can be captured - if you have them on digital inputs and try to read them then sometimes you will see the H and sometimes you will see the L, even when it IS locked on the beacon.

3. carefully check all your wires and make sure a power wire is not loose in a terminal somewhere, and make sure someone didnt knock off a pwm wire to a spike and plug it in backwards.
  #7   Spotlight this post!  
Unread 23-02-2004, 09:25
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Digital Inputs interfering with each other

Quote:
Originally Posted by KenWittlief
Im not sure what you might have wrong with your wiring - some things to check:

1. switches only need to be connected between the ground pin and the signal pin - the black and white wires on the pwm cables if thats what you are using which goto the outside pins on the 3 pin digital input connector. If you connect a switch across the red and black wires (+5V and Gnd) that would tend to make the whole digital input section wack out.

2. the IR sensors - are you talking about the banner sensors (yellow and black box with 4 wires) or the little 3 pin photodetector for tracking the beacon? The photodetectors dont goto the digital inputs - they must be used with interrupt because they pulse on and off when they see the beacon (low for 1 or 2mS and high for 9 or 8 mS) - they have to be on the interrupts pins so the transisition from H to L can be captured - if you have them on digital inputs and try to read them then sometimes you will see the H and sometimes you will see the L, even when it IS locked on the beacon.

3. carefully check all your wires and make sure a power wire is not loose in a terminal somewhere, and make sure someone didnt knock off a pwm wire to a spike and plug it in backwards.
Thank you. That's awesome, we were plugging the compressor switch into all 3 at once (problem #1 ahoy!). For the IR sensors, I am talking about the black photodetectors. I wasn't aware that I had to use them with the interrupts, and it's a bit late now to change it. What I did is I made a little workaroud. I found that the sensor always knew when it was off, but knew about 50% of the time that it was on. So, I made some code that would 'remember' that it was recently on for about 7 cycles of the control loop. This actually works great, as long as the saudering on our photodetectors holds up. Thank you for all your help.

And I just re-read my original post, and it is perfectly forgiveable to believe that we had wired our compressor to our RC. Wow, I need a writing class.
  #8   Spotlight this post!  
Unread 23-02-2004, 09:48
KenWittlief KenWittlief is offline
.
no team
Team Role: Engineer
 
Join Date: Mar 2003
Location: Rochester, NY
Posts: 4,213
KenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond reputeKenWittlief has a reputation beyond repute
Re: Digital Inputs interfering with each other

ok now which pressure sensor are you using?

FIRST supplied you with two - one that is analog and has three wires coming out of it

and one that is simply a switch - it has two screws to attach terminals - this is the one you want for the digital inputs - if thats the one you are using I cant imagine how you attached three wires to it

no wait, there are some things I dont want to know :c)
  #9   Spotlight this post!  
Unread 23-02-2004, 11:18
Bongle's Avatar
Bongle Bongle is offline
Registered User
FRC #2702 (REBotics)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2002
Location: Waterloo
Posts: 1,069
Bongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond reputeBongle has a reputation beyond repute
Send a message via MSN to Bongle
Re: Digital Inputs interfering with each other

Quote:
Originally Posted by KenWittlief
ok now which pressure sensor are you using?

FIRST supplied you with two - one that is analog and has three wires coming out of it

and one that is simply a switch - it has two screws to attach terminals - this is the one you want for the digital inputs - if thats the one you are using I cant imagine how you attached three wires to it

no wait, there are some things I dont want to know :c)
Wow, your sig was either tailored to respond to my post, or that's kinda creepy.

We were using a switch with 3 terminals. It didn't look like the in-out part of the switch was deep enough to be analog (it may have been from some of the scrap electronics we have), but I guess that's part of the problem we have. On one hand, our robot is entirely student fabricated by monetary necessity, and will actually chinup easily and quickly, but electronically, it is quite basic. See whine below.

<whine subject='programming' tone='unhappy'>
The more I come on to this site, the more I realize that our school does not have a strong electronics team. I live 2 hours away from the team (I'm the programming mentor, and was the programmer last year), and it doesn't seem that anyone has been doing this type of research when I'm away. The programmer would program stuff, but nobody tried to hook up the photodetectors, nobody tried to figure out how to wire stuff to the RC, nobody thought about this stuff unless I was around. Oh well, maybe this year's seemingly inevitable weak autonomous mode, combined with last years non-existing autonomous mode will encourage more attention to be paid to the programming side of things.

I admit that I'm guilty of not knowing a thing about interrupts (and actually avoiding learning about them), but I've only been up to the robot 3 weekends over the build period (I've had swim meets on the other 2 weekends, and we didn't have a meeting on the first weekend, we were waiting for supplies), so I should definetely not be go-to guy on basically anything. Unfortunately, it appears next year will be even worse, as I won't be around to help (will have a school term for january-april), and there aren't many up-and-coming programmers to replace our graduating one this year.
</whine>

Edit: Ken, did you guys go to the Canadian Regional last year? I think we may have been allies on one of our first matches.

Last edited by Bongle : 23-02-2004 at 11:50.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Plez help me Wacko324 Control System 8 26-01-2004 20:24
digital inputs not valid just after initialization? WizardOfAz Programming 2 26-01-2004 13:21
How to access other Digital inputs on OI? DougHogg Electrical 2 12-03-2003 13:57
Serial Port and Custom Circuit Ryan Meador Programming 40 06-02-2003 11:34
Digital inputs, bandwith, errors? Micah Brodsky Programming 7 20-01-2003 16:08


All times are GMT -5. The time now is 05:46.

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