XPD: open-source keywin e-bike lab replacement

Get all your technical information about electric bikes here.
User avatar
stancecoke   100 kW

100 kW
Posts: 1023
Joined: Aug 02 2017 2:56pm

Re: XPD: open-source keywin e-bike lab replacement

Post by stancecoke » Sep 26 2017 2:12am

I just bought this controller from aliexpress.

Edit: The processor is a 16bit NEC:
D79F9211
1635EB40x

Is there any experience with this controller and the XPD software?

Regards
stancecoke

edit: here are some pictures of the circuit board:
Image

Image

Image

Galvo   100 µW

100 µW
Posts: 9
Joined: May 01 2017 8:28am
Location: Singleton WA

Re: XPD: open-source keywin e-bike lab replacement

Post by Galvo » Sep 30 2017 4:39am

Cowardlyduck wrote:It's not exactly related to the XPD software, but I had some issues using it after upgrading to Windows 10 recently.

The issue turned out to be with my USB to Serial chip. Apparently Prolific (the makers of most of the chips used in USB to Serial converters) no longer support the 2303 chip on Windows 10.
After doing some digging I came across the blog post below that outlines how to install an older driver from 2008 that makes it work on Windows 10.
http://leftbraintinkering.blogspot.com. ... evice.html
After installing the old driver I was able to run XPD and upload new settings to my controller (18fet EB3) again. :)

Cheers
Yay I cannot believe how much I have read to finally find the the answer to my issue been on it for about 6hrs :) Thank you Cowardly Duck so much.
The program finally recognizes the serial port im using. Ok Ive read heaps but Im a dummy so going to ask anyway as I didn't see my controller. Its a 12fet 3077 mosfets 48v Max 60v can some one please give me an idea of what the settings should be for regen? I had the bike wired for a test run and regen was like changing from 5th to 4th gear and I have been told regen is strong on this controller? I am running a 52v setup. I do have a broken wire that needs mending on the 3 speed switch could that be affecting regen?
Also a quick question. Can you see the settings that are already in your controller? when you plug in the cable does it register the settings? I would like a copy of what it is set at in case I do something undesirable. My controller is below.
Attachments
22046480_10155993551039683_1617251809533252855_n.jpg
22046480_10155993551039683_1617251809533252855_n.jpg (68.13 KiB) Viewed 3628 times

User avatar
Cowardlyduck   100 MW

100 MW
Posts: 2637
Joined: Jun 26 2011 8:41pm
Location: Canberra, ACT, Australia

Re: XPD: open-source keywin e-bike lab replacement

Post by Cowardlyduck » Sep 30 2017 5:59am

Hi Galvo, glad that info was helpful! :)

To increase the regen, make sure you set it to Strong or Unlimited in the Regen setting, and also make sure the upper voltage limit is your batteries fully charged voltage. Also be aware that the EB3 controllers have a bug where if you set the max regen voltage to about 58.4V they will actually set it lower by about 2-3V. You either have to accept this lower value, or set it higher. I found setting it to 58.6V+ usually fixed it and I just accepted the small risk to my battery (it's really not that bad anyway as you will use that excess power soon after anyway).

To answer some of your other questions. Your 3 speed switch won't be affecting regen. You cannot read the settings already set from the controller (it's just not possible with these controllers).
For the most part, the pre-set configurations that come with the XPD software are acceptable for a regular hub motor setup so if you screw it up, just start again from one of those.

Cheers
Custom made 18650/21700 battery packs

Modified Stealth Fighter - Force air cooled motor @ 6KW, Adaptto Mini-E. 49AH, 52V 18650 - 2.5Kwhr
Cowardlyducks - Stealth Fighter Videos

BikeE recumbent commuter - 9C, 6Fet Grinfineon, internal 17AH, 52V, + on-board solar.

Ebike Garage - My YouTube Ebike ramblings.

High Power LiPo wiring harnesses - 4P - XT90, HXT4mm, 5.5mm. 200Amp+ capable. Global shipping.

