Twin motor, CA V3 & PhaseRunnered Bosch Haibike build & teething problems

Limbs

1 W
Joined
Sep 3, 2020
Messages
51
Hi all
I have built a twin motor eMTB project using a Bafang G020 front motor and a Bosch Gen 2 mid motor, each motor is controlled by its own CA V3 & PhaseRunner combination. The CAs both share the same throttle, brake, 1 wire PAS RPM sensor & connection to the original, internal Bosch torque sensor. The Bosch is currently fed power from the original Bosch 36v battery, whilst the Bafang is fed from an independent 52v battery; earths are linked at the CA inputs, but not at the main battery earth leads.

On first testing I had 3 major problems:

1) On pulling away using pedal assist only, both motors would surge to near full power before gradually settling down after 2 or 3 seconds, this happened regardless of which level of assist was selected, even very modest ones.

2) When I stopped pedalling, both motors continued to run, but would gradually ramp down over several seconds.

3) When I shut the throttle, both motors would surge to a high power level before gradually ramping down over several seconds.

I eventually managed to bring No 1 under control by reducing PAS ramp up to 2v per second and increasing WGain to a setting well in excess of the “recommended range” of 8-25 @ 90.

After much more testing I worked out that issues 2 & 3 were both linked to running of the Bosch motor, as everything worked fine when only the front motor was running. The Bosch motor phase cables, plus 5v, earth, speed, PAS, torque & temperature sensor all run in a Grin supplied 10 core cable, the signal cables being screened (the whole cable is fed through the down-tube), at both ends the signal cables split off to go to their respective connections, however, at the motor end, the torque sensor signal wires continue run parallel to the phase cables. After a bit of research, mainly on Endless Sphere, I decided that the problem was likely to be interference related, so I made another, temporary torque sensor loom that I hung away from the phase wires & frame (apart from 1 zip tie to the outside of the down-tube, to stop it snagging on the front wheel; this made no difference!

After yet more testing, I realised that the problem was that I had mounted the magnet ring for the PAS RPM sensor to the “chain-ring” guard (as this was the easiest way to do it), so once the Bosch motor was running, it became self-maintaining, this despite there not actually being any torque applied, in fact torque goes slightly negative when the pedals are stationary & the motor running.

Next I designed & printed a new magnet mount, so that the magnets only rotate when the pedals are actually turning & eureka, everything now works fine, or so I thought.........

The main reason that I wanted the Bosch system to have throttle functionality is that I only have one arm and do some reasonably extreme off-roading. If the going gets sufficiently tough & I have to get off, it’s very difficult for me to push the bike, the previous addition of the throttle controllable front motor helped quite a lot, but on steep uphills it couldn’t get enough traction.

Anyway, I was testing throttle controlled “pushing” of the bike on a steep, garage access road & it worked great, until I got to the top & released the throttle; the bike took off great pace, tearing off the Velcro strap that fastens my false arm to the handlebars before I managed to grab the brake which shut everything down. What caused this is that, despite there being a freewheel in the Bosch gearbox, so that the motor does not force the pedals to turn with it, when your feet aren’t on the pedals, there is enough friction to turn the pedals and, when the throttle is closed, the CAs seem to think that they should apply a bucket load of power, again despite there being no torque applied. My question is, does anyone know how the CAs are programmed to function, as in, should they behave in this way or do I still have an interference problem?

I actually started writing this in order to send the question to Grin, which I will do, but I have been meaning to get round to writing a build thread for some time, but have been too busy actually building the bike, so I thought that now is as good a time as any. I will upload a load more info & photos in due course, plus I have a few more niggles to ask for help with when I get chance.
 
Can you post your CA setup file? Looking at all the settings together, we might see something that causes the issue. Many settings interact with each other, so it's possible that's the issue. Or it might be a timing or cadence sensor setting (it's probably not reacting to the torque itself, but more likley to the pedals moving causing cadence sensor to make pulses that the CA reads as if you were pedalling).

However, it's possible that you may have to change modes to ignore the PAS/torque sensor whenever you're not on the bike. That's pretty easy, by enabling the presets so you can make preset 2 throttle-only. You can even set this up as the default preset, so that anytime the CA is power cycled it will always startup in throttle-only mode, preventing any accidents like you had (at least until it's switched to the other preset that enables PAS/troque control).
 
Hi @amberwolf, thanks for your reply, I have attached screenshots of the important settings from the Bosch's CA setting, the Bafang settings are the same, in all important aspects, and both motors are behaving in the same manner.

CA 1.pngCA 2.pngCA 3.png

Without a doubt the CAs are reacting to pedal cadence but, as you can see, they are set to only apply PAS power when HWatts are greater than 20, which it is not (I have tested several more times, whilst also observing the live HWatts variable on the CAs).

Good idea reference changing Presets, however given that at the time that I need to push with throttle, I am likely to be in a pretty awkward situation & will also likely be holding brakes on, it will probably be easier for me to reduce PAS levels to zero via the digital aux inputs. The other option, given that I am now aware of what will probably happen, is to grab a brake at the same time as closing the throttle (as long as I remember); I will have to see how I get on tomorrow which will be the first time the system gets a proper test! Having said all that, what I obviously really want, is for the CAs to react in the way that they logically should.
 
Limbs said:
Without a doubt the CAs are reacting to pedal cadence but, as you can see, they are set to only apply PAS power when HWatts are greater than 20, which it is not (I have tested several more times, whilst also observing the live HWatts variable on the CAs).

AFAIK, in TorquePAS mode, then yes, the HWatts must be greater than whatever limit is set there, before any assist is provided.

The settings *look* right at first glance. I'll have to go thru them in detail to see if I can figure out any interaction reason for the problem.

Just to be certain it is not a torque sensor issue, have you tested with just the torque wire disconnected from the CA PAS inputs? (but the cadence sensor still connected) I ask because the CA display updates are not instantaneously continuous, so there could be tiny spikes in the sensor voltage that the CA sees (but you can't) that cause the problem. I don't know how much "smoothing" the CA does on the sensor data, if any.
 
amberwolf said:
Just to be certain it is not a torque sensor issue, have you tested with just the torque wire disconnected from the CA PAS inputs? (but the cadence sensor still connected) I ask because the CA display updates are not instantaneously continuous, so there could be tiny spikes in the sensor voltage that the CA sees (but you can't) that cause the problem.

That's a good plan, I'll give that a try on Friday and report back; out riding in the mountains tomorrow! :)

amberwolf said:
I don't know how much "smoothing" the CA does on the sensor data, if any.

Presumably that's the what the "Torque Assist Averaging" setting does, I originally had this set at 6 poles (180 degrees of crank rotation), but later increased it to 12 poles, to further smooth things, when riding in PAS mode.
 
Slight delay to further investigations as I had a great day out in the mountains on Thursday, but having covered around 40 miles, I now have some nasty noises coming from the gearbox of the Bosch motor, so I need to pull that apart to see what's going on.

One thing I did notice however, is that sometimes, when it's doing funny things, I have little "F" & "P" icons flashing up beside the ThrO variable on the "diagnostic" page, anyone got any ideas what they mean?
 
Limbs said:
One thing I did notice however, is that sometimes, when it's doing funny things, I have little "F" & "P" icons flashing up beside the ThrO variable on the "diagnostic" page, anyone got any ideas what they mean?
the manual on page 8:
4.2 Diagnostics Screen, Display #12
If you press the left button once from the main display, you will have the
diagnostics display. This can be invaluable during any kind of system
troubleshooting. The top line shows the actual throttle voltage signal going into
the CA3, as well as the throttle voltage going out to your motor controller. If the
rate of change of the throttle is being clamped, then the associated rate limit will
show up (F = fast, U = up, P = PAS, D = down, see section 6.5).

The bottom left shows if any of the limit settings are actively regulating the
throttle output voltage. Letters awvst refer to the Amps, Watts, low Voltage,
Speed, and Temperature rollbacks, and they become capitalized when active.
This display lets you easily identify if your input throttle is working correctly, if the
CA itself is sending an output throttle to the motor controller, and if that output
throttle is being clamped by any of the programmed limit settings.
 

Attachments

  • V3CA_Screen11[1].jpg
    V3CA_Screen11[1].jpg
    12.3 KB · Views: 502
Thanks again Amberwolf, I thought I'd seen info on that somewhere, but assumed that it was in the unofficial guide, where I couldn't find anything. Interesting though, as I was getting a flash of F, followed by P, so that at least confirms that the power that the CA thinks it should be adding is PAS related.

I have decided that, once I've fixed the mechanical side, I will try to do some data logging in an effort to find what's going on, I will start off using the CA's data stream, but if that doesn't show anything, I have an automotive data logger that logs @ 100Hz which should pick up any spikes if 10Hz fails to.
 
OK, so I’ve fixed the mechanical side (was a stick stuck in my PAS magnet mount, coupled with a noisy bearing on the main output shaft) and done some more mods & testing.

I changed the wiring for the PAS & Torque sensor 5v supplies, so that, instead of coming from the centre drive’s PhaseRunner, it comes from whichever CA the throttle’s 5v comes from; easily swappable, so that I can run with one system turned off, should I wish to do so. This enabled me to run just the front system, to see whether I still had the issue and, if so, this would enable me to rule out interference from the Bosch’s phase wires. As, in this configuration, the cranks would not spin on their own, I had to ride the bike, applying then releasing the throttle, whilst pedalling, to keep the cranks spinning, but without applying any torque; I could NOT reproduce the problem, leading me to believe that it must be down to interference.

Next, I tried the Bosch system on its own, but with the PAS wire connected, but NOT the torque input wire (as suggested by @Amberwolf), unbelievably, this still resulted in the motor powering up for a short time after shutting the throttle, before shutting off again briefly before starting up again......... After several repeats of this test, I noticed that the throttle out reading on the CA’s diagnostic screen was raising & falling, as would be expected, along with the “F” & “P” symbols denoting that the Fast Up rate, followed by the PAS Up rate were limiting. I also noted that, whilst the CA was telling the motor to run, in a supposed response to a PAS input, the Human Watts readout remained @ ZERO. I changed the Fast Up rate to zero, which confirmed that the CA was throttling up in response to a supposed PAS input (just the “P” flag beside the rising Thr O reading).

Next, I changed the “Assist Start Level” to 999 HW, this had no effect.

After that, I played with the PAS (Cadence) Start & Stop Thresholds & noted that this seems to have an effect on the amount of time that the CA’s “ghost” throttle out command lasted. Eventually I set both the Start & Stop Thresholds to the same figure, which overcame the problem; eureka!

My next planned step, was to see if I got the same response with the front system, when both systems were running at the same time, however the front CA did not want to play; see this thread: https://endless-sphere.com/forums/viewtopic.php?f=49&t=111814

Given my other, more pressing issue, I have not yet got round to checking a theory, that came to me later, that maybe the CA is cutting in & out between the cadence speeds set in the Start & Stop Thresholds, I will try to get round to testing this theory tomorrow. This, in turn, also opens the possibility that it isn’t interference related & that the issue did not occur, when I was testing the front system on its own, because the cadence at which I was pedalling, was not in the required window. I obviously need to fix/replace the front CA before I can test this theory!
 
Having previously said that I had found the problem, continued use proved that, in fact, I have not!

I have had to return to the UK, for at least 3 months, and my bike remains in Tenerife, so there won't be any more investigations or updates for a while. :(
 
Back
Top