Adding CA-DP connector to non-CA-DP compatible controller

mlt34

100 kW
Joined
Jan 19, 2011
Messages
1,245
Location
Boston
The last time I did this job I took pictures so I could do a writeup for my site, and I thought I'd share it here as well so any ES members that want to use a direct plug-in CA with a controller lacking a CA connector can do so. Fair warning, I wrote this with the target audience being beginner level, so it may be below the level of many people here.

When my site goes live in a couple weeks I'll update this thread with the link.

Here it is:

How To Add A Cycle Analyst Connector To A Controller

Before we begin, make sure you have everything required for this project. The tools you need include:

Soldering iron
Solder (I use 60/40 rosin core solder)
Screwdriver to open your controller
Crimping tool or needle nose pliers (I use pliers)
6 different colored wires, 28 awg or larger
JST-SM female plug (I bought 10 pairs for $7.50 on ebay)
One 1,000 Ohm resistor (only required for version 2.3 Large Screen Cycle Analysts)

Step 1: Open the controller

Open your controller on the end with the wires. You’ll likely have four screws, one in each corner. You’ll also likely have a number of bolts along the side of the controller connected to the heatsink. Unscrew all of those bolts. Make sure you put all the little screws, bolts and washers somewhere so they don’t get lost.
controller-unscrew.png


Next, slide the controller’s board out of the case. The wires and cover plate will stay connected, that’s just fine.

Now that we’ve got the board out, we can start locating the six points where we’ll be soldering our wires.

Step 2: Hunt around for the pin locations

There are six locations we need to find on the board. Each one will be soldered to its own wire and fed outside the controller. The six locations which correspond to the six pins in the Cycle Analyst connector are:

1. Battery positive (or ignition wire if your controller has one)
2. Battery negative (ground)
3. Shunt negative
4. Shunt positive
5. Hall sensor signal
6. Throttle signal wire

To find these locations, see the photos below of my controller. Your controller will be similar looking, though the individual locations of each component will be slightly different.

The battery positive and negative locations should be easy to find by following the thick red and black wires from the discharge connector outside of the controller. In my controller there are two empty solder through holes next to each point on the board. This will make it easy for us to add our wires.
battery-leads.png


Next we are going to look for our shunt. The shunt should look like one or more bars of solder that stretch across the board. Sometimes they are short, sometimes they are tall. Sometimes it’s just one bar, sometimes it’s three or more. In my controller I see the shunt is two bars right near the end of the board.

Looking carefully, you can determine which end of the shunt is positive and which is negative. The negative end will share a connection with the negative side of the battery (the thick black wire). On my board this is very easy to see because they are located right next to each other. That means the far end has to be the positive side of the shunt.

shunt-location.png


Next we need to find our hall sensor wires. The Cycle Analyst has to tap into one of the hall sensor wires in order to measure the speed of the motor and thus calculate the speed of the ebike. It doesn’t matter which of the three hall sensor wires you end up using, blue, green or yellow will work all the same.

On my controller the hall sensor wires are a big congested, but I can find them by following the wires back from the hall sensor connector on the outside of the controller. When in doubt, lightly tug on one wire outside the controller’s front plate and watch which wire moves near the board. Double check to make sure you’re working in the right location. You should have five wires all in a row: red, black, blue, green and yellow (though not necessarily in that order.)

hall-wires.png


The last location we need to find is the throttle signal wire. The Chinese still haven’t agree on a standard for this, so it could be white, green, yellow, blue or pretty much any color. The easiest way to find it is to follow the wires from your throttle back to the board.

throttle-wires.png


As you can tell, the throttle wires are pretty hard to see. The black and green wires are visible, and the red wire is hiding in back. They’re surrounded by all the other wires in this corner of the board and are really hard to get to. Let’s take a look at the other side of the board to make things a bit clearer.

throttle-wires-underside.png