Galvo   100 µW

100 µW
Posts: 9
Joined: May 01 2017 8:28am
Location: Singleton WA

Re: XPD: open-source keywin e-bike lab replacement

Post by Galvo » Sep 30 2017 6:08am

Thanks Cowardly
Apparently I need the KH612 infinion 4
So got that sorted.
Regen is not shown as strong or low etc on this setting it shows it as Force i.e 40 then theres ebs limit voltage so I guess I just keep increasing the force ( May the Force) until im happy. I cant believe I played and read for 3 nights until I saw your post hahaha

User avatar
Htfan   100 W

100 W
Posts: 132
Joined: Oct 24 2014 12:10am
Location: So Cal

Re: XPD: open-source keywin e-bike lab replacement

Post by Htfan » Sep 30 2017 7:58pm

jerome_speedy wrote:Hi all,

I tried to use the XPD program, which seems so much more simple to use than the Keywin software, but I have several problems....

First of all, my Xie Chang controller (supposedly on ver 6, which infineon number does it equate to ?) was delivered with a 5 pin MALE JST plug, which is unsual
P1060128.JPG
Also, my USB-TTL cable, bought from Lyen, doesn't have the same colour order from the picture 2 posts before,and the cable loop is not on the same pin number, which is a bit puzzling.
P1060126.JPG
As for the software itself, XPD used under Linux runs well but didn't recognize my controller (not surprising given the wire problem discussed above).
On Windows XP, XPD 3.3 doesn't even start, although all the packages from Sourceforge were installed (Python 2.7 is in the programs menu and the programs launchs).

Any suggestion ? I only want to program the regen braking on my controller, nothing more ! Thanks
I didn't see an answer to the lyen programming cable compatibility question. I have a lyen 12 Fet and his cable does not seem to successfully upload to the controller. (download seems to work)

Thank you
"Try not to become a man of success, but rather try to become a man of value."

- Albert Einstein

User avatar
MrDude_1   100 kW

100 kW
Posts: 1015
Joined: Aug 17 2012 3:07pm
Location: Charleston, SC

Re: XPD: open-source keywin e-bike lab replacement

Post by MrDude_1 » Oct 16 2017 11:25pm

Galvo wrote:
Cowardlyduck wrote:It's not exactly related to the XPD software, but I had some issues using it after upgrading to Windows 10 recently.

The issue turned out to be with my USB to Serial chip. Apparently Prolific (the makers of most of the chips used in USB to Serial converters) no longer support the 2303 chip on Windows 10.
After doing some digging I came across the blog post below that outlines how to install an older driver from 2008 that makes it work on Windows 10.
http://leftbraintinkering.blogspot.com. ... evice.html
After installing the old driver I was able to run XPD and upload new settings to my controller (18fet EB3) again. :)

Cheers
Yay I cannot believe how much I have read to finally find the the answer to my issue been on it for about 6hrs :) Thank you Cowardly Duck so much.
The program finally recognizes the serial port im using. Ok Ive read heaps but Im a dummy so going to ask anyway as I didn't see my controller. Its a 12fet 3077 mosfets 48v Max 60v can some one please give me an idea of what the settings should be for regen? I had the bike wired for a test run and regen was like changing from 5th to 4th gear and I have been told regen is strong on this controller? I am running a 52v setup. I do have a broken wire that needs mending on the 3 speed switch could that be affecting regen?
Also a quick question. Can you see the settings that are already in your controller? when you plug in the cable does it register the settings? I would like a copy of what it is set at in case I do something undesirable. My controller is below.
And your quote of his post helped me! :lol:
Warning:This post is being read via light, a substance known to the state of California to cause cancer.

inetchik   10 µW

10 µW
Posts: 6
Joined: Mar 25 2017 3:24pm
Location: Russia, Saint-Petersburg, 60.041778, 30.423250

Re: XPD: open-source keywin e-bike lab replacement

