Go to Post Don't worry about someone stealing your ideas...if they're good ideas, then imitation is the sincerest form of flattery. If they're lousy ideas, we'll let you know, so you can work on finding a better idea. win-win! - MrForbes [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 15-01-2008, 11:55
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
How to wire the IR on the RC?

Hi guys,

We're having a sirious problem with the IR:
We're wiring the wires of the colorful cable thingy to PWM pins, and we're connecting them to the RC to the digital in/out pins.
When we're connecting the PWMs to the digital in/out pins the ERORR light on the IR turns on and we're not able to use the IR.

I presume we're just not sure how to wire the wires of the colorful cable, but we haven't found any guides, except for one Edena Robotic's one on Youtube.

What do we do?

Thanks in advance,

Nir.
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
  #2   Spotlight this post!  
Unread 15-01-2008, 12:10
keen101's Avatar
keen101 keen101 is offline
Ubuntu Linux User
no team
Team Role: College Student
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Loveland, CO
Posts: 228
keen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the roughkeen101 is a jewel in the rough
Re: How to wire the IR on the RC?

I suspect that you after you wired the outputs to a PWM, you plugged the PWM in the "normal" way. You need to connect it in sideways in the signal row.


(I will try and get a picture of ours soon.)
  #3   Spotlight this post!  
Unread 15-01-2008, 16:34
kiettyyyy's Avatar
kiettyyyy kiettyyyy is offline
Registered User
FRC #1538 (The Holy Cows)
Team Role: Engineer
 
Join Date: Mar 2006
Rookie Year: 2005
Location: San Diego, CA
Posts: 181
kiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond reputekiettyyyy has a reputation beyond repute
Send a message via AIM to kiettyyyy
Re: How to wire the IR on the RC?

Hi there!

You should connect the IR board's output into the Digital I/O, and in your robot code, have a section for interpreting the signal, maybe something like what is shown below if your output is connected to Digital I/O #1.

Code:
if (rc_dig_in01)
{
    printf("Button one is pressed on IR\r\n");
}

Good luck
  #4   Spotlight this post!  
Unread 16-01-2008, 16:22
neutrino15's Avatar
neutrino15 neutrino15 is offline
plɹoʍ ollǝɥ
AKA: Jordan Perr
FRC #0694 (Stuypulse)
 
Join Date: Feb 2007
Rookie Year: 2007
Location: New York City
Posts: 162
neutrino15 is just really niceneutrino15 is just really niceneutrino15 is just really niceneutrino15 is just really nice
Re: How to wire the IR on the RC?

I don't know if this is because we tried on a vex controller, but when we set up the IR sensor, everything was inverted. So we got +voltage out of every pwm when there was no button press, and then when there was a button press, we had every input but the needed one drop in voltage to 0. I am startng to think that we have it miswired, but this is what the pwms look like (1 = +voltage, 0 = 0 voltage)

Code:
no button: 1111
1st button: 1000
2nd button: 0100
3rd button: 0010
4th button: 0001
The only thing about this is that you cant just go "If(digin1 == 1)" because they default to 1!! We just use a bunch of ands and checked for the pattern, but it seems odd that nobody else is reporting this. What is the way to properly wire it? Or do we have it the correct way?
  #5   Spotlight this post!  
Unread 16-01-2008, 16:30
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: How to wire the IR on the RC?

That's what you usually see when you use a separate battery to power the IR board. With two different batteries the grounds are not common and the signal pins stay high.

You could get around it with a check of all the pins, such as:
Code:
if (rc_dig_in13 == 0 || rc_dig_in14 == 0 || rc_dig_in15 == 0 || rc_dig_in16 == 0)
{
    if (rc_dig_in13 == 1)
    {
        //Drive away
    }
}
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 16-01-2008 at 16:34.
  #6   Spotlight this post!  
Unread 16-01-2008, 20:52
neutrino15's Avatar
neutrino15 neutrino15 is offline
plɹoʍ ollǝɥ
AKA: Jordan Perr
FRC #0694 (Stuypulse)
 
Join Date: Feb 2007
Rookie Year: 2007
Location: New York City
Posts: 162
neutrino15 is just really niceneutrino15 is just really niceneutrino15 is just really niceneutrino15 is just really nice
Re: How to wire the IR on the RC?

Ok, thanks for confirming that it isnt an error. And yeah, I was going to just do the suggested code.. Thought something was wrong!
  #7   Spotlight this post!  
Unread 16-01-2008, 21:19
Sykan's Avatar
Sykan Sykan is offline
Lead Programmer
AKA: David
FRC #0540 (Team 540)
Team Role: Engineer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Virginia
Posts: 24
Sykan is on a distinguished road
Re: How to wire the IR on the RC?

I was wondering, do you power the IR senor with the backup battery through the pwm outputs, or you have to wire them directly onto the E board with like a 20amp fuse. Also do you need to supply power to both positives and negatives or just one set of them to use the sensor?
  #8   Spotlight this post!  
Unread 16-01-2008, 21:23
nick1230's Avatar
nick1230 nick1230 is offline
Registered User
FRC #0888
 
Join Date: Dec 2007
Location: Maryland
Posts: 9
nick1230 is an unknown quantity at this point
Re: How to wire the IR on the RC?

Quote:
Originally Posted by Sykan View Post
I was wondering, do you power the IR senor with the backup battery through the pwm outputs, or you have to wire them directly onto the E board with like a 20amp fuse. Also do you need to supply power to both positives and negatives or just one set of them to use the sensor?
i believe it can be done both ways and you only need to power one + and one - pin on the IR board. If you look closely on the back, pin 1 and 2 (and 3 and 4) are connected so it doesn't matter which one you use
__________________

"Confucius say: He who play in root, eventually kill tree."
  #9   Spotlight this post!  
Unread 17-01-2008, 22:19
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Smile Re: How to wire the IR on the RC?

I think you will need to power the IR board via the 12V distribution panel. I believe the PWM outputs are 5V. The IR board needs at least 7 Volts in order to work properly, hence wiring to the 12V panel. I would recommend a very small fuse, like 1 amp.
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #10   Spotlight this post!  
Unread 17-01-2008, 23:31
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,854
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: How to wire the IR on the RC?

Quote:
Originally Posted by marccenter View Post
... the PWM outputs are 5V...
The PWM outputs are at unregulated backup battery voltage, nominally 7.2v and dropping
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #11   Spotlight this post!  
Unread 25-01-2008, 15:52
marccenter's Avatar
marccenter marccenter is offline
Registered User
FRC #3548 (RoboRavens2)
Team Role: Coach
 
Join Date: Sep 2004
Rookie Year: 2004
Location: Royal Oak
Posts: 406
marccenter has a spectacular aura aboutmarccenter has a spectacular aura about
Re: How to wire the IR on the RC?

Quote:
Originally Posted by marccenter View Post
I think you will need to power the IR board via the 12V distribution panel. I believe the PWM outputs are 5V. The IR board needs at least 7 Volts in order to work properly, hence wiring to the 12V panel. I would recommend a very small fuse, like 1 amp.
Thanks Mark for the PWM output information (tied to backup battery voltage)
__________________
Marc Center
FIRST FRC Mentor/Coach - Team 3548 Royal Oak RoboRavens#2 - on Sabbatical 2017 season
marc.center@gmail.com
Mobile: 248-255-7377
  #12   Spotlight this post!  
Unread 25-01-2008, 17:55
fstumpo's Avatar
fstumpo fstumpo is offline
Question Everything!
FRC #1640 (SAB-BOT-AGE)
Team Role: Mentor
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Downingtown
Posts: 9
fstumpo is an unknown quantity at this point
Thumbs up Re: How to wire the IR on the RC?

Not sure what you are seeing on your Vex but here's some code from out testing unit. The check for rc_dig_14 is just a way to run this code only if a jumper is in 14.

My printf is returning all zeros, unless an IR cmd button is pressed.

printf("c1: %d c2: %d c3: %d c4: %d\r", (int)rc_dig_in03,(int)rc_dig_in04,(int)rc_dig_in05 ,(int)rc_dig_in06);

if (rc_dig_in14) //no jumper
{
if (rc_dig_in03)
ir_cmd = CMD0;
else if (rc_dig_in04)
ir_cmd = CMD1;
else if (rc_dig_in05)
ir_cmd = CMD2;
else if (rc_dig_in06)
ir_cmd = CMD3;

switch (ir_cmd)
{
case CMD0: //Forward
pwm02 = (unsigned char) 254;
pwm03 = (unsigned char) 50; //Adjusted for Faster Motor
break;
case CMD1: //Turn Right
pwm02 = 0 + RT_SPEED_ADJ - 20; //Adjusted for slower motor
pwm03 = 0 + RT_SPEED_ADJ;
break;
case CMD2: //Turn Left
pwm02 = 254 - LT_SPEED_ADJ;
pwm03 = 254 - LT_SPEED_ADJ;
break;
case CMD3: //Stop
pwm02 = 127;
pwm03 = 127;
break;
}
}

I have each of the appropriate rainbow cable wires going to the signal pin (white) and I daisy chained the grounds (black) with pins 3 and 4 from the rainbow cable.

I have a toggle sw to control the power to the IR unit, so if the Vex Power in on, then I switch on the IR unit, I get initial 1's then zeroes. If I already have the IR power on, then power on the Vex, I get zeroes from the beginning.
  #13   Spotlight this post!  
Unread 26-01-2008, 03:14
Bomberofdoom's Avatar
Bomberofdoom Bomberofdoom is offline
Biggest FIRST addict in Israel
AKA: Nir Levanon
FRC #2230 (Zcharia's Angels)
Team Role: Programmer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Israel
Posts: 471
Bomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond reputeBomberofdoom has a reputation beyond repute
Send a message via MSN to Bomberofdoom
Re: How to wire the IR on the RC?

Problem solved: IR gone nuts and wiring was wrong.
Next IR will come in next week but we'll be able to work with it by then. Currently we're alterning switches as IRs (seeing how the code reacts with switches on and off etc.)
__________________
TEAM 2230 ZECHARIA'S ANGELS

2009 Microsoft Israel FRC Regional Winners!
2009 Microsoft Israel FRC Regional Chairman's Award Winners!!!
---------------------------------
2008 Microsoft Israel FRC Regional semi-finalist.
2008 Microsoft Israel FRC Regional Delphi's "Driving Tommorow's Technology" Award winner.
2008 Robot Driver
---------------------------------
2007 GM/Technion Israel FRC Regional semi-Finalist.
2007 GM/Technion Israel FRC Regional Xerox Creativity Award winner.
2007 Robot Driver.
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
How do you wire the gear tooth sensor? 1594code Electrical 5 12-01-2008 16:24
How do you wire the wheel encoders? Demothesis Electrical 2 17-07-2007 16:59
how do you wire the team light coolguybigt Robot Showcase 2 21-02-2007 22:18
how to wire the pneumatic diagram yara92 Pneumatics 0 17-02-2007 16:28
how to wire the new two motor gearbox Vince lau Electrical 10 14-02-2005 07:30


All times are GMT -5. The time now is 18:43.

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