Encoders not working on PWM or SPI on SimpleBGC 32 Extended
  • I have tried several configurations on using both PWM and SPI from encoder to controller, and get no data from the encoders.

    This is similar to https://forum.basecamelectronics.com/index.php?p=/discussion/comment/9520#Comment_9520, which appears to be unresolved.

    I bought this https://www.iflight-rc.com/index.php?route=product/product&product_id=233&search=8028 kit. Which has the AS5048A encoder and the SimpleBGC 32 Extended controller ( https://www.iflight-rc.com/index.php?route=product/product&path=25_95&product_id=276 ). I have updated the board to '2.63 b0 Extended + ENCODERS' from GUI v2.63 b0.

    For PWM I hook up to the v+, gnd, and rc-p/fc-p/fc-r on the controller using stock included harnesses

    For SPI I hook up to the three SPI ports built into the controller using stock included harnesses

    Here is the debug for the PWM connection (skip autodetection checked or unchecked):
    Device s/n: 01239f8b8584d442ee, MCU s/n: 38363020015734591b002000
    Firmware ver.: 2.63 b0, board ver.:3.6
    assert_line: 0
    COM errors: 3
    Encoder[ROLL] type: AS5048A,B (PWM)
    read errors: 7175
    Encoder[PITCH] type: AS5048A,B (PWM)
    read errors: 7178
    Encoder[YAW] type: AS5048A,B (PWM)
    read errors: 7175
    TIME SLOTS FREE (us): 1:516, 2:522, 3:206, 4:460, 5:273, 6:266, 7:524, 8:278, 9:525, 10:529,
    I2C errors: 1; by device: 0x68=1;

    The debug trace for SPI with skip autodetection checked is the same.

    The debug trace for SPI with skip autodetection checked does not show read errors or any problems.

    On the monitoring tab: In all cases (PWM, SPI, skip autodetection checked or unchecked) the ENC_RAW_R, ENC_RAW_P, and ENC_RAW_Y show value of 0. Various other monitors show reasonable values.


    Since at least one other person is seeing this I suspect its not simply a rare defect. I need to get this resolved or Ill have to return the controller and find another solution.

  • Hello,
    "For PWM I hook up to the v+, gnd, and rc-p/fc-p/fc-r on the controller using stock included harnesses"
    - this connection type is suitable only with regular or Tiny boards.

    The extended board has particulary ports for encoders: http://ybex.com/d/75hqvf74rb9ipuhphiypabfofs2or88rcpcdxbs5.html
    I markered pins which will be used for PWM connection type.
  • Another important thing, there are two types of AS5048 chips: https://media.digikey.com/pdf/Data Sheets/Austriamicrosystems PDFs/AS5048A,B.pdf
    Types differ in available interfaces:
    AS5048A - SPI + PWM
    AS5048B - I2c + PWM
    What type of chip do you have on the board?
  • AndrewSupport: Thanks for responding. As specified in my post:

    "the AS5048A encoder"

    "For SPI I hook up to the three SPI ports built into the controller using stock included harnesses"

    -Mark West
  • Hello,
    Ok. I found similar motor from Iflight with built-in encoder, and discovered there AS5048L
    This is clone of AS5048A chip is compatible with our boards.
    But sequence of pins in the connector is different from sequence of pins in our controller.
    This photo with description will help you connect the encoder correctly: http://ybex.com/d/q3uhyb1tzgsda23jecy4hlfk7pbdyb244g6zxthv.html
  • AndrewSupport: Thank you, Ill work on getting the harness adapted and see what happens.
  • i had the same connection problem and i solved changeing the pin sequence. But now I have another issue ... with version 2.60 or higher, I can't do the calibration of the encoders, why? It only works with the 2.56 b7 but with this I don't have access to MavLink!
    Thanks to who will help me!
  • Hello -

    I seem to be having the same problem with iFlight A5048A encoders.

    I suspect the problem can be solved by changing the pin sequence to the correct order.

    The link posted by "AndrewSupport" no longer works - so I can't view this diagram.

    Can someone please help me with the proper pin sequence?

    Thank you - Joe Stroup
  • Hello

    I am also having the same problems with the A5048A encoders. I'm also looking for the link to the pin sequence
  • Hello -

    Sorry for my delay in replying. I've uploaded a document with images that helped me with the pin sequence:

    https://www.dropbox.com/s/3fmxk9gy88598a6/encoder pinout.png?dl=0

    The connections are:

    ALEXMOS CONNECTOR ---------------- AS5048A CONNECTOR
    PIN 1 (GROUND) ------------------------- PIN 1
    PIN 2 (+5 V) ------------------------------ PIN 2
    PIN 3 (CS/PWM) ------------------------- PIN 6
    PIN 4 (MOSI) ----------------------------- PIN 4
    PIN 5 (MISO) ----------------------------- PIN 3
    PIN 6 (SCK) ------------------------------ PIN 5

    I've also uploaded a photo of a cable I made. Please note - these pin sequences are not symmetrical - you have to make sure you attach the proper end to each device. In my photo, you'll see that I've marked one connector - it's the connector that must be connected to the Alexmos connector.

    https://www.dropbox.com/s/1x6zq7nqy876zfz/Alexmos to AS5048A wire harness.jpg?dl=0