Lyen & other programable controllers

amigafan2003

Esteemed Pedelecer
Jul 12, 2011
1,389
139
Jerry - have you selected the right port? On the initial screen bottom right hand corner you'll see a drop down box containing com3, com6 etc.

Open the software WITHOUT the cable connected - it should only show one or two ports. Now shut the software, plug the cable in, wait ten secs, open the software - you should see a new port in the list - select it and try uploading again.
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
YAY I cracked it :D

I took a look at Lyen's software and noticed his board is EB306 not the default EB206 on the XPD software i.e. this is an Infineon 3 not 2.

Changed it to Infineon 3 and EB306 and it programmed just fine. You do seem to have to push the button once let go again and then push it again to make it work.

Connected it up took it out for a spin and not a slipping clutch in sight, whether I gun it or or turn it on full flow. Turnigy read 8.3A peak so I could easily take it up another amp or so.

Its taken a while to get there and spending 2 hours today with the software was was VERY frustrating. Now lets hope these small motors prove as reliable as my Nanos.

Thanks again amigafan.

Oh just one final question why do you set the phase wires to 10A when the overall current is limited to 8A anyway ?

Regards

Jerry
 
Last edited:

amigafan2003

Esteemed Pedelecer
Jul 12, 2011
1,389
139
Phase current controls acceleration and battery current control amp draw at top speed.
 

cwah

Esteemed Pedelecer
Jun 3, 2011
3,048
179
www.whatonlondon.co.uk
One is Lyen's software cwah and one is an open source version.

Jerry
Thanks Jerry. I suppose at the end there is no difference once the programming is finished.

That's funny because I have Lyen and Cellman configurable controller. They both have a different name for the software and are both confidential. But they are exactly the same, I just configured Cellman controller with Lyen software.
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
I can now confirm that this is based on an Infineon 3 controller.

Having spoken to a lot of other now it seems these controllers are available from a wide range of suppliers. The beauty of Eds one for me, is I wanted something plug and play and apart from the programming challenge for me this suited.

I can now experiment with other solutions having grasped the basics :p

Regards

Jerry
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
I raised the current from 7amps to 8.4amps. Turnigy showed a 10amp peak and I had a couple of minor clutch slippages.

Before I had it set at 7A so I am going to turn it down to 7.7A. I noticed it drew a max of 34.5V even though it has 39V+ at its disposal ?

The whole thing might work out better given a lot of my commute is flat and I can help pedal. If the current draw is less then I should also get more distance for the same capacity battery, than when using my more current hungry Nanos which peak around 17A.

Regards

Jerry
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Jerry, you also should look at the phase amps, this is normally based on a simple 2 to 2.5 times the battery current ratio, so you may want to tweak the phase down instead of the battery current.

The battery current setting is there to protect the battery and while it does have an indirect affect on motor power its the phase amps that you need to keep an eye on, try tweaking that setting first.

Also, check the block time is not set to 3 seconds or something, set it to half a second or lower, this will allow the controller to limit current at motor startup.
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
Thanks NRG,

The phase current is set to 10.6A as per amigafans settings.

Don't see a block time setting though over current detection delay is 0.1s.

Regards

Jerry
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
I raised the current to 7.7 and its still peaking at 10A with no clutch slippage.

amigafan2003 I know you are running your Goldant s at a higher voltage but what current is yours peaking at. I guess to find the right value I could take my Goldant out with the stock controller and see what it peaks at.

BTW I have also purchased an e-crazyman controller which is identical to the Lyen unit less the programmable lead and wires. It's also a lot cheaper. I think a few of you pointed this out to me at the start which is what made me go and get one and see. As I said in another post I am pleased I purchased the Lyen one as it has enabled me to understand how these units work and now I have the serial/usb lead and a template for the e-crazyman controllers I have purchased :p

I can't believe it has taken me so long to discover programmable controllers. The penny only just dropped about the ability to adjust current settings for different motors having previously assumed I had to get the manufactures controller (in my case Tongxin) to ensure the motor worked correctly and was not over amped :eek:

PS I also now understand the the manual way of doing this i.e. the many users who shave or increase the size of the shunt to lift or reduce current. I think I prefer doing it in software though I guess if you have a favorite controller without the programming ability, then this provides another good option.

Jerry

Regards
 
Last edited:

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
Silly me :eek:

Of course I can do it using the calculation P=V*A

So from this spec sheet (click the parameter tab to see) we have max power = 500W. I notice it also says 8.3A max for the 36V motor ?

So 500 = 43.2*A

A = 500/43.2 = 11.57A

The Goldant controller has 12A written on it. I will still do a real life test just to confirm.

Obviously amigafan is running it at a lower current because he is running it at a higher voltage. I am guess I can take it up about another 0.5-1A on the controller setting. This stuff is geeky but fun!

Regards

Jerry
 
Last edited:

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
Just went out for a real life test using the stock Goldant controller

