Go to Post Sleep well Chief Delphi, because for the next 6 weeks, sleep is only for the weak. :D - ttldomination [more]
Home
Go Back   Chief Delphi > Technical > Motors
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
  #16   Spotlight this post!  
Unread 29-01-2013, 15:37
pmangels17's Avatar
pmangels17 pmangels17 is offline
Mechanical Marauders - Alumnus
AKA: Paul Mangels
FRC #0271 (Mechanical Marauders)
Team Role: Mechanical
 
Join Date: Jan 2012
Rookie Year: 2011
Location: Bay Shore, NY
Posts: 406
pmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond reputepmangels17 has a reputation beyond repute
Re: Measuring motor speed

I recommend gearing down the RPM as much as possible. You can use plastic gears for this if you have a weight concern, since they are virtually weightless. You could even use plastic sprockets and plastic 25 chain, if you don't want to worry as much about alignment.
__________________
Junior at the University of Notre Dame, Mechanical Engineering

Got questions (about Notre Dame, robots, college, etc), don't hesitate to ask.

**Bang Boom Pop!** "Was that the robot?" "I don't know, do it again"
**BANG BOOM POP** "Oh, now it's on fire."
  #17   Spotlight this post!  
Unread 29-01-2013, 15:50
Teamcodeorange's Avatar
Teamcodeorange Teamcodeorange is offline
Registered User
FRC #3476
 
Join Date: Jan 2011
Location: US
Posts: 236
Teamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant futureTeamcodeorange has a brilliant future
Re: Measuring motor speed

Quote:
Originally Posted by pfreivald View Post
We tried using this optical sensor yesterday with a half-black, half-white wheel, and found that it didn't seem to refresh fast enough at frisbee-shooting speeds. (This is what was reported to me -- I wasn't there).

Does this seem like a legitimate problem for this sensor? And how would I go about determining whether or not any given sensor is suitable for these kinds of rates?

Thanks!
We used one of these with a piece of retro-reflective tape and it worked beautifully at the free-speed of a CIM.
__________________
Try Code Orange's electronics tutorials!
---------------------------------------------------------
2015 - Tesla Division Champions
2015 - Inland Empire Engineering Inspiration Award
2015 - San Diego Regional Chairman's Award
2014 - San Diego Regional Chairman's Award
2013 - Newton Division Champions
2012 - San Diego Regional Winners
  #18   Spotlight this post!  
Unread 30-01-2013, 08:53
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Measuring motor speed

Working with Richard Wallace: put a plastic nut on the back shaft to use as a spacer, then superglued a K&J Magnetics diametrically magnetized ring magnetic (R424DIA, $0.61). He salvaged an Allego A3291 Hall Effect Latch from a washing machine motor. added a couple of filter caps and a pull up, and we put it on a scope. Beautiful square wave. Student wired up a harness to connect it to the side car, added the code to LABview to set up a counter, read width of last period, take the reciprocal, and plot the resultant revolutions/s. Rock steady with up to a full speed Banebots, about 310 rps (18600 rpm), and it work with about 1.5 or 2 cm from the face of the Hall Effect sensor to the edge of the ring magnet.

I imagine for the Hall Effect what we did was very similar to Team 2729's boards. The ring magnet just glued to the backshaft was pretty slick; K&J has a pretty neat selection.

Can't find the Allegro chip in a non-surface mount package, so ordered some UA1881 and UA5881 chips using our Digikey voucher, and we'll just use vectorboard to fab a couple up for the bot. Those chips are about a buck. We're gonna try a team 2729 board also.

So: I could use an encoder for this, but it looks like about $3 in parts and some sweat equity, we have get lots and lots of RPMs....

Will try to get a white paper detailing some comparisons between the various chips and doing this optically, but probably not until after bag day. Post here or PM if you want more information before then.

Last edited by fovea1959 : 30-01-2013 at 08:59.
  #19   Spotlight this post!  