Now we can see things much better. The three throttle wire pads are clearly visible at the edge of the board. The top pad is the positive line which delivers 4.3V to the throttle, the middle pad is the signal line and the lower pad is the ground line. The signal pad in the middle is the one we want.

Now we’ve located all six pads on the board that will be important to us. Let’s move on to the next step.

Step 3: Run your wires

This can technically be done after you’ve soldered everything up, but I prefer to do it first. This allows me to be sure that my wires will fit and that I won’t stress the solder connections by poking around too much after I’m done.

On my controller I was lucky enough to have a few extra holes in the silicone water barrier. I was abled to easily slide my wires through these holes and pull enough wire to reach each pad. If your controller doesn’t have enough space for your 6 wires, you might need to poke a few more holes in the silicone or drill a hole in the plate. Be very careful drilling holes, and of course only do this with the plate removed from the controller.

holes-for-more-wires.png


Step 4: Solder your connections

Now it’s time to make your connections to each of the 6 locations we found in step 2. Remember which color wire you are using for each connection. It’s best to write it down so you don’t make any mistakes afterwards.

We’ll go in order and start with the battery connections. You’ll remember that on my controller’s board I was lucky enough to have extra holes for additional components at each of the battery lead terminations. I’ll use one of these holes for each the first two pins, one for the battery positive and one for the battery negative.

connecting-battery.png


One thing to note on this step is that things change if your controller has an ignition wire. An ignition wire is usually a thin red or orange wire that is included with the larger red battery positive wire, and must be connected to the larger red wire to turn on the controller. If you have one of these ignition wires, you’ll need to wire your first wire (battery positive) to this ignition wire and not to the larger red wire. This is because when you turn your controller off by whatever means you have for separating the two wires (handlebar switch, throttle button, etc) then your Cycle Analyst would still remain powered. If you connect your Cycle Analyst connector’s battery positive wire to the ignition wire pad though, each time you turn your ebike off by separating the ignition wire from the main battery positive wire, your Cycle Analyst will turn off too.

Find your ignition wire pad by following the ignition wire back from outside the controller. Mine controller had a couple extra holes in this location too, which made soldering straight through the board easy.

ignition-wire-connected.png


After soldering the battery wires onto the board, next you’ll do the shunt wires. You want to avoid adding too much additional solder to the shunt as this can change the performance of your ebike. In my case, I actually soldered the wires to the base of the shunt so that I had more room to work with. This also kept me from adding additional solder onto the shunt bars themselves.

Technically you can add the negative shunt wire to the negative battery pad, though you won’t get the most accurate readings that way. I’m going to add it directly to the shunt base on the underside of the board.

shunt-connected-underside.png


And a view from the top…

shunt-connected-topside.png


Next we’ll add in the speed sensor wire, which we can add to any of the three hall sensor signal wires, either blue, green or yellow. I’m going to add my wire to the pad with the largest solder gap compared to the other two. Also, I’ll make use of a convenient hole in the board right next to the hall wires to feed the wire down under the board.

conecting-speed-wire.png


The last wire to add is the throttle signal wire, which overrides the throttle for limiting features of the Cycle Analyst such as speed and current limiting. If you have a version 2.3 Large Screen Cycle Analyst, you’ll need to cut your controller's throttle signal wire and solder a 1,000 ohm resistor in line with it. Then, solder a second wire (which will reach to your new Cycle Analyst connector) to the throttle signal pad. If you have a Version 3.0 Large Screen Cycle Analyst, you could simply solder your wire straight to the throttle signal pad, however this will not provide backwards compatibility if you want to use a Version 2.3 Large Screen Cycle Analyst in the future. Therefore, it is recommended to include the resistor modification so that you have backwards compatibility with all Large Screen Cycle Analysts. Thanks to Teklektik for providing corrections and the accurate diagram for this step.

I actually didn’t include this wire in my controller here because I didn’t intend on using any of the limiting features of the Cycle Analyst. Assuming you do want to include this though, you’ll solder it just like in the diagram below. Again, its recommended to include this step to make sure the Cycle Analyst connector is compatible with all Large Screen Cycle Analysts.



