This is a bit of a long post, but the CA V3 and Lyen controller configurations go hand-in-hand so here's details on both…
Lyen Controller Upgrade
A few posts back I described mounting Lyen EB312 controllers (modified by Lyen for gear motor use) in place of my original Crystalyte Analog 12 FET controllers. Unfortunately, when I ran the new controllers I found that each of the three (two on the bike and a spare) performed differently, presumably because of parts tolerances and differences in soldering the shunts. These differences were Not Good since the bike design is predicated on the idea of two identical controllers/motors/wheels that equally share the power allocation from a single CA. So - I somewhat unhappily had to learn to do some controller programming to equalize performance. But in the end, this provided an opportunity to make the controllers and CA V3 work together pretty nicely.
CA V3 & Controller Closed Loop Operation
By the time the controller swap was underway, I was running a CA V3 with closed loop
current throttle to help address the tweaky throttle mentioned in
the previous post; this was upgraded to
power throttle when the feature became available. An explanation of how the CA closed loop control works and can refine throttle control may be found in
this post. Below is a diagram of the CA V3 and controller interaction for this build. This is basically the same as the single controller situation but both controller/motor pairs act on the same load and so affect each other by changing the apparent load seen by the other.
Configuration Overview
The strategy is to configure the V3 and controllers to give a throttle/power curve that cannot be achieved with either individually and that is optimized for BMC/MAC. Nothing magical here, but the midrange config is slightly interesting. The configuration can be viewed in three power zones:
- Startup - Low End: Minimize gear/clutch stress by disabling the Infineon controller Block Time feature to eliminate the 'kick in the pants' unlimited current off the line. Replace this high current boost with the exact opposite - smooth application of reduced current using the V3 throttle ramping feature
- Low-Midrange: Once rolling, use an aggressive high power controller configuration to get high available midrange torque. The high torque can be applied with controlled midrange acceleration over a longer time period to offset the loss of the initial Block Time boost.
- High End: Use the CA V3 power or current limiting to limit maximum motor power to safe levels. This allows the controllers to be configured for an excessively high rated current to yield an abnormally aggressive midrange power curve. This V3 maximum power level is set to improve travel range (see preceding battery post) and to avoid pushing the motors into an inefficient high rpm region where there is excessive motor heat generation.
The goal is a setup that eases off the line to save gears/clutches, pulls very hard though normal cruising speeds, then rolls off power as speed increases to the rpm limit of the motor. This focuses on get-away and cruising use and leaves the motor running fairly cool at the less frequently used max speed. On the downside, the controllers work harder in the midrange but do so at less than max current levels.
Performance
Skipping ahead to the result before plodding through the configuration details

we see the present
(2WD/1WD switch) and (LHM switch) power matrix looks like this:
View attachment 4
- Caveat: With both motors engaged each sees one half the load from net vehicle weight, hills, and wind. Two motor operation substantially reduces motor stress and heating making 1-motor/High the most taxing setting (red cell in chart above). This mode is used only in case of a motor/controller failure (limp home mode).
Tests are plotted below for the red and green cells above. These three test runs were made last week at 45 degrees F with data collected by an Analogger at a 1Hz rate. The runs were made on a more or less flat and level stretch of bike path - each test terminated when the flat path section ran out - it was barely long enough. These are 'no pedal' runs with the throttle slammed WOT at a dead start. The plots show speed, power and how the CA manipulates the controller throttle levels.
Notice in each plot how the throttle (orange line) goes to WOT on startup and stays there but the CA
ThrottleOut to the controllers (green line) drops to limit the power (blue line).
View attachment 3