Unread 30-01-2013, 09:25
pfreivald's Avatar
pfreivald pfreivald is offline
Registered User
AKA: Patrick Freivald
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2001
Location: Naples, NY
Posts: 2,304
pfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond repute
Re: Measuring motor speed

Quote:
Originally Posted by Teamcodeorange View Post
We used one of these with a piece of retro-reflective tape and it worked beautifully at the free-speed of a CIM.
They got it counting yesterday, now just need to figure out how to report rates. Thanks for the help, folks!
__________________
Patrick Freivald -- Mentor
Team 1551
"The Grapes of Wrath"
Bausch & Lomb, PTC Corporation, and Naples High School

I write books, too!
  #20   Spotlight this post!  
Unread 30-01-2013, 09:44
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Measuring motor speed

Freivald: one of our students licked it in LV with Hall Effect, should be same with opto. Set up a Counter, read the period from the Counter vi, take the reciprocal, and he had RPS.
  #21   Spotlight this post!  
Unread 30-01-2013, 11:07
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Measuring motor speed

Quote:
Originally Posted by pfreivald View Post
They got it counting yesterday, now just need to figure out how to report rates. Thanks for the help, folks!
Use the GetPeriod() method in the Counter class. This will give you the elapsed time (in seconds) between the two most recent pulses*. Take that elapsed time (call it T) and use it in the following formula:

RPM = 60/(T*CPR),

... where CPR is the number of counts per rev (in your case, CPR=1).


*assuming you are not running in semi-period mode
and you haven't modified the FPGA sample averaging from its default value of 1


  #22   Spotlight this post!  
Unread 30-01-2013, 11:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Measuring motor speed

Quote:
Originally Posted by pmangels17 View Post
I recommend gearing down the RPM as much as possible.
Quote:
Originally Posted by Alchemy99 View Post
Why not just gear the encoder down... the shooter is spinning at 20k, gear it so the encoder is spinning at 5k. 4:1 ratio.
Not recommended. Has the potential to introduce a lot of noise, which could make speed control more difficult.

If your speeds are so high that an encoder will exceed its mechanical or electrical limits, or will exceed the FPGA's maximum pulse detection rate, then consider a one-pulse-per-rev solution.

  #23   Spotlight this post!  
Unread 30-01-2013, 11:38
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Measuring motor speed

Quote:
Originally Posted by fovea1959 View Post
Post here or PM if you want more information before then.
Nice work. Thanks for posting this. Some questions:

1) I'm not familiar with that sensor and magnet. How many counts per rev are you getting with that setup?

2) What size did you have set for the FPGA's sample averaging1?

3) What are you going to use for your speed control algorithm, and at what rate will you run it?


1The default in C++ & Java is 1; I don't know about LabVIEW

  #24   Spotlight this post!  
Unread 30-01-2013, 11:44
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: Measuring motor speed

Quote:
Originally Posted by fovea1959 View Post
Working with Richard Wallace: put a plastic nut on the back shaft to use as a spacer, then superglued a K&J Magnetics diametrically magnetized ring magnetic (R424DIA, $0.61). ....
Very Cool, I haven't seen one of those magnets before. I am going to look into trying these with our Hall Effect board, thanks for the info! Great work sharing your results too!
  #25   Spotlight this post!  
Unread 30-01-2013, 12:37
fovea1959's Avatar
fovea1959 fovea1959 is offline
Herder of programmers
AKA: Doug Wegscheid
FRC #3620 (The Average Joes)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2011
Location: St Joseph
Posts: 336
fovea1959 will become famous soon enough
Re: Measuring motor speed

Ether: we get one count per rev with that magnet. I believe the student had the averaging set to 1, and period length set to 1s (need to double check the Counter class myself, see if we can get something shorter). I am anticipating doing bang-bang, and frankly, I don't know how fast we'll run it. One of the students put together a test program just for the shooter; when we implement speed control, we'll leave the provision to vary parameters in real-time and run some experiments. I am really hoping to do this Saturday, depends on whether or not our Hall-Effect goodies show up. I'm going to get someone coding tonight so we are ready for Saturday.