Post by inetchik » Apr 23 2018 7:53am

Hello, Andrew.

V0.4.1a working GOOD in XP.
Thanks for READ Mode.
anpaza wrote:
Jul 23 2017 10:48am
New version for public testing: 0.4.1 alpha.....
....... * XPD for Android (from scratch in Java) (not finished yet, so, no test builds for now)
How to install XPD (not finished) to Android devices and connect to controller via PL2303HxD+OTG, it's possible ?
Maybe you have a Command List (Get...., Set.....) for working (reading and writing) with controllers via Serial Terminal for Android devices
Screenshot_2018-04-23-16-15-43.png
Screenshot_2018-04-23-16-15-43.png (75.09 KiB) Viewed 2835 times
with application PL2303HxD ?

Best regards,
Last edited by inetchik on Apr 23 2018 8:38am, edited 3 times in total.

hypertoric_amplituhedron   100 W

100 W
Posts: 208
Joined: Dec 02 2016 7:57pm
Location: Land of the Florida Man

Re: XPD: open-source keywin e-bike lab replacement

Post by hypertoric_amplituhedron » Aug 11 2018 1:21pm

I have an issue installing python 2.7.1 on a new mac with windows 8 bootcamp. The installer quits prematurely, citing some error that I will update later with a screencap. Python 3.7.0 will install fine, but won't recognize the older files for XPD. So I'm stuck!

Anyone have or troubleshot this issue yet? My options are to get a small windows based tablet, use a pc not at home, or maybe this android XPD version is the way to go.
There are two types of people in this world.

1. Those who can extrapolate from missing information.

kairaspo   1 µW

1 µW
Posts: 3
Joined: Dec 22 2018 10:56am

Re: XPD: open-source keywin e-bike lab replacement

Post by kairaspo » Dec 24 2018 11:36am

Anyone know if this board works with XPD? It has the infineon xc486 chip. Its a 48V controller.

As well, how do I enable regen? I haven't found this board on any of the threads yet.. the brand is kind of unknown. "DCMOTO"
IMG_5508.JPG
IMG_5509.JPG

inetchik   10 µW

10 µW
Posts: 6
Joined: Mar 25 2017 3:24pm
Location: Russia, Saint-Petersburg, 60.041778, 30.423250

Re: XPD: open-source keywin e-bike lab replacement

Post by inetchik » Dec 29 2018 1:57pm

:shock:
MCU - 28pin !
Maybe MCU "XC836....." ?
;)
Mark at PCB: .......-836........

kairaspo   1 µW

1 µW
Posts: 3
Joined: Dec 22 2018 10:56am

Re: XPD: open-source keywin e-bike lab replacement

Post by kairaspo » Dec 30 2018 3:48pm

Yes! XC836. I don't seem to see any traces for the Rx/Tx to change the parameters? Has anyone used this board before? I see an SDA pin for i2c, but no SCL pin!

Thanks!

inetchik   10 µW

10 µW
Posts: 6
Joined: Mar 25 2017 3:24pm
Location: Russia, Saint-Petersburg, 60.041778, 30.423250

Re: XPD: open-source keywin e-bike lab replacement

Post by inetchik » Dec 30 2018 10:55pm

inetchik wrote:
Dec 29 2018 1:28pm
MCU XC836....

User avatar
pguk   100 W

100 W
Posts: 106
Joined: Mar 16 2012 4:30pm
Location: North England, birthplace of the Industrial Revolution

Re: XPD: open-source keywin e-bike lab replacement

Post by pguk » Jan 20 2019 2:23pm

Having trouble installing this - I'm on Windows 7
I followed the instructions for installation in first post as far as:

"d) you will see two icons: the XPD program and the XPD icon."

I don't see any icon - not either one.
I do have the 10 folders:
0.1.0
0.2.0
0.2.1
...
0.4.1
support

??? :) :lowbatt:

