|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
How do I use the AS5304 sensor?
I am trying to find out how to use the AS5304 sensor and how to get a signal out of it. I'll like to know how to wire it and to get a signal.
|
|
#2
|
|||
|
|||
|
Re: How do I use the AS5304 sensor?
The AD5304 is a magnetic linear encoder, which requires a magnetic strip to work. Assuming you have the magnetic strip, you then place the sensor <1.0mm away from the strip and slide it along the strip. This produces quadrature pulses which can be read using the Encoder class (or VI) in WPILib.
As for wiring, connect the 5V supply and ground to the corresponding pins on the roboRIO, and the A and B channels to two digital inputs. The channel numbers of the digital inputs are what should be supplied to the Encoder constructor/open VI. |
|
#3
|
||||
|
||||
|
Re: How do I use the AS5304 sensor?
Ok thanks. I'm starting to wire it now. How do I get a signal from the Rio. Is their any additional code or anything like that for it to work. Or do I plug it in and it works.
|
|
#4
|
|||||
|
|||||
|
Re: How do I use the AS5304 sensor?
Note - programming info is followed up in another thread.
|
|
#5
|
|||||
|
|||||
|
Re: How do I use the AS5304 sensor?
Do you have a bare AS5304 chip, or are you using the adapter board that was supplied for FRC teams in the 2011 Kit of Parts?
If it's the AS5304-AB-2.0 board, with JP1 labeled "Ind AO B A GND 5V", then connect it exactly the way you would connect a quadrature encoder. Because that's exactly what it is. +5 and GND go to the +5 and GND pins of a DIO port on the roboRIO, A goes to the SIG pin, and B goes to the SIG pin of a second DIO port. http://www.usfirst.org/uploadedFiles...r%20Manual.pdf |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|