This thread was started for my own use to figure out some info about the KEBLPD software, but formatted into a E-S forum friendly format. It's going to break all kinds of rules about double posting and not properly citing sources or giving credit. Suffice it to say all of this info has previously appeared on the E-S forums but it was scattered EVERYWHERE.
So if some of it came from you, then THANK YOU! I don't mean to take anything from your efforts, but I want to keep this info readable, so I didn't cite every source. I will give special thanks to E-S users: methods, knuckles, geoff57, stator, caleb777, and mwkeefer whose info I borrowed directly. Also to the guys from https://endless-sphere.com/forums/viewto ... controller that worked on getting the original Chinese to English version. Without them this would never have come into being- my Chinese sux.
OK, Let's get to it!
BASIC Programming and installation steps:
1. Gather the ESC and USB hardware.
2. Figure out how to install the software and drivers. This is not a straightforward install. I have a new option, supplied by user: mwkeefer. It is a package of all the software and an installer that will do most of the work for you. Mike say it will work for Windows XP, Vista, and Windows 7. I have made the file available for download at the bottom of this post. You need to download the file, decompress it and click on setup.exe. Everything installs itself and you open the program! I am leaving the old instructions, so you can figure out what the installer does for you or do it yourself. You can skip down to step 5 if everything worked out right.
I have compressed the need files into a zipped file below. This install was for Windows Vista, yours may be different, especially Step e.
f. Open the Parameter Designer, which with luck, will open!a. Download the software folder and unzip it.
b. you can try to open the Parameter Designer software, but it probably won't launch correctly until you finish the rest of the installs, so keep going.
c. Run the setup.exe for the MDU232M-Driver. This is for the USB cable/adapter.
d. Drag and drop the downloaded Richtx32.ocx and MSCOMM32.OCX files into the directory /system32 (or c:/windows/SysWOW64 for 64-bit) on your computer.
e. Now you have to register the .ocx files. You can try "open with" on the individual files and browse your way to the system 32 folder and use the app "regsvr32.exe" to open the files and register them. I got an error code (yay Vista!) and had to use the cmd.exe app in the system32 folder running as the Administrator. This opens the command line mode so you can do the registration.
To register with the command line:
1. Drop the .ocx files into the system32 folder first then open the CLI.
2. Type this at the command line: cd c:\windows\system32 (or cd c:/windows/SysWOW64 for 64-bit)
2. Hit return, then type: regsvr32 Richtx32.ocx
You should get a registration successful message.
3. Hit return, then type: regsvr32 MSCOMM32.OCX
You should get a registration successful message.
5. Click "OpenFile" to open one of the "Example Settings" .asv files provided as a test file. The program should populate itself with info.
6. It's time to check your COM settings for the USB dongle. You need the USB dongle attached to the usb cable plugged into the computer. The dongle should appear in the device manager and you should be able see/set what comm port it uses. Fire up the PD software and set it to the same COM port as the USB dongle. It must be 1-5. If your computer assigned a higher port number then you can manually change it.
7. Let's load a test program onto the ESC and make sure all the connections are working. If you haven't already, now plug in the USB dongle to the computer (verify the USB adapter lights are on), make sure the dongle is NOT connected to the ESC yet, open the PD software, select your COM port, open your test .asv file of choice and press "StartTransmit". The phrase "Start Transmit" will appear in the white window and the text "Transmit Gauge" will start flashing, the button you pressed will now say "Stop Transmit".a. Go into Device Manager and look in the COM port section. Make sure the USB cable is plugged in.
b. Look for the USB device-labeled CP2101 USB to UART Bridge Controller. Make sure it has a COM number of 5 or less.
c. You can manually assign COM numbers by going into the advanced properties and manually setting the COM port to a lower number. COM's 1 and 2 are usually open. These were reserved on older computers for things like parallel ports that no longer exist on new computers. Use one of those. You may have to take something that is on 1-5, change it to 6 or 7, then change your USB dongle to one of those lower numbers.
8. Insert the USB dongle into the controller's 4 pin programming harness. The button on the connector goes up, the visible metal on the connector goes down. The lights should be up on the dongle. For some reason at this point, my computer wanted to install the USB driver, even though I thought I had already installed it. Follow the Windows installer prompts to navigate to the driver file folder and open it to install the driver. The blue progess bar will quickly fill and the "Completed" will appear in the white window. This should take about a second to happen, any longer and you have an issue, check your connections and COM settings.
9. Now that your connections are verified, you can attempt your first custom program. It took me a little while to figure out what each field means and appropriate values,but for a starter setup I am using Method's DC30AC80_65ADC.asv file but added the 3-speed switch parameters and no regeneration. All the PD fields will be explained below, but for now, let's assume you have completed the programming, clicked "StoreFile" to save it, and then used the snipping tool in Windows to take a screenshot of the PD window, which will help others to see what you've done quite easily if you have a question later. Now, you are ready to upload to the controller. So go back to step 7 and repeat.
10. Disconnect the cable and go ride. On your first ride, keep track of what's going on using a Cycle Analyst, monitoring temperature levels, and using some common sense. Don't assume you've go it right the first time, even if you did!
This is lifted direct from Methods thread, there's too much info to reprocess, other than some light cleanup. https://endless-sphere.com/forums/vi ... 38#p202364
Parameter Designer Field ExplanationsCANT GET SOFTWARE TO RUN
* Did you install the two drivers? If you are on Vista, try running as administrator
CANT RECOGNIZE PORT
* Go into Device Manager and look in the com port section. Look for the USB device. Make sure it has a com number of 5 or less. You can manually assign com numbers by going into the advanced properties and manually setting the com port to a lower number. Com's 1 and 2 are usually open. These were reserved on older computers for things like parallel ports that no longer exist on new computers. Use one of those. You may have to take something that is on 1-5, change it to 6 or 7, then change your USB dongle to one of those lower numbers.
* Make sure the USB dongle has lights on and is actually plugged into a USB port and not your network port or some other hole on the computer Don't laugh - happens all the time. Guys will put the dongle into any hole where it will fit.
EVERYTHING IS RUNNING - JUST WONT PROGRAM
* The controller must be powered off for this entire sequence.
* You must have the software running (i.e. pressed start) before plugging into the controller. This is because the controller only accepts a firmware update right at powerup. After that the controller multiplexes the programming pins out to other functions. So - if your controller is powered or the USB is plugged in before you hit program the microcontroller inside will be ignoring the programming ports. You must apply power to the controller 5V buss (via the USB) at the same moment you attempt to program. Dont worry - it is repeatable and reliable.
* If you get a message that says that the download FAILED then what is happening is the peripheral devices on your controller are sucking more current than your little USB dongle can source. Please disconnect a few items like the throttle, ebrake, cruise control, 3spd switch, etc. All those devices draw power from the +5V buss
SOFTWARE CRASHES, COMPUTER MAKES NOISE LIKE SOMETHING HAS BEEN UNPLUGGED AND THEN PLUGGED BACK IN
* In some cases (mostly with weak USB ports) the controller has so much capacitance on the board that when you plug in the USB dongle it crashes the little controller in the dongle. I remedied this by soldering a small inrush current limiting resistor of 100 ohms on your little USB dongle. Normally the dongle could handle the inrush but once it was put at the end of the long usb extension cable things got more sensitive. As a last resort you can always cut away the heat shrink I put on the dongle, unplug it from the extension cable, and plug it directly into the computer. This will fix the problem. Your new problem will be that you need to set your computer RIGHT ON the controller due to length issues... In this case you would want to procure a higher quality USB extension cable. Dont worry though - I wont leave you hanging. If you have problems with this uncle methods will take care of you.
This is a screenshot where I numbered each of the information fields and below are some explanations and extra info to consider when programming settings for those fields. 1. OpenFile- opens .asv files
2. StoreFile- saves .asv files
3. <<hide- hides the right 2/3 of the PD. This button changes to ">>visiable" when closed
4. OpenRoot- Shows the directory path of the starter *.asv file
5. StoreRoot- Shows the directory path of the *.asv where you have saved your settings. If this field is empty, then you have not saved your current settings yet.
6. Comm Num- The COM port number. You can manually enter numbers here or use the drop down menu to choose 1-5.
7. Start Transmit button- Press to start the upload. It will change to "Stop Transmit" when transfer is complete.
8. Transmit Gauge- This test will blink when "Start Transmit" is pressed and will shoot over with blue boards when you successfully flash the controller.
9. White Window- There is where the current state of the software will be displayed along with history.
10. Board Type- Choose your controller, the last two numbers are the number of FETs - 1:EB206 6-fet, 2:EB209 9-fet, 3:EB212 12-fet, 4:EB215 15-fet, 5:EB218 18-fet. This setting tells the board what size shunt to expect, setting a lower board type sets a higher expected shunt value an hence a higher current limit.
11. PhaseDegree- This refers to your hall signals. Most are 120 degree. Compatible works for both.
0:120 Degree, 1:60 Degree, 2:Compatible
12. PhaseCurrent- This is the phase current limit. Read below to understand. Keep the ratio to RatedCurrent. !! Dependent on the shunt value and Board Type selected !!
13. RatedCurrent- This is the DC current limit. Read below to understand. This is the current limit you will see on your CA. !! Dependent on the shunt value and Board Type selected !!
14. HaltVoltage- This is the low voltage cutoff for your battery setup. !! Dependent on the R12 voltage divider !!methods wrote:There is DC current and Phase current. The numbers you see in the software are based on a LARGER shunt resistance value. When you cut the shunt resistance value in half you are effectively tricking the controller. When you are running 100A the controller thinks it is only 50A. That being the case, we have understand the relationship between the actual current and the programmed current.
The shunt values range from around 220uOhms to 240uOhms. This will put some variance in the numbers. As a rule of thumb, the controller is going to run about double the current you set up. If you want a DC current of 60A I would suggest that you start by setting the DC current in the software to 30A.
The phase current is always a constant multiple of the DC current. As a general rule, if you cut the DC current in half, also cut the phase current in half. If you triple the DC current, triple the Phase current. Off the top of my head - I believe that the phase current is about 2.5X the DC current. This is not critical, but if you set the Phase current too low you will get results that may seem odd... For instance you may find that at low speeds you have a lower current limit than you do at high speeds. This is because the phase currents are greatest at low speeds and lowest at high speeds... we can talk about this off line if you need to.
15. Tolerance Delta V - The number of volts you must rise over LVC to resume (hysteresis). For example, the battery voltage may sag and drop below LVC, the tolerance gives it a chance to drop and then recover.Methods wrote:If you want to utilize the LVC functionality of the controller then you will need to scale the voltages by 20%. I "fooled" the controller by changing the values of the voltage divider that it uses to read the V+ rail. The controller things that the voltage is 20% less than it actually is. If you tell the controller to set the LVC at 50V it will actually set the LVC at 60V
20% of 50V is 10V
50V + 10V = 60V
This was done to raise the maximum regen voltage and relieve an over voltage condition on the A/D input of the controller (credit to SAM-Pilot for finding that). The stock regen voltage is 75V. We wanted to have regen up to 90V
20% of 75V is 15V
75V + 15V = 90V
Here is a quick look-up table to help those who are not so math inclined.
(CHECK THESE NUMBERS - NOT TESTED)
Desired LVC Number to enter
20 V 24 V
21 V 25.2 V
22 V 26.4 V
23 V 27.6 V
24 V 28.8 V
25 V 30 V
26 V 31.2 V
27 V 32.4 V
28 V 33.6 V
29 V 34.8 V
30 V 36 V
31 V 37.2 V
32 V 38.4 V
33 V 39.6 V
34 V 40.8 V
35 V 42 V
36 V 43.2 V
37 V 44.4 V
38 V 45.6 V
39 V 46.8 V
40 V 48 V
41 V 49.2 V
42 V 50.4 V
43 V 51.6 V
44 V 52.8 V
45 V 54 V
46 V 55.2 V
47 V 56.4 V
48 V 57.6 V
49 V 58.8 V
50 V 60 V
51 V 61.2 V
52 V 62.4 V
53 V 63.6 V
54 V 64.8 V
55 V 66 V
56 V 67.2 V
57 V 68.4 V
58 V 69.6 V
59 V 70.8 V
60 V 72 V
61 V 73.2 V
62 V 74.4 V
63 V 75.6 V
64 V 76.8 V
65 V 78 V
66 V 79.2 V
67 V 80.4 V
68 V 81.6 V
69 V 82.8 V
70 V 84 V
71 V 85.2 V
72 V 86.4 V
73 V 87.6 V
74 V 88.8 V
75 V 90 V
76 V 91.2 V
77 V 92.4 V
78 V 93.6 V
79 V 94.8 V
80 V 96 V
16. EBSLimVoltage- This is the maximum regeneration voltage. !! Dependent on the R12 voltage divider !!The same rules apply for the REGEN voltages as LVC voltages shown above. 55V, 60V, 75V correspond to 66V, 72V, and 90V
17. LimitSpeed- This sets that global speed limit based on the percentage of full throttle allowed and overrides other speed settings. Limit speed works in both cycle and switch mode, it provides an an extra speed setting, this can be activated by a switch and could be used as a economy speed. Another use of this could be to provide a better form of motor over heating protection than to just stop the motor from working until the motor has cooled down, with this a thermal switch could be fitted inside the motor that operated at the temperature required this would then short to the ground wire of the hall wires this means only one more wire need come out of the axle of the motor, an override switch would be advisable the last thing that is wanted is to slow down in the middle of a junction. Values range from 30-99%
18. SpeedMode- This controls the behavior of the ESC's speed switch
0: Switch mode allows you to change speed on the fly using a 3-speed switch (Low, Medium, High)
1: Cycle mode latches the value at power on. In this mode two speed settings are available, speed 1 is used when the Infineon is switched on, pressing a switch the Infineon will change to using speed 2, the speed 3 setting is NOT available in this mode. This mode could be used in 2 obvious ways, fitting the switch in a hidden place on the ebike what you have is a parental mode or an on road off road mode, by setting the startup speed to a speed that would be suitable for children. Then you can let your children have a ride without danger then when you want to use it you press the switch and you have full speed. The alternative is to set speed 1 to the road legal speed, if you go out riding to your favourite off road track then when you get there press the switch you have full power for a ride off road where the law does not apply, if on returning you forgot to return to road legal speed and see the police anywhere around just switch off the controller switch back on and you are back to road legal speeds, when you get home count yourself lucky and tell yourself off for not resetting when you went back on the road.
19. Speed 1- The low speed setting. Can be set form 30-120% of top speed
20. Speed 2- The high speed setting. Can be set form 30-120% of top speed
21. Speed 3- The mid speed setting. Can be set form 30-120% of top speed
22. IndicateMode- see item #31, which this seems to work with. The P3 output (along with the speed LED signals P1 and P2) can be active high or active low depending on the setting of "Indicate Mode". For active low, set it to 0:Comm VCC (all LEDs share a common + voltage). For active high, set it to 1:Comm GND (all LEDs share a common ground). Values are 0:Comm VCC, 1:Comm GND, 2:164 Mode P1-DAT P2-CLK
23. ConverseSpeed- This the reverse speed setting in case you have the switch connected. this is a max. setting based on percentage of top speed. Range of 0-100%
24. BlockTime(s)- Current limit overshoot - higher values will let you overshoot more. Current limit Damping. Values vary from 1-10
25. AutoCruisingTime(s)- The length of time needed to lock in Cruise Control. Values vary from 1-15.
26. SlipChargeMode- The Slip Current Charge Mode feature is either "ON or OFF" and allows regen from the throttle. Throttling back when cruising will regen the Direct Drive hub motor and slow it down to about 15% of full speed. The eBrake regen and the Throttle regen act independent of each other. I set the Throttle regen to "OFF" by default (I like to coast freely when throttled back). Values are 0: UP 15 Mark (throttle regen) and 1:Only Fake Indicate (no throttle regen)
27. EBS Level- This sets the strength of the regeneration. A higher number is stronger.When the eBrakes are applied the Direct Drive hub motor will slow down to a complete stop. values are 0: (low), 1: (med.), and 2: (high) Setting 2: has been recommended for 26" wheels if you are using regen and the other numbers for smaller wheels.
28. Guard Level- The controller has a anti-theft feature which is activated through the TB pin. This sets the polarity of that signal. The default should be 0:Low. In this mode, a low signal on the TB pin will lock the motor from turning. Presumably, this signal would come from a external alarm system. In the 1:High setting, a high signal on TB will lock the motor. In order to use the High mode, you must remove the 51K ohm resistor at location R75.
29. Bar Protect- This is a throttle fault protection feature. When active (1:Yes), it will shut off the motor if the throttle input is shorted to +5V. Normally WOT is around 4V, so if the wires short, or the hall sensor shorts, it should go close to 5V.
30. 1:1 Design- This is for pedal assist sensor operation. The options are 0:Fast and 1:Slow, but another document says 0:False and 1:True.
31. P3 Design- This sets the function of the P3 LED output. When set to 0, the P3 output is active when in cruise control mode. When set to 1, the P3 output will also blink a trouble code when a fault is detected. The P3 output (along with the speed LED signals P1 and P2) can be active high or active low depending on the setting of "Indicate Mode". For active low, set it to 0:Comm VCC (all LEDs share a common + voltage). For active high, set it to 1:Comm GND (all LEDs share a common ground).
Whew! You made it! Got something you want to add/correct/clarify? Please send me a PM since you may not be able to post in this forum.