Go to Post I remember eating dinner once. Long before Build season. Now, we only eat aluminum swarf and disappointment. - BeardyMentor [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 30-01-2008, 20:43
zako234 zako234 is offline
Registered User
FRC #2628
 
Join Date: Jan 2008
Location: Great Neck NY
Posts: 2
zako234 is an unknown quantity at this point
New team needs help with gear tooth sensor

Hey guys, this is my school's first year with robotics, and we just got our robot moving for the first time today. I am our team's head programmer, and was chosen as the head programmer because i'm the only one who actually knows how to program in the first place. I am very skilled with Java and C#, and have figured out how to work with C for this competition.. Anyway, now that our little robot can move, I have to figure out how to do the autonomous mode. Anyway, i was considering using the (working) gear tooth sensor to figure out how far my robot is traveling, and hopefully get it to go where I want it to in the 15 seconds with that.

OK! now that we have the background worked out, I need help with the gear tooth sensor. I have absolutely no idea at all what-so-ever on how to use it, how to code for it, or even how to wire it. I downloaded the encoder code, however it's not quite making sense to me. Pretty simply, i just want to be able to figure out how far my robot is going. If anyone would be kind enough to donate any wisdom, or knowledge to me, I would be very appreciative.

-- EDIT--
I am using MPLAB

Last edited by zako234 : 30-01-2008 at 20:44. Reason: more info
  #2   Spotlight this post!  
Unread 30-01-2008, 21:09
sloteera's Avatar
sloteera sloteera is offline
Registered User
AKA: Rafa
FRC #1860 (Cephatron)
Team Role: Coach
 
Join Date: Mar 2007
Rookie Year: 2004
Location: Brazil
Posts: 190
sloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud ofsloteera has much to be proud of
Re: New team needs help with gear tooth sensor

Welcooome man...

Well... if you want to use gear tooth sensor, you must to know PID controls.
PID controls is a method that controls the movement of your robot.

But...
Basically, the gear tooth sensor is a pulse counter.
You should to use near any screw.

Example: the robot wheel's have 10 screws... when it turned, the gear tooth will count the screws and return 10 pulses in digital input of FRC...

10 screws = 1 turn of the whell = 2*3.1415*R_wheel

You'll know that ten screws corresponding to 'x' feet displacement of your robot, so you should to do a simple operation:

10 screws = 1 feet (Example)
'x' screws = 5 feet


When you find the quantity of screws, you'll set as your set point on your program....

gear_tooth_sensor = set_point - rc_dig_in0x

when 'gear_tooth_sensor' = 0, your bot will stop.





To get counter, you need set a interruption on FRC, and... the conection wires is: Signal - 5V - GND...


Our autonomous in last year: http://www.youtube.com/watch?v=0_NWM2OEfI0 ( gear tooth + gyro + CMU cam + sensor magnatic to detected Spider lag)

I try to explain, but my english isn't so good..
Good luck for your team!!!!
  #3   Spotlight this post!  
Unread 30-01-2008, 23:43
MrForbes's Avatar
MrForbes MrForbes is offline
Registered User
AKA: Jim
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Feb 2006
Rookie Year: 2006
Location: Sierra Vista AZ
Posts: 5,959
MrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond reputeMrForbes has a reputation beyond repute
Re: New team needs help with gear tooth sensor

this thread

http://www.chiefdelphi.com/forums/sh...ad.php?t=62340

might help you figure out the wiring, it needs two cables, one to 12v power, and also a PWM signal cable to the robot controller.
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
Problem with 2008 gear tooth sensor Larry R Sensors 27 18-02-2008 11:39
Gear Tooth Sensor Help borabora Electrical 1 28-01-2008 14:54
Gear Tooth Sensor Help owner_master Programming 9 18-02-2007 12:16
New Gear Tooth Sensor- Connection JJMax7 Kit & Additional Hardware 12 11-02-2006 15:52
Help with Gear Tooth Sensor RedOctober Electrical 3 27-01-2006 18:38


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

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