Go to Post ..."A bad day at college is always better then a good day at work" - KyleGilbert45 [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
  #16   Spotlight this post!  
Unread 12-01-2005, 22:50
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

is that already in the default routine, because our compressor doesn't automatically turn itself on. plus, if you read my above post, are you sure the default settings work with the way my bot is configured? thank you.
  #17   Spotlight this post!  
Unread 12-01-2005, 23:05
gnormhurst's Avatar
gnormhurst gnormhurst is offline
Norm Hurst
AKA: gnorm
#0381 (The Tornadoes)
Team Role: Programmer
 
Join Date: Jan 2004
Location: Trenton, NJ
Posts: 138
gnormhurst will become famous soon enoughgnormhurst will become famous soon enough
Re: encoders

I have some vague recollection that you may not pass inspection if you do not have the pressure limit switch controlling the compressor.

Last year we were overweight and removed our compressor, opting instead to charge the air tanks before each match.
__________________
Trenton Tornadoes 381
2004 Philadelphia Regional Winners
2006 Xerox Creativity Award
---
My corner of the USPTO.
My favorite error message from gcc: main is usually a function
My favorite error message from Windows: There is not enough disk space available to delete this file.
  #18   Spotlight this post!  
Unread 13-01-2005, 00:30
thoughtful's Avatar
thoughtful thoughtful is offline
Registered User
FRC #1219 (Emery Iron Eagle)
Team Role: Alumni
 
Join Date: Nov 2003
Location: Toronto,Canada
Posts: 291
thoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to beholdthoughtful is a splendid one to behold
Re: encoders

Sorry if this is a bit off topic.

I was looking through the encoder the Mr.Kevin provides on his website. I did not find the model of the encoder he was using, i am currently wanting to use optical encoder from digikey there a lot of them available. I am trying to decide which one to buy and will the optical encoder just tick when the dark area changed to light?

Thank you in advance
__________________
.:Bringling Brains to Life:.

03,04,05-Team 1219 Captain
2003 Rookie all Start @ GTR
2005 Galileo Semi-Finalist & Alliance captain
06-Team 1219 Mentor
2006 Radio Shack Innovation in control @ Waterloo
  #19   Spotlight this post!  
Unread 13-01-2005, 01:16
Anthony Kesich's Avatar
Anthony Kesich Anthony Kesich is offline
Programmer Turned Engineer
AKA: SonKenshin
#1097 (Site 3 Engineernig)
Team Role: Leadership
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Sacramento, CA
Posts: 186
Anthony Kesich has a spectacular aura aboutAnthony Kesich has a spectacular aura about
Send a message via AIM to Anthony Kesich
Re: encoders

Quote:
Originally Posted by gnormhurst
I have some vague recollection that you may not pass inspection if you do not have the pressure limit switch controlling the compressor.

Last year we were overweight and removed our compressor, opting instead to charge the air tanks before each match.
I believe it is the pressure blow off valve that cannot be removed, not the pressure sensor. In 2003, we ran without a sensor. That's where CJO got the code from. We used the wheel since we didnt have any more buttons on the controller to map the function to. We controlled it manually since we were having power regulation problems and decided to kill the compressor completely for the last 30-45 seconds of the match.

-Tony K
__________________
C is screwing up my English--I'm ending all my sentences in semi-colons;

Horray for most things! -George Carlin

"Sure, I'll play rugby. Besides, I have a lot of experience running from really big guys who want to cream me." -Me, Freshman year
  #20   Spotlight this post!  
Unread 13-01-2005, 01:30
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Cañada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Cañada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: encoders

Quote:
Originally Posted by thoughtful
...I was looking through the encoder the Mr.Kevin provides on his website. I did not find the model of the encoder he was using...
From the readme.txt: "This software was tested with Grayhill 63R256
and 61K128 quadrature output optical encoders. Data sheets for
these devices are included."

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #21   Spotlight this post!  
Unread 13-01-2005, 01:35
CJO's Avatar
CJO CJO is offline
Emeritus Pain in the $@#$@#$@#
AKA: Christopher J. O'Connell
None #1097 (Site 3 Engineering)
Team Role: Alumni
 
Join Date: Feb 2003
Location: Latrobe (over the rainbow), CA
Posts: 217
CJO will become famous soon enoughCJO will become famous soon enough
Re: encoders

As Anthony points out. If you have power to burn, leave the compressor in full auto, if, on the other hand, you want manual control (for any one of a number of reasons) I think that the wheel is a good choice, as it is convienient, and hard to press by accident.
__________________
Team 1097 -- Site 3 Engineering
~~~~~~~~~~~~~~~~~~~~
2003 Sacramento Rookie All Star
2003 Silicon Valley Rookie All Star
2004 Sacramento Engineering Inspiration Award
2004 Sacramento Visualization Award
2004 Outstanding Volunteer Award (G. Glasser)
2004 Silicon Valley Sportsmanship Award
2004 National Visualization Runner Up
2004 Cal Games Finalist
2005 Sacramento Sportsmanship Award
2005 Sacramento #1 seed
2005 Sacramento Finalist

2005 Silicon Valley Sportsmanship Award
2005 Silicon Valley #1 Seed
2005 Silicon Valley Finalist

  #22   Spotlight this post!  
Unread 13-01-2005, 07:15
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

Quote:
We're still looking for a description of the symptoms.
actually, our encoder does work, it's just a matter of finding if the code works or not. if not, then there is an encoder problem. however, I checked the wiring. I heard there's a way to see every time it clicks on the laptop. how's this done? also, yes, I've gone over the read me.
  #23   Spotlight this post!  
Unread 13-01-2005, 13:51
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: encoders

Quote:
Originally Posted by stephenthe1
actually, our encoder does work, it's just a matter of finding if the code works or not. if not, then there is an encoder problem. however, I checked the wiring. I heard there's a way to see every time it clicks on the laptop. how's this done? also, yes, I've gone over the read me.
Here's what I would do to verify that your encoder is working: In the routine where you are controlling the arm, add the following code:
Code:
int tempEncoder;
static int prevEncoder = 0;
...
tempEncoder = Get_Left_Encoder_Count();
if (tempEncoder != prevEncoder) {
   printf("%d ", tempEncoder);
   prevEncoder = tempEncoder;
}
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #24   Spotlight this post!  
Unread 13-01-2005, 14:37
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

Quote:
Originally Posted by gwross
Here's what I would do to verify that your encoder is working: In the routine where you are controlling the arm, add the following code:
Code:
int tempEncoder;
static int prevEncoder = 0;
...
tempEncoder = Get_Left_Encoder_Count();
if (tempEncoder != prevEncoder) {
   printf("%d ", tempEncoder);
   prevEncoder = tempEncoder;
}
which screen will it print to when running the program? I know in the link cable program thing to download the (ifi loader) program, there's a little screen.
is it in that?
that would be hard to trace, because it prints out hundreds of lines, and there isn't a way to print or save it to a file for viewing. guess I can search it. thanks!

also, I don't know if it matters, but what are the three "..." periods for after the previous static encoder.

Last edited by stephenthe1 : 13-01-2005 at 14:40.
  #25   Spotlight this post!  
Unread 13-01-2005, 14:42
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

also, it says there's an error on this line when I put it in user routines fast.
int tempEncoder;

what's up with that?
  #26   Spotlight this post!  
Unread 13-01-2005, 16:38
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: encoders

Quote:
Originally Posted by stephenthe1
which screen will it print to when running the program? I know in the link cable program thing to download the (ifi loader) program, there's a little screen.
is it in that?
Yes. that's where you'll see the output.

Quote:
that would be hard to trace, because it prints out hundreds of lines, and there isn't a way to print or save it to a file for viewing. guess I can search it. thanks!
That's why my code only prints the encoder value when it changes. It will still move pretty fast when the encoder is turned, but it will stop when the encoder stops. Also in order to keep as much of the data on screen as possible, I intentionally didn't print a newline.

Quote:
also, I don't know if it matters, but what are the three "..." periods for after the previous static encoder.
Those were just intended to show that there were lines omitted.

Quote:
also, it says there's an error on this line when I put it in user routines fast.
int tempEncoder;

what's up with that?
Sorry. I guess I could have been a little more specific. The first two lines need to go at the beginning of the function. In C (unlike in C++), data definitions must appear before any executable statements in a function.

Leave out the ellipsis (the "..."), and then put the rest of the code just before the arm control code.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #27   Spotlight this post!  
Unread 13-01-2005, 16:45
stephenthe1 stephenthe1 is offline
Registered User
#1008
 
Join Date: Dec 2004
Location: Ohio
Posts: 113
stephenthe1 is on a distinguished road
Re: encoders

the encoder is working!!! thanks for the help in this thread. I'm still looking at our compressor, though it's not a pain to enable, just that they have it wired oddly. thanks again!
  #28   Spotlight this post!  
Unread 13-01-2005, 19:37
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: encoders

Quote:
Originally Posted by stephenthe1
the encoder is working!!! thanks for the help in this thread. I'm still looking at our compressor, though it's not a pain to enable, just that they have it wired oddly. thanks again!
Congratulations! Does that mean the arm is working too?

Earlier, you said
Quote:
ok, our compressor is hooked up to digital 17. from last year's white sheet with the different wires labeled, it says that the sensor for the relay is hooked up to analog 1. I'm new to the compressor stuff. Is this all of what you need to write the code for it? It is hooked up to a spike. unless this is hard, could you show me the code for this, and tell me where to put it. That would allow me to learn from it as I get confused easily when I have to write things on my own without experience. as soon as you can is best, as I'm at a robotics meeting right now.
thank you for your help,
Stephen
Did you mean the compressor is on relay 17? And did you really mean analog 1 for the pressure switch? If so, is it the pressure transducer (an analog pressure sensor) or the (digital) pressure switch?

The default code expects the compressor to be on relay 8, and the pressure switch on digital 18. If you hook up your compressor and pressure switch this way, you're golden. These lines in Default_Routine() in user_routines.c will take care of the compressor:
Code:
  relay8_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
  relay8_rev = 0;
If you really are using the pressure transducer, and you want to leave the compressor on PWM 17, you will need to add some code that I'm not prepared to help you with right now, since we haven't used any analog inputs on the robot since we have gotten the new controllers.

BTW, I think that last year, the ruling was made that even if you want to use the pressure transducer, you still have to have the digital pressure switch. If this is the case (and you still want to leave your compressor on relay 17), you will need to change the line in Default_Routine() to
Code:
  relay17_fwd = !rc_dig_in18;  /* Power pump only if pressure switch is off. */
  relay8_rev = 0;
(Change rc_dig_in18, if necessary, to whatever digital input you connect your pressure switch to.)
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
  #29   Spotlight this post!  
Unread 04-02-2005, 18:55
roboticsjenkins's Avatar
roboticsjenkins roboticsjenkins is offline
robotics_jenkins
AKA: Andrew
#0616 (Southampton Indian Robotics)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2003
Location: Courtland, Virginia
Posts: 15
roboticsjenkins can only hope to improve
Send a message via AIM to roboticsjenkins Send a message via Yahoo to roboticsjenkins
Re: encoders

On getting the Phase A/ Phase B hookup on the encoder. Do i need to splice the wires. Do i have just one pwm for each encoder or two? Please Help....
__________________
  #30   Spotlight this post!  
Unread 04-02-2005, 21:38
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: encoders

Quote:
Originally Posted by roboticsjenkins
On getting the Phase A/ Phase B hookup on the encoder. Do i need to splice the wires. Do i have just one pwm for each encoder or two? Please Help....
Encoder signals go to digital inputs on the RC, not to pwms. Quadrature encoders require power and ground, and they provide two digital signals.

If you're using interrupts, you're pretty much required to use the first two digital inputs for the "A" phase outputs of two encoders, with the "B" phase outputs on two other digital inputs.
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
Mechanical Wheel Encoders? Jaine Perotti Electrical 15 04-12-2004 22:46
Shaft Encoders wun Programming 3 12-10-2004 16:40
encoders? what kind and where from? ajlapp Electrical 1 03-02-2004 01:49
Who used wheel encoders CyberWolf_22 Technical Discussion 12 04-05-2003 15:37


All times are GMT -5. The time now is 13:14.

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