|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Hall Sensor working?
We have the ATS665LSG encoders, and we can't get them to work... Are they just digital ins?? Could someone give me a print statement that has a way of displaying whether its working.. Thanks in advance
|
|
#2
|
||||
|
||||
|
Re: Hall Sensor working?
Yeah, i'm having big problems too.
They are analog ins. I cannot get them to output usable data. no matter where they are when I start the program, they just float around 0 and 1. Sometimes the value starts at like 50, then every second it drops by like 1 or 2. but if i move the sensor, it goes back to 0, and once it's at 0, i cant get it any higher than 1. theres no consistancy, what kind of value should i be gettnig frmo a working hall effect? |
|
#3
|
|||
|
|||
|
Re: Hall Sensor working?
well, we just got it to work digitally, but you have to be pretty close, it should switch between 1 and 0. Thanks anyways guys, i guess we solved our own problem.
|
|
#4
|
|||
|
|||
|
Re: Hall Sensor working?
The Hall Effect Sensor should output a digital signal. According to the documentation, it converts its analog signal to digital before output. It also appears that it should be positioned between .5 and 2.5 mm from the gear. We just finally mounted ours Thursday night, and it was able to reliably detect the teeth, although we have yet to incorporate it into our code.
|
|
#5
|
|||||
|
|||||
|
Re: Hall Sensor working?
Quote:
The RC digital inputs provide a +5 pullup resistor, so they're all ready to handle the Allegro gear tooth sensor with no additional components. (The application note strongly suggests filters on the supply and the output, but you can ignore them if you're not concerned about electrical noise.) |
|
#6
|
||||||
|
||||||
|
Re: Hall Sensor working?
Quote:
|
|
#7
|
|||
|
|||
|
Re: Hall Sensor working?
Do you have to have interrupts?? or is the fast loop fast enough??
|
|
#8
|
|||
|
|||
|
Re: Hall Sensor working?
all you need to do is set the counting part of your program in user_routines_fast.c this is plenty fast enough... no need for interupts... (we didn't need them....) it counted almost everytooth on the last stage gear in the stock tranny running at full speed....
for the code do something really simple like Code:
////in variables section
int numteeth=0; //num of teeth
int lastreading=0;
/// in code
if((rc_dig_in01-lastreading)!=0) // if the value of the sensor changes then......
{
numteeth++; // add one to teeth count....
}
lastreading=rc_dig_in01;
|
|
#9
|
|||
|
|||
|
Re: Hall Sensor working?
YES... if you move the counter you need to reset there is a automatic calibration... this is okay to move the sensor if your using a sprocket or something... but if you are using a gear...NO NO NO... get that thing mounted EXTREMELY stable... with in 3-4 mm of the gear teeth... it will not read if it is out of appx. that range.
|
|
#10
|
|||
|
|||
|
Re: Hall Sensor working?
We'r eusign it on the last sprocket (the one on our wheel) that came with the kitbot. It seems to not count all of the teeth, unless its going pretty slow...
|
|
#11
|
||||
|
||||
|
Re: Hall Sensor working?
Ys, we have them working.....and he trick I was not aware of until I "READ THE SPEC" was that they do a self-calibration when you power them on....that is, if they are not powered on "in position", they do not get the magnetic lay of the land and do not sense teeth too well.
(if that makes sense to anyone) |
|
#12
|
|||
|
|||
|
Re: Hall Sensor working?
Well, i tried that stuff, and it still wo't work, where did you guys mount your sensors?? maybe thats our mistake....
|
|
#13
|
|||
|
|||
|
Re: Hall Sensor working?
Thats odd... it seemed on our robot to count all teeth on the sprocket even at full speed! ....
remember the sensor needs to be fairly stable ... you guys aren't just holding it near the teeth to test or anything like that right? (cuz we tried that !) try running some code that will stop the motors after the count reaches a certain number (like the 2Xnumber of teeth on the sprocket...) at full speed the motors will of course not stop in time... but you can see how many extra revolutions the sprocket made.... and then see if its ballpark with in the count value.... are you printf the count value? also keep the sensor about 10-15 mm away from the SPROCKET (with gears its different) try different things till it works... |
|
#14
|
|||
|
|||
|
Re: Hall Sensor working?
We have it there with a bracket, but it's probobaly about an inch or so away from the sprocket. with the double chips running at 2/3 speed, it goes 10 revs in "100 teethcount" . But when its at 10 off 127, it goes just about 2 revolutions counting "100 teeth" so thats a problem...
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hall Effect Sensor. | Nixterrimus | Electrical | 77 | 29-01-2005 10:48 |
| Hall Effect Source | LaughingJack | Programming | 3 | 26-01-2005 05:28 |
| Chairmans Award Dinner With Dean. | Josh Hambright | Chairman's Award | 26 | 20-07-2004 19:05 |
| FIRST Hall of Fame | Chris Fultz | Chairman's Award | 2 | 16-04-2004 19:35 |
| hall of fame | nuggetsyl | General Forum | 15 | 05-05-2002 22:54 |