11.76AP
36.57VP

So that is 430W. This was off a freshly charged balance 36V battery measuring 42V.

I still don't get it how much faster pedelec is ? With the throttle setup and pedaling lightly I go up to about 15mph but with pedelec I its more like 16.5mph. Maybe pedelec encourages you to pedal harder ?

Or is it that the extra couple of volts 36.5v of the stock controller over the Lyen controller at 34.5v is making the motor spin faster ?

Regards

Jerry
 

NRG

Esteemed Pedelecer
Oct 6, 2009
2,592
10
Most likely the throttle is not outputting enough volts, I think d8veh found the hall to magnet distance and positioning was critical to getting the full output from it. I've noticed variation in a number of thumb throttles I use.
 

amigafan2003

Esteemed Pedelecer
Jul 12, 2011
1,389
139
Picking up on something really old - sorry for the thread resurrection:-

Just went out for a real life test using the stock Goldant controller

11.76AP
36.57VP
That voltage reading doesn't sound like the peak voltage - it sounds like the lowest voltage recorded. RC Voltage meters (Turnigy watt meter and watts up certainly) record the LOWEST voltage recorded during a run, so you can check you're not pushing the batteries too hard.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
I've just read through this thread and found the battery/phase current settings info very interesting. So let's see if I understand this...

The battery current sets the limit so that whatever the phase current is set to, the controller won't deliver more than the battery current?

The phase current sets the power ramp so a high setting will deliver more power at low levels but will be limited by the battery current setting?

So for an extreme example, with:
Battery current = 10A
Phase current = 5000A
the power ramp would be very steep giving effectively full power immediately but not going beyond the 10A limit?

And with:
Battery current = 5000A
Phase current = 10A
the power ramp would be very smooth going upto 10A but wouldn't be protected against spikes?
 

jerrysimon

Esteemed Pedelecer
Aug 27, 2009
3,292
112
Cambridge, UK
As I understand the battery current limit protects the controller from drawing more than the current set.

I am using this with the new Goldant motor and have set the battery current quite low to 9.1 amps but as we know these setting are a little rough in their implementation and tend to run higher than that set. I think when I tested it on the actual ride it peaked at 11-12amps.

I still find it slips sometimes a little if I hit the throttle too fast when starting off even though I am moving ?

Like you the phase setting is confusing to me. I just checked my phase current which is set to 10.6 A. I think overcurrent detection delay plays a part too. Mine is set to 0.1s.

Even though my cruise control is set to 15s its more like 60s before it kicks in.

Jerry
 
Last edited:

Marctwo

Pedelecer
Dec 1, 2012
182
1
My thinking is that it's essentially the same as an audio limiter/compressor with:
Battery current = threshold
Phase current = gain
Overcurrent detection delay = attack

But in my experience, even some 'recording engineers' don't understand how limiter/compressors work. :)
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
I'm about to start a few tests on this and on reading the phase current tooltip in xpd, it says that the mosfets are at risk if the phase current is too high. But won't the mosfets just see the pulsing 36V and therefore the battery current?

I can see that the motor will see lower effective voltages and higher currents but can't see how this applies to the mosfets...
 
D

Deleted member 4366

Guest
The controller fires pulses of battery-level voltage at the motor. The pulses duration are timed to coincide with the magnet positions as the motor rotates. Each pulse is divided up by PWM, which affects how much energy is contained in each pulse, so it's like pulses of pulses. The battery current is the sum of the current from the pulses of pulses in each phase. The PWM is mainly based on throttle position or PAS setting according to a complicated algorithm in the controller software. The controller can change the length of the pulses as well as the percentage of PWM, although for optimum efficiency, there's an ideal length of the pulses. If you limit the phase current, it could do it by giving a maximum percentage PWM or by shortening the pulse lengths. It's the area under the graph that counts - if you know what that means.
 

Marctwo

Pedelecer
Dec 1, 2012
182
1
It's the area under the graph that counts - if you know what that means.
No... :smiley for straight over my head:

I get the PWM, those are the 36V pulses I was refering to.

What concerns me is if I have the throttle at 10% then the controller will use PWM to simulate 3.6V. Now if I'm pulling 10A at this point then the motor, having a slow response, would see 100A at an effective 3.6V. But what would the mosfets see? I'd imagine they'd see 10A@36V but the xpd tooltip seems to suggest otherwise.
 
D

Deleted member 4366

Guest
If you look at the video in the first post here, you can see what happens in one pulse from the controller. The pulse length is about 2 thousandths of a second. The pulse frequency depends on how many magnets/coils you have. It fires one pulse on each phase when a magnet passes a coil. If you take a BPM motor with 16 magnets and 18 coils, there must be 16 x 18 pulses per rotation = 288, so at 240 rpm that would be 384 times a second per phase.
Endless-sphere.com • View topic - Video proof - myths of 120% throtle setting and more!