Installing a Speed Control Switch

August 15, 2011

Three-way Speed Control Switch

N.B.: This upgrade is only suitable for bikes with “infineon” type controllers with an EB-206/212/218 board, such as the LYEN Edition Controller and  eCrazyman controllers. Check that your controller type supports speed control settings before going ahead with this upgrade! You will also need the USB/TTL programming lead and software that enables you to program the controller settings.

The Switch

The first thing you need is a suitable three-way switch. A handlebar-mounted, three-way switch exists specifically for this purpose and is now available from my shop. Other similar switches are available from various China-based vendors.

The custom, three-way switch, available here

To fit the switch, you remove the throttle control by loosening the alan bolt that secures it, and sliding it off the handle. You then slide the switch onto handlebar so that it sits next to headlight switch mounting, and secure it by tightening its alan bolt. The throttle is then slid back into place to its right and similarly resecured.

The switch is connected by a good length of cable to a standard three-way mini connector.

To feed the cable through to the rear of the bike, I removed a side panel to route it through to where it was within reach of the controller, using cable ties to secure it.

The Controller

At the controller side, the EB-type boards support three speed settings, which can be set via the Parameter Designer software that is used to program the controller. The speed settings can be found in the “Speed Mode” panel on the right of the settings screen. Three speeds – Speed 1, 2 and 3 – are listed which are all set to 120% default. Modifying these enables you to customise the amount of power that is delivered by the controller in response to throttle movement.

In effect, lower speed setting values decrease the throttle sensitivity, making it so that more rotation of the throttle is required to deliver a set amount of power. In addition to letting you set up an ‘economy mode’ which restricts the amount of power you use, it is also hand for creating a ‘low-gear’ for manoevering at low speed. This is particularly handy if you are running at very high current and voltage, which can make the throttle twitchy and oversensitive.

The Parameter Designer Screen

The key to rigging up a three-speed switch is understanding how the EB board sets its speed mode at a hardware level. The way it does this is fairly straightforward. There are two terminals on the PCB, X1 and X2, which are simply shorted to GND (battery bank negative) to set the controller’s speed mode. Shorting X1 to GND puts the controller into Speed 1 mode, shorting X2 to GND selects Speed 3 mode, while leaving both of these terminals un-shorted keeps it in the controller’s defaul Speed 2 mode. Effectively the bike is always running at the Speed 2 setting, unless it is told to do otherwise by wiring up a switch to short X1 or X2.

In terms of the physical layout of the connector attached to the switch, it looks like as below. The black wire goes to GND, while the green and red go to X1 and X2 respectively.

Adding a Connector to the Controller

The main part of the job that needs to be done is to add a connector to the controller. To do this, the case needs to be dismantled and the PCB carefully removed. The X1 and X2 terminals are clearly marked and simply need a couple of suitable, small guage wires to be soldered to them, These wires can then be fed through the end of the case by threading them through the hole with all the existing wiring. A two-way mini connector can then be added and the case re-sealed.

The EB-212 board seen with the X1 and X2 terminals (here with wires soldered in place)

This is the final arrangement on my bike. A two-way connector feeds through to X1 and X2 on the controller board via grey and purple wires. If you wanted to use a GND (battery bank negative) connection from within the controller, rather than somewhere else on the bike, you could have an extra wire here and use a three-way connector instead. I chose to only run wires for X1 and X2 from the controller, and found a place elsewhere on the bike, to earth the GND wire directly from the switch itself.

The X1 and X2 connector for the speed control switch.

The only thing that remained for me to do was to assemble a short length of cable to join the three-pin male connector from the switch tothe two pin connector I had wired up to the controller. The remaining GND wire was routed to a connector on the loom that served the negative terminal of the main battery bank.

Try it out!

This done, it’s simply a case of programming your controller with suitable speed settings. For testing purposes you should make sure that the settings are far enough to be clearly noticeable when you switch modes. I set mine to 40%, 70% and 120% for Speed 1, 2 and 3 respectively.

