XPD: open-source keywin e-bike lab replacement

I have been thinking about this and the different protocols and came up with this idea.

I have an EB312 board on a sensor-less controller, with an Xlyte APM plug on it.

Now the Xlyte APM in setup mode programs the MCU,,it allows you to alter current limits, and in run mode you can change between the 3 speeds and have speed and current monitoring via reading the MCU output.

So my thinking goes like this..if we ( OK I ) can intercept the signals coming to and from from the APM it may give us clues as to the protocols being used...especially we can compare with what we know already in relation to the current XPD.

OK big snag in this theory, how would I go about tapping into and intercepting these signals and recording them.

I am imagining one (or maybe two) of these USB-RS232 adapters as found on the programming cables. Connect the RX side of the adapter to a T between APM and the controller, then use some sort of console terminal logging program ...the name of which slips my mind at the moment to record the data flow between the APm and the board MCU.

I say "maybe two" of the adapters..because..I imagine that you would need to hear the output from the APM (listening on the board Rx port) and then the reply from the MCU (board tx port)

I'll quite happily try and do this if it will help and someone can give me an idea of how I put this idea in to practice
 
zombiess said:
I modded XPD to add in all the extra parameters for the EB3xx boards hoping the protocol was the same, but it fails on programming them. Was worth a shot, but without having someone who knows more about this such as the Author of the program I guess I'm done. I was able to read and understand his code, make the changes was pretty straight forwards, but no luck programming.


My hex edited version programs just fine, Im yet to test it because its pooring rain.. but the 3 speed switch is working nice, so my 0,1 block time should work too.
 
gensem said:
zombiess said:
I modded XPD to add in all the extra parameters for the EB3xx boards hoping the protocol was the same, but it fails on programming them. Was worth a shot, but without having someone who knows more about this such as the Author of the program I guess I'm done. I was able to read and understand his code, make the changes was pretty straight forwards, but no luck programming.


My hex edited version programs just fine, Im yet to test it because its pooring rain.. but the 3 speed switch is working nice, so my 0,1 block time should work too.

my hex edited versions work great too. I set all my controllers to 0.1S block time.
 
mxer said:
Managed to get this sorted and am programming, which is great :mrgreen:

Have a couple of question tho :roll:

Set the "Battery current limit" to 20.1amps as there was tooo much tourqe 30.1 max was being pulled before, this feature didd't do anything ? Still pulled the 30amps ?

Ok, so that diddn't work so had a play with "Phase current limit" was set at 65.4amps, so set that down to 20amps, now only pulls 4amps max, Ok, getting somewhere, so set to 50amps and now it pulls my desired 20amps :D

But why when i set the phase current limit to 50amps it pulls 20amps? :? , battery current limit doesn't seam to do anything so shall i put that back to default ?....

If i could understand this i would feel more comfortable, not understanding it worries me i have set values that could damage my system...

I did notice i had a bit of stuttering/grundting going on but that could of been down to a low (ish) battery ?.....


OH bollocks..I just spent 20 mins going through your post and created a really nice answer., individual quotes, from your question..with bits pulled from BLDC theory threads i found..quoted and referenced ..all to help you understand the difference between phase and battery amps...but i swapping tabs, I seem to have lost it...F**K

OK no reasons..in a nutshell..it is to do wtiht how the controller and motor works..mosfet switching , charge being stored in the capacitors and then released..so greater phase amps
Go to http://www.ebikes.ca/simulator/

and click and drag in the graph while looking at the middle talbe of figures below the graph. Look at Mtr Amps (=phase amps) and battery amps..note what happens as you drag from left to right in the graph
http://mh-nexus.de/en/hxd/
 
Yea, i had lots of stuff like that in my first post that 'vapourised', but was not go to go pulling up all those references yet again :)
 
This is soo cool, thanks to all you guys, it was a community effort, drawing from all the good posts in this thread, but I now have a custom built Keywin 12 FET controller programmed to some safe operating parameters. I'm off to test this baby out....
 
