Lyen & other programable controllers

Marctwo

Pedelecer
Dec 1, 2012
182
1
Cheers Dave, Just like the old Open University. :)

So it looks like the mosfets are indeed seeing the full, true voltage in the PWM. Which means they should be protected by the battery current limit.

I'm sure I'll still manage to blow something up...
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
I did a few tests...

For the last few months I've been using the following settings:
Battery Current Limit (BCL): 15A
Phase Current Limit (PCL): 37A
Overcurrent Detection Delay (ODD): 0

My ammeter is a few amps off so the figures are unreliable guesstimates. But it's the relative differences that are important anyway. That being said... With these settings I rarely go over 13A and normally cruise at about 9A.

Test 1: Safe Hard Limit.
For this test I just lowered the BCL to 6.5A. The idea being that as I don't usually go that low, the current would always be limited by the BCL. Sure enough, that's exactly what happened with the current dancing around 6A regardless of accelerating, cruising, uphill or head/tail wind.

Nice ride if you like exercise...

Test 2: No Limit.
For this test I set BCL@20A and PCL@15A. The idea being that I should never pull enough current for the BCL to be called into action. I was hoping this would give me a much smoother, dynamic power range than my old settings. It ended up being between 13A and 7A. More range, yes... but not as much as I'd hoped for. This may be because my motor doesn't spin up all the way.

This setting was quite lively but didn't have the grunt I'm used to.

Test 3: Slightly Less Safe Hard Limit.
My old settings make for a hard limit but there's still a bit of dynamic range there. So the idea here is to push the PCL to try and flatten the dynamics a bit and maybe get a bit more power at cruising speed. With BCL@15A and PCL@50A I was pulling between 14A and 12A so it seems to have flattened out a bit. I'm inclined to keep pushing the PCL but... There were a few times when the motor just didn't feel quite right, a bit slugish and I'm wondering if the effective lower voltage from slow PAS/low throttle is causing the motor to draw more current than it can handle.

Apart from the odd moments, this felt a bit pokier than my old settings but not by much.

Test 4:
I may need to get a spare motor/controller before test 4. :)
 
D

Deleted member 4366

Guest
My understanding is that the controller can't measure the phase current, so it calculates it using an algorithm based on battery current. That seems to imply that you could use either battery current or phase current to limit power, but if you use both, it'll use whatever gives lowest battery current. The algorithm might be as simple as multiplying the battery current by three, so, as an experiment, set the battery current to 10A and the phase current to 50A, then set the phase current to 30A and the battery current to 20A, and see if you get the same result.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
My understanding is that the controller can't measure the phase current, so it calculates it using an algorithm based on battery current.
Yes, I seem to remember reading this before. I'd imagine the phase current limit is one of the variables used.

That seems to imply that you could use either battery current or phase current to limit power, but if you use both, it'll use whatever gives lowest battery current.
Yeah, hence my use of it as a limiting threshold. In test 1 the battery current limit was lower so it was used to limit the current. In test 2 the phase current was lower so there was no limiting needed apart from the upper boundry of the phase power curve.

The algorithm might be as simple as multiplying the battery current by three, so, as an experiment, set the battery current to 10A and the phase current to 50A, then set the phase current to 30A and the battery current to 20A, and see if you get the same result.
Not sure we're on the same page here. lol Definitely won't get the same results from those settings.

The first setting: BCL@10, PCL@50A is essentially the same as test 1 above. As I've already done BCL@15, PCL@50 and had a low current of 12A, lowering the battery limit to 10A would likely flatten the power curve to 10A max.

The second setting would likely give a more dynamic power curve with 20A max.
 
D

Deleted member 4366

Guest
Test it and see. Then you'll know - and so will we.
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
One thing I would not mind achieving from this unit is to get max RPM at full throttle. With the Goldant motor and the stock Tongxin pedelec only controller it comes with, I get assistance up to about 16-17mph.

However using the Lyen controller and full throttle, assistance seems to peek/stop at about 14-15mph ?

Maybe this is a function of the throttle unit ?

Jerry
 
D

Deleted member 4366

Guest
Maybe this is a function of the throttle unit ?