Edit: sorted it, I realised I needed to uncompress the file inside folder 0.4.1 :)
6pence spot welder https://endless-sphere.com/forums/viewt ... 31&t=81274
"It is all nice and proper, but only an idiot would think that the father is sixpence to the good on the transaction." C.S. Lewis' Mere christianity

danoussh   10 mW

10 mW
Posts: 23
Joined: Aug 20 2013 6:04pm
Location: France

Re: XPD: open-source keywin e-bike lab replacement

Post by danoussh » Feb 14 2019 8:48am

anpaza wrote:
Jul 23 2017 10:48am
New version for public testing: 0.4.1 alpha.

Download here.

New features:
* Implemented KHxxx (AKA Infineon 4) controller support.
* Implemented profile downloading (EB3xx and KH6xx)
* XPD for Android (from scratch in Java) (not finished yet, so, no test builds for now)
teslanv wrote:
Apr 05 2017 9:18am
I'm adding this thread to the Sticky.
Also, there have been some good advancements with respect to the new version and compatibility with the new Sinusoidal "KH6" boards, (and clones).
Here is a download Link for XPD R4.8 (Most recent version as of April 5, 2017):
Hi, I'm slightly confused as to whom is the main developer or owner of the project. Can someone enlighten me? As I would like to know is this project is still active or not.

Also where can I find this Android .APK build? Or is it not available anymore? I would really love to be able to setup the controller on the run and be able to test/experiment with settings.
Going through this repo (https://sourceforge.net/p/xpd-ebike/cod ... ree/trunk/), there is a android folder containing code to build the apk, but haven't tested yet. Sadly it's a year and a half old.

danoussh   10 mW

10 mW
Posts: 23
Joined: Aug 20 2013 6:04pm
Location: France

Re: XPD: open-source keywin e-bike lab replacement

Post by danoussh » Feb 15 2019 3:04pm

I haven't had any response yet from anyone about me previous post, so instead I went ahead trying out the android code trunk I referenced in my previous post^^.

After a few software updates in Android Studio, then some more updates, I finally got my first error msg when building. Gradle version is to old, so here is my corrected version of the "build.gradle" file, see line "classpath 'com.android.tools.build:gradle:2.3.1'".

Code: Select all

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        //Original line:
        //classpath 'com.android.tools.build:gradle:2.2.3'
        //My correction:
        classpath 'com.android.tools.build:gradle:2.3.1'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}
allprojects {
    repositories {
        jcenter()
    }
}
task clean(type: Delete) {
    delete rootProject.buildDir
}
Here is a screenshot of the app on a Nexus5 with LineageOS14.1 Nightly (Android: v7.1.2).
Screenshot_20190215-203603.png
XPD-Ebike Android - Welcome Screen; Lists profiles/configs.
Screenshot_20190215-203603.png (32.6 KiB) Viewed 1727 times
Also successfully uploaded a config to 12 x 4110 MOSFET Extreme Modder Controller LYEN Edition using an ebay "FT232RL 3.3V 5.5V FTDI USB to TTL Serial Adapter". I fried my original usb/serial adapter bought from lyen, so went with an ebay and it has work flawlessly since, useful for other projects as well. Everything went smoothly.
Screenshot_20190215-202151.png
XPD-Ebike Android - Successful upload of configurations to 12 x 4110 MOSFET Extreme Modder Controller LYEN Edition.
Screenshot_20190215-202151.png (22.67 KiB) Viewed 1727 times
Picture of what the serial adapter looks like.
FT232RL-3.3V-5.5V-FTDI-USB-to-TTL-Serial-Adapter_s-l300.jpg
Ebay: FT232RL 3.3V 5.5V FTDI USB to TTL Serial Adapter
FT232RL-3.3V-5.5V-FTDI-USB-to-TTL-Serial-Adapter_s-l300.jpg (18.05 KiB) Viewed 1727 times
There is an issue when clicking on the "Eye" and "open in Browser" icon, app crashes. Hopefully that will be fixed at next version.
Thanks to developers, really hope this project will continue. :bigthumb:

