Search results

  1. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    @geofft Thanks for the report. How did you find out about that branch and how to use it so fast? Did a little bird twitter "coke" down from the stance? ;-)
  2. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    It isn't, its a very minimalistic (1980s style) digital protocol via UART. IIRC even the voltage reading is not being measured directly by the display.
  3. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Not sure where it was, stancecoke reported it to me. I'll probably just implement a counter that counts when throttle/torque override is present: if erps <3: down else: up if counter reaches 0: disable override init 127 or something.
  4. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    No, that would be an experimental and dangerous option we could add though. What changed since October is ACAsetpoint 282. In the past apparently someone blew up his motor by tilting his pedal against a wall or something. Without this new protection the bike then wanted to move but couldn't...
  5. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    You know that I reworked that part? So no idea what version you're referring to. Where I picked it up it looked up some position from the (only) svm wavetable that was influenced by hallsensor position and motor angle. And that "some position" could have been anything within a 60° range...
  6. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    You can change the 6step startup to trapezoid and see if that works better (wavetable already there, just one or two line change in motor.c) This is on my backlog, but hadn't time/motivation so far.
  7. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    I had the same behavior with the same ACS712 on a 35A 12FET when there was a solder blob connecting all 4 pins. No idea why they did that, once I (more or less) removed it more current went through the sensor and correction worked fine. Have you checked on the underside of your board that there...
  8. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Why do you get a buildup? If hysteresis is >1 as it was b4 you would get a constant offset of 1 once correction kicks in?
  9. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Yes, you invest ~40+ hours to implement that ;-) Without worsening the code quality. Without breaking anything. ...
  10. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    @davideserin or whoever edited the Wiki: Power Based Control: ? Switches from current regulation control to power regulation (the lower voltage the more current you get for the same assist %) Switch to 360 degree interpol: ? Normally the controller interpolates PWM between hall sensor signals...
  11. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Strange indeed. Take a look at the code where the gear ratio is used. Maybe you find some explanation/bug. I'm unable to explain it right now. Debug the X4Value in the left panel, normally it goes more or less linearly down when temp goes up. Then you have to calculte 0 point and gradient and...
  12. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Gear ratio is really only needed for determining the correct speed, motor will not turn differently if you change it, only the set speed limits work different then. That's ok, amplitude is proportional to current, no automatic upscaling is done. Can be adjusted in 5 steps just as power assist...
  13. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Using 10A regeneration now for ~1000km with the Custom FW, so far nothing exploded ;-) On a full battery Custom FW prevents overvoltage. Regarding stock FW: wrong thread :) Imho regeneration is overrated though, you get maybe 10% more range, but you could also just use a geared motor which is...
  14. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Regarding controller reset: could you comment out the GPIO_Write in gpio.c and try again: // added by DerBastler - Light void light_pin_set (void) { GPIO_WriteHigh(LIGHT__PORT, LIGHT__PIN); } // added by DerBastler - Light void light_pin_reset (void) { GPIO_WriteLow(LIGHT__PORT...
  15. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    The OS FW already has options for compensating "different gaps". I had this last year and can tell you it feels completely different than the resonances. So maybe you fixed some additional problem with the motor. But the main problem seems to be a resonant circuit with certain controller/motor...
  16. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Display is not running on 5V rail, so there is no current you're saving if you don't have it. For every mA the BT mod uses, the regulator will burn 10 times more, not a good idea.
  17. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Regarding C and P Parameters, they are being processed, but not bound. Wheelsize currently can not be bound, cause its one of the few options not yet changable at runtime. P1 could be bound now. The remaining P and C values have limited value ranges (you have to look at the logical and shift...
  18. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Then the remaining question is: Can we do something about it via software. If we can that would be great, because then we're better than the original FW in yet another area. I don't have the equipment to even figure out what's going on. If someone has a fancy oscilloscope he could probably...
  19. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Does this cheap "trapezoid" even do PWM? I recently added a trapezoid wavetable, you could test that by changing a few lines in motor.c But ofc this "trapeziod" ist still generated via PWM. Maybe it's simply the PWM frequency on the KT controllers. Can we change that at all? Edit yes we can...
  20. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    So those resonances seem to be a commutation issue after all, although I have no idea what might cause them. Ofc iterpolation has to go backwards then and maybe also you'd have to add -120° (or -60°?) to the table lookup (also not sure if motor angle would be the same for forward and backward...
  21. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    You'd have to change interpolation in motor.c and also disable or rework angle correction there. Also you'd have to implement something in display.c or BOdisplay.c to set or reset the new reverse flag you will have to introduce. If you write nice code and don't just hack it in some way, we...
  22. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Can't write for anyone else, but I won't until you don't prove you read https://github.com/stancecoke/BMSBattery_S_controllers_firmware/wiki by posting some kind of useful information.
  23. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    Wiki: https://github.com/stancecoke/BMSBattery_S_controllers_firmware/wiki Controller should both work, read wiki for info on pimping square wave (ACS712) :) Regen braking working fine on direct drive including overvoltage protection, 5 step adjustable via app or additional regen throttle...
  24. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    It doesn't, it starts at ui32_time_ticks_between_pas_interrupt_accumulated>>3 which starts at timeout, not at 0 as in your code. You can let it start at timeout <<3 which would be more correct but I doubt that solves your problem.
  25. Xnyle

    KT motor controllers -- Flexible OpenSource firmware for BMSBattery S/Kunteng KT motor controllers (0.25kW up to 5kW)

    ui16_time_ticks_between_pas_interrupt only gets updated when ui8_PAS_Flag == 1 otherwise it keeps it's initial value of 64000L. ui8_PAS_Flag only gets to 1 if there was an interrupt on the PAS__PORT which is GPIOD which is address GPIOD_BaseAddress which is 0x500F For what you describe to...
Back
Top