Log in

View Full Version : Problems with the AS5145B and CAN


ILikePizza555
02-02-2013, 14:49
Our team has decided to use the AS5145B encoder for some of our motors this year. However, we are running into a few problems.

We've double-checked and we are sure that the encoder is hooked up to the Jaguar correctly, however, in the Labview example project, the motor just keeps increasing speed and and encoder doesn't return return any data.

Also in the BDC-COMM application, when we use Position mode and Set the PID to some simple test values (12, 0, 0) the motor just turns and never stops. When we check the Periodic Status Messages, we see that the data returned is just 0.00 for POS B0-3 and Speed B0-3.

I'm stumped. Anyone else figured this thing out?

RufflesRidge
02-02-2013, 16:10
Have you wired up the CSn pin to Ground?

http://wpilib.screenstepslive.com/s/3120/m/8559/l/91404-using-the-as5145b-magnetic-encoder-with-the-frc-control-system

ILikePizza555
02-02-2013, 16:35
Have you wired up the CSn pin to Ground?

http://wpilib.screenstepslive.com/s/3120/m/8559/l/91404-using-the-as5145b-magnetic-encoder-with-the-frc-control-system

We are not using the digital sidecar, we are connecting it to the encoder pins on the jag, but, now that you mention it, the GND pin is connected to the (-) on the jag.

I'll try changing it and I'll see what happens.

RufflesRidge
02-02-2013, 17:15
GND should be connected to - on the jag, but CSn should as well. Even though you aren't using the DSC that page should still be helpful.

ILikePizza555
02-02-2013, 17:17
I can't change the wiring ATM, but I have a couple of pics for clarity:

https://lh3.googleusercontent.com/-pt06oelHgcA/UQ2PJQNIzHI/AAAAAAAAAOI/8BfcExSdO_A/s800/photo.JPG

https://lh3.googleusercontent.com/-KimpSDYUw5c/UQ2MbfqQHGI/AAAAAAAAAOE/6sFWSLtGTeg/s800/photo%25281%2529.JPG

https://lh5.googleusercontent.com/-_f5cns1sslY/UQ2Np4wEh-I/AAAAAAAAAN8/x7QutHjgUnI/s800/photo%25282%2529.JPG

Do we need to change the wiring?

Edit:
Sorry, I didn't see your last post

RufflesRidge
02-02-2013, 17:24
Excellent job on the pictures! If you run a wire from CSn to GND on the board and leave GND connected to - on the Jag I believe you should be all set.

ILikePizza555
02-02-2013, 17:53
Excellent job on the pictures! If you run a wire from CSn to GND on the board and leave GND connected to - on the Jag I believe you should be all set.

Okay, thank you. We have someone sodering the pins right now. Just wondering if you have tried doing this, and if you have, what's the best way to test it works? BDC-COMM?

RufflesRidge
02-02-2013, 18:17
Okay, thank you. We have someone sodering the pins right now. Just wondering if you have tried doing this, and if you have, what's the best way to test it works? BDC-COMM?

Using the encoder, used CAN, never used them together before. BDC-COMM sounds like a good way to check things out and moving to an O-Scope or DMM on one of the channels to see if it's actually changing are where I would go next if that doesn't work.

ILikePizza555
02-02-2013, 18:22
Thanks, we tried it out and it worked perfectly.