XPD: open-source keywin e-bike lab replacement

Get all your technical information about electric bikes here.
User avatar
Samson   1 W

1 W
Posts: 63
Joined: Nov 03 2011 4:14pm
Location: Ontario, Canada

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

Post by Samson » Jul 25 2012 8:37pm

I need a profile for a 6 Fet Lyen controller. The board is EB306 but the tag says to use a EB312 profile. I have just purchased and installed the controller and it work fine. However there is no 6 Fet EB312 profile in the software I downloaded. I have not been able to get a response from Lyen. I am reluctant to make a change until I can see a logical profile first. I do not use the preset speed settings.

User avatar
anpaza   10 W

10 W
Posts: 69
Joined: Dec 07 2010 5:24pm

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

Post by anpaza » Jul 26 2012 3:20pm

If you're talking about the "Parameter Designer" software, it seems you have downloaded the old version of it.
You may search for a newer version, with support for EB3xx controller series.
This thread is about an alternative software, which supports EB3xx series, but the EB3xx support is now in the testing stage.
For guaranteed results you might want to use the "Parameter Designer" software, which is not covered here.

User avatar
Kepler   1 GW

1 GW
Posts: 3225
Joined: Nov 08 2009 9:22pm
Location: Eastern suburbs Melbourne Australia

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

Post by Kepler » Aug 07 2012 10:41pm

Sorry to come in so late on this thread. I have a need to program a 3xx board. Been though the thread and have the XPD.3 loaded fine. I am confused though. With this latest version can I use my Lyen 2xx programming cable or do I need something else now?
Current Rides

Lightest true ebike on the planet: ON ROAD viewtopic.php?f=6&t=74269
eBoost on facebook: http://www.facebook.com/pages/Eboost/200306283342024/

User avatar
parabellum   10 MW

10 MW
Posts: 2067
Joined: Nov 19 2010 9:55am
Location: Dominican Republic, north.

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

Post by parabellum » Aug 09 2012 3:23am

Kepler wrote:Sorry to come in so late on this thread. I have a need to program a 3xx board. Been though the thread and have the XPD.3 loaded fine. I am confused though. With this latest version can I use my Lyen 2xx programming cable or do I need something else now?
You need different cable for 3xx, or modification to Lyens cable. Have no acces to pictures of the differences till tusday but try to ask zombies or neilp.

User avatar
anpaza   10 W

10 W
Posts: 69
Joined: Dec 07 2010 5:24pm

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

Post by anpaza » Aug 10 2012 2:12am

Kepler, you need an adapter cable like mine:
infineon-2-to-3-cable-adapter.jpg
infineon-2-to-3-cable-adapter.jpg (159.3 KiB) Viewed 462 times
You connect the right end of the cable with your programmer, and insert the left end into the controller. The wire marked with red must connect with the red cable on programmer & controller. The opposite ends of the flat cable are connected together and connect both to the bottom contact of the right connector (just in case it's not obvious from the photo).

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

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

Post by teklektik » Aug 10 2012 10:08am

annotated...
infineon-2-to-3-cable-adapter-annotated2.jpg
infineon-2-to-3-cable-adapter-annotated2.jpg (20.66 KiB) Viewed 2535 times
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
Kepler   1 GW

1 GW
Posts: 3225
Joined: Nov 08 2009 9:22pm
Location: Eastern suburbs Melbourne Australia

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

Post by Kepler » Aug 10 2012 8:10pm

Excellent. Thanks for that guys. Putting that straight into my useful ebike info folder. :)
Current Rides

Lightest true ebike on the planet: ON ROAD viewtopic.php?f=6&t=74269
eBoost on facebook: http://www.facebook.com/pages/Eboost/200306283342024/

User avatar
methods   10 GW

10 GW
Posts: 4532
Joined: Aug 08 2008 12:08pm
Location: Santa Cruz CA
Contact:

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

Post by methods » Aug 20 2012 4:28pm

Ok - I used this software and it is great. My intention here was to lay down a post with a rewording of the install... the original post makes it sound a little harder than it is and I am afraid that is scaring off a few folks. All you need is one link... you just have to do is go to the code depository and download two files - the prerequisite files and the XPD (both zip). Inside the prereq there are three executables that you run in the order posted. Then you can just dip into the XPD folder and run it.