Hi guys, long time no see ;)

If somebody wants to participate in testing a newer XPD with support for EB3xx, you can download the alpha version from here:

http://cs.ozerki.net/zap/pub/xpd/0.3.0-alpha/

NOTE: This version was barely tested, it works for me but I can't guarantee it will for you.

For windows download xpd-0.3.0a-windows.zip and install just like earlier XPD versions.
For linux download xpd-0.3.0a.tar.bz2, unpack and "make install".

Also it would be nice to test it with EB2xx, since I updated the "flashing" logic a bit so that (I hope) the chance for the "Invalid reply byte" failures should be minimal.

Another new feature - the serial port list is dynamically updated. That is, with earlier versions you had to insert the programming cable first, then wait until the serial port appears in the system and only then launch XPD. Now you just launch XPD, and when a new serial port appears XPD will automatically refresh the list of serial ports. This works fine in linux, I would be interested somebody to test this with windows.
 
I'm too young to die yet :D
Problem was, I had no EB3xx at hand for experimenting. Until yesterday :p
 
This is soo cool, thanks to all you guys, it was a community effort, drawing from all the good posts in this thread, but I now have a custom built Keywin 12 FET controller programmed to some safe operating parameters. I'm off to test this baby out....
So what do you consider safe parameters?
Dan

I'm still waiting.

I want to know what you consider safe.

Dan
 
You cant just tell an amount of amps is safe or not... you need know the voltage too.
Either way my 12fet 4110 died in a long hill doing 50a main.
 
Thanks for that info.

No hills to worry around here.

i am running 15s lipo on a 8t Mac 26" wheel.
the 6 fet is doing better than my 12 fet as to smoothness thru the power range. I wish I wrote down what I set it at. did a lot of changinging to get a smooth pull. The 12 fet is at 45 and 100 amp. if I go lowe it seems to have a missfire from 10mph to 15 then it's smooth. With higher levels it is smoother or it goes thru the rough spot faster.

Both are EB3xx boards I got from Keywin and are done with 4110 fets and heavy braided traces. Both are running rather cool as the 6 fet is heatsinked in the frame of my BlackComb. It fits nice under the seat frame area. Both bikes hit 40mph with pedal assist.

I wish there was a way to recover the settings you put in if you didn't write it down.

thanks for the info.

Dan
 
Maximal controller current heavily depends on cooling. If you put it into a closed box, it will overheat even on moderate currents, if you provide it with a good air flow, you can get twice more amps from it. That's a important factor to keep in mind when designing your new ebike.
 
I tried it on a basic EB306 from Keywin and it came up with 'Programed successfull' or something like that.
I can't try it on a bike yet until I upgrade it to 100v.

thanks for all your work
Eddie
 
Nice.

When somebody tests new XPD, I'm very interested what was the real battery current (measure with CycleAnalyst/ampermeter etc). Different manufactures use different shunt values, thus expect that the real current may be quite different from the programmed value.

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.

I'll add the models EB306/CellMan, EB309/CellMan, EB312/CellMan in the final release, but for now just do like he says.
 
Since my Windows laptop has a power connector problem and won't run or charge the battery, and this will take several hours to disassemble, fix, and reassemble, I thought I would try an old Imac G5 with OSX 10.4 I have here, but Python Launcher can't open any of the XPD versions. I used to know a fair bit about the Mac, but have forgotten most of it in the last 5 years of not using any of that knowledge. :(

Python's IDLE will "run" XPD, but it doesn't actually run as intended, simply shows the script in action. I am not sure if it is showing me errors, or simply all of the script in "notepad" form. I can type up what it shows here, if necessary, but it's pretty long, and I can't copy and paste from that machine to this one.

I skimmed thru the thread and the XPD (and python) websites, and didn't see any info on troubleshooting XPD on a Mac.


What I will try to do for now is drag the bike far enough into the bedroom to get the programming cable to reach the Windows PC's USB port, and see what happens there. (XPD does run on this PC).
 
Back
Top