Hey i searched the forums of how the gear tooth sensors works, and how it should be programmed. The problem we have, is that it is not reading any values. All we get is a value of 0, even after putting it less than a millimeter beside a gear of multiple motors. Nothing seems to work! please we need any help we can get, thanks
The geartooth sensors are designed to run off the Digital I/O interrupt ports on the microprocessor. An example of this code is available from Kevin Watson here:
The interrupt code will handle multiple gear tooth fires per processor loop.
The sensors are very fragile. If you think you have done everything properly, and mounted them correctly, you may want to check the outputs over a osciliscope to make sure the sensor is operational, and firing the correct digital pulse.
We found that the mounting is very important. We found that this configuration works very well for the kit sensors.
-Hope this helps, let us know if we can help futher.
Hey its me again but on my own account. i still can’t seem to get it to work. i also tried the easyC GTS code and it also doesnt work. Anymore suggestions? And we couldnt find the code on kevin’s site, we had to put his codes together. could anybody give us a code that is already written for testing purposes? thanks
are you sure it’s programming issues? i don’t know much about sensors but if that gear tooth sensor is one of the magnetic field ones i won’t work on non magnetic metals. i don’t know if this helps at all. just giving my input and trying to help.
Namely, aluminum.
The kit GTS are hall effect sensors. They require a magnetic metal to work.
we tried the gears that was on the mabuchi motors, do those work?
We had to move out GTS around to find it would work on IO pin 2 from the default code.
The first one we wired up didn’t work at all.
Do you have 12V to the power ? I see you have two PWM cables hooked up…
What code did you use from Kevin’s site?
I’m using the encoders code from his site but im only getting it to work on the first and second input and also only when rotating in one direction…
I’ve read the readme that was included and still nothing works…
I’ve wired the J2 part to the digital inputs and J1 to a circuit breaker for the 12V and still it doesn’t work properly…
Any help will be appreciated,
Thanks
The GTS signal doesn’t have a Phase B, so using it with code intended for quadrature encoders is not always going to work. Specifically, the first two inputs can deal with it because they only trigger on one edge of the signal, but the other four will trigger on both edges and think the encoder is moving slightly back and forth at one spot. Since there’s no information on direction from the GTS, you’ll always count up (or down, depending on defaults) no matter which way the gears are turning.
If you must use digital inputs 3-6, you’ll have to remove a lot of the code in the interrupt service routine that deals with relationships between the two phases of a quadrature signal.
I’ve wired the J2 part to the digital inputs and J1 to a circuit breaker for the 12V and still it doesn’t work properly…
The digital inputs? There’s only one digital signal from the GTS.
Oh yeah, was a typo hehe, I meant to a single input.
The reason I wanted the 3rd input is because the readme says they are better for getting position.
Anyway I got it to work but it counts only once every 3 teeth, it’s really strange