|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Magnetic encoders? Anybody else having trouble?
My team has decided to use the new magnetic encoders on this years robot, however, we are having lots of trouble getting them to work. We are unsure if it is due to the position of the magnet over the motor or if it is something else. Is anyone else using these encoders and either are also having difficulties or have figured them out? Thanks
![]() |
|
#2
|
|||||
|
|||||
|
Re: Magnetic encoders? Anybody else having trouble?
Lucy,
You need to provide part number so we are sure we are on the same page. |
|
#3
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Are you talking about the magnetic encoders from FIRST Choice?
http://www.andymark.com/FIRST-Choice-p/fc13-062.htm We got a pair, but haven't tried them out yet. |
|
#4
|
|||
|
|||
|
Re: Magnetic encoders? Anybody else having trouble?
We too are having difficulty with the AS5145B encoder. So far we can't get them to deliver any quadrature signal. We'll keep you posted if we find out why
|
|
#5
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Quote:
It looks like there are a few different ways to communicate with this chip. One is a digital method much like a SPI device and the other is like it was a pot (a pwm signal through a filter which just gives an analog DC-like voltage out; not sure if the filter to do this is on the PCB though). I don't see connections for quadrature output. - Bryce |
|
#6
|
|||||
|
|||||
|
Re: Magnetic encoders? Anybody else having trouble?
One fundamental to keep in mind is these devices are intended to give angular info over a 360 degree rotation. These do not replace rotational encoders they are a "rotational position sensor".
|
|
#7
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
From what the data sheet says, they are supposed to have incremental outputs as well as absolute position output.
How have you wired it up? And have you picked the magnet size/spacing appropriately? Alignment is very important. |
|
#8
|
||||
|
||||
|
Quote:
- Bryce |
|
#9
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Here is the Austria Microsystems link to the data sheet.
http://www.ams.com/eng/content/downl...6/533867/34237 For the AS5145B, on page 29 it says that the default firmware has the incremental mode set up for use. |
|
#10
|
|||
|
|||
|
Re: Magnetic encoders? Anybody else having trouble?
https://wpilib.screenstepslive.com/s...control-system
Well here's WPI's instructions on how to AS5145B Magnetic Encoder with the FRC Control System. Not sure how much it'll help, but just my 2 cents |
|
#11
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Quote:
So it looks like sg999 has it right. Take a look at the WPI instructions. The only gotcha is that the CSn pin needs to be pulled low to use this feature. Then it works just like a standard encoder. On a side note, it looks like this chip can take rotational speeds up to about 15,000 RPM. It looks like to go this fast would require putting the chip in high speed mode, but it really is unclear. Good find! - Bryce |
|
#12
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Quote:
|
|
#13
|
|||
|
|||
|
Re: Magnetic encoders? Anybody else having trouble?
How are you mounting these encoders? We just got ours today, only to realize they don't fit on the encoder shaft of the mini tough boxes we were planning to use.
Also, has anyone figured out if putting the encoder too close to the motor will actually cause interference, as our backup plan for mounting these encoders also involves putting the encoder almost touching the motor. EDIT: No, putting the encoders right next to the motor doesn't cause (noticable) interference, we tested them today. Last edited by sg999 : 19-01-2013 at 17:46. Reason: Answered my own question |
|
#14
|
|||
|
|||
|
Re: Magnetic encoders? Anybody else having trouble?
I'm a bit confused. In table 4, it says the max input frequency for the magnet is 153 rpm @4096 positions/rev. In table 7 it says that you can go up to 9766 rpm@ 64 samples/rev. Then in 9.6.3 it says it can go up to 30,000 rpm and refers to table 7. Maybe by going lower than 64 samples/rev?
In any case, I can't find where to change the samples/rev. Any ideas? |
|
#15
|
||||
|
||||
|
Re: Magnetic encoders? Anybody else having trouble?
Quote:
I don't know how the encoder truly works, but one can, with the WPILIB, read the amount of ticks(in one direction) the encoder has moved since the start of the robot's program. The get() function of the Encoder class will give you the ticks (1024 per full revolution of a shaft). Say you move the shaft 3 revolutions counterclockwise since the start of the encoder class; the get() function would read 3072. Move the shaft 1 revolution clockwise, and the get() function will read 2048.(I don't know which way -- clockwise or counterclockwise, reads 'positive ticks') The library(or encoder) accounts for ticks read in the opposite direction One can also see what direction the shaft the encoder is reading and weather the encoder is moving or not(which is probably don't at the library level). Last edited by Azrathud : 11-02-2013 at 00:27. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|