danoussh   10 mW

10 mW
Posts: 23
Joined: Aug 20 2013 6:04pm
Location: France

Re: XPD: open-source keywin e-bike lab replacement

Post by danoussh » Feb 15 2019 4:25pm

Any idea how to connect bluetooth module to controller? I connected it the same way I would with regular USB/Serial adapter. I tested with controller ON (ready to run) but software did nothing, just waiting. If I power off the controller (battery switch) the bluetooth module is not powered. If I leave the battery switch on and switch off the ignition on controller, I still don't get any power to bluetooth module.

Do I need external battery pack for this setup to work? As I need someway to power the bluetooth module but still need to controller completely off in order to properly receive the config.

My bluetooth module: jy-mcu bt-board v1.03 (https://www.dx.com/p/jy-mcu-arduino-blu ... le-2011902)

Edit:
Found 3V battery, added voltage divider for RX line of bluetooth (5V to 3V), but still nothing. After all, the android build was in beta stage.

User avatar
pwd   100 W

100 W
Posts: 289
Joined: Oct 11 2011 12:01pm
Location: Ontario, Canada

Re: XPD: open-source keywin e-bike lab replacement

Post by pwd » Mar 07 2019 4:19pm

danoussh wrote:
Feb 15 2019 3:04pm
There is an issue when clicking on the "Eye" and "open in Browser" icon, app crashes.
That is as far as I was able to get as well. I was able to get the APK built last year but I haven't looked at it since then. I attempted to get my development environment fired up again and was able to get an android emulator going in hopes of fixing the crash. Here is the error thrown in the Android Development Studio:

Code: Select all

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: ru.cobra.zap.xpd, PID: 3463
    java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.view.View.getContext()' on a null object reference
        at ru.cobra.zap.xpd.GuiUtils.fillSpinnerControllerFamilies(Util.java:280)
        at ru.cobra.zap.xpd.FragmentProfileEdit.onCreateView(FragmentProfileEdit.java:121)
        at android.support.v4.app.Fragment.performCreateView(Fragment.java:2087)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1113)
        at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1295)
        at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:801)
        at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1682)
        at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:541)
        at android.os.Handler.handleCallback(Handler.java:751)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6119)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
I will dig into it some more but my Java is quite rusty.
Commuter/Street Build:
Rocky Mountain Element
Magic Pie 4 front + Leafmotor 1500 rear w/ WCEC 18fet
em3ev 14S5P 30Q + 14S6P 25R pack
Build Thread: viewtopic.php?f=6&t=98286

Offroad Build:
2019 Rocky Mountain Blizzard 20
Cyclone "3kw" 13T motor to 44T chain ring then 36T chain ring to 11T-46T Cassette
em3ev 14S5P 30Q

evo1087   10 mW

10 mW
Posts: 30
Joined: Oct 18 2016 4:33am
Location: Los Angeles

Re: XPD: open-source keywin e-bike lab replacement

Post by evo1087 » Mar 27 2019 3:14am

Just left scorgforge looking for the apk. Now I know it needs to be manually compiled. So you've both managed to edit and upload a profile? Can you download one too? I really could use this. Please apk and bluetooth tutorial. Id pay for the effort to avoid forehead surgery, and furniture replacement money I would use to do this myself.
I currently use xpd via windows laptop and ttl to usb. A portable and wireless solution is essential this day and age.

User avatar
pwd   100 W

100 W
Posts: 289
Joined: Oct 11 2011 12:01pm
Location: Ontario, Canada

Re: XPD: open-source keywin e-bike lab replacement

Post by pwd » Mar 27 2019 10:46am

I wasn't able to test uploading/downloading or editing the profile. To be honest, I didn't even see an option for editing or downloading. It looks like danoussh was able to upload a profile via USB though.
Commuter/Street Build:
Rocky Mountain Element
Magic Pie 4 front + Leafmotor 1500 rear w/ WCEC 18fet
em3ev 14S5P 30Q + 14S6P 25R pack
Build Thread: viewtopic.php?f=6&t=98286