Jerry
Very likely. The slightest reduction in magnetic field at full throttle makes a big difference to top speed. Also, the magnet has to be hard up against the sensor for full throttle. Try shorting the 5v to the signal wire at full speed to see if it speeds up. Check also whether you've got 5v or 3.7v on the throttle supply.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
One thing I would not mind achieving from this unit is to get max RPM at full throttle. With the Goldant motor and the stock Tongxin pedelec only controller it comes with, I get assistance up to about 16-17mph.

However using the Lyen controller and full throttle, assistance seems to peek/stop at about 14-15mph ?

Maybe this is a function of the throttle unit ?

Jerry
I've found the throttle to be weak on mine. If I throttle alone it'll usually hold the speed I'm at but doesn't seem very good at accelerating. But if I pedal without effort it accelerates fine.

I always assumed it was the extra (although minimal) pedal power that made the difference but maybe it's the PAS... I'll have to try it with the pedals lagging behind the drive so the PAS will kick in but there'll be no extra pedal power.
 
D

Deleted member 4366

Guest
From the tests I've done, I know it - and so should you.
The test I'd like to see is with the phase current more than three times the battery current, then a second test with the phase current exactly three times the previous battery current limit, and the battery current more than a third of it. The idea is to see whether the phase current is three times the battery current and whichever is lowest is the limit. The figures that you gave don't verify this theory right or wrong because the values don't correspond between the tests.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
The idea is to see whether the phase current is three times the battery current and whichever is lowest is the limit.
But it's an illogical idea that seems to have been randomly plucked out of the air. This would make seperate battery/phase current limit settings completely pointless.

It's far more likely to me that the phase current limit sets the depth of the power curve and the battery current limit sets the limit for the current drawn from the battery. That's the theory I started testing with and my tests so far support it.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
I've found the throttle to be weak on mine. If I throttle alone it'll usually hold the speed I'm at but doesn't seem very good at accelerating. But if I pedal without effort it accelerates fine.

I always assumed it was the extra (although minimal) pedal power that made the difference but maybe it's the PAS... I'll have to try it with the pedals lagging behind the drive so the PAS will kick in but there'll be no extra pedal power.
Tried this... It's definitely the extra pedal power making the difference.
 
D

Deleted member 4366

Guest
But it's an illogical idea that seems to have been randomly plucked out of the air. This would make seperate battery/phase current limit settings completely pointless.

It's far more likely to me that the phase current limit sets the depth of the power curve and the battery current limit sets the limit for the current drawn from the battery. That's the theory I started testing with and my tests so far support it.
Well, if you test my theory, you'll know if it's right. I didn't pluck it out of the air. It's based on simple physics and logic.
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
Ok on a practical level I have some slipping of the clutch on my lightweight Goldant motor (180W) when I set it to 9.1A battery limit and 9.1A on the phase limit.

I have to lower it to 7.4A on the battery and 7.4A on the phase to almost eliminate it but it still happens sometimes, usually when I am already moving/pedaling and I apply throttle. My meter measures max current draw as 8.9A at this setting.

Should I lower the phase setting more or adjust something else ?

From memory I think my Overcurrent Detection Delay (ODD): is set to 0.1

Jerry
 
Last edited:

Marctwo

Pedelecer
Dec 1, 2012
182
1
The first thing I'd do is set the ODD to 0. I have no Idea if this delay works on the battery, phase or both limits but for your purpose it's just going to confuse the issue. It'd be interesting to see how your max current draw compares to your limit settings with ODD set to 0.

<edit>Just checked xpd and it says the ODD affects the phase current limit.</edit>
 
Last edited:

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
Ok I will give that a try.

Jerry
 

rpurchon

Pedelecer
Sep 22, 2012
55
0
i tryed mine once, at 25a battery current, phase current 5a.result very slow motor. [wheel running freely]
so the controler must work to the lowest set amp.
can any one shed any light on my motor controler issues.
i have a code 12 bpm running on 15 cells 60v.when it gets to apx 28 mph the motor becomes noisy and controler too.as if the timing is out or its hit its limit.
i have a sensorless controler,would a sensored one work better?
or is the controler at its max frequency speed wise.
i would have though a fast wind motor at 48v must be spinning faster than my set up.
it does it worse when batterys fresh.
richard
 
D

Deleted member 4366

Guest
Two things l can think of:
1 The controller can't switch quick enough.
2 The timing is not accurate enough sensorless

Try another (high speed sensor controller.