Top view of how the throttle over-ride wire's install would look (detail diagram in lower left)
meJlFsg.png


Step 5: Add the connectors

The female connectors are really tiny so you’ll want to be careful when crimping them. There’s a special crimping tool you can buy, but of course I don’t have that tool, so I just used needle nose pliers.

Start by stripping the wires about 1/8 to 1/4 inch back from the end of the wires. Break the connectors off the strip they come connected with and crimp each one onto the end of a wire.

connectors.png


Go slow and make sure you have a strong crimp job.

connectors-crimped.png


Once you’ve got each of the individual connectors crimped to the wire, you can start placing them into the plastic housing. Use a small flathead screwdriver or toothpick to push the connector in until you hear a click. The order to connect the pins is:

1. Battery positive
2. Battery negative (ground)
3. Shunt negative
4. Shunt positive
5. Hall sensor signal
6. Throttle signal wire

pin-order-with-labels.png


…And that’s it, you’re done! Enjoy the satisfying feeling of having modified your own controller to work with a direct plug-in Cycle Analyst!
 
So how did you calibrate the CA to the controller's internal shunt resistance?
 
motomech said:
So how did you calibrate the CA to the controller's internal shunt resistance?
This probably isn't the best method, but because I know it's a 20A controller, I just adjusted the shunt resistor value in the CA settings menu until the CA read approx 20A while accelerating from a stop.

I remember reading somewhere a few years ago that the way to do it is to power your bike while the front wheel is up against a wall to ensure max current draw, and adjust the value of the shunt in the CA menu that way.

Surely there's a better way, I've got to do some searching. Unfortunately BMSbattery doesn't know the exact value of their shunts in their controllers.
 
Exciting stuff, very interesting to me, thanks so much for sharing! I hope you stick around these forums for a long, long time.

Are there any controllers this kind of modification wouldn't work for? For example, the S12S found at BMSBattery? I am sure there are plenty of other sort of generic ebike controllers one may want to modify for a cycleanalyst. I imagine this is a hard to answer question, but maybe you understand some things about this sort of setup that I do not.
 
Theoretically it would work for pretty much any controller, except controllers like the s12s are sensorless, correct? A sensorless controller wouldn't have a hall sensor line to allow the CA to tap into in order to check speed, so that'd be the only problem with a sensorless controller. Of course you could use a CA-DPS which has a speedometer cable going to the wheel, so that would be the workaround for a sensorless controller.

Technically, you only NEED to connect pins 1-4 to have a functionin wattmeter, and every controller should have the battery and shunt pads to connect pins 1-4. But without pin 5 and 6, you lose a number of the fun and helpful features unique to the CA.
 
mlt34 said:
Theoretically it would work for pretty much any controller, except controllers like the s12s are sensorless, correct? A sensorless controller wouldn't have a hall sensor line to allow the CA to tap into in order to check speed, so that'd be the only problem with a sensorless controller. Of course you could use a CA-DPS which has a speedometer cable going to the wheel, so that would be the workaround for a sensorless controller.

Technically, you only NEED to connect pins 1-4 to have a functionin wattmeter, and every controller should have the battery and shunt pads to connect pins 1-4. But without pin 5 and 6, you lose a number of the fun and helpful features unique to the CA.

That is an excellent point, but I think the S12S is capable of sensored only. I've read about people being uncertain if the controller is running in either sensored or sensorless mode(assuming the controller can switch do both), the speedometer on a cycleanalyst might be a good tell.
http://www.bmsbattery.com/controller/552-s06-250w-imitation-torque-square-wave-controller.html I have no idea why that webpage has that label, hah.

Thanks for spelling this out so clearly and simply.
 
ah, you're exactly right, that's a sensored controller, so it should be fine for this modification. I don't know why I thought it was sensorless.
 
