|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
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
|
||||
|
||||
|
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
|
|||||
|
|||||
|
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. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
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 |