Go to Post By the end of week six, I'm sick of looking at the robot enough that stuffing it in a bag is rather cathartic...:rolleyes: - 2544HCRC [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 13-01-2006, 00:49
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: Speed Sensor

Quote:
Originally Posted by Kevin Watson
Actually, I've got updated encoder code that can use any of the interrupts. The first two are just like last year's (optimized for velocity control) plus the upper four are optimized for position control, but can also be used for velocity control. I'll have it up after I finish some documentation.

-Kevin
Will that work with any encoder, or only quadrature encoders?
  #17   Spotlight this post!  
Unread 13-01-2006, 01:34
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: Speed Sensor

Quote:
Originally Posted by Workaphobia
Will that work with any encoder, or only quadrature encoders?
Quadrature only.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #18   Spotlight this post!  
Unread 13-01-2006, 05:44
BradAMiller BradAMiller is offline
Registered User
AKA: Brad
#0190 ( Gompei and the Herd)
Team Role: Mentor
 
Join Date: Mar 2004
Location: Worcester, MA
Posts: 592
BradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant futureBradAMiller has a brilliant future
Re: Speed Sensor

Quote:
Originally Posted by Workaphobia
Will that work with any encoder, or only quadrature encoders?
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.

For example, in the interrupt service routine for EasyC you connect the A channel to pins 1-6. When the interrupt on the A channel happens, the code reads the B channel to decide whether to count up or down. It doesn't matter if the B channel is actually connected to an encoder - it only sets the count direction.

If you decide to use EasyC it has built-in encoders that only look at a single input.

Brad
  #19   Spotlight this post!  
Unread 13-01-2006, 11:56
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: Speed Sensor

Quote:
Originally Posted by BradAMiller
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.

For example, in the interrupt service routine for EasyC you connect the A channel to pins 1-6. When the interrupt on the A channel happens, the code reads the B channel to decide whether to count up or down. It doesn't matter if the B channel is actually connected to an encoder - it only sets the count direction.

If you decide to use EasyC it has built-in encoders that only look at a single input.

Brad
Actually, the new software I described, and Jon had a question about, does require a quadrature input.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #20   Spotlight this post!  
Unread 13-01-2006, 13:51
Workaphobia Workaphobia is offline
Registered User
AKA: Jon
FRC #1546 (Chaos Inc.)
Team Role: Alumni
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Long Island
Posts: 26
Workaphobia will become famous soon enough
Re: Speed Sensor

Quote:
Originally Posted by BradAMiller
The code will probably work with any single input encoder provided that you tell it that the B Channel is an input that is always high or low (disconnected or jumpered). The code will read what it thinks is the B channel and it will see the same value, making it always count in the same direction.
That's what I thought initially, but then I figured that if the phase B input is constant, then every change in the phase A input will be interpretted as the encoder moving back and forth repeatedly, instead of always forward.

Quote:
Originally Posted by BradAMiller
If you decide to use EasyC it has built-in encoders that only look at a single input.
That's good to hear. I graduated last year and had no chance to check out the new tools for this year, so I still think of these problems in terms of hand-typed code.

Last edited by Workaphobia : 13-01-2006 at 13:53.
  #21   Spotlight this post!  
Unread 13-01-2006, 21:07
6600gt's Avatar
6600gt 6600gt is offline
Registered User
AKA: Lohit
FRC #0226 (Hammerhead)
Team Role: Alumni
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Troy, MI
Posts: 221
6600gt is a jewel in the rough6600gt is a jewel in the rough6600gt is a jewel in the rough
Re: Speed Sensor

This maybe a little of topic but can a PIC output a analog value directly?
It would make life a lot simpler.
  #22   Spotlight this post!  
Unread 13-01-2006, 22:24
Matt Krass's Avatar
Matt Krass Matt Krass is offline
"Old" and Cranky. Get off my lawn!
AKA: Dark Ages
FRC #0263 (Sachem Aftershock)
Team Role: Mentor
 
Join Date: Oct 2002
Rookie Year: 2002
Location: Long Island, NY
Posts: 1,187
Matt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond reputeMatt Krass has a reputation beyond repute
Send a message via AIM to Matt Krass
Re: Speed Sensor

You can use onboard PWMs or software/timer generated PWMs to create a make shift ADC. Simply feed the output to a small capacitor connected to an analog input with a resister between the capacitor and the analog input that leads to ground.

Take a look at this: http://www.piclist.com/techref/sceni...pwm/pwm_vp.htm
__________________
Matt Krass
If I suggest something to try and fix a problem, and you don't understand what I mean, please PM me!

I'm a FIRST relic of sorts, I remember when we used PBASIC and we got CH Flightsticks in the KoP. In my day we didn't have motorized carts, we pushed our robots uphill, both ways! (Houston 2003!)
  #23   Spotlight this post!  
Unread 14-01-2006, 03:05
Tatsu Tatsu is offline
Audiophile and Physicist.
AKA: Tatsu Hashimoto
FRC #1072 (Harker Robotics Team)
Team Role: Leadership
 
Join Date: Jan 2006
Rookie Year: 2004
Location: Woodside
Posts: 49
Tatsu will become famous soon enough
Send a message via AIM to Tatsu
Re: Speed Sensor

Just use a DAC. big deal.
DACs arnt very hard to make, you could even just take a reference esign from TI or AD
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
air speed sensor for rc plane Greg Needel Technical Discussion 19 07-10-2005 23:43
Speed of banner sensor Kashi Chan Electrical 7 06-03-2005 20:00
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 26-04-2004 21:27
Quick Optical Sensor Question zorro Technical Discussion 10 21-01-2003 06:39
What else do we want? archiver 2000 63 23-06-2002 23:19


All times are GMT -5. The time now is 00:36.

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