iambujo: be interesting to see if you get comparable results with your boards. What sensor did you use?
  #26   Spotlight this post!  
Unread 30-01-2013, 14:46
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Measuring motor speed

Quote:
Originally Posted by fovea1959 View Post
Ether: we get one count per rev with that magnet. I believe the student had the averaging set to 1
The 6.525 us quantization of the FPGA timing of the period should give you about 38 RPM peak-to-peak jitter at 18,600 RPM with sample size set to 1. That's about 0.2% p-p. Pretty darn good.

Quote:
I am anticipating doing bang-bang, and frankly, I don't know how fast we'll run it.
Nice thing about bang-bang is it doesn't care much if your control period has jitter. Since the bang-bang code is so minimal, you can run it fast without chewing up much CPU.



Last edited by Ether : 30-01-2013 at 14:49.
  #27   Spotlight this post!  
Unread 30-01-2013, 21:50
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: Measuring motor speed

Quote:
Originally Posted by fovea1959 View Post
iambujo: be interesting to see if you get comparable results with your boards. What sensor did you use?
Our board uses the US1881 Hall Latch. I hope to get it tested at higher speeds this weekend, with the ring magnets.
  #28   Spotlight this post!  
Unread 31-01-2013, 20:09
pfreivald's Avatar
pfreivald pfreivald is offline
Registered User
AKA: Patrick Freivald
FRC #1551 (The Grapes of Wrath)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2001
Location: Naples, NY
Posts: 2,304
pfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond reputepfreivald has a reputation beyond repute
Re: Measuring motor speed

Another issue, if you'd indulge...

We have a variable representing our rate, that we want to plug into the PID constructor(?), but we don't know how to change the variable into a PIDSource.

The documentation we were able to find said that you should be able to make any sensor a PIDSource, but we can't find *how*. Here's a screen shot of the code and the errors.

Any help would be most appreciated!
Attached Thumbnails
Click image for larger version

Name:	screenshot.png
Views:	27
Size:	40.8 KB
ID:	13741  
__________________
Patrick Freivald -- Mentor
Team 1551
"The Grapes of Wrath"
Bausch & Lomb, PTC Corporation, and Naples High School

I write books, too!
  #29   Spotlight this post!  
Unread 03-02-2013, 10:45
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: Measuring motor speed

FYI - I just tested our Hall Latch sensor with a ring magnet on a Fisher Price 00801-0673 motor shaft. I got the motor up to max free speed (12V from a bench supply), and the sensor read 20220 RPMs, 337 Hz on my logic analyzer. The duty cycle was about 45% regardless of the motor speed so I figure that's based on the ring magnet's pole alignment. I feel the US1881 is an excellent device for measuring wheel/shooter/shaft speeds at pretty much any speed we could ever want.

Quote:
Originally Posted by iambujo View Post
Our board uses the US1881 Hall Latch. I hope to get it tested at higher speeds this weekend, with the ring magnets.
  #30   Spotlight this post!  
Unread 03-02-2013, 12:54
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,125
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: Measuring motor speed

Quote:
Originally Posted by iambujo View Post
FYI - I just tested our Hall Latch sensor with a ring magnet on a Fisher Price 00801-0673 motor shaft. I got the motor up to max free speed (12V from a bench supply), and the sensor read 20220 RPMs
How were you decoding the sensor signal?
e.g. did you have the FPGA setup to measure rising edges only, or both rising and falling?


Quote:
The duty cycle was about 45% regardless of the motor speed so I figure that's based on the ring magnet's pole alignment.
Most likely. Were you able to measure any jitter using the logic analyzer?

Quote:
I feel the US1881 is an excellent device for measuring wheel/shooter/shaft speeds at pretty much any speed we could ever want.
Indeed

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


All times are GMT -5. The time now is 15:33.

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