Offroad Build:
2019 Rocky Mountain Blizzard 20
Cyclone "3kw" 13T motor to 44T chain ring then 36T chain ring to 11T-46T Cassette
em3ev 14S5P 30Q

User avatar
burner77   100 W

100 W
Posts: 130
Joined: Mar 04 2014 9:57am
Location: Austria

Re: XPD: open-source keywin e-bike lab replacement

Post by burner77 » Jun 04 2019 10:17am

Does anbody know which profile has to be used with the 24 fet 4115 EB624? I can find it just for 18fet max. Thanks

Steve65   1 µW

1 µW
Posts: 1
Joined: Jun 24 2019 6:10am

Upload failed XPD Version 0.4.1a

Post by Steve65 » Jun 24 2019 3:33pm

Has anyone tried the Download and Upload functionality in XPD Version 0.4.1a with a 124110ST-MII-LYEN EDITION controller ?

I've been able to Download the parameters OK but when try to upload the same values (no changes) I get :-

"Upload failed: byte must be in range(0, 256)"

Here's the screen shot :-
Upload_Failed_Message.jpg
Upload_Failed_Message.jpg (110.81 KiB) Viewed 899 times
Here's the Parameter values :-

5:EB318
79.0
29.9
28.0
0.9
99
0
99
99
99
1.0
15.0
1
0
0
35
77.3
0
0
0
1
0
99
2
29
0

User avatar
johnrobholmes   1.21 GW

1.21 GW
Posts: 3955
Joined: Jul 07 2008 2:19pm
Location: Missouri
Contact:

Re: XPD: open-source keywin e-bike lab replacement

Post by johnrobholmes » Sep 23 2019 5:08pm

I'm getting no traction with a fresh install on a newer computer, win7. Seems the xpd.pyw file isn't doing anything. Did the python and gtk install, ive got the idle and command line working. pyw file does nothing, no gui now. what gives? Been a while since I had to trudge through this and my last computer with an operating install got taken out by a power surge.

User avatar
Cowardlyduck   100 MW

100 MW
Posts: 2637
Joined: Jun 26 2011 8:41pm
Location: Canberra, ACT, Australia

Re: XPD: open-source keywin e-bike lab replacement

Post by Cowardlyduck » Sep 24 2019 3:34am

Not sure which file you need to run, but I recall one of them is just an icon file whereas the other actually runs the program.

Cheers
Custom made 18650/21700 battery packs

Modified Stealth Fighter - Force air cooled motor @ 6KW, Adaptto Mini-E. 49AH, 52V 18650 - 2.5Kwhr
Cowardlyducks - Stealth Fighter Videos

BikeE recumbent commuter - 9C, 6Fet Grinfineon, internal 17AH, 52V, + on-board solar.

Ebike Garage - My YouTube Ebike ramblings.

High Power LiPo wiring harnesses - 4P - XT90, HXT4mm, 5.5mm. 200Amp+ capable. Global shipping.

User avatar
johnrobholmes   1.21 GW

1.21 GW
Posts: 3955
Joined: Jul 07 2008 2:19pm
Location: Missouri
Contact:

Re: XPD: open-source keywin e-bike lab replacement

Post by johnrobholmes » Sep 24 2019 8:31am

figured it out. pyserial wasn't installed. Also is no longer listed in the sourceforge downloads so I found it here https://sourceforge.net/projects/pyserial/

danoussh   10 mW

10 mW
Posts: 23
Joined: Aug 20 2013 6:04pm
Location: France

Re: XPD: open-source keywin e-bike lab replacement

Post by danoussh » Oct 03 2019 6:22am

I tried to recompile android trunk of the XPD code, but failed at it.

Hopefully someone with some Android skills can compile it and share the updated code and the APK file.

Post Reply