Go to Post mabye this is a case of I AM JVN to the Extreme! - Tytus Gerrish [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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 01-03-2004, 17:34
Biff Biff is offline
Registered User
AKA: Tom Cooper
#1227 (Techno Gremlins)
Team Role: Mentor
 
Join Date: Jan 2004
Location: Grand Rapids MI
Posts: 214
Biff is a jewel in the roughBiff is a jewel in the roughBiff is a jewel in the roughBiff is a jewel in the rough
Re: Optical Sensors Used as Encoders?

Quote:
Originally Posted by Rickertsen2
Just me 2 cents, but if you are going to go through the trouble to do all this, then why not just use encoders or gear tooth counters?

If you use reflective tape and banner sensors, it will work, but i don;t see how you can possibly get much resolution.
Not counting slop in the chains, I'm predicting .3 in resoulition We will be testing and codeing on a drive mock up built with some unused but gorgeous double bearing blocks and last years Cim motors. Hopefully we can make it all work in our "Drive system lab"
  #17   Spotlight this post!  
Unread 01-03-2004, 17:36
Biff Biff is offline
Registered User
AKA: Tom Cooper
#1227 (Techno Gremlins)
Team Role: Mentor
 
Join Date: Jan 2004
Location: Grand Rapids MI
Posts: 214
Biff is a jewel in the roughBiff is a jewel in the roughBiff is a jewel in the roughBiff is a jewel in the rough
Re: Optical Sensors Used as Encoders?

Quote:
Originally Posted by Greg
Personally, I think unless the bot is very slow, the extra resolution wont matter. You still cant stop the bot theres just too much inertia. And we are not using the sensor on the actual wheel. We have it on a gear that is in a ratio of about 18:1 to the wheel. So that increases the resolution. And about the tape... The rules say "no adhesive-backed tape on the robot. The only exception is electrical tape, and it can only be used as as insulator". So a "decorative" explanation might not go over with the inspectors too well. White paint works very well, and is completely legal.
I read all the First Questions and answers last night and they said that reflective tape for pulse generation is legal. As long as they don't change their minds like they did with the yaw rate sensors life will be good.
  #18   Spotlight this post!  
Unread 01-03-2004, 17:36
jacob_dilles's Avatar
jacob_dilles jacob_dilles is offline
Registered User
AKA: theshadow
FRC #0620 (WarBots)
Team Role: Mentor
 
Join Date: Jan 2003
Rookie Year: 2003
Location: Vienna, VA
Posts: 245
jacob_dilles will become famous soon enough
Send a message via AIM to jacob_dilles
Re: Optical Sensors Used as Encoders?

Quote:
Originally Posted by Rickertsen2
Just me 2 cents, but if you are going to go through the trouble to do all this, then why not just use encoders or gear tooth counters?

If you use reflective tape and banner sensors, it will work, but i don;t see how you can possibly get much resolution.
lol we dont need 1/4 degree resoluton. we need to know GENRALY how many times the wheels have turned...
__________________
--------------------------
"You're not a real programmer until all your sentences end with semicolons;"
  #19   Spotlight this post!  
Unread 01-03-2004, 21:44
ErichKeane ErichKeane is offline
Registered User
FRC #3210
Team Role: Mentor
 
Join Date: Nov 2003
Rookie Year: 2004
Location: Hillsboro, OR
Posts: 113
ErichKeane is just really niceErichKeane is just really niceErichKeane is just really niceErichKeane is just really niceErichKeane is just really nice
Send a message via AIM to ErichKeane
Re: Optical Sensors Used as Encoders?

Quote:
Originally Posted by jacob_dilles
lol we dont need 1/4 degree resoluton. we need to know GENRALY how many times the wheels have turned...
Well, it shouldnt be hard to figure out w/ the code example i posted. Let me know if it comes in handy
  #20   Spotlight this post!  
Unread 01-03-2004, 23:47
ECarlson's Avatar
ECarlson ECarlson is offline
Registered User
AKA: Eric Carlson
#0116 (Epsilon Delta)
Team Role: Engineer
 
Join Date: Feb 2002
Location: Herndon, VA
Posts: 140
ECarlson has a spectacular aura aboutECarlson has a spectacular aura about
Re: Optical Sensors Used as Encoders?

We tested the banner sensors to measure RPM's, and from what I saw it worked quite well, but our team decided to go with shaft encoders.

We also were going to use a potentiometer to measure the position of our arm, but also went with shaft encoders for that since the potentiometers from RadioShack were only responsive over about 180 degrees of their range, and we needed the full 270 degrees. We could have geared down the potentiometer, or gone with higher quality potentiometer, but we already had the shaft encoders.
__________________
- Eric
www.InvisibleRobot.com Updated: August 24, 2008
Over 28,000 FRC & FTC Photos , Team 116 OI adapter board info
  #21   Spotlight this post!  
Unread 02-03-2004, 01:09
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Optical Sensors Used as Encoders?

We used the red light narrow beam optical sensors as wheel counters last year with good success, and tried this years "broad beam" IR banner sensors but found them to be less attractive. As a result, we used last year's sensors. It turns out that Banner QS18VN6LV, is not available
from an approved electronics source, while the same sensor with polarized light QS18VN6LP is available. I have posted a question to FIRST to learn if the "V" sensor will be considered equivalent for wheel counter use. Lacking that, we will buy and swap in the "legal" sensors in on the practice day of the competition. Hopefully, we won't have to waste the $122 and the half hour of time...

We used retro-reflective tape on the inside rim of the kit supplied wheel. Pieces of tape about 1/8 inch wide and half an inch long are pasted on the wheel rim at 5 degree intervals. We count transitions, giving us a 2.5 degree resolution. The sensor looks at the wheel through the kit frame tubing, through a slot about 1/8 inch wide, with the inside painted flat black. The sensor is set half way between the "no signal" point in the "-" adjustment direction and the the "+" limit which still produces a signal as the wheel is turned. You can find suitable tape in last years kit of parts, and at most hardware stores. Another source is 3M reflective tape used for boating safety, it has a pattern on it that is perfect for cutting strips about 1/8 inch wide by hand. Last year we put the relfective tape on the output
shaft of the drill motor, but did not get as much resolution as we got this year off the back side of the wheel. We checked with FIRST with regard to using retro-reflective tape to support wheel counters in the QandA and it is explicitly approved for this purpose.

The sensors are polled in the "fast loop" using the code below. Each time a light-dark, or dark-light, transition is seen the wheel counter for the corresponding wheel is incremented. The additional code tracks the minimum run length of ones or zeros, so that you can make sure that the RC computer is not missing any transitions when you turn up the speed. It also tracks any "glitches" that might confuse the counter code, if they happen. We found that maximum freewheel speed was easily accomodated with the drills set in low gear. About half maximum free wheel speed was accomodated in high gear. If you want to handle higher speed in high gear you need to sacrifice your measurement resolution and go with wider relfective strips spaced at larger intervals. It could be that there is no issue at all when the robot is driving itself on the carpet, as the wheels might not get going as fast as when running with the wheels off the ground. Your mileage will vary with your gear ratio.

Why such fine resoution, you might ask. You can measure a turn quite accurately with it, and you can dynamically correct motor power using feed back in order to track a very straight path if you feel the need to do this. It is also the case, with fine resolution, that you don't have to carefully set the wheels in the starting position.

The code in the fast loop follows, you have to put a call to it in the autonomous routine because it is not called in the default code. Calling it in the non-autonomous code is not that useful, unless you want to do clever things with the user controls.

Code Follows:

At the end of user_routines.h:
extern int left, oldleft, leftcounter;
extern long leftstringlength, minleftstringlength;
extern int right, oldright, rightcounter;
extern long rightstringlength, minrightstringlength;

In user_routines_fast.c:

Add the call:
Process_Data_From_Local_IO();
at the end of the while(autonomous_mode) loop so that
the wheel counters are updated while in the autonomous code.

Add, right above the Process_Data_From_Local_IO() definition:
int left, oldleft, leftcounter;
long leftstringlength, minleftstringlength;
int right, oldright, rightcounter;
long rightstringlength, minrightstringlength;

Here is the Process_Data_From_Local_IO() code:

void Process_Data_From_Local_IO(void) {
if((left = ((int)rc_dig_in10)) != oldleft) { /* Left counter is dig in 10 */
oldleft = left;
leftcounter += 1;
if(leftstringlength < minleftstringlength) {
minleftstringlength = leftstringlength;
}
leftstringlength = 1;
}
else {
leftstringlength += 1;
}

/* Repeat the code above for the "right wheel"
*/
}


Now, the minimum string length variable and the counter
values can be printed
out every time it gets smaller, running the wheels with the
joysticks, so that you can be sure that the counters are working
and not missing any transitions. Once you know all is well,
you can delete the tracking of the minimum string length. It is
taking time to execute, after all, and contributes to the possibility
of missing a transition.

The variables need to be suitably initialized, when the RC
comes on line. Do this in the user initialization routine,
after all of the RC controller IO hardware is set up.

#define MINSTRINGLENGTH 1000
oldleft = left = ((int)rc_dig_in10);
leftcounter = 0;
leftstringlength = 1;
minleftstringlength = MINSTRINGLENGTH;
/* Similar for the right wheel counter.
*/

We put this in just before the User_Proc_IS_Ready() call.

I'll leave the state machine code that uses the wheel counters,
packet counter for time, soft starts, soft stops, turns, and so forth,
to do your particular autonomous task as an excersise for the reader.
Any bugs/typos in the above are an excersise for the reader also,
I retyped it reading our code from the PC laptop and may not have
gotten it all, or gotten it all correct.

With good high resolution wheel counters, properly programmed,
you can "dead recon" to fractions of an inch on the floor and get
accurate repeatable turns.

Have Fun,
Eugene
  #22   Spotlight this post!  
Unread 02-03-2004, 10:12
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,938
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: Optical Sensors Used as Encoders?

Quote:
Originally Posted by eugenebrooks
...It turns out that Banner QS18VN6LV, is not available
from an approved electronics source, while the same sensor with polarized light QS18VN6LP is available.
Here's some good news...

Newark InOne Part No.:
21H6014
Manufacturer Part No.:
QS18VN6LV
Manufacturer Name:
Banner Engineering
Product Category:
Sensors
Part Description:
QS18VN6LV CABLE RETRO NPN
Cost:
$61
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
  #23   Spotlight this post!  
Unread 03-05-2004, 13:22
Zil709's Avatar
Zil709 Zil709 is offline
The Toolbelt Chick
AKA: Liz
#0709 (FemmeTECHFatale)
Team Role: Engineer
 
Join Date: Nov 2003
Location: Philadelphia (well, Rosemont, but that's no fun.)
Posts: 8
Zil709 is an unknown quantity at this point
Send a message via AIM to Zil709 Send a message via Yahoo to Zil709
Smile Re: Optical Sensors Used as Encoders?

Our team had a hole milled into the side plate of the gearbox such that we have a banner sensor on each gearbox. There's a single piece of retroreflective tape on one gear in each gearbox. The program (which I don't know that much about, sorry.) counts the number of times that the banner sensor views the tape. This works really well for autonomous and is really easy to adjust. Good luck!
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
Q&A Discuss: Optical sensors with EduBot CD47-Bot Extra Discussion 2 01-03-2003 18:37
Q&A Discuss: optical sensors CD47-Bot Extra Discussion 0 15-02-2003 22:58
optical sensors great_one411 General Forum 1 15-02-2003 19:54
optical sensors acting strangely rosebud Electrical 10 03-02-2003 00:29
optical sensors majormusic2005 General Forum 1 28-01-2003 20:37


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

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