|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#16
|
||||
|
||||
|
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.
|
|
#17
|
||||
|
||||
|
Re: Measuring motor speed
Quote:
|
|
#18
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Measuring motor speed
They got it counting yesterday, now just need to figure out how to report rates. Thanks for the help, folks!
|
|
#20
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Measuring motor speed
Quote:
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
|
||||
|
||||
|
Re: Measuring motor speed
Quote:
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
|
||||
|
||||
|
Re: Measuring motor speed
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
|
|||
|
|||
|
Re: Measuring motor speed
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
|
||||
|
||||
|
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
|
||||
|
||||
|
Re: Measuring motor speed
Quote:
Quote:
Last edited by Ether : 30-01-2013 at 14:49. |
|
#27
|
|||
|
|||
|
Re: Measuring motor speed
Our board uses the US1881 Hall Latch. I hope to get it tested at higher speeds this weekend, with the ring magnets.
|
|
#28
|
||||
|
||||
|
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! |
|
#29
|
|||
|
|||
|
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.
![]() |
|
#30
|
||||
|
||||
|
Re: Measuring motor speed
Quote:
e.g. did you have the FPGA setup to measure rising edges only, or both rising and falling? Quote:
Quote:
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|