Encoder motors.
  • Hello again.

    I have been vacant for some time now, after i installed my new 32bit board, wich btw i couldnt be happyer with :)
    The change from 8bit has been flawless. No problems whatsoever that wasnt caused by my own ignoranse.

    But now i have started to look into these new encoder features, and the benefits realy makes me want to rebuild (again)
    I only use my gimbal on my aerial platform, and only for relatively mild payloads. Nex5/a6000/gopro cube.
    I have only found prebuilt encoder motors of the size that realy isnt needed for these small cameras.
    Is there any other places that sells these motors prebuilt?

    I found this page, wich has a 57mm motor that supposedly should work nicely

    But other than this i realy havent found much, nor any prices.
    If there is somewhere to source the encoder backplates seperatly that would also be fine, as my gb54 motors are more than
    fine for my use. And id hate to see them go to waste.

    I read trought the basecam sources for encoders, but as i understand you need more than just ordering the encoders themself
    and a prebuilt backplate package would be more suitable to me.

    Any advise?
  • A back plate that fits any design would be very difficult to produce. I have made some encoder modifications, each gimbal needs specific parts.... I am located in Finland Helsinki area.
  • Thank you for the reply again Garug.

    Finland huh, Im located in Norway preaty close.
    Do you have anything to show off your work :) ?
    As i understand motors with hollow shafts would be the easyest to work on correct?
    Is there any limit to how smal a motor you can make work?

    Best regards.
  • You find some results of my work here http://www.levitezer.com/styled-2/blog-2/index.html

    This is the one I have been using http://www.digikey.com/product-detail/en/AS5048B-AB-1.0/AS5048B-AB-1.0-ND/3188613 The magnet is 6 mm diameter. the challenge is to get it installed and everything need be well centered.

    You can contact me via here http://www.levitezer.com/contact-form/index.php
  • Thank you Garug, i was thinking more about images or photos of your gimbal\motors with encoders installed.
  • I do not know how to post pictures here and anyway, I can provide some pictures via email, if you contact me first so that I get your email address.
  • Those are really big and powerful motors for big gimbal especially when combined with encoders.

    One big advantage of encoders is that even small motors can provide high power for short time without overheating.
  • Those motors are a nice find aopen, But they are realy overkill for my payload range.
    And would change to much of my coptersetup to be usable tbh.
    But thank you anyway. I will send you a quote Garug.
  • if you can tell me what size your looking for?
  • Im currently using 48 series motors.
    motors that are in range is everything from 41 to 54mm
    Garug's work looks prommising, how much hassle is it to work with in basecam?
    Can you still use pid autotune with them installed?
  • Sure, PID autotune works. It can be a bit challenging to set the encoders calibrated after installation, but after that everything is at least as easy as without encoders and encoders use only camera IMU, so it is one IMU less to worry.
  • Great.
    One more question, Do you still need to buy the encoder license sepperatly or is it now worked into 2.50 firmware?
  • The encoder FW is needed and it cost extra: http://www.basecamelectronics.com/encoders/#full
  • Is there some value changes in the new firmware?
    Downloaded after buying, and tried to get the gimbal working without encoders
    Everything as the same as the 2.43 something firmware.
    Redid acc and gyro calibrations but i can not het the thing to stabilize at all now.
    Pitch seems to weak even with 250 power
  • For the first PID tuning, it is necessary get the gimbal just good enough so that the encoder setup can be performed. It does not work good without encoders.

    When the encoder setup is done, then it PID tunes normally.

    it could be good to perform erase EEPROM before encoder FW setup, expesially when coming from very old FW. there could be some settings mixed on EEPROM. Note though, EEPROM erase erases everything and complete setup needs to be performed.

    It is no use to start using encoder FW before encoders are installed.

    I would suggest using the non encoder newest FW until you have encoders. from that it should be relatively easy to transfer to encoder FW.
  • Ok. I Just saw that you could disable encoders so I thought IT Wold work ok if i did.
    Il Just wait untill i source some encoder motors
  • I got hold of a couple of motors.
    These are 28poles and has a custom encoder fitting.
    Using the as5048a. They came with regular servo leads attached so i assume they work via pwm
    Set everything upp in basecam and connected them to fc-r and fc-p as instructed by the encoder manual from basecam.

    But i cant get any reading in monitoring whatsoever.
    Anything dead on special i need to take care of?
  • error:0
    assert_line: 0
    COM errors: 0
    Encoder[ROLL] type: AS5048A,B (PWM)
    read errors: 5721
    Encoder[PITCH] type: AS5048A,B (PWM)
    read errors: 5721
    Encoder[YAW] type: DISABLED
    read errors: 0

    Got this from the debugger tool.
    Clearly there is something wrong i just cannot find out what?
    These are brand new encoders.
  • Why is Yaw disabled, you need to have all 3 encoders connected, or is this only 2 axis gimbal?
  • Only 2x right now
  • Just to make sure, are the motors configured also for 2 axis gimbal.

    You have plenty of read errors and for some reason the same amount. I would carefully check all connections and also encoder installation. The magnets need to be at centre and 1 to 2 mm away from the encoder chip.

    Have you connected 5V jumper, i.e. are the encoders getting the power?
  • I have not connected any jumper. But i meassured across the gnd and 5v pin on the fc inn connections that there was 4.87v
    The magnet and chip are spaced and held in place by aluminium enclosures so they cannot move from the set 1mm distance apart.
  • When i calibrate el.field i get values so they are clearly reading something.
    I just dont get why theyr not working.

    This is the setup:

    Motors: 5015 with hollow shaft. Magnet is seated at the end of the shaft with an aluminium spacer
    Encoder: as5048a seated in an aluminium backplate that mounts onto motor
    Board: Basecam 32bit with firmware 2.50b5

    Motor ouput for yaw disabeled
    Encoder input yaw disabeled

    rc_roll pin: pwm setting
    fc_roll and pitrch on theyr normal values.
    everything else preaty much normal.
    i have working stabilization with encoders turned of.
  • The Encoders have been tested with 3 axis configuration only. They should work even at 1 axis configuration, but 2 and 1 axis have not been tested. Your problems could be related to this, but more likely something wrong with the setup. Did you perform the calibration as instructed by users manual and this video
  • Yes, everything done per the pdf manual and this video.
  • Then maybe you have found a bug related to 2 axis configuration, but do you really intent to use it as 2 axis gimbal?
  • That is if so a werry wierd bug.
    Why on earth would it not work with 2 axis?`

    I intended on using it with 2 axis, as far as i can see all the benefits of encoders makes for a
    flexible platform. + some advantages for aerial packages like mine.

    This thing has started to grow gray hairs on me allready.
  • I will test it later on this week with my gimbal.

    It should work, it is just that it has not been tested.
  • Thank you Garug that would be werry kind.

    Coudl you share your settings aswell when you do?
    Maybe i overlooked something, even though i am werry causius when im working on my gimbals
  • I just tested 2 axis (pitch, roll) configuration, works ok

    I erased EEPROM and set up everything from start for 2 axis. I had some problems before setting RC settings correctly I have analog joystick connected and by default the inputs are PWM. After configuring RC and calibrating it, the gimbal was working very well 2 axis without encoders.

    Connected the encoders for pitch and roll from the encoder tab (remember press write) and verified the encoder raw data from realtime tab (remember check receive debug info) The data shows ok and acts accordingly the gimbal moves.

    Performed encoder calibration and the encoder started working well with encoders activated.

    This testing was just brief 'does it work 2 axis with encoders' test and it does, as it should.

    The motors on the test system are GB90 and encoders AS5048 PWM. The test was performed with 2.50 b2 FW.

    If you do not get raw encoder readings on realtime tab, then there probably is something wrong with the encoder installation.
  • where did you plugg the encoders inn?
    and did you change anything in the input mapping in the software?
  • I did not change any connections from the 3 axis configuration, so just accordingly the users manual. See page 6 physical connections FC_ROLL and FC_PITCH.


    There is no options on this. they must be connected as per the users manual, and nothing must be configured to the connections that are used. Other connections can be used normally on RC tab.
  • If you go to the rc tab, what does it say in the fc_roll and pitch dropdown menus?

    I dont get any data from the encoders at all.
    Just value 0
    If i use a multimeter (i know its not usable)
    But i do get values out from the pwm pin on the encoders. So atleast it does work.
    Just my board wont catch the data for some reason.

    I downgraded to 2.50b2 again and the same ressults appear.
  • This is starting to drive me mad.
    I tried again, erased eeprom. Flashed fresh firmware.
    All off a sudden i had values in the enc_raw area.
    But as soon as i saw them they where gone again.

    I meassured the 5v rail on my card an this is realy not good.
    rc_p: 4.6v
    rc_r: 1.5v
    rc_y: 4.5v
    fc_p: 1.2v
    fc_r: 1.2v

    How can this be?
    And could it be the cause of my issues?
    Should i try to feed the 5v to the encoders off my reciever f.eks?
    just to check if this is the cullprit?
  • 'no input' and that is logical as there is no RC input. those inputs are used by encoders. overall any input that does not have RC connected is good to set 'no input'
  • The voltage variation is really strange, because those pins are typically connected together (all + pins together and all GND pins together.) What board is that?
  • Dys board with plastic case.
    I opened it today to find out if there was anything wrong. and when i did i found a stock basecam board design innside.
    There was also nothing burned, nothing obvius atleast.
    There was a resistor over the pads you usualy put a jumper over to get the 5v rail i guess.
    that was about all out of the ordinary i could find.
  • The resistor is strange, but it could be fuse.

    power off and measure resistance between each + pins and then between each - pins. All readings should be 0.
  • Ok, first of all THANK YOU Garug.

    This is so embarassing i will have to cry myself to sleep for months maybe years to come.
    Yes i have an electric degree.
    Yet i still managed to put pwm on positive and ground via pwm pin.....
    Switched servo connectors arround and what do you know.
    Full reading......

    God i hate myself right now.
  • Question though.

    I use pwm to controll pitch can i still connect this to rc_pitch?
    Or how do i do that now?
  • And one more, should i auto tune again after the encoders are activated or would that be counter productive?
  • Sure, it is best to perform PID tuning after encoders are activated, and RC PWM can be used normally on the available ports. SBUS/Spectrum can also be used, but see users manual how to connect.
  • Another thing.

    During magnetic field calibration how far should you tilt the gimbal?
    I know the manual says 10-30 degrees but does it just calculate the remaining field values from that?
    Or if not how can you get smooth transitions when crossing extreme angles?
    Do you still use estimate frame angles?
  • I am not sure what the calibration does, but I suppose it does an offset correction (that would not need any movement) and direction detection (what rotation direction the value increases, what degreases) and maybe something else too, but just trust the users manual and it will be good.

    "Do you still use estimate frame angles?" no and no follow offset correction, better set them 0.
  • I have gone through your discussion and it is looking nice and cool. I think it is difficult to design the black plate that would suitable for all designs.
    About your PID autotune ofcourse it will work. It can be a bit challenging to set the encoders calibrated after installation, but after that everything is at least as easy as without encoders and encoders use only camera IMU, so it is one IMU less to worry.
  • Hi people i just started my encoder adventure

    these are the motors and controller i have


    GB5015EN Brushless Gimbal Motor with Encoder and TinyPro controller with encoder ports builnt in

    all looks working well except the encoders... they are not recgnized by the system

    this is the answer from the DEBUG

    in: C [67,1] [22 ] 22
    in: r [114,0] [] 0
    out: 4 [52,0] [] 0
    assert_line: 0
    COM errors: 0
    Encoder[ROLL] type: AS5048A,B (PWM)
    read errors: 0
    Encoder[PITCH] type: AS5048A,B (PWM)
    read errors: 0
    Encoder[YAW] type: AS5048A,B (PWM)
    read errors: 0

    i just read all the thread and it looks like it should be a connection problem but in my case it shouldn't be...

    any suggestions?
  • ok people things gone well by themselfe
    now i have a new issue....

    i can't configure the RC settings
    basically there is no difference if i set PWN, Summ PPM or S-Bus
    i can only have one channel working that on the controlboard is on the YAW port

    any possile reason for that?
  • Se the users manual, not all ports are available with encoders and SBUS is on different pin.
  • hi Garug
    yes i already saw that s-bus should be on AUX3
    i made a try but nothing changed