Go to Post You know you're addicted to FIRST when to you: 4's company, 5's a crowd, and 6 is someone off-sides. - Tetraman [more]
Home
Go Back   Chief Delphi > Technical > Electrical
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
  #46   Spotlight this post!  
Unread 16-01-2005, 16:54
jdong jdong is offline
Linux Nerd
AKA: John D
#0245 (Adam-Bots)
Team Role: Programmer
 
Join Date: Apr 2004
Location: Rochester, MI
Posts: 98
jdong will become famous soon enoughjdong will become famous soon enough
Re: Hall Effect Sensor.

Quote:
Originally Posted by Sparks333
Al,
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.



http://www.allegromicro.com/datafile/0660.pdf
, pg.9
Well, it's difficult and processor-expensive to do so. You'd have to measure the length of each pulse, by interrupting on rising edge, then having the handler switch to interrupt on falling edge. By using a timer to count the ticks between these two, you can obtain the length of the pulse.

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...
__________________
John Dong
Co-Captain, Webmaster / Programmer
Team 245 -- Rochester Adams Robotics
  #47   Spotlight this post!  
Unread 16-01-2005, 20:04
Sparks333's Avatar
Sparks333 Sparks333 is offline
Robotics Engineer
AKA: Dane B.
FRC #1425 (Wilsonville Robotics)
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2003
Location: Wilsonville, Oregon
Posts: 184
Sparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of lightSparks333 is a glorious beacon of light
Send a message via AIM to Sparks333
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
__________________
ICs do weird things when voltage is run out of spec.

I love to take things apart. The fact that they work better when I put them back together it just a bonus.

http://www.ravenblack.net/random/surreal.html
  #48   Spotlight this post!  
Unread 16-01-2005, 20:52
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
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.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #49   Spotlight this post!  
Unread 17-01-2005, 11:22
Gal Longin's Avatar
Gal Longin Gal Longin is offline
Gal L.
#1578 (IsraBot)
Team Role: Leadership
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Israel
Posts: 32
Gal Longin is an unknown quantity at this point
Send a message via ICQ to Gal Longin Send a message via AIM to Gal Longin Send a message via MSN to Gal Longin Send a message via Yahoo to Gal Longin
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?
__________________
"Only two things are infinite: the universe and human stupidity; and I'm not sure about the the universe." -Albert Einstein.

2005 Israel regional Finalist
2005 Israel regional Johnson & Johnson Sportmanship Award
2005 Israel regional Website Award
  #50   Spotlight this post!  
Unread 17-01-2005, 11:49
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Connecting the Hall Effect Sensor.

Quote:
Originally Posted by Gal Longin
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?
If you scan down from page one you will see a reference that Pin 3 is an internal connection, scan a little further and you will see that it "must" be tied to ground externally.
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.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #51   Spotlight this post!  
Unread 17-01-2005, 16:11
russell's Avatar
russell russell is offline
Registered User
#1430 (WRONG)
Team Role: Electrical
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Anchorage AK
Posts: 402
russell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to allrussell is a name known to all
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.
  #52   Spotlight this post!  
Unread 17-01-2005, 16:34
scottm87 scottm87 is offline
Registered User
AKA: Scott McClure
#0469 (Las Guerrillas)
Team Role: Programmer
 
Join Date: Nov 2002
Rookie Year: 2000
Location: Bloomfield Hills, MI
Posts: 24
scottm87 is on a distinguished road
Re: Hall Effect Sensor.

Quote:
Originally Posted by russell
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.
First of all, the slow loop runs at something around that speed. The fast loop runs much faster. Even if the fast loop was too slow, there is the magic of interrupts!

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
  #53   Spotlight this post!  
Unread 17-01-2005, 19:16
Derder1625 Derder1625 is offline
Registered User
#1346
 
Join Date: Jan 2005
Location: Vancouver
Posts: 2
Derder1625 is an unknown quantity at this point
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~~
  #54   Spotlight this post!  
Unread 17-01-2005, 19:22
Derder1625 Derder1625 is offline
Registered User
#1346
 
Join Date: Jan 2005
Location: Vancouver
Posts: 2
Derder1625 is an unknown quantity at this point
Re: Hall Effect Sensor.

=] May someone please tell me
where could we find the manual
of the hall effect sensor?? =] thank you
  #55   Spotlight this post!  
Unread 17-01-2005, 19:42
Unsung FIRST Hero
Mike Betts Mike Betts is offline
Electrical Engineer
no team
Team Role: Engineer
 
Join Date: Dec 2001
Rookie Year: 1995
Location: Homosassa, FL
Posts: 1,442
Mike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond reputeMike Betts has a reputation beyond repute
Re: Hall Effect Sensor.

Quote:
Originally Posted by Derder1625
=] May someone please tell me
where could we find the manual
of the hall effect sensor?? =] thank you
Please read this thread. The data sheet link is given.
__________________
Mike Betts

Alumnus, Team 3518, Panthrobots, 2011
Alumnus, Team 177, Bobcat Robotics, 1995 - 2010
LRI, Connecticut Regional, 2007-2010
LRI, WPI Regional, 2009 - 2010
RI, South Florida Regional, 2012 - 2013

As easy as 355/113...
  #56   Spotlight this post!  
Unread 18-01-2005, 01:37
Kevin Watson's Avatar
Kevin Watson Kevin Watson is offline
La Caņada High School
FRC #2429
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 2001
Location: La Caņada, California
Posts: 1,335
Kevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond reputeKevin Watson has a reputation beyond repute
Re: Hall Effect Sensor.

Quote:
Originally Posted by jdong
Well, it's difficult and processor-expensive to do so. You'd have to measure the length of each pulse, by interrupting on rising edge, then having the handler switch to interrupt on falling edge. By using a timer to count the ticks between these two, you can obtain the length of the pulse.

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.
If I understand this correctly, the duty cycle (time pulse is high/total period) is fixed at some value if the gear is going one way and fixed at a different value when spinning in the opposite direction. If this is true, all you need to do is use a timer to keep track of the delta time between edges to know which direction you're spinning. This *can* be done. In fact, this is very close to how the beacon receiver code worked last year. Perhaps someone can grab a copy of receiver.c and make it work? Last years code is kept here: http://kevin.org/frc/2004.

-Kevin
__________________
Kevin Watson
Engineer at stealth-mode startup
http://kevin.org
  #57   Spotlight this post!  
Unread 18-01-2005, 23:24
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
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.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #58   Spotlight this post!  
Unread 19-01-2005, 00:26
pludodog pludodog is offline
College Student
AKA: Joe Hall
None #0395 (2trainrobotics)
Team Role: College Student
 
Join Date: Dec 2003
Rookie Year: 2001
Location: New York, NY
Posts: 37
pludodog is a splendid one to beholdpludodog is a splendid one to beholdpludodog is a splendid one to beholdpludodog is a splendid one to beholdpludodog is a splendid one to beholdpludodog is a splendid one to beholdpludodog is a splendid one to behold
Send a message via AIM to pludodog
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)?
  #59   Spotlight this post!  
Unread 19-01-2005, 07:31
Unsung FIRST Hero
Al Skierkiewicz Al Skierkiewicz is offline
Broadcast Eng/Chief Robot Inspector
AKA: Big Al WFFA 2005
FRC #0111 (WildStang)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1996
Location: Wheeling, IL
Posts: 10,798
Al Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond reputeAl Skierkiewicz has a reputation beyond repute
Re: Hall Effect Sensor.

Quote:
Originally Posted by pludodog
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)?
It is unlikely to read through the chain, there isn't enough of a magnetic change. It is better to mount further up in the transmission. Any error in counting is therefore reduced by the gear ratio between the gear you are sensing and the final movement of the robot.
__________________
Good Luck All. Learn something new, everyday!
Al
WB9UVJ
www.wildstang.org
________________________
Storming the Tower since 1996.
  #60   Spotlight this post!  
Unread 19-01-2005, 17:49
Excelsior's Avatar
Excelsior Excelsior is offline
Electrical Head
AKA: Alex Hughes
None #1208 (Metool Brigade)
Team Role: Electrical
 
Join Date: Jan 2005
Rookie Year: 2003
Location: O'Fallon
Posts: 30
Excelsior is on a distinguished road
Send a message via AIM to Excelsior
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?
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
Making a Sensor Board SpaceOsc Technical Discussion 11 15-05-2004 12:46
heres the code. y this not working omega Programming 16 31-03-2004 15:18
Banner Sensor Programming Problem 2Crisis Programming 4 24-02-2004 13:40
IR sensor trouble D.Viddy Electrical 2 30-01-2004 09:49
Quick Optical Sensor Question zorro Technical Discussion 10 21-01-2003 06:39


All times are GMT -5. The time now is 04:34.

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