Several CA RShunt calibration techniques are detailed in "Appendix A. Calibrating the Cycle Analyst RShunt Value" of the V3 Unofficial User Guide available here.

These procedures can be applied to any CA model.
 
  • 1.
    mlt34 said:
    The last wire to add is the throttle signal wire, which overrides the throttle for limiting features of the Cycle Analyst such as speed and current limiting. If you have a version 2.3 Cycle Analyst, you’ll need to also solder a 1,000 ohm resistor in line with the wire you connect to the throttle signal pad.
    This is incorrect and will not work at all or will work improperly. There are a number of means to accomplish this style of throttle hook up, but in the end your instructions result in the 'controller throttle input' and 'CA throttle override' connections being reversed.

    2.
    mlt34 said:
    If you have a Version 3.0 or high Cycle Analyst, you simply solder your wire straight to the throttle signal pad.
    The CA V3 and the large screen V2s use the identical CA-DP interface. To avoid issues, the CA-DP connector should be added to mimic the standard OEM CA-DP interface without regard for the CA version. Do not make special accommodations for the V3.

    This recommendation yields a pretty sleazy hook up that precludes running the V3 in legacy mode and can present an unnecessarily taxing load situation for the CA if the user attempts to by-pass the CA by attaching a throttle to the controller. This is not a good approach in the 'general CA-DP' context, but if you are going to present this technique, you should include specific caveats/guidelines for use.

    3.
    mlt34 said:
    One 1,000 Ohm resistor (only required for version 2.3 and lower Cycle Analysts)
    Implemented properly, this "1K resistor" technique should result in a controller with a "Large Screen Compatible' interface. That controller interface type is ONLY usable with recent V2/V3 CA models; the earlier CA-DP interface is functionally different although it uses the same connector and pinout. Suggesting otherwise is incorrect and has safety consequences.

    Under no circumstances should this modification be used with CA V2 models with PCB earlier than rev 12 (2011) - doing so may cause an immediate runaway when the bike is powered up.

Lots of good detail and description here, but it should not be used as is...
 
teklektik said:
mlt34 said:
The last wire to add is the throttle signal wire, which overrides the throttle for limiting features of the Cycle Analyst such as speed and current limiting. If you have a version 2.3 Cycle Analyst, you’ll need to also solder a 1,000 ohm resistor in line with the wire you connect to the throttle signal pad.
This is incorrect and will not work at all or will work improperly. There are a number of means to accomplish this style of throttle hook up, but in the end your instructions result in the 'controller throttle input' and 'CA throttle override' connections being reversed.

