|
Magnetic Encoder Help
We have an AS5130 magnetic encoder from ASM. We're trying to get some readings off of it so we can determine our shooter angle. i'm having trouble getting any response from it.
here's what we've done so far.
wiring is as follows (per an email from an ASM representative)
5V to Digital I/O 5V
GND to Digital I/O (-)
Vout to Digital I/O Signal
Programming:
1. We used the Encoder class, meant for quadrature encoders. We know this is not a quadrature but we tried it anyways. We called the digital I/O channel that it was plugged into and an unused channel as well because it required 2 channels in the constructor. We were unable to read any values.
2. Some CD posts suggested using the Counter class. We tried that as well and were not able to get any readings either.
3. We also tried the PWM class since it should be a PWM signal coming out of the sensor. This classes constructor calls for a pin on the PWM channels on the digital sidecar as opposed to the digitial I/O channels. So we moved the connection as required to a PWM channel. This time we didn't just get no readings, we got an diamond shaped error icon in the output field of the SmartDashboard as if the output was not a number/correct format or something????
4. Lastly, we also read on CD as well as some FIRST forums that a low pass filter could be used to convert it to an analog signal read from the analog breakout. When we did that we found out pretty quickly (and luckily before damaging anything) that it was making the transistor on the breakout module heat up enough to burn your finger within a couple of seconds.
__________________
Wendy
Team 3502
|