You can test it on its stand easily enough by holding the throttle open a set amount and switching between modes. If you’ve got it right, the motor will slow and speed up accordingly.

Ohmless and Angry…

April 4, 2011

12 x 4110 MOSFET Extreme Modder Controller – LYEN Edition

Part 1 – Fixing the regen braking (the ‘R12 resistor mod’)

Resistance is futile!

I should make it clear from the beginning that the title of this article relates only to a single gripe I had about an otherwise excellent controller. I couldn’t resist such a terrible pun relating to the resistor modification I ended up having to make to the controller to get regenerative braking working with my 72V system, and which is how I would have preferred it straight out of the box. With the exception of a couple of minor annoyances I was mostly very happy with Lyen’s service, and overall delighted with the controller 😀

For quite some time now, I’ve been planning to get hold of one of the more expensive, powerful, high-end controllers such as the Ecrazyman ones that are so frequently talked about on E-bike forums. While the stock, ‘McController’ that I’ve been using has been a great improvement on the factory 48V unit that came with the bike, and was great to get me up and running with more power, it still restricts the current to a fairly cautious level, and is rather too gentle on the acceleration for my likes. It also offers only basic features and can’t be programmed and configured the way you can with ‘luxury’ units. I was also just barely cracking the ‘true’, satnav 40 mph mark on my scooter, and – though this was a great improvement on the 28 mph it did out of the factory – I wanted to see if I could push myself up a little closer to 50 if possible.

I’d heard a great deal about a person known as Ecrazyman who is quite well known in e-biker circles from building and selling controllers and chargers, which can be found on eBay. However he is not the only one making such controllers. Another guy by the name of Lyen – who can be found on the Endless Sphere forum where he does much of his trading and correspondence with buyers – also offers to build and supply high-end controllers that can be configured and upgraded to cope with as much as 100A continous current to suitable motors. He enjoys a very good reputation on this forum, and has clearly sold a lot of things to very happy customers, so I was more than happy to approach him about supplying me with one to my own specs.

So, just a few short day ago, I contacted him on the forum by PM to enquire about his LYEN Edition controllers. I asked which type he would recommend, (9-FET, 12-FET or 16-FET) for my particular bike and bank voltage, bearing in mind I might upgrade to a Lithium battery pack or want to make other upgrades to pull more power to the motor. I asked for a quote for one with the superior IRFB4110 MOSFETS that are the heart of the controller, and capable of regenerative braking on my system. I also wanted the USB/TTL programming cable, which he was also offering at a very reasonable price, as it would save me the tedious task of building one myself. Others on Electric Motoring Forum and elsewhere had built their own, but I really didn’t have time for this at the moment.

He got back to me recommended the mid-range of his three boards, including a Paypal request and asking for confirmation of the voltage I would be running it at, presumably to set up the LVC  (low voltage cut-out) to something suitable in the first instance.

I promptly paid for it, and asked for instructions on how to program it when it arrived. I also asked him if he could see to it that would be valued ungenerously on the customs documentation and labelled in a way that was less likely to land me with ridiculous surcharges from customs. He replied promptly, assuring me that the customs documentation would be dealt with discretely.  He also sent me links for the software, and a forum thread explaining how to program the controller. He also told me that he would set to work building one right away. 🙂

So far so good. I had ordered it on on the 24th March, and I figured I would have a couple of days to double-check things and make sure that I would end up with what I wanted, that I ‘d be able to

It was at this point, though, that I began to wonder if I was going to get my regenerative braking all working as I wanted it. Many people on Endless Sphere were talking about the PCB board on his controller requiring a resistor modification before it could produce the voltage required by a 72V battery bank, and I was concerned that he would ship this unit without the necessary change being done. I also wanted to double-check that I’d be able to run it at the 65A that I wanted to eventually get my bike working at, and that I could do this without any nerve-wracking jobs like reinforcing the solder tracks on the board.

