Lishui "Open Source Firmware" project / KingMeter 5S

Yes.
Would be helpful, if you would commit your changes to a fork at GitHub, then I would see what you are doing;)
Or post the content of your config.h
 
Or post the content of your config.h
Not 100% sure what you mean, but my latest flashed settings are attached.
EDIT: config.h attached. Not sure if it (always?) is latest version.
 

Attachments

  • 20241212-113225CET.ini
    454 bytes · Views: 2
  • config.h
    2.1 KB · Views: 6
Last edited:
1734015543189.pngI found brake :). It was the only cable left on the pcb (besides the motor-cable) from the original cable-set (2 pin/wires). It does cut the power to the motor, but I somehow cannot start the auto-detect sequence (brake + full-throttle). Can there be more than one pad on the pcb (or on the STM32 chip) be used for braking? I probably do something else wrong here :).
 
Why do you want to start the autodetect again!?
You are not the first one, who reports, that full throttle + brake at start up doesn't start the autodetect routine. I haven't tried it for years.

You still have the speed source at EXTERNAL...

#define SPEEDSOURCE EXTERNAL

regards
stancecoke
 
Why do you want to start the autodetect again!?
If this should (could :) ) be a function, I just like to try it out :mrgreen:.
You still have the speed source at EXTERNAL...
I do not think I changed the speed source by unselecting the "external speedsensor" in advanced settings.

If I manually change the config.h file, can I only flash this file (how does that work?)

thanks in advance
 
I do not think I changed the speed source by unselecting the "external speedsensor" in advanced settings.
Are you sure?! It should work
https://github.com/EBiCS/EBiCS_Firm...r/src/Lishui_Parameter_Configurator.java#L610

If I manually change the config.h file, can I only flash this file (how does that work?)

There is the file compile makefile.bat in the project folder.
https://github.com/EBiCS/EBiCS_Firmware/blob/master/Compile_Makefile.bat

You can try to run it from a cmd window or double click from the explorer. But perhaps you have to adapt the path information in the batchfile manually.

regards
stancecoke
 
Last edited:
I tried the setup in a bike. It looks promising :). PAS works, support-modes look good. Motor only makes some gear noise. Pretty much as it used to behave with a Kunteng controller.

The only "rough" thing noticeable is the start up from standstill and very low speed. Power kicks in with a small bang/jolt and the motor rattles and jerks a bit. Like there is play and the motor "bangs" against it with full force. It could be the motor, I unfortunately use a geared motor.

Could the PPL setting improve this?
 
I made two clips. First a "fairly used" motor (sanyo):
The second clip is the exact same motor, but "almost new". I did not "autodetect" this one:
Not that much difference. It could be the controller. I could try a Kunteng S controller for comparison (have to figure the fase and sensor wires out for that ;)).

Could it help to do autodetect, or should I raise the rpm to swich to FOC?
Would a direct-drive motor behave better? When walking with the bike, it would be nice not to shudder :).
 
Thanks for the reply (y)
It seems that the transition from angle extrapolation to PLL fails
That sounds very technical to me, but I agree it looks/sounds like a "transition" not going as it should.

Disable the PLL, or tune the PLL parameters.
I will start with disable. I have no idea how to "tune" (use which values?) the parameters myself :mrgreen: .
 
Disable the PLL, or tune the PLL parameters. It seems that the transition from angle extrapolation to PLL fails
I did autodetect (the readings are very close to the other motor) and turned PLL off. That did take care of the judder and stutter (y). It picks-up and runs smooth from there, just like the Kunteng I used before (and most other controllers I presume).

For now I only experience some electrical noise. It is audible from 12-15km/h and gets louder going faster. Compared to the silent Sparta ION system, it is quite noticeable ;). I will experiment with the PLL parameters to see if noise can be improved.
Is there a way to send the config.h file to the controller, without compiling everything?
 
Last edited:
Compared to the silent Sparta ION system, it is quite noticeable
the Sparta Ion is a direct drive. Of course it's completly noiseless. A geared hub motor will always be more noisy than a direct drive.
I'll try to make the PLL more robust in the next days. I never use the PLL, as the difference in noise is not noticeable on a real ride. I'll take it as a technical challenge to my tinkering instinct ;)

regards
stancecoke
 
A geared hub motor will always be more noisy than a direct drive
Absolutely true. However, when I let go of the power, the noise (the part I call "electrical noise" ) goes away. The mechanical noise from the motor remains.
I'll try to make the PLL more robust in the next days. I'll take it as a technical challenge to my tinkering instinct ;)
Thanks, I will try it out!
 
the Sparta Ion is a direct drive
Could it be possible to get this motor to run:
1734717599021.jpeg

This is a smaller (just a bit ;)) front motor from Sparta. No controller inside, just a motor. The funny thing is the magnet ring in the lid. The hall sensors work on this ring, not on the actual magnets that the stators/poles use :rolleyes:. Could it work with the current software; does "autodetect" find the right values to compensate for a difference (angle?) between both rings of magnets?
 
This is a smaller (just a bit ;)) front motor from Sparta. No controller inside, just a motor. The funny thing is the magnet ring in the lid. The hall sensors work on this ring, not on the actual magnets that the stators/poles use :rolleyes:. Could it work with the current software; does "autodetect" find the right values to compensate for a difference (angle?) between both rings of magnets?
It's probably a SIN/COS encoder, which is much more precise than the UVW hall sensing type. If it uses just two hall sensors, then that's almost certainly what it is, in which case they will be analog sensors rather than digital.

For another example of this, take a look at my Powerchair BLDC motor thread around here somewhere (motor tech subforum, I think).
 
If it uses just two hall sensors
This one does work with 3 sensors. Most "Sparta ION" motors use this setup. Sensors are A20L. Unfortunately a sensor broke and I destroyed the sensor-pcb while desoldering a sensor :mad:.
I did read somewhere that these motors could be PMSM motors.
 
Given the A20L is a bipolar digital type, then the ring is probably just magnetized in a bipolar pattern that lets the controller know where the rotor magnets are relative ot the stator. It probably has the same number of poles as the rotor, but it could be different if the controller is custom made for that motor design to account for that.

You can test this by coutning the pulses from any one of the sensors. Also, you can verify if the sensors are all facing the same way, to know if it's 120 or 60 degree timing.


As for why they would do it this way (more expensive, more complicated, requires "calibration" to ensure alignment of ring to rotor magnets, etc), it's because halls near the stator (or in it) reading the rotor magnets have to deal with all the crap thrown out by the stator windings, and still try to provide a valid clean signal to the controller. Under high currents this doesn't always happen, and can be a problem during regen braking as well.
 
Also, you can verify if the sensors are all facing the same way, to know if it's 120 or 60 degree timing.
They do face the same way, I recon it is 120 degree.
The bigger rear wheel motors have 6 hall sensors by the way. (there is a controller inside)
Given the A20L is a bipolar digital type
Are most hall sensors bipolar in ebike motors? Could a A20L be replaced with a more common 41F (or a knock-off)?
 
Back
Top