But.. when I went to go get links they all appear to be dead (though they were working yesterday). I know this may make the developer cringe but I am going to post up an independent snap-shot on my server just in case things disappear (which has happened way too many times over the years). I also compressed everything into one single zip and labeled the software programs FIRST, SECOND, and THIRD since it confuses the shit out of me to install those version numbers out of order :mrgreen:

So look... this is how easy it is:

1) Download this single zip file: methods super retarded easy XPS install version

EDIT: Dont use that one for my controller, overshoot window is not set correct in defaults - use this

2) Extract it and look at what is inside - should look like this:
XPD_SCREENSHOT.jpg
XPD_SCREENSHOT.jpg (74.08 KiB) Viewed 2502 times
3) Install the three files in the order shown (you can delete them when you are done)

4) Open the XPD folder and run the program

Dude... Easy right?
You might have some USB driver issues but I don't at the moment so good luck finding those on your own.

NOTE: Programming is not 100% clear cut - you have to know what you are programming, what R12 is set to, etc. Assume nothing... so if you are having trouble my best advice is to set LVC all the way down to 10V. If you are using a LYEN tune on a stock controller I suspect he is already compensating for the R12 mod... so if you set LVC where you want it you may end up getting it like 30V higher than you expect. That is something I ran into.

In the end I think I ended up starting with an 18 fet tune and converting it over to a 24 fet and that worked. Have not played with it enough to determine what was hanging me up... but when you are sitting on a 13KW trike one tends to get a little impatient :mrgreen: :mrgreen:

Anyhow much respect and a thousand thanks to anpaza for supplying this amazing software... just the simple touch of describing what functions do when you hover over them makes things so much better... if there is anything I can do in thanks let me know.

And FYI folks... that link I have is just a snapshot in time. If you follow his links you will get his latest source version which is usually a good idea. :wink:

-methods
Increasing battery voltage and controller current limit will result in a non linear experience

User avatar
liveforphysics   100 GW

100 GW
Posts: 14134
Joined: Oct 29 2008 1:48am
Location: Santa Cruz, CA, USA

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

Post by liveforphysics » Aug 23 2012 12:57am

Anpaza- Just wanted to say thank you for your awesome work. A fantastic gift to the ebike community.

Thank you!
-Luke
Each carcinogen vapor exposure includes a dice roll for cancer.

Each mutagen vapor exposure includes a dice roll for reproductive genetic defects in your children.

Each engine start sprays them into a shared atmosphere which includes beings not offered an opportunity to consent accepting these cancer experiences and defective genetics life experiences.

Every post is a free gift to the collective of minds composing the living bleeding edge of LEV development on our spaceship.

User avatar
anpaza   10 W

10 W
Posts: 69
Joined: Dec 07 2010 5:24pm

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

Post by anpaza » Aug 28 2012 4:13pm

Okay, here is the 0.3.1 release.

https://developer.berlios.de/project/sh ... p_id=12389

If 0.3.0 alpha works for you, there's no need to upgrade. The changes in 0.3.1 compared to 0.3.0a are minimal.

Download the archive for your OS (e.g. xpd-0.3.1-windows.zip for Windows, xpd_0.3.1-1ubuntu1_all.deb for Ubuntu) and install just like previous versions.

User avatar
NeilP   10 GW

10 GW
Posts: 4969
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

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

Post by NeilP » Aug 29 2012 12:43am

I generally use Windows, but seeing tbe various versions of build you have available, I wonder if any are suitable for a Mac, and how to install on it

Anyone put this on a Mac yet?
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
amberwolf   100 GW

100 GW
Posts: 27552
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

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

Post by amberwolf » Aug 29 2012 2:03am


User avatar
NeilP   10 GW

10 GW
Posts: 4969
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

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

Post by NeilP » Aug 29 2012 2:12am

ah ok , so python based. i forgot that. so need to read up on how to run python..cheers
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
NeilP   10 GW

10 GW
Posts: 4969
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

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

Post by NeilP » Aug 29 2012 2:33am

Ah shit

Code: Select all

Bon-Air-Mac-Pro:~ neil$ python /Volumes/User\ Folders/Users/neil/Downloads/xpd-0.3.0/xpd.pyw 
FATAL: This program requires PySerial to run

Nah, not for me..supposedly already has python installed, but looks like lots of command line stuff needed to do to get it to work, for something that is not that important for me
http://jessenoller.com/2009/03/16/so-yo ... n-the-mac/
http://www.python.org/getit/mac/
http://docs.python-guide.org/en/latest/ ... stall/osx/

have tried a few things and as you found it just dumps you in to a text box.

Until someone comes up with an easy instal Mac dmg, then it is dead to me on mac. I don't have a mac laptop, and can't get the bike near the home mac, so not a real issue, jsut would ahve been nice to have it..but not worth hours of research
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
Alan B   100 GW

100 GW
Posts: 7700
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

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

Post by Alan B » Aug 29 2012 8:30am

pySerial is a module that needs to be installed, a python extension that is not included in the box. It is required for this program to talk to the serial port which is necessary to talk to the controller.

http://pypi.python.org/pypi/pyserial

Install the version that matches your version of Python.

User avatar
NeilP   10 GW

10 GW
Posts: 4969
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

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

Post by NeilP » Aug 29 2012 9:03am

I did actually start fiddling with it, and did do the pgsyserial, then it asked for psyGTK...then it ran but no serial was selectable.

Need someone with more knowledge to create compete package for Mac to do a one click install from a dmg
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
Alan B   100 GW

100 GW
Posts: 7700
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

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

Post by Alan B » Aug 29 2012 12:56pm

Excellent progress. You are 80% of the way there.

Now you need an OS driver for your serial adapter. This problem has nothing to do with XPD. XPD is looking for available serial adapters, and not finding any.

User avatar
anpaza   10 W

10 W
Posts: 69
Joined: Dec 07 2010 5:24pm

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

Post by anpaza » Aug 30 2012 2:03pm

The problem could be with XPD.

On POSIX operating systems (which includes McOS) the module that scans for available serial ports is xpdm/scan_posix.py

So far it looks only for devices named "/dev/ttyUSB*", which is true for Linux but most likely is not true for Mcs.
If you find out how the serial port devices are named on McOS, you can try to edit scan_posix.py and add the mask for Mc serial devices.
For example, if on McOS serial devices happens to be named /dev/USBSerialAdapter* , you should change the line:

for port in sorted (glob.glob('/dev/ttyUSB*')):

into:

for port in sorted (glob.glob('/dev/ttyUSB*') + glob.glob('/dev/USBSerialAdapter*')):

Then you will see your serial ports in the drop-down combobox. Whether they will really work depends if PySerial you succeeded to install can 'talk' to McOS serial ports.

User avatar
NeilP   10 GW

10 GW
Posts: 4969
Joined: Nov 27 2010 3:18pm
Location: 49.17303, -2.05354 Jersey, Europe
Contact:

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

Post by NeilP » Aug 30 2012 2:12pm

Thanks for the input, but not even going to try...it is something I do not even need. have jsut spent since 0600, to now, 2010, trying to get a new NAS4Free box up and running. Decided it is time to stop..I just kicked the front panel clean off the front of the chassis of the tower case. utterly sick of frocking computers today. The bloody thing runs for as long as you leave it, but as soon as you actually try and sue the fcukign thing,like add hard drives, configure shares and run backup, well give it half anhour and ths shitting thing has kernel panics and the ^%^R%&E%Y%W thing shuts down.....aaaaagggh
:) Only Irish coffee provides in a glass all four essential food groups: alcohol, caffeine, sugar, and fat :)

User avatar
amberwolf   100 GW

100 GW
Posts: 27552
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

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

Post by amberwolf » Aug 30 2012 2:41pm

If I have time to futz with it, I'll give it a go, because it would be handy to be able to use my imac (which is relatively portable) rather than dragging the whole CrazyBike2 into the bedroom with the PC, or taking the controller off (which would require cutting wires as the halls are soldered since the connectors gave me too much grief).

If I figure out a neat way to do it I can upload the bits here.

User avatar
Kingfish   10 GW

10 GW
Posts: 4064
Joined: Feb 03 2010 11:23am
Location: Redmond, WA-USA, Earth, Sol, Orion–Cygnus Arm, Milky Way. Age: > yesterday < tomorrow
Contact:

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

Post by Kingfish » Sep 24 2012 2:27pm

I just tried this application for the first time today on my 2WD:
  • The first controller (vintage 2011 road trip) flashed fine.
  • The second returned "Upload failed: Invalid reply byte 'ce'". For the life of me I could not get it to accept even the default configuration.
I pulled out my tried-&-trusted Parameter Designer for Infineon 116 and loaded up the old faithful file, and no-joy; won’t flash, and won’t give an error code with that app... it just sits there Waiting for Godot. Decided to flash the first controller with the old faithful – and it flashes fine. I must therefore presume that it is not the XPD application, but rather the second controller that is unresponsive. Pity; so much work into modifying it… and it won’t flash. :cry:

Anyways – I would be keen to know what the error code means.
Not moving, KF
* My 2WD Garden Wall
* Kinaye MotorSports
* Primary ride: 2WD Disc 9C 2806-equiv / Dual Lyen 12FET / 20S7P LiPo.
* Epics: Going to California: 2011 8)
* 50-mph, 101, 10k-Club. 12,527 miles-to-date, 7037 as 2WD.

It is by caffeine alone I set my mind in motion.
It is by the beans of Java that thoughts acquire speed.
The hands acquire shakes, the shakes become a warning.
It is by caffeine alone I set my mind in motion.

User avatar
methods   10 GW

10 GW
Posts: 4532
Joined: Aug 08 2008 12:08pm
Location: Santa Cruz CA
Contact:

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

Post by methods » Sep 24 2012 4:11pm

Lots of chips floating around now that wont flash.
Solder the shunt, build up an external 3-spd switch, and forget it is my advice.

Or... you could lift it and solder in another from a known programmable blown controller :wink:

-methods
Increasing battery voltage and controller current limit will result in a non linear experience

User avatar
Alan B   100 GW

100 GW
Posts: 7700
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

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

Post by Alan B » Sep 24 2012 4:18pm

Hi Kingfish, take a look at the source code, XPD is Python, easy to read. The code is waiting for a byte to come back, but it got the wrong byte back, so it won't proceed. Might be interesting to compare what it is waiting for with what it got back. If they are close perhaps it is a bias too close, or a bypass cap in the wrong place, or a solder splash affecting the programming line.

User avatar
ohzee   1 MW

1 MW
Posts: 1715
Joined: Jul 20 2011 1:13pm
Location: Columbus Ohio USA

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

Post by ohzee » Sep 24 2012 4:19pm

Kingfish wrote:I just tried this application for the first time today on my 2WD:
  • The first controller (vintage 2011 road trip) flashed fine.
  • The second returned "Upload failed: Invalid reply byte 'ce'". For the life of me I could not get it to accept even the default configuration.
I pulled out my tried-&-trusted Parameter Designer for Infineon 116 and loaded up the old faithful file, and no-joy; won’t flash, and won’t give an error code with that app... it just sits there Waiting for Godot. Decided to flash the first controller with the old faithful – and it flashes fine. I must therefore presume that it is not the XPD application, but rather the second controller that is unresponsive. Pity; so much work into modifying it… and it won’t flash. :cry:

Anyways – I would be keen to know what the error code means.
Not moving, KF
This is funny.. I am having the exact same issue with 3 different controllers so far.

I talked to Lyen via pm last night and he told me the mk2 controllers of his need the usb ttl adapter with the jumper between the outside pins.

I tried on my desktop pc - my mac - parallels windows and was about to give ubuntu a try.

Searching on the error is also no luck.

I also have flashed an older 12fet controller multiple times with no issues. arrrrrrrrrgggg I feel your pain.

User avatar
Alan B   100 GW

100 GW
Posts: 7700
Joined: Sep 11 2010 7:43am
Location: San Francisco Bay Area, USA
Contact:

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

Post by Alan B » Sep 24 2012 5:13pm

I use a cable adapter with the newer boards, and the Lyen cable that is compatible with the older boards. Lyen provides the cable adapters or you can make one. Is that the problem Kingfish?

Post Reply