We’re trying to use the AS5304 encoder to return the absolute position of a motor. How would we go about mounting this encoder onto to the motor/gearbox?
The AS5304 is a linear encoder. It can detect motion along a straight line. Is that what you’re trying to do?
If instead you want to measure the angle of a rotating shaft, the AS5030 rotary magnetic encoder is what you need.
Whatever the case, the place to go is the Kit of Parts page on the FIRST web site. You will find full documentation on each of the sensors provided in the Kit. The sensor you’re asking about is in the Parts Data Sheets section, as is the one it sounds like you need instead.
Can the KOP magnetic rotary sensory measure more than 360 degrees of shaft rotation?
Right off the bat, I’m not an electrical guy, but I think you’ll have a problem reading a motor’s orientation directly off a motor when its moving. You probably want an encoder (which will read a fast spinning motor) or you want the magnetic angle sensor somewhere closer to the end of your motor/gear system (on the final output shaft).
Can you be more specific about what you’re trying to measure?
Bane bot shaft that’s driving a larger gear for an arm. Dead shaft on arm joint, so I’m trying to measure the arm position by how much the bane shaft has turned which will be more than 360 degrees to move the arm up and down.
The rotary magnetic encoder would work pretty well in this case.
It only gives a position out of 360 degrees (actually in 1.4 degree increments), which isn’t ideal, but with code you can keep track when it “crosses over” from 5V to 0V.
As long as its not spinning at >~1000RPM, you should be fine.
Alternatively, you could buy a multi-turn potentiometer, which would give you an absolute position of the shaft. For example, a 10-turn pot would give your position over 3600 degrees. However, they physically cannot turn more than this amount: so plan accordingly. Also, keep in mind that you will lose resolution if you use too many turns. (There are 10-bits of resolution, which means each detectable step is about 0.1% of the total value.)
We haven’t tried it yet, but our solution to the same issue is to use an accelerometer. Should read the absolute angle of the arm with respect to the floor. Some filtering for hits may be required.
Check your torques and all, my suspicion (as a mechanical guy) is that you’ll need a larger gear reduction to move the arm with enough torque, control and to avoid stalling your motors at high amperage for too long. A very good PID might alleviate it, but lots of reduction will help.
When working with potentiometers as suggested, it may be helpful to mount the pot to a slower turning shaft or in some cases the slowest turning shaft because you can ‘get the most’ out of your ten turn pot.
Alright, thanks.
Questions about the linear encoder: Where is the AS5304 mounted in order to get a reading. Does it have to be in contact with a motor, or does it simply have to be on the robot?
Can the Motor With Encoder example in LabVIEW work with the AS5304, without any modifications?
Read the AS5304 data sheet to answer these and many other questions.
New question:
Where would we go to purchase the AS5304-AB encoder. I checked the link given by the PDF from FIRST, but it only has the AS5304-A and AS5304-B models for sale.
The sensor you want to use may not be the best option. It requires very precise mounting to work. The cherry an8 series or a vishay version would be better. The cherry allows for some magnet misalignment and a variation of magnet to face much greater than the Austria micro chip. The vishay version has a shaft. CUI also has a version that has many features by SPI.