![]() |
Hall Effect Sensor.
The 2005 kit came with something a Hall Effect Sensor, after a bit of looking I found the manual for it, it's actually a ATS665LSG made by Allegro Microsystems. Allegro desribes it as a True Zero Speed, High Accuracy, Gear Tooth Sensor. What does that mean? Is this the "gyro" for this year? And does this work in congunction with the accelerometer. There are two of Hall Effect sensors so it seems we need to use them in twos. Also the Allegro manual mentions gears and gear tooth length. So I'm a bit confused and a bit curious and maybe even a bit excited. Anybody know anything about the Hall effect?
|
Re: Hall Effect Sensor.
My GUESS is that you would use these to count gear teeth - used for feedback to determine how fast/far your robot moves, or for sensing the motion of anything else using chain/sprocket. However ours were missing when we did our kit inventory ...
|
Re: Hall Effect Sensor.
Quote:
This is not a gyro. A gyro returns your angular acceleration (NOT your angular heading... you would need to integrate the acceleration to get that) |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Nixterrimus, Is Ken Wittlief still on your team? He should be able to explain the sensors and demonstrate their usage.
|
Re: Hall Effect Sensor.
This is a neat article I found on calculating heading with a rate gyro.
http://www.seattlerobotics.org/encod...onal_gyro.html Not sure if FIRST provides us with this code though, I'll have to dig deeper into the documentation and report back. [EDIT] I found this article from a Hall Effect sensor manufacturer about how they work. http://www.micronas.com/products/ove...sors/index.php [/DIT] |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
:o I thought that a lot of it was out there, I suppose I'm looking for just an intro to the hall effect. |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
Using a gyro to measure the robot's heading is pretty common with FIRST robots. The parts teams used last year are the Analog Devices ADXRS150EB and ADXRS300EB. The only difference is that the 150 can measure +- 150 degrees per second and the 300 measures up to 300 degrees per second. Lots of posts describing how to do it. |
Re: Hall Effect Sensor.
Quote:
Sparks |
Re: Hall Effect Sensor.
To clear things up, the HAL effect sensors have NOTHING TO DO WITH ACCELERATION, OR HEADING. They are a type of sensor that detects the presence of ferrous materias. They are designed to be mounted up against(but not touching) the teeth of a gear in a gearbox or other assembly. They will output 1 pulse for each gear tooth that goes by them. If for example you were to connect them to your drivetrain, you could count the number of pulses they output to figure out how far your robot had traveled. It is also possible to use them to determine the speed at which your robot (or some subassembly) is moving.
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Here are a few tips on the Hall Effect sensors:
These guys simply output a digital signal corresponding to whether or not a gear tooth is in front of them or not, and the polarity of the signal depends on the direction of gear rotation wrt the sensor itself (see the data sheet for more details: http://www.allegromicro.com/datafile/0660.pdf). Think of this device as a one-bit wheel encoder when you program for it. The air gap, according to the manufacturer, should be 0.5-2.5mm, though they assure us that their adaptive sensing technology can make it work for an even bigger gap, especially with larger gear teeth. The device has an open-drain output stage, but the digital inputs on the RC have pull-up resistors built-in, so you can directly connect the signal to the RC's inputs. Try to avoid grounding the signal wire, though, as this would technically be a short-circuit. Don't worry if you do -- the manufacturer says it has short-circuit protection on the output stage. |
Re: Hall Effect Sensor.
We are given two Hall Effect Sensors. By using them to count teeth of sprockets on opposite sides of your robot you can calculate the difference in number of wheel rotations, and from that rotation of your robot.
If they are used this way, i believe, they work as a replacement for a gyro, although they would not account for being pushed or otherwise interfered with. - Toby |
Re: Hall Effect Sensor.
Guys,
Read some of the posts above before making guesses. The Hall effect sensors are easy tachometers that can tell you how fast a gear is rotating and how many gear teeth have passed by the front of it. Using two on the same gear, about 90% apart, can also give you direction information with some simple electronics or software interpretation. The accelerometer can be used only to give an indication of turning. It will give a large output for a bump or fast turn and a small output for a slow turn. Combine the data from all three and you will know that you have traveled "X" inches in some direction relative to your starting direction. As a caveat, if your wheels are not firmly on the ground, counting gear teeth tell you nothing. |
Re: Hall Effect Sensor.
1 Attachment(s)
Quote:
|
Re: Hall Effect Sensor.
http://www.allegromicro.com/datafile/0660.pdf
I can confirm that is the proper spec sheet for the hall effect gear tooth sensor that is included in the 2005 FRC KOP. It is labled Data sheet 27627.107 |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Arghhh! I don't understand lol.
Ok the Hall Effect sensor counts teeth and has to be mounted very close to the gear. The accelerometer measures acceleration. How is that done and where does it have to be mounted. How do all these values come together in the RC and help me? What does the code that we get for both these sensors do? |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
So... They are sprocket-tooth encoders. Check.
How do we wire them? They have 4 pins, I haven't checked but it seems like they might fit on a PWM cable, but that only has 3 pins, so is it possible to wire it with only 3 pins or do we need to make new cables? --Jonathan |
Re: Hall Effect Sensor.
Quote:
http://www2.usfirst.org/2005comp/Specs/gths1.pdf For a basic overview, looking from the top of the sensor, the pins from left to right are supply, output, int. connection, and ground. it can take 4.5 to 24 volts input voltage (you would probably use 12), and the output will provide a digital signal whenever a gear tooth passes by (whether or not the output is high or low when a tooth goes by depends on the direction of rotation). CHECK the spec sheet before you try it. It is helpful to see the diagram and check for yourself. Scott |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
What kind of value does it give out? |
Re: Hall Effect Sensor.
Has anyone had any luck with mounting the hall effect sensors?
i haven't found anything that fits them....... also, if you haven't read the manual it states that you must connect pin 4 to pin 3 externally. -Leav |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
Please read http://www.chiefdelphi.com/forums/showthread.php?p=307123&highlight=encoders#post307 123. We were talking about encoders on that page but the theory of quadrature remains the same as what Mr. S is talking about. |
Re: Hall Effect Sensor.
Mike,
I can't get to the page you are listing. So for the meantime, think of this. You are able to get two pulses from two seperate sensors. As the gears turn, one sensor has an output slightly different in time from the other. (You are positioning them that way for this demo.) Each outputs exactly the same info, (error checking) and if you determine which sensor outputs first for a particular direction then you will always know that you are traveling in that direction. When the pulses change places you have reversed direction. |
Re: Hall Effect Sensor.
1 Attachment(s)
Quote:
To reliably get direction information, you would need to position the sensors just far enough out of phase that the pulses overlap as illustrated below. Then when you see one of the lines go high, you can just check the other one, and immediately know the direction. |
Re: Hall Effect Sensor.
With regards to sensors in general:
Buy good sensors, but make sure you consider their context of operation: Example: Last season I used optical sensors with white lines on output sprockets to count wheel revolutions. Didn't get me very far because the robot wheels slipped horribly. I probably would have required some kind of accelerometer to determine forward velocity independantly. (Think like this: If i know how fast I'm going forward and my wheels are going faster than that, they don't have full traction) Also, consider what you are trying to measure, because integrating sensor values introduces a large amount of noise into the system. (Little bits of noise, added up over a 'long time') I'd avoid getting fancy compasses or other such devices. But If you want to read about them... look here: Honeywell Magnetic Sensors If you are interested in the Hall Effect, grab a physics book. I believe Fundamentals of Physics by Haliday, Resnick, and Walker covers the Hall Effect. |
Re: Hall Effect Sensor.
Quote:
Thanks for the correction. I need to stop trying to rush a post before I leave work. You don't get a chance to go back and look at what you've done. |
Re: Hall Effect Sensor.
Has anyone come up with a good way to mount the Hall Effect Sensors?
We are having a devil of a time figuring out a good way... Can anyone offer a suggestion? thanks |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
http://www.firstrobotics.uwaterloo.c...etrains025.jpg |
Re: Hall Effect Sensor.
Quote:
Can the sensor sense the larger gear in this years gearbox or does it need to sense the sproket teeth? |
Re: Hall Effect Sensor.
Quote:
Nice! |
Re: Hall Effect Sensor.
Hey,
Does anyone know where we can source more ats660s? Allegro seems to have ditched their remaining surplus of the soon to be obsolete sensors on FIRST. Very gracious and professional. Amiclament. Right now were are looking for a healthy alternative... |
Re: Hall Effect Sensor.
Is the Hall Effect Sensor included with the Kit an ATS660 or ATS665? The KOP lists it as a 665 but the specification sheet on the FIRST website is for the 660. The two models have different placements for the Hall IC element within the sensor. This means the 660 needs to be mounted so the end faces the teeth, while the 665 is mounted so the side faces the teeth. It would be helpful to know which model it is without having to test it by experimenting. Can anyone clear up this contradiction?
Distributors for the sensors can be found through the allegro website. A company called NU Horizons electronics sells the ats660, but the time to deliver looks like it is 16 weeks. Newark in one sells ats665 sensors at $4.30 each. Thanks Bobby Sakurai Team 159 |
Re: Hall Effect Sensor.
Judging from the pictures, it is a 660, but the 665 is much easier to use (less external circuitry) and has a much more convient side mount. :rolleyes:
Oh yeah... and Nu Horizons has a large lead time (194 days IIRC) |
Re: Hall Effect Sensor.
Does anyone know a reliable method to track your displacement using these guys? Our idea is to have something similar to a small idler/roller attached to a sprocket on the ground with positive only motion (perhaps one for forward motion and one for reverse) to eliminate the problems associated with wheels slipping/object contact etc. Any other ideas?
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
I was looking over the allegra datasheets (links up above... Thanks Caleb Fulton!) and on Page 9, it describes something regarding polarity and direction. I think its internal circuity makes it so when you are facing a tooth going one direction, it's high, but when you are going the other direction, it's low. If your gear teeth are fairly far apart, you would have to measure the duty cycle to see which way it's turning... not sure how it would be done, but it may be possible with a single sensor to tell direction. Here's what I read. Please correct me if I'm wrong. Quote:
http://www.allegromicro.com/datafile/0660.pdf , pg.9 |
Re: Hall Effect Sensor.
Quote:
However, the time to pulse also varies with the speed (no direction) of the rotations. You sort of have to know the speed to do much with it. However, I see little wrong with assuming direction. A PID controller reacts in ~20-30 ms -- it's very unlikely a robot can push yours in the reverse direction at that exact velocity... |
Re: Hall Effect Sensor.
Jdong,
I imagine you are quite right about the complexity, and you bring up a good point about assumptions. I was merely throwing it out as a piece of information that could be used so people could mess with it. I have absolutely no idea about how programming is done, and am rather hopeless (even after 2 C classes!) but what if you were to make the hall-effect sensor read a gear with a large gap between the teeth? that would make the duty cycle difference easier to read. I have other ideas, but most of mine are not that great. Thanks again! Sparks |
Re: Hall Effect Sensor.
Sparks,
Sorry this is a little late. I have been looking at the sensor and page 9 is a discussion of the output vs. direction. If the gear is moving in one direction the output will rise from a low state to a high. If the gear is moving in the other direction, the output will move from a high to a low. This is data that I don't think could be useful other that scoping the output while rotating the shaft by hand. The suggestion I made earlier (thanks Greg for the corrected waveform) requires two sensors mounted so that the pulses overlap by 90 degrees (electrical degrees that is). You can see that rather easily in Greg's waveform that the top pulse leads the bottom by some amount. If the direction were reversed, the top pulse would lag the bottom pulse by the same amount. If you were to then compare the pulse trains by sampling when the top pulse goes from low to high, and determining the value of pulse train two, you could determine which direction you were turning. (If pulse two is already high when pulse one goes high you are turning in one direction. If pulse two is low when pulse one goes high you are turning in the other direction.) This is easy to do in software, (don't ask me how) and requires about four gates as I remember, in logic hardware to decode. The Hall effect is actually a pretty neat little package in that it uses two sensors at right angles to each other, to cancel out errors and temperature problems automatically. Please note the restrictions on gear tooth specifications when using and positioning the sensor. |
Connecting the Hall Effect Sensor.
I've been having abit of a problem connecting the hall effect sensors with the 4 pins. i looked at the file on http://www.allegromicro.com/datafile/0660.pdf and it said that one pin is for +v one is for GND and one is the output signal and the one left is also for GND . it seems a bit weird to me. perhaps i'm not understanding it correctly. why would you need two pins for GND. do you really have to connect both the 3rd and the 4th pin to the GND?
please help me figure this out. what is the correct way to connect it? |
Re: Connecting the Hall Effect Sensor.
Quote:
It may be an electrocstatic shield or it may be the shell of the magnetic structure. Four pins tied to a PCB are better than three. |
Re: Hall Effect Sensor.
doesnt the program only run every 26miliseconds? Thats about 38 times per second. So if you had 38 teeth moving past it per second wouldnt your program show taht the robot is simply sitting still? These things look way too complicated for me.
|
Re: Hall Effect Sensor.
Quote:
Interrupts allow your code to process events that may come in during the execution of another task, and "interrupt" the current processing to handle the interrupt (in a function known as the "ISR", or "interrupt service routine") There are a few magic registers in the controller that control how interrupts are handled (for a good reference, check out Kevin Watson's interrupt code). So, while the radio may be able to only transmit/recieve information every 26ms, the controller operates much faster, and with interrupts, can handle tasks even faster than the "fast loop" that executes code while waiting for a radio packet. Scott |
Re: Hall Effect Sensor.
[font=Comic Sans MS][font=Comic Sans MS]hm.. so afterall that has been said..
does anyone know where could we find the manual for the hall effect sensor??~ :) thank yoU~~ |
Re: Hall Effect Sensor.
=] May someone please tell me
where could we find the manual of the hall effect sensor?? =] thank you |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
-Kevin |
Re: Hall Effect Sensor.
Kevin,
The data sheet is really vague on this question. I have not used these sensors but in reading the data sheet, it repeatedly talks about how the duty cycle is fixed at some value and is stable with respect to temperature, air gap, and speed. I found that there is some hidden text as respect to duty cycle in the sheet and the waveforms for duty cycle are missing. (search the pdf for "duty cycle" and at the bottom of p8 you will see highlighted blanks, I selected the text and pasted it in another document to read it.) Due to the variations in tooth shape, tooth depth, surrounding metal, etc., I believe the magnetic fields vary considerably. I am guessing that the manufacturer tried to compensate for these variables and probably aimed for 50% +/-5% by sensing zero cross. There is discussion that the sensor learns it's environment over the space of 64 cycles, adjusting gain and A/D parameters to make the output stable and accurate. If anyone has practical experience with this device and can produce a waveform or two, it would be a big help. I will try and dig one out and see if I can get some data, next week. FLL state tournament is this weekend, so it's going to be pretty busy between now and then. |
Re: Hall Effect Sensor.
What's everyone's best place and advice for mounting the sensor? The data sheet is lacking, but from what I would gather, it has to be mounted behind the teeth, so it can record their absence. Has anyone gotten it to work mounted above the gear pointing downwards (reading through the chain)?
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
We are having problems getting this particular sensor to work. We are currently testing it with an o-scope, and it appears that all our wiring is done correctly, but we are getting no output at all.
Any suggestions? |
Re: Hall Effect Sensor.
Quote:
-Kevin |
Re: Hall Effect Sensor.
Quote:
Excelsior, When you tested it, how exactly did you have it hooked up electrically, and what were you trying to test? |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
We got it up and running last night, very cool. A couple of things... We did not use pin 3 (internal connection), I bet it is a safeguard for grounding and we may hook this up and retry it soon. As far as mounting it, we made a small hole in the top of the transmission closest to the 50 tooth output gear and wired it to a piece of proto circuit board and connected it directly to the analog input on the RC via PWM cable. The sensor must get fairly close to the gear teeth, within a 2-4 mm. Also its "self adjusting" which means you can't move it once your program is running. You have to adjust it then reset the program. Also run a test program in user_routines_fast.c . I'll take a picture of our simple test setup tomorrow and post it here.
|
Re: Hall Effect Sensor.
Quote:
Hoever, after lunch on Saturday, it wasn't working any more. I replaced the sensor with the other one, and it didn't work either. I had a couple of students double-check the wiring to make sure it matched the documentation. I took it apart and reassembled everything in a nicer arrangement with a PWM connector. They still didn't work. They haven't worked since. I can't figure out why. I am discouraged. We will probably use something else to measure the robot's speed. Quote:
|
Re: Hall Effect Sensor.
Alan,
If it were me, I'd check to make sure the gear is rotating in the way described in the datasheet (I think it's so the flat part on the top is pointing away from the middle of the gear. Check the datasheet to be sure.) I hooked up our hall-effect to a proto-board and it wouldn't do anything until the gear was positioned correctly. By the way, I will test some more, but I couldn't get much of a duty cycle change out of the hall effect sensor by changing directions. I may do more testing on this, but as of now, it's software's problem :) Keep us updated. Sparks |
Re: Hall Effect Sensor.
Pardon my ignorance, but can't you tell direction by how you are controlling the motors? Aside from determining if you are getting pushed in the wrong direction by another robot, what is the purpose of using the encoders for determining direction?
I was just informed of the fact (at least for our setup) that if you fully power motors for each side to make the robot go forward, that the motor for one side will be going running "forward" while the other will be going in reverse. I was told the motor going forward will run slightly faster than the one going in reverse meaning that the robot will tend to angle off of a straight path. If what I was told is correct, using an encoder on each side (rather than two on one side) would allow you to determine if this is happening. Also, as mentioned elsewhere, this could replace dead reckoning. c h e t ! |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
Still, having feedback on the actual motor speed is important if you do want to control things well. |
Re: Hall Effect Sensor.
Quote:
|
Re: Hall Effect Sensor.
Quote:
-Drive your robot forward and it's no great problem determining direction. -Now cut all power and coast to a stop. -You can assume your motors are still going in the last direction commanded, but when is that over? The robot will coast forward, but if it bumps into a wall/goal/robot and drifts backwards the s/w will think the robot is a foot further in one direction when it is actually a foot further back (that's a location error of two feet in this example). |
Re: Hall Effect Sensor.
Thanks to all who replied!
First, thanks for the info on the motors. Armed with your information, we will check ours to see if they get the same results. Regarding Mr. McLeod's comments, good example! You are right about the double error. You made me realize that the accelerometer combined with the gyro would help in the situation you mentioned. Regarding Mr. Skierkiewicz' comments, while you also are correct, I wasn't clear in that I am not against using the encoders but was wondering if they wouldn't be better used - if you only have two - with one on each side of the vehicle. With the accelerometer and gyro you should then be able to tell direction. Slippage, of course, nullifies the encoders, which might happen if you are being pushed opposite the direction of your motors. I could be wrong, but it seems to me that with only two encoders plus the gyro and the accelerometer, you would get more information with the encoders on different sides than you would by mounting both on the same side. With mounting on opposite sides, you can count teeth on both sides, yielding distance and difference in speed between the two sides (again, not counting slippage). c h e t ! |
Re: Hall Effect Sensor.
Quote:
Hope this answers your question |
Re: Hall Effect Sensor.
Quote:
From another post, connect to controller using a PWM cable - RED to Pin1 - WHT to Pin2 - BLK to Pins 3 & 4 We will wire, test, then epoxy them into these homemade housings. Mouser PNs 571-14454211 (x2) and 571-16041961 (x4) Good Luck, Jim |
Re: Hall Effect Sensor.
Hey, Stu, it's Christine. I did some calculations.
Wheel radius = 4", Robot speed = 10 ft/sec, gear by sensor has 45 teeth 2 * pi * 4" / revolution * 1 revolution / 45 teeth * 1 sec / 120 " * 1000 mSec / sec = 4.65 mSec / tooth In other words, you can't do this by polling the sensors in a 26 mSec cycle, and you probably can't do it in the fast cycle either. I think the right way to do this is to hook the sensors to a digital counter and poll the counter. I could be wrong. I don't know squat about counters, it's after midnight, and I can't remember how quickly the fast code cycles. I won't be there this weekend. See you all Monday. |
Re: Hall Effect Sensor.
You can get very similar Hall effect sensors from Newark (they are actually just the next version newer, ATS665LSGTN) for $5. So, teams shouldn't limit themselves to just the two in the kit if they want more. There were 762 in stock when I posted this.
|
| All times are GMT -5. The time now is 21:02. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi