Domo arigato Mrs. Roboto
Home
Go Back   Chief Delphi > Technical > Control System > Sensors
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 27-01-2012, 19:57
BitTwiddler's Avatar
BitTwiddler BitTwiddler is offline
electronics/programming mentor
AKA: Mr Tanguay
FRC #1726 (N.E.R.D.S.)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2006
Location: Sierra Vista, AZ
Posts: 259
BitTwiddler is on a distinguished road
Re: Hall Effect Latch as an encoder/counter?

Quote:
Originally Posted by iambujo View Post
And here is the assembled and functioning PCB. It is about 1.75"x.75". Hope it works out our pitcher this year! I used expresspcb.com's SW to do the layout and used their protoboard service for the board manufacturing.
I like the layout on your board. I suspect the LED is totally superfluous for operational purposes but will be useful in ensuring things are working. Let us know how it works out.

One of our students wired up our prototype sensor board. Its a kludge but it appears to work when we watch it with our handy-dandy voltmeter. More testing will be required. Hopefully the counter vi in the WPI library will work well with it but we aren't there yet.

Last edited by BitTwiddler : 27-01-2012 at 20:26.
Reply With Quote
  #17   Spotlight this post!  
Unread 27-01-2012, 21:02
iambujo iambujo is offline
Mentor
FRC #2729 (Storm)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: NJ
Posts: 86
iambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to all
Re: Hall Effect Latch as an encoder/counter?

Thanks. Yup the LED is for user feedback only, it tracks the state changes of the output. I dislike that most of the typical KOP sensors have no visual status that they have power and are functioning.

We have 9 PCBs and parts enough to solder them up. Once we are sure the design is working we'll probably make some of them available if anyone is interested, just PM me. If there is interest we can order more boards.
Reply With Quote
  #18   Spotlight this post!  
Unread 10-02-2012, 14:13
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Hall Effect Latch as an encoder/counter?

Our team is considering using this as an encoder/counter as well. my concern is that it might not work as well at high speeds.

if, for example, a wheel was rotating at 5000 rpm = 83 rps = 0.083 rp(ms) and the teleop loop runs every 20 ms, then that would mean that the wheel would have spun 1.67 times before the next cycle in the teleop loop. wouldn't that mean that we will miss a revolution every now and then?

by those calculations, the max speed of a wheel that the sensor could measure is 1/20 rp(ms) = 50 rps = 3000 rpm???

on top of that, the hall effect sensor we have is latching meaning it turns on when a north pole passes it and turns off when a south pole passes it (i might have that backwards). so that means it actually has to count twice as fast and max speed of the wheel is only half of that 3000 rpm.

is this the right thinking? i'm kind of new with coding sensors so excuse me if this is totally wrong.

we're using a banebots motor with an enclosed cim-u-later gearbox so we can't mount it anywhere else other than the wheel. we're trying to avoid having another auxiliary gear system just for the sensor (that's why we can't use an encoder).

any ideas on how to get around this in the code? or perhaps a different sensor (other than an encoder)?
__________________
Wendy
Team 3502
Reply With Quote
  #19   Spotlight this post!  
Unread 10-02-2012, 19:01
cgmv123's Avatar
cgmv123 cgmv123 is offline
FRC RI/FLL Field Manager
AKA: Max Vrany
FRC #1306 (BadgerBOTS)
Team Role: College Student
 
Join Date: Jan 2011
Rookie Year: 2011
Location: Madison, WI
Posts: 2,091
cgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond reputecgmv123 has a reputation beyond repute
Re: Hall Effect Latch as an encoder/counter?

The counting is independent from the loop. The FPGA (hardware) does the actual counting. All your code does is ask it for it's current count. Note that the FPGA can only handle up to ~39000 pulses per second.
__________________
BadgerBOTS Robotics|@team1306|Facebook: BadgerBOTS
2016 FIRST Championship Tesla Division | 2016 Wisconsin Regional Engineering Inspiration Award

2015 FIRST Championship Carson Division | 2015 Wisconsin Regional Chairman's Award

2013 FIRST Championship Curie Division | 2013 Wisconsin Regional Chairman's Award

2012 FIRST Championship Archimedes Division | 2012 Wisconsin Regional Engineering Inspiration Award, Woodie Flowers Finalist Award (Lead Mentor Ben Senson)

Reply With Quote
  #20   Spotlight this post!  
Unread 11-02-2012, 08:14
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,372
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Hall Effect Latch as an encoder/counter?

We have gone to an analog solution. We took a wire coil, some metal and a 12 pole magnet to make an alternator. We get a AC sine wave voltage output proportional to RPM. Next the AC is passed through a full wave bridge and then filtered by a cap and resistor. We then have a nice clean DC voltage that is proportional to the shooter RPM. One of our mentors brought in a scope to check the ripple and we have a nice clean responsive output. Also, the C-rio AD Is -10 to +10 volts. At full speed we are above 5 volts and are taking advantage for the first time of the high resolution that is available. So far it seems to work well. We originally used a small DC brushed motor until we got shot down by the GDC in a Q and A. Hint have you ever taken a stepper apart? There are many advantages to this kind of Tach.
Reply With Quote
  #21   Spotlight this post!  
Unread 11-02-2012, 18:16
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Hall Effect Latch as an encoder/counter?

Quote:
Originally Posted by cgmv123 View Post
The counting is independent from the loop. The FPGA (hardware) does the actual counting. All your code does is ask it for it's current count. Note that the FPGA can only handle up to ~39000 pulses per second.
I'm not familiar with FPGA hardware. Is that something in the digital sidecar or the digital module? How would one access the current count in the code?
__________________
Wendy
Team 3502
Reply With Quote
  #22   Spotlight this post!  
Unread 11-02-2012, 18:34
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,153
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Hall Effect Latch as an encoder/counter?

Quote:
Originally Posted by twiggzee View Post
How would one access the current count in the code?
Look at the Counter class in WPILib.

Reply With Quote
  #23   Spotlight this post!  
Unread 11-02-2012, 19:32
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Hall Effect Latch as an encoder/counter?

great, thanks!
__________________
Wendy
Team 3502
Reply With Quote
  #24   Spotlight this post!  
Unread 21-02-2012, 07:42
iambujo iambujo is offline
Mentor
FRC #2729 (Storm)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2008
Location: NJ
Posts: 86
iambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to alliambujo is a name known to all
Re: Hall Effect Latch as an encoder/counter?

As a followup to this thread, we have fully integrated the custom hall effect sensor into our 2012 robot. Using the WPI counter libraries we are able to get the current speed of the wheel. The shooter goes upwards of 4000 RPMs and the sensor as no issues in keeping up. We mounted 2 tiny rare earth magnets 180 degrees out of phase, opposite poles. So a single period of the square wave is 1 rotation.

I believe SW is now using getPeriod() in the counter class, but if they called it too often it sometimes had bad data (I guess before the period completed or before the internal API was about to update the value from the hardware?).
Reply With Quote
  #25   Spotlight this post!  
Unread 02-03-2012, 19:58
twiggzee twiggzee is offline
Registered User
FRC #3502 (Octo-(PI)-Rates)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2011
Location: Tallahassee, FL
Posts: 55
twiggzee is an unknown quantity at this point
Re: Hall Effect Latch as an encoder/counter?

Quote:
Originally Posted by iambujo View Post
As a followup to this thread, we have fully integrated the custom hall effect sensor into our 2012 robot. Using the WPI counter libraries we are able to get the current speed of the wheel. The shooter goes upwards of 4000 RPMs and the sensor as no issues in keeping up. We mounted 2 tiny rare earth magnets 180 degrees out of phase, opposite poles. So a single period of the square wave is 1 rotation.

I believe SW is now using getPeriod() in the counter class, but if they called it too often it sometimes had bad data (I guess before the period completed or before the internal API was about to update the value from the hardware?).
can you verify that the getPeriod method in the counter class works? i've tried using it but only get "infinity" when i run it...
__________________
Wendy
Team 3502
Reply With Quote
  #26   Spotlight this post!  
Unread 10-03-2012, 14:10
wilsonmw04's Avatar
wilsonmw04 wilsonmw04 is offline
Coach
FRC #1086 (Blue Cheese)
Team Role: Teacher
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Midlothian, VA
Posts: 1,894
wilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond repute
Re: Hall Effect Latch as an encoder/counter?

Quote:
Originally Posted by twiggzee View Post
can you verify that the getPeriod method in the counter class works? i've tried using it but only get "infinity" when i run it...
We are getting the exact same response. Can anyone shed some light on this?

We are getting a good square wave when hook up the sensor to a scope.

We can't even seem to get a count on this channel.

We have encoders working on the drive train, but we can't seem to get anything from this other sensor.
__________________
Currently: Coach FRC 1086/FTC 93
2006-2011 Coach FRC 2106/FTC 35
If you come to a FRC event to see a robot competition, you are missing the point.
Reply With Quote
  #27   Spotlight this post!  
Unread 10-03-2012, 14:39
wilsonmw04's Avatar
wilsonmw04 wilsonmw04 is offline
Coach
FRC #1086 (Blue Cheese)
Team Role: Teacher
 
Join Date: Dec 2006
Rookie Year: 2007
Location: Midlothian, VA
Posts: 1,894
wilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond reputewilsonmw04 has a reputation beyond repute
Re: Hall Effect Latch as an encoder/counter?

We could not find a sample code for what we were doing, but we got it working.

We forgot to call Start() method. So the return count was always 0 and the period was always "Inf." After we called Start() we are in business!
__________________
Currently: Coach FRC 1086/FTC 93
2006-2011 Coach FRC 2106/FTC 35
If you come to a FRC event to see a robot competition, you are missing the point.
Reply With Quote
Reply


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


All times are GMT -5. The time now is 01:38.

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