The plots show smooth and well-behaved speed curves (red lines) with no sudden changes in slope. The low end power is clearly restrained by the CA throttle ramping. The noticeable rise in the speed curve at the low-midrange is the effect of the high current configuration of the controllers - in this range they operate like dual 2200W units; at those speeds they are not drawing 4400W, but the bike experiences the strong midrange power curve of controllers of that power rating. Towards the top end, CA 3300W limiting takes over, holding peak motor power consumption down as the speed curve flattens out to a top speed of about 40mph. Under load on hills, the CA top end limiting just takes over sooner at a lower speed.
cell_man said:
The other thing to consider is that there is a limit to the rpm these motors will efficiently operate to. There are 80 electrical cycles per revolution with the 16 pole motor and 5:1 gear reduction. If you run the motor much above 400rpm the motor will get hotter due to inefficiencies in the stator that are unavoidable. I would say that the max rpm you should operate is maybe around 500rpm which equals about 60kph in a 26" rim, but closer to 50kph is advisable. If you are really obsessed with having big power, fit dual motors, it really flies and the motors will not be stressed doing it, but the motors will still be limited by the max rpm of the motor.
With a 26" rim and Fat Franks (2150mm) these recommendations work out to be:
-
Code:
rpm-limited speed: (500rev/min) x (2150mm/rev) / (1609344 mm/mi) x (60 min/hr) = 40.7 mi/hr
max efficient speed: (400rev/min) x (2150mm/rev) / (1609344 mm/mi) x (60 min/hr) = 32 mi/hr
preferred top speed: (50kph/60kph) = 83.33% of max speed
40.7mi/hr x (83.33/100) = 33.9mph
These recommendations match the bike performance pretty closely.
Configuration Details
Here are the relevant configuration parameters for the CA v3 (B19 firmware):
-
Code:
Plim -> Max Current = [75.0] Amps
Plim -> AGain = [110] Gain
Plim -> Max Power = [3300] Watts
Plim -> W Gain = [10] Gain
ThrI -> Cntrl Mode = { Power (W) }
ThrO -> Up Ramp = [32]
ThrO -> Down Ramp = [400]
Ctrl -> Aux Funct = { Power Lim }
Here are the Lyen controller configuration parameters:
Rated/Phase Current Config
There are some small rated/phase current differences between the front and rear controllers to obtain equivalent power/performance in spite of minor controller hardware differences, however, both use the same low phase-to-rated current ratio of about 2:1. Increasing the rated current while lowering the current ratio pushes the power curve upward making the low end smoother and the higher speeds more powerful. Without limiting, the individual controller configurations would run about 2200W each - too extreme for BMC motors. However, the high current configuration is moderated at dead start and the top end by the CA as mentioned above.
The current values shown are the effective controller values, not the values entered into the Lyen programming software. There are two strategies to address programming cell_man/Lyen modified controllers:
- cell_man: program the controller using the true board type (e.g. EB312) and mathematically manipulate the desired values into the configuration parameter values
cell_man said:
o00scorpion00o said:
... you have to set the amps to (HALF) what you need...
- Lyen: program the controller using a more powerful board type (e.g. EB318 instead of EB312) and program using the actual parameter values. (See this related thread on the topic of running a non-hub BMC gear motor with a Lyen controller.)
After testing many Lyen-style configurations, I tried the cell_man approach. My impression was that it offered marginally smoother low speed operation than the Lyen technique and I just stayed with it but did no subsequent testing to verify this - I am happy with the result in any case.
Block Time/Speed/LVC Config
The controller block time is as short as possible (0.1 sec) - essentially disabled.
LVC detection is localized with the CA and the controller LVC values are set as low as possible.
I did not finish experiments with different Speed% settings and am presently running at 115%. I tried this because the Crystalyte controllers seemed somehow smoother at the top end. Since Speed% settings over 100% are reported to reduce phase current at the top end, it seemed worth a try as a means to 'loosen up' the motor at speed. However, my attention got redirected to other issues and I just left the controllers with the 115% configuration without finishing testing - all seems to be working fine but I cannot offer any assessment of the relative effectiveness of the setting - 100% might be just as good… (yet another thing to do next Spring).
- Caveat: Although this general V3/controller config scheme will work nicely for single gear motor builds, the settings above heavily tax the clutches in this 2WD setup (remember: only half the load each). BMC V4 clutches are a new rugged design and are holding up well, but the earlier design MAC and pre-V4 BMC clutches have seized. Although this has a great deal to do with riding style (aka 'customer abuse'), please do not consider these exact settings to be 'safe'

Contention
Other threads about 2WD mention problems with motor 'contention' which is characterized by a kind of ratty power application at lower power levels when PWM is in play. Experiencing this behavior was a little surprising since the phenomenon never occurred with the Crystalyte Analog controllers which ran together smooth as silk. In any case, I detected two types of 'contention' with the Lyen controllers: (1) between the CA and the controllers and (2) between the two controllers.
- The CA interaction was not very pronounced but the effects were all but eliminated by decreasing the CA ThrO->DownRamp setting from the original [999] to [400] - the ThrO->UpRamp setting was already set very low to [032]. Together these effectively damped the CA ThrottleOut response while leaving the controllers with a fairly rapid response. The differing time constants appear to prevent the CA and controllers from getting into the over-correction lockstep of 'contention'.
- The controller/controller 'contention' was apparent when the controllers had identical default Lyen-style configurations. The interaction between the two controllers essentially disappeared when I switched to the cell_man controller programming technique and finalized the configuration as shown above with higher power, the 2:1 current ratio, and slightly dissimilar controller current settings. I was not actually attempting to address the 'contention' issue but something accidentally remedied the matter. Whatever the cause - a somewhat puzzling but welcome resolution…
In the end there is very rarely any sensation of 'contention' in either 1WD or 2WD modes. A faint interaction can very occasionally be detected under certain low speed high load conditions, but a minor throttle adjustment suppresses it. Not a problem
Summary
The Lyen controller and CA V3 upgrade have worked out great and give the bike a nice production feel with very satisfying power and easy throttle control. It's extremely smooth off the line and requires no special care to avoid wheel spin or to protect gears/clutches. The bike tops out at just under 40mph, does 0 to 30 in under 10 seconds (150lb bike + 200lb rider), and zips up hills. The result is a really nice improvement over the original Crystalyte Analogs and CA V2. These changes took more effort than I had foreseen, but I am a very happy camper