I promptly sent him an email asking for confirmation of this, and hoping for the swift reply I’d received before. But both Saturday, then Sunday came and went without any reply, and I started to get nervous. I sent a final email Sunday marked urgent and headed “PLEASE ANSWER MY QUESTIONS”. To my annoyance – and just as I feared – he replied that he’d already sent out the controller, and that if I wanted any modifications made, I should have asked for it before the unit was it was shipped, and not afterwards. He did, however, reassure me that the unit came equipped with 4110 FETs, as requested, and that it was capable of drawing a sustained 65A without further modification.

It was at this point that I was a little bit irate,as I was looking forward to having a controller that worked in every way I asked, and that I could  just change the connectors on it (so it was compatible with those on my bike), program it and hook it up straight away. I felt that since I’d ordered a controller capable of regenerative braking and for a 72V system (which I made very plain), then it was reasonable to expect  a controller with regenerative braking that would work –  out of the box – with my 72V system. He’d gone ahead and shipped it before checking my emails in which I was urgently trying to make sure that the unit would arrive with regeneration working 😦

San Francisco to UK in under 48 Hours!

Happily the regen issue was the only real gripe I had about the unit and the way things were handled. Lyen is to be commended on the extraordinarily fast preparation and despatch of this unit. The very day after his email telling me it was shipped, it arrived on my doorstep, which did much to placate my annoyance about the absence of the resistor mod needed to get ‘regen’ working.

First impressions, the unit was beautifully and professionally packaged, in a box within an envelope, all of it padded to the gills with pink styrofoam and bubblewrap. Everything was minty fresh, with all the connectors and the USB lead I’d requested nicely bagged and packaged. It had all the look and feel of a quality operation at work. He’d even included all the connector counterparts (the other sides for the connectors on his cables) and fresh pins so that the owner would have everything they needed to get on with the fun of connecting it all up…

All the connector counterparts and fresh pins are included!

The first thing was for me to change the main power couplings for an anderson connector, and to rig the phase wires up with the 6mm ring connectors they’d need to go onto the terminal block. I also checked that the throttle connector had the pins on the right way round

All done! New connectors fitted so the Lyen Controller is ‘plug-and-play’ for my Ego Scoota

The R12 resistor mod for regenerative braking

The Lyen’s controllers use the XieChang (“Infineon”) type boards, the same type as Ecrazyman and many other brands of controller. This makes sense and is also handy, as they can all be programmed in the same way and support the same standard range of features, such as cruise control, three switchable speeds and ‘high’ and ‘low’ cut-off features to enable them to be disabled and enabled externally, such as by the brake’s 12V circuit (which enables you to cut power to the motor whenever the brake is engaged).

The problem also, is that all of these boards share the same ‘bug’. They will only support regenerative braking voltages up to a maximum of 75V, and this isn’t enough to enable regenerative braking for anything above a 60V system.

To get round this problem, there is a simple hardware modification that can fool the board into providing the higher voltage required. A 1.2KΩ resistor on the board called “R12” can have its value lowered to raise the programmed regen voltage by a proportionate amount. This though, would also raise the programmed LVC cut-out level by the same amount, so this would have to be modified in the program settings too.

The famous R12 resistor (circled) on the EB-212 board, which renders the unit ‘hackable’ for higher voltage regeneration.

It was at this point, though, that I hit a snag. Ian of the Electric Motoring Forum had provided me with a document that detailed the R12 mod for this type of board, but unfortunately things had changed since this had been documented . The pictures showing where the resistor should be mounted showed a board that was nothing like the one I had in front of me. 😦

I posted a message asking if our resident electronics guru knew how to do the resistor mod for these newer types of board, but he said it was just a case of figuring it out for myself with a multimeter. He did say, however – as stated in the documentation and elsewhere on Endless Sphere – that I should run a resistor of about 6KΩ in parallel with this one, effectively reducing it from 1.2KΩ to 1KΩ, to give a scaling factor of 20% for both the regenerative braking and the LVC.

In other words you multiply your program value by 1.2 to get the actual value (or multiply the REAL voltage you want by 0.84 to get the program value). So setting the regen voltage to “75” will then give an actual 90V regen voltage, which is about what we want for a 72V system. A side-effect of this, though, is that a similar adjustment must also be made to the lvc. To get an actual 68V LVC value suitable for a 72V system, you need to enter the setting of “57” into the programming interface.

I did message Lyen, to ask him about how to make the required mod, but by the following day I’d still heard nothing back, so set to work with my multimeter…

Tracing a site to mount the resistor

Finding a site to mount the resistor was all new to me, but was also common sense when you think about it. The tiny SMC (surface-mounted component) resistor meets with tracks either side of the board that can be followed by putting the multimeter into continuity tester mode. I had already been told that one of these would be one of the GND points on the board, and the track from the other leg went straight to a little hole further up the board. After a lot of fiddling around testing various ground points on the board, I eventually had two holes on the board that ran parallel to the R12 resistor, and which gave a reading of 1.2KΩ or close enough. Just as a reality check I temporarily mounted a 2.2KΩ resistor across these points by just wedging the legs in the holes, and measured a ‘combined’ resistance of about 780Ω which is about right, by my calculations.

Got it! – a site on the base of the EB-212 board to mount the parallel resistor 🙂

The closest resistor I had in my collection was a 4.6KΩ one. I could have just soldered this onto a couple of other resistors to get a value approaching 6KΩ, but this wasn’t very elegant. Instead I went and bought a 6.2KΩ one (and a couple of spares). Eager to get everything up and running, I carefully soldered this on. It was quite fiddly because of the quite narrow track, but I eventually got it attached nice and tidily with a bit of heatshrink covering it as a precaution.

A meter reading now showed the expected R12 value of about 1KΩ, giving me the 20% scaling factor I need for lvc and regen voltage (with the 6.2KΩ resistor this was actually 19.3%, to be precise).

Sorted! The 6.2KΩ is soldered in place and the board is ready to roll

Time for a test run!

Finally I was all set to replace my 72V McController with my great new Lyen’s Extreme Modder. This was not as simple as a stright swap, though, as the Lyens controller was a bit shorter than my old one and wouldn’t meet up with the same hole in the base plate.  But five minutes with a drill gave me a new hole in just the right place to securely bolt my new controller. Then it was just a case of plugging everything together.

Up and running – The LYEN Edition controller is finally wired into my bike and ready to go!

I was more than a little nervous that my resistor mod would have the right effect and so I decided to run a couple of tests to make sure it was behaving as predicted. At first I left the regen self-connector disconnected, just to be on the safe side.

I’d already got the controller programmer software installed and working on my desktop and my laptop computer as per the instructions at the links Lyen had provided. The software was basically a version of the “Keywin E-bike Lab” program that Ecrazyman had put together to enable users to program his own controllers (Parameter Designer.exe), and – presumably – any other controller that used these types of boards via a suitable cable. Lyen had his own customised version of this software which would allow an extended  range of current and LVC settings way above the ones permitted in the original program.

The Lyen Edition controller setup program

To make absolutely sure that my modification worked, I decided to put in adjusted values for the LVC and see if the bike would come on – or not – as predicted by the current charge state of the batteries and the LVC setting I had specified.

First I set the LVC setting to something below the 79V that my fully charged bank. I put in a setting of “60”, which translated to about 71.5V (1.193 x 60). The bike started up and turned over fine.

However the real test was to set the LVC slightly above the current voltage, as the bike may have worked whether or not my 20% scaling factor had been working the way it should. This time I raised it to “66.5”, the maximum allowed by Lyen’s version of Parameter Designer, which should have taken the actual LVC to 79.3V – just a little above the voltage of the bank. If my mod had worked, the controller would now cut off because my voltage was below the 79.3 cut-off point it was expecting.

Lo and behold it worked! The bike wouldn’t start with this value because of the cutoff… Next I lowered it to the “57” and it came back to life again… Smile


%d bloggers like this: