XPD: open-source keywin e-bike lab replacement

Welcome back Anpaza, great work!

Rather than guessing the shunt and current values is there any facility in the program to enter a defined Rshunt value ?
Presumably this is what is done by selecting the controller type from the drop down menu (ie for a 12 fet it expects X shunt value, for a 9 fet it expects less etc) I guess for people who don't know their shunt resistance just selecting the controller type is easy but for those of us customising our controllers (whichis what this software is all about) a list of selectable shunt resistances would alloy you to more accurately program a variety of controllers
 
I've received this proposal many times in the past.
However, beside the shunt resistance, there are other unknowns in the equation:
- What is the amplification factor of the opamp amplifier?
- What is the reference voltage of the microcontroller?

I've looked at the schematics of some XC846-based controller which I found somewhere. Looks like reference voltage is 5V. In this case the battery voltage measuring resistor divider, which is 1.2k/15k on that schematics, will achieve 5V on output at 67.5V. But the maximal voltage the controller "sees" with this divider is over 75V. Thus, there's something I don't understand here.

Also, the amplification coefficient of the opamp could be calulated if I know the shunt resistance and reference voltage. But I'm not convinced reference voltage is 5V, and I don't know the shunt resistance for different controllers. Is there some place where I can find the shunt resistance for all EB2xx and EB3xx controllers of all existing modifications (Lyen, ecrazyman, cellman)?
 
Those with a CA connected will know the shunt resistance of their controller, because it has to be set to get the correct amp reading.
I should add 'only with unmodded shunts'.
Eddie
 
Anpaza, Would you be able to add selectable XPD profiles for EB324 and EB336 controllers? I have one of the latest revision (EB3 with Sunplus 65SF112A MCU) 36FET controllers from Keywin i would like to program.
 
boostjuice said:
Anpaza, Would you be able to add selectable XPD profiles for EB324 and EB336 controllers? I have one of the latest revision (EB3 with Sunplus 65SF112A MCU) version 36FET controllers from Keywin i would like to program.

When did those come out? Ive only seen eb224 and eb236 using the 116 ecu. If they ate eb3 they should use the gpm8f ( something close to that) ecu.
 
amberwolf said:
I skimmed thru the thread and the XPD (and python) websites, and didn't see any info on troubleshooting XPD on a Mac.

I would also LOVE to see XPD running on a Mac as it's all I use. I do have access to a Windows 7 VirtualBox image at work so might try that, but Mac support would be killer.
 
AFAIK there's no specific reason it shouldn't run on a mac with OSX; I just don't know how to do it myself yet, and haven't had time to troubleshoot much. I expect all that needs to be done is A) have a new enough version of Python (I think I have the latest OSX 10.4 compatible off the Python site), have serial.py in the right place, and use the right sequence of events to startup Python and XPD. Just have to figure out those things and I bet it will work.
 
amberwolf said:
Just have to figure out those things and I bet it will work.

I wonder about USB drivers etc... maybe I'll play around with it and see what happens. I code PHP for a living (not well or anything though haha) so can probably digest the Python, but talking to ports... meh... we'll see...
 
The driver might be an issue, but there should be OSX drivers for at least the common chip(s). My issue is getting XPD to run *at all*, because I don't actually know what I'm doing with the Mac anymore. :oops:

A google search for drivers does turn up some; haven't tested any.
http://www.google.com/search?q=OSX+10.4+USB-serial+driver
 
The Python code and GUI should be portable. Drivers for USB serial adapters are usually available. It looks like the PySerial module should work on both PC and Mac. So there's a good chance it will work, or can be fixed.

I have complicated Pythong GUI programs that have ported to MaxOS with no changes, though they didn't involve serial.
 
zombiess said:
boostjuice said:
Anpaza, Would you be able to add selectable XPD profiles for EB324 and EB336 controllers? I have one of the latest revision (EB3 with Sunplus 65SF112A MCU) version 36FET controllers from Keywin i would like to program.

When did those come out? Ive only seen eb224 and eb236 using the 116 ecu. If they ate eb3 they should use the gpm8f ( something close to that) ecu.

According to Keywin, the 65F112A is a Sunplus clone of the 8B116. Does that mean the board should be programmed as an eb2xx?
 
boostjuice said:
Anpaza, Would you be able to add selectable XPD profiles for EB324 and EB336 controllers? I have one of the latest revision (EB3 with Sunplus 65SF112A MCU) 36FET controllers from Keywin i would like to program.
Do you have the Keywin E-Bike Lab with support for those controllers? Right now I'm taking controller parameters from KEBL.

Perhaps, I'll add later the possibility to add new controller definitions if you know several hardware parameters (shunt resistance, voltage divider etc).
 
anpaza said:
Perhaps, I'll add later the possibility to add new controller definitions if you know several hardware parameters (shunt resistance, voltage divider etc).

That'd be a great help to others in the future. I'll read/measure them for you (4 wire method for the shunt wires)
 
Yeah, with my EB318, the current entered into XPD has to be twice my intended value. i.e., opposite what was said for the EB312 My CA is calibrated, and it is reading 48.8A to a 89.8A setting in XPD. THat should be giving me a theoretical 44.9A +/-1%, but it's giving me a 8% overshoot (even with block time set at 0.0s). I don't know what's to fault...tolerance of the board measuring circuitry I suppose.

Unlimited regen unloaded is much smoother than setting 2. On the road, it seems much smoother. I'm going to try to turn up the phase amps (one thing at a time) now because I had it set at 80A and must've been getting 40A.

update: I know that usually there will be peaks on the cycle analyst above the cycle analyst's current limit. I've had this controller programmed through keywin to 99A and have been running it at 77A limited by CA. During that time I saw peaks of 78-79A. Now, when I set current to 192.5 (96.25A) in XPD, I see peaks of 102A when the cycle analyst was limited to 95A.

While I don't have a clamp to measure phase current and confirm this, I can probably say the same is true for phase current (programmed value/2=actual). To get to my intended 140 phase amps, I will have to program for 280 phase amps :twisted:
 
hillzofvalp said:
While I don't have a clamp to measure phase current and confirm this, I can probably say the same is true for phase current (programmed value/2=actual). To get to my intended 140 phase amps, I will have to program for 280 phase amps :twisted:

I'm not so sure, my experience with EB3 boards has shown me that the phase setting appears to be independent of the shunt value. I modded the shunt on my 18 FET controller from 1.25mOhm to 0.5mOhm and regen did not increase at all and when I turned down the phase current it wasn't even ride able it was so slow, I had to leave my phase current at the original setting and adjust the battery amps in order to dial in the performance. I suspect the EB3 boards might be doing something different with the phase current and ignoring the shunt unlike the the EB2xx boards which had a correlation between battery A, phase A and lower shunts than expected.

For example, with my 1.25mOhm shut EBS setting of 2 no mods my bike would pull about 17A max during regen. After modding the shunt to 0.5mOhm and an EBS setting of to my bike would still only pull 17A max during regen. The shunt was calibrated for each test.
 
hillzofvalp said:
Yeah, with my EB318, the current entered into XPD has to be twice my intended value. i.e., opposite what was said for the EB312
Pretty interesting.

a) Could you explain what and where was said about EB312?
b) What EB318 do you have? From Lyen, from CellMan, from e-crazyman? With all these "mods" around it's pretty hard to follow.

If you definitely have a Lyen or e-crazyman EB318 (which is named simply "EB318" in XPD) and there's a noticeable difference when programming your controller with XPD on one side, and unmodified "EM3EV.exe" or "Lyen MK.exe" software on other side, I'd like to know that.

If this confirms, I'd like to have the program you used to program your controller. I've checked the final binary output that goes into controller when using "Lyen MK2.exe" and XPD, and it's pretty much the same; there are some (very) minor differences due to different numbers rounding etc, but not something as big as a twofold difference in current settings. I'll double-check it again specifically for EB318 when I'll have some time to work on XPD.

hillzofvalp said:
Unlimited regen unloaded is much smoother than setting 2. On the road, it seems much smoother. I'm going to try to turn up the phase amps (one thing at a time) now because I had it set at 80A and must've been getting 40A.
"Unlimited regen" feature is still unconfirmed on EB3xx controllers. It seemed to work on EB2xx, but I don't have any numbers on the EB3xx series.
 
zombiess said:
hillzofvalp said:
I'm not so sure, my experience with EB3 boards has shown me that the phase setting appears to be independent of the shunt value. I modded the shunt on my 18 FET controller from 1.25mOhm to 0.5mOhm and regen did not increase at all
As far as I know, the shunt value does not influence regen in any way. The reason is that the current measuring circuitry (notably the shunt voltage amplifier) does not "see" negative currents. For the microcontroller it's the same as 0 amps.

Thus the regen setting works by limiting PWM duty cycle. Anyway, even at the "unlimited" setting Infineon doesn't do everything that can be done, because the regeneration with MaxController on the same hub motors is much stronger than with Infineon (and works almost until full-stop).
 
anpaza said:
For now I know about CellMan's controllers, he recommends programming his EB306 & EB309 by choosing EB312 in KEBL/XPD, and his EB312 by choosing EB312 and setting the current value twice smaller than desired.

My eb318 is a lyen. Programming with xpd at 200 phase amps and 192A battery makes it feel smoother and maybe even faster than when I program at 145 phase amps and 99 battery amps on keywin... But the motor isn't as warm. I will have to investigate this today at higher phase amps setting.. I tested it last night when, as you know, everything feels faster.

First thing I will try is the current settings but with EBS set to strong (2) like it was before. Then I will increase phase amps until regen feels like it did with the highest setting in lyen mk2? From what I have been able to record so far, I'm pretty sure phase amp setting directly effects unlimited regen strength.
 
I'm having a problem with this software. Maybe a computer guru could help me.

History:
At one time, I had this software working perfectly on my Windows 7 64 bit machine. Now, due to my computer being wiped, I've had to re-install the xpd software. Seemed to install ok. Then, the first time I tried to re-program my controller, the computer looked like it was searching for a driver for the usb cable I just plugged in. I don't think it installed. Now, when I try to program, I plug in the usb, and the computer makes a little noise (like it is seeing the cable), but the xpd software won't let me select any port. Anyone know what I could try? I'm about as dumb as a doughnut when it comes to computers.

Thanks,
Adam
 
You need the driver for the USB to serial adapter (it doesnt come with XPD)
Gimme a sec I ll find the driver for you.

Edit: files attached... Install the driver with the USB cable disconnected.
Im almost sure you got a counterfeit one, coz all my TTLs are made with fake chips. So please install the driver that works with the counterfeit first.
 

Attachments

  • Prolific_Original_Chipset_v1.6.1.zip
    3.2 MB · Views: 173
Thanks GENSEM! You are a gentleman and a scholar. The counterfeit one worked for me.

Adam
 
Back
Top