Thanks for the catch, teklektik. Can you explain the proper way to do this, or link to the right thread (I tried searching for a while but haven't found a proper description.) How should the resistor inclusion be modified?

teklektik said:
mlt34 said:
If you have a Version 3.0 or high Cycle Analyst, you simply solder your wire straight to the throttle signal pad.
The CA V3 and the large screen V2s use the identical CA-DP interface. To avoid issues, the CA-DP connector should be added to mimic the standard OEM CA-DP interface without regard for the CA version. Do not make special accommodations for the V3.

This recommendation yields a pretty sleazy hook up that precludes running the V3 in legacy mode and can present an unnecessarily taxing load situation for the CA if the user attempts to by-pass the CA by attaching a throttle to the controller. This is not a good approach in the 'general CA-DP' context, but if you are going to present this technique, you should include specific caveats/guidelines for use.

I understand what you're saying, thought I was going off the recommendation Justin made to me via email:
with the new large screen CA's there is no need for a diode anymore, as we have included that onboard the CA itself. Instead, you can use like a 1kOhm resistor. This way your modification will work both with the V2.3 CA devices, as well as the new V3 units that need to regulate the throttle line directly. If you are planning to only use a CA V3, then you can hook it up directly to the throttle signal line, no other components required.
(emphasis added by me)

but you are right, this should be presented along-side specific caveats/guidelines. To avoid this issue altogether, would you suggest always suggesting to include a 1,000 ohm resistor?

teklektik said:
mlt34 said:
One 1,000 Ohm resistor (only required for version 2.3 and lower Cycle Analysts)
Implemented properly, this "1K resistor" technique should result in a controller with a "Large Screen Compatible' interface. That controller interface type is ONLY usable with recent V2/V3 CA models; the earlier CA-DP interface is functionally different although it uses the same connector and pinout. Suggesting otherwise is incorrect and has safety consequences.

you're right, by V2.3 I was intending large screen CA but that wasn't clear. I'll update to make it more clear and correct. Thanks for the suggestions and fixes.
 
bowlofsalad said:
Exciting stuff, very interesting to me, thanks so much for sharing! I hope you stick around these forums for a long, long time.

Are there any controllers this kind of modification wouldn't work for? For example, the S12S found at BMSBattery? I am sure there are plenty of other sort of generic ebike controllers one may want to modify for a cycleanalyst. I imagine this is a hard to answer question, but maybe you understand some things about this sort of setup that I do not.
Why would you want to use a C.A. instead of the $30 "plug and play" SLCD-3?
On one of my Ebikes, I have both, a CA 2.23 up frt. and a SLCD-3 rear.
On the SLCD-3, the plastic brackets are cheap and easy to break and it can be a bit of a pain to program, but the 5-level assist makes it perferable for use for my main motor.
I just use the Ca for battery monitoring, the LVC and sometimes, Amps limit.
 
mlt34 said:
teklektik said:
This is incorrect and will not work at all or will work improperly. There are a number of means to accomplish this style of throttle hook up, but in the end your instructions result in the 'controller throttle input' and 'CA throttle override' connections being reversed.
Thanks for the catch, teklektik. Can you explain the proper way to do this, or link to the right thread (I tried searching for a while but haven't found a proper description.) How should the resistor inclusion be modified?
Research:
The Mod:
  • Gee - any way that switches the leads as you have called them out...

    In your case with a PCB mod, I would recommend this strategy as the simplest and requiring a low soldering skill level. Build/solder the resistor/wire assembly first where there are no PCB tight wiring considerations. Sleeve with shrink then insert the finished mod into the PCB as a final step. Solder on the underside pad. Use a 1/4W or 1/2W resistor to improve lead strength since the wiring gets stressed opening/closing the case.

    LargeScreenControllerThrottleMod4.png

mlt34 said:
teklektik said:
The CA V3 and the large screen V2s use the identical CA-DP interface. To avoid issues, the CA-DP connector should be added to mimic the standard OEM CA-DP interface without regard for the CA version. Do not make special accommodations for the V3.

This recommendation yields a pretty sleazy hook up that precludes running the V3 in legacy mode and can present an unnecessarily taxing load situation for the CA if the user attempts to by-pass the CA by attaching a throttle to the controller. This is not a good approach in the 'general CA-DP' context, but if you are going to present this technique, you should include specific caveats/guidelines for use.

I understand what you're saying, thought I was going off the recommendation Justin made to me via email:
... Instead, you can use like a 1kOhm resistor. This way your modification will work both with the V2.3 CA devices, as well as the new V3 units that need to regulate the throttle line directly. If you are planning to only use a CA V3, then you can hook it up directly to the throttle signal line, no other components required.
(<black>emphasis added by me)

but you are right, this should be presented along-side specific caveats/guidelines. To avoid this issue altogether, would you suggest always suggesting to include a 1,000 ohm resistor?
True - you did use one of Justin's two recommendations -- but I have highlighted Justin's FIRST recommendation in red.

Philosophy:
  • There can be many Solutions but the real trick to a good result is understand The Problem. You chose the 'low hanging fruit' solution that saves a resistor, but IMHO that was a poor Engineering and Business solution.

    You saw The Problem as making a V3 CA-DP. The Real Problem is:
    • to add a CA-DP interface to a controller and to do so in a way that
      • requires the least (technical) explanation to (non-technical) builders,
      • that will allow the controller to be used as a normal OEM CA-DP controller without special knowledge, and
      • that will allow the controller to be re-purposed - perhaps after sale to yet another unsuspecting unknowledgeable user.
    This is a different problem than you solved, but seeing it this way hopefully makes choosing between Justin's two options look a little different.

FWIW - "PDF - "Adding a Controller 'Large Screen Compatible' CA Interface":

  • Back in the Spring the V3 UUG got an extensive overhaul and the whole business of adding CA-DP connectors to controllers got a fair bit of attention. A new section was to be added specifically describing how to to add a CA-DP connector by several means. But - it was clear that such a How-To description would apply to both V2 and V3, so since May 2014 the UUG has had the following section directing folks to a separate document:

    CaDpHowTo.png
    Unfortunately, Life got in the way and the new 'HowTo' doc remains unfinished. Completion now looks like a Winter project.

    That document would have directly answered your questions and would have obviated the need for this post, but as Jack Benny said: "Timing is Everything...."
 
Lot of great info here!! :D
 
izeman said:
btw: this is imho the best way to measure a shunt correctly w/o assuming and w/o non precise clamp amp meters.

https://www.youtube.com/watch?v=0vMvCVyOp9g&list=WL&index=8 (this was posted by someone here on the forum before. sorry can't give the right credits. just can't remember :)

Very slick, I like it! Ohm's law FTW again!
 
amberwolf said:
izeman said:
https://www.youtube.com/watch?v=0vMvCVyOp9g&list=WL&index=8 (this was posted by someone here on the forum before. sorry can't give the right credits. just can't remember :)
A search on the YT vid number finds this post by Gwhy:
http://www.endless-sphere.com/forums/viewtopic.php?f=28&t=55215&p=936075&hilit=0vMvCVyOp9g#p936075
but I don't know if it was the first one.
at least it was the one i was referring, as the post just after that one was from me :)
 
This is essentially the same constant current technique laid out in the Unofficial V3 Guide as mentioned above in this post.

The difference is that that the technique in the Appendix of the Guide directly calibrates the CA (which measures the voltage across the shunt and calculates the current) instead of using an external DMM. IMO that is a more direct approach that also takes into account any calibration errors in the CA op-amp gain and always yields the proper current reading - which is really the end result we seek.

 
izeman said:
...after taking a second look at the picture it should make no difference if the shunt is internal or external. Correct?
Exactly right.

The technique above is just a handy gimmick to use existing external controller connections instead of messing around inside the controller. In the general case, you need to power the CA somehow, then get the constant current to flow entirely though the (internal/external) shunt by some means - possibly as shown above with the controller wired in, or separately, just the shunt alone as in the YouTube demonstration (with the CA Gnd tied to either end of the shunt as well). In the second case, the CA just replaces the DMM in the demo.
 
So here's one possible approach for calibrating the CA to an external shunt with everything installed in a build (i.e. not on the bench)....
You just need to break the external shunt connection to divorce the constant current source from the existing bike wiring except for CA shunt and Gnd, then do the steps in the Guide...

calibration7ext.png
 
Thanks, I'm trying to do more like this for my new site. Here's a simpler example for just swapping connectors, like when you get a new throttle. http://www.ebikeschool.com/swap-ebike-connector/
 
Hi Micah,

I'm posting this here since I cannot send any comment on your web site.
I applied your technique of adding a CA connector to a standard controller (from a GreenCity bike from 2009), and it worked great with a CA 2.4. I did this to moderate the original controller's ardor, which insists on pushing as much amps as possible even though I'm not pedalling much, which is not good at all for the battery in the long run. The CA isn't calibrated properly yet (for Rshunt) but this is a problem I'm going to address shortly.
Many many thanks to you for this great guide, it was something I meant to do a long time ago, that I hadn't get round to doing until recently. Very pleased with the result, I'll now profit :thumb:
 
Back
Top