-
Notifications
You must be signed in to change notification settings - Fork 255
Home
Welcome to the LishuiFOC wiki!
-
Make sure, that your controller uses the STM32FEB or STM32F103 or any compatible clone processor
-
Make sure, the you can find the three shunts, three halfbridge-drivers and the OP on the PCB. Your PCB can look completely different, it's only important, that you can find the components.
3. Wire the STLink-V2 to the white connector, or directly to the PCB.
-
Download and install the Java Runtime Environment (if not already installed)
-
Download and install the System Workbench for STM32. Start Eclipse once to extract the compiler. (in path C:\Ac6\SystemWorkbench\eclipse.exe by default)
-
Download the repo from github and extract it.
-
Download and install the ST-Link Utility Caution, there is an issue with some contributions of the utility.
-
Doubleclick on JavaConfigurator.jar to open the configuration tool.
-
Power the controller with appropriate external power supply. Turn on the controller using controller display.
-
click on "unlock controller" once, to disable the read/write protection. Caution, the original firmware is deleted and can't be undone!
-
Adjust your settings for the parameters, then click on "compile & flash". Don't touch the parameters in the "advanced" tab, if you don't know what you are doing!
- Import the repo in Eclipse by file --> import --> git --> Projects from git --> clone URL. Copy the adress https://github.com/stancecoke/LishuiFOC to the dialog window and choose an empty folder. In eclipse, you have to adjust the reset setting:
- You have to disable the write protection of the controller once, this will delete the original firmware and can't be undone. You can use the ST-Link utility, see figure 19 of the manual
The firmware has an "autodetect" function. This function runs the motor in open loop and sets the right specific angle in the emulated EEPROM. You can use any hallsensor- and phase combination. To start the autodetect, make sure that the wheel can turn free without load, pull the brake lever and give full throtte while starting the system for 10 seconds. The wheels starts turning slowly. Release the throttle and brake lever After a few seconds it stops again and it'll perform the KV detection by spinning the motor at max speed. Then the procedure is finished. If the motor runs in the wrong direction, set the "Reverse" option in the GUI.
If you don't have a brake switch and a throttle on your system, you can start the autodetect routine by activating the autodetect and debug option in the GUI. The controller runs the autodetect at every start then. You have to run it only once, so you can disable the option again after one start.
Caution: all of this project is highly experimental and all you are doing is on your own risk!
https://www.youtube.com/embed/iYRHn77PX7U?wmode=opaque&start=0