Cycle Analyst V3 preview and first beta release

Get real world experience and user feedback on the electric bicycle products.
User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 04 2012 5:54pm

Setup Summary for CA v3B19

The setting summary for the newer v3B20 release is available here.
The setting summary for the previous v3B16/v3B17 releases are available here.
Unofficial basic setup notes are available here.

Please see the Grin Tech Site for a detailed explanation of Setup Parameters.

Printable version:
CA_v3B19_ConfigSettings.zip
(1.62 KiB) Downloaded 133 times
Last edited by teklektik on Nov 11 2012 1:02pm, edited 1 time in total.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

Bjorntsc   100 mW

100 mW
Posts: 42
Joined: Aug 14 2012 4:15am

Re: Cycle Analyst V3 preview and first beta release

Post by Bjorntsc » Oct 05 2012 4:52pm

The thread is extremely long.
Is there a way to use the cycle analyst V3 to turn a rc controller system into a current based throttle instead of speed based?

User avatar
amberwolf   100 GW

100 GW
Posts: 26761
Joined: Aug 17 2009 6:43am
Location: Phoenix, AZ, USA, Earth, Sol, Local Bubble, Orion Arm, Milky Way, Local Group
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by amberwolf » Oct 05 2012 5:31pm

You may wish to look at the RC-CA version thread linked in the very first post of this thread. here is the link again:
http://endless-sphere.com/forums/viewto ... 28&t=29846

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 05 2012 7:20pm

I know there are some readers who have been sitting on the fence about the V3, so here's a quick knee-jerk evaluation of v3B19 (short form: the wait is over! :D )

Using the new Firmware Flash Utility from the CAV3 page of the Grin Tech site, I flashed v3B19, trying both the plain vanilla and NoCal versions. As Justin promised, the NoCal version preserved the settings in the Setup 'Calibration' section. Nice.

My bike is as described in my signature below and has no PAS or temp measurement equipment so I cannot speak to those features. The CA is configured according to the Unofficial Setup Notes - here's my exact settings:
CA_v3B19_ConfigSettings_teklektik_20121004.zip
(1.4 KiB) Downloaded 103 times
In broad strokes my CA is set up for Power Throttle (new feature!), power limiting on CNTL input driven by LMH switch, and Plim->MaxPower=3300W. Because I have BMC gear motors, I'm running a slow ThrO->UpRamp=32 to save the clutches and no down ramp at all (ThrO->DownRamp=999).

Setup works very nicely with no glitches or display artifacts at all - not much to say - it's final production quality. The live data voltage and speedometer displays make a review of equipment health quick and effortless.

I took the bike on a no-pedal 30 mile run today and the CA worked flawlessly. There is no surging or cutouts and the Human Power display behaved itself (I have no PAS so 'behaved' means it stayed at zero :) ). There were absolutely no issues - everything was smooth as silk at all LMH settings from 450W to 3300W. The closed loop Power Throttle (similar to Current Throttle) worked smoothly with nicely refined control from barely rolling to WOT both on the flat and up hills.

You can use either Current or Power limiting for throttle and CNTL features, but since I have voltage to burn at 66v, I use the Power settings. The result is that the bike runs the same at the end of ride at 60v with 80% DOD as it does hot off the charger at 73v. Very nice. (There is also a closed loop Speed Limiting option for throttle/CNTL but I have not tried that mode under v3B19.)

Justin has promised some refinements/features for v3B20, but I find v3B19 to be bike-ready. I haven't flogged the daylights out of it, but the anomalous behaviors of the past appear to have been addressed and the current state of the firmware is nicely polished.

My bike has two torquey gear motors running above the recommended max of 60v which gives the bike a twitchy and unmanageable throttle curve and too much torque for the clutches to endure. Adding the V3 gives me smooth getaways, refined throttle at all speeds, and provides an LHM switch not available on my controllers - it completely transforms the riding experience - hard to believe it's the same bike. This is not the purchase for someone who just wants an Ah meter, it's for folks who want their unruly throttle, controller, and motor to make nice and play together. If you have a MAC or BMC, buy a V3 instead of a replacement gear cluster...

I'm sure this post sounds gushy and some small issues may turn up, but v3B19 is a giant step forward and really delivers. :mrgreen:
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
rscamp   1 kW

1 kW
Posts: 363
Joined: May 24 2009 2:24pm
Location: Ontario Canada

Re: Cycle Analyst V3 preview and first beta release

Post by rscamp » Oct 05 2012 7:49pm

Don't mince words. Do you like it or not?

:)
Rob
Trice QNT with Astro 3215 8T & V4 Drive
Trice Q with Bafang BBS02 at 48V with "500W" limit
Astro 3210-12T + Neugart PLQE60 20:1 Chain-Puller Spring '17

User avatar
mrbill   10 kW

10 kW
Posts: 508
Joined: Jun 10 2008 6:47pm
Location: Silicon Valley, California
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by mrbill » Oct 05 2012 10:12pm

teklektik wrote:In broad strokes my CA is set up for Power Throttle (new feature!), power limiting on CNTL input driven by LMH switch, and Plim->MaxPower=3300W. Because I have BMC gear motors, I'm running a slow ThrO->UpRamp=32 to save the clutches and no down ramp at all (ThrO->DownRamp=999).
Power Throttle sounds like a great new feature. Can you tell us if there is a cruise control capability when using the CA throttle in each of its modes (power, current, or voltage)?

What is an "LMH switch"?

Thanks.
Bill Bushnell
http://mrbill.homeip.net/
Bike build thread can be seen here.

User avatar
Joe Perez   100 W

100 W
Posts: 187
Joined: Apr 06 2011 10:41am
Location: New York City

Re: Cycle Analyst V3 preview and first beta release

Post by Joe Perez » Oct 05 2012 11:22pm

justin_le wrote: Also, be sure to download the latest firmware utility program from there too, as the earlier one I had posted here did not support firmware updates that left the calibration data alone.
This makes me exceedingly happy. :mrgreen:


rscamp wrote:Don't mince words. Do you like it or not?
I'll provide a non-minced summary.

I've been using the CA3 for a few months now, and it's just a great box, period. The closed-loop current throttle mode alone is worth the purchase price. I can't imagine a better device to have hanging on my handlebars.
The concept of "average" requires that 50% of the population be below it.

Bjorntsc   100 mW

100 mW
Posts: 42
Joined: Aug 14 2012 4:15am

Re: Cycle Analyst V3 preview and first beta release

Post by Bjorntsc » Oct 06 2012 12:08am

Yet again this amazing site and people come through in helping anyone doing anything EV and them some... :mrgreen:

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 06 2012 2:02am

mrbill wrote:Can you tell us if there is a cruise control capability when using the CA throttle in each of its modes (power, current, or voltage)?
Presently no. See this post for planned cruise control capability.
mrbill wrote:What is an "LMH switch"?
This is a (handlebar) 'Low/Medium/High' switch typically supported by controllers to scale the max throttle on-the-fly to selectable percentages of the maximum configured Amps (e.g. 20%, 50%, 100%). This makes higher powered bikes more controllable for protracted lower speed operation like diddling along on a bike path. Here I was using the term generically to indicate similar functionality that can be obtained using the V3.
LHM-switch.png
Commercially available LHM switch for a Crystalyte controller
LHM-switch.png (3.56 KiB) Viewed 5478 times
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
justin_le   10 MW

10 MW
Posts: 2208
Joined: May 28 2007 3:27am
Location: Vancouver
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Oct 06 2012 4:26am

teklektik wrote: I'm sure this post sounds gushy and some small issues may turn up, but v3B19 is a giant step forward and really delivers. :mrgreen:
I swear that I don't pay teklektik to say that! But I would like to hear back especially from other people who have had some issues or glitches with their beta device so far, as to how it behaves with the B19 firmware. So if you can get a chance to install and try it out in the coming week that'd be great. The speed limiting really can be dialed in to work well, so those with a bit of familiarity with PID controllers I'd encourage playing around to find the gain values that best stabilize your setup in speed limit mode and post them here.

Attached as well is an even more refined firmware updater utility. There are still a few more tweaks before we make it official but it's now just a single button press to reflash a unit and gives better status updates on the progress. It will default to selecting the highest value COM port which is normally what gets assigned to the USB->TTL adapter when it is plugged in, and if you move the firmware .hex files to the same directory where the program is unpacked then it will automatically list them in the drop-down.
Flash_Updater.gif
Flash_Updater.gif (20.56 KiB) Viewed 5475 times
-Justin
Attachments
CAFUT-SE.zip
(5.09 MiB) Downloaded 114 times
Currently recovering from the Suntrip race on a back to back tandem solar powered row/cycle trike. 550 watt solar roof, dual Grin All Axle hub motors, dual Phaserunner controllers, 12 LiGo batteries, and a whole wack of gear.

Now back in Vancouver with my Big Dummy Frame (yes This One, thanks ES!) with Grin all-axle front hub, Phaserunner controller, and 52V 19Ah Cellman triangle pack
My website: http://www.ebikes.ca
Please contact via email, info@ebikes.ca, rather than PMs, which are disabled

User avatar
hjns   100 kW

100 kW
Posts: 1273
Joined: Aug 20 2011 11:05pm
Location: Basel, Switzerland

Re: Cycle Analyst V3 preview and first beta release

Post by hjns » Oct 06 2012 4:50am

teklektik wrote:I know there are some readers who have been sitting on the fence about the V3, so here's a quick knee-jerk evaluation of v3B19 (short form: the wait is over! :D )

....
I'm sure this post sounds gushy and some small issues may turn up, but v3B19 is a giant step forward and really delivers. :mrgreen:
Very nice review. I will flash to B19 once I get back home from my holiday next week, and post the results with my cromotor at 20S lipo, power throttle, and temp limit.
Henk


All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 06 2012 11:50am

justin_le wrote:I swear that I don't pay teklektik to say that!
What!?? So the check is no good? :mrgreen:

Seriously though, you have only to flash the initial release and compare it to the current release to see the change in the complexion of the unit over these many months - it's like a different product. Looking at the recent posts about the thread length (40+ pages) and knowing that the product seemed suspended with show-stopper problems and many cautionary posts and issues, it seemed time to reset expectations.

Stepping back and looking at the persistent critical issues, their most distressing characteristic (although perhaps not well expressed in the posts) has been that they could not be reproduced at Grin Tech. What sets v3B19 apart is that the problems were finally able to be reliably reproduced in the lab so development could move forward and specific revisions could be introduced to address them. This is huge.

Again - although the post was a bit enthusiastic and did not have the benefit of extensive testing, after months of beta testing, there is nothing like a great ride on sunny Autumn day with a V3 that works out-of-box to make it all seem Good... :mrgreen:
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Cycle Analyst V3 Throttle Mode Overview

Post by teklektik » Oct 06 2012 10:17pm

Throttle ramping and min/max voltage range scaling to match throttle and controller voltage ranges can improve operation in fairly obvious ways, but it might be useful to take a quick 30,000ft view of how the various CA throttle modes can give more refined operator control.

Open Loop Throttle

The illustration below shows the CA in Pass-thru mode - similar in concept to directly connecting the throttle to the controller except that the V3 may apply some Vin-to-Vout scaling and Vout ramping. This is an open loop control configuration where the control voltage is applied to the controller and transformed by the controller/motor curves to directly affect the final motor output. For controllers/motors with curves possessing steep steps in input/output transformation, a small rider throttle change can affect a large alteration in motor power.
openloopthrottle.gif
openloopthrottle.gif (14.67 KiB) Viewed 5004 times
Closed Loop Throttle

This second illustration shows the CA in Current Throttle mode. This is a closed loop control configuration where the rider throttle is not passed through to the controller but rather sets a target output for the CA to achieve - the CA provides the controller throttle and receives feedback from the shunt to determine how well it has done in achieving that target. It then adjusts the controller throttle, etc in a closed loop to cause the output to automagically track the desired rider throttle input. Because the load is reflected through the motor back to the shunt, the CA will maintain the target current regardless of changes in terrain.

In this mode any unpleasant non-linearities in the controller/motor curves are of little consequence as the CA can rapidly and precisely adjust to get the desired output - this task is no longer the responsibility of the rider. Some controller/motor curves may have strongly non-linear characteristics that require small adjustments to the CA control mechanism, however these are simple gain adjustments to prevent 'hunting' or oscillation, not detailed configuration of input/output throttle curve mapping.
closedloopcurrentthrottle.gif
closedloopcurrentthrottle.gif (15.53 KiB) Viewed 5004 times
In this Current Throttle example, if Plim->MaxCurrent is set to 50A then WOT is 50A. Assuming the rider throttle is more or less linear, adjusting the throttle to 10% rotation yields a predictable controller output of 10% of 50A or 5A.

The closed loop illustration can be redrawn for Power or Speed Throttle with appropriate alterations to the source of the feedback. The table below shows the available throttle types - all but Pass-thru are closed loop. The columns show the physical metric the CA uses for feedback and the relevant parameters for each type of operation. To get the smoothest and most consistent operation it may be best to set the 'other' limits as loosely as possible (i.e. as true maximum safety limits) so only the single thottle limiting parameter is generally in play.

It is important to note that the CA Speed Throttle is completely different than the Infineon throttle logic which is often misnamed as a 'speed throttle'. The CA Speed Throttle is a true closed loop control system that measures the bike speed and corrects for variations. In contrast, the Infineon throttle uses open loop control to vary phase PWM duty cycle according to the input throttle voltage without regard for directly measured bike or motor speed; this results in varying speed with load and terrain.
cav3ThrottleModeSummary.gif
cav3ThrottleModeSummary.gif (23.63 KiB) Viewed 5004 times
Aux POT (Vpot) Input

The Aux POT input (aka Vaux, Vpot) operates in a fashion similar to the rider throttle (ThI) in that an applied voltage limits the associated parameter to some percentage of the configured maximum value. The CA PCB provides three pads for Aux POT: +5v, Gnd, and POT. This makes it straightforward to connect a potentiometer that will provide 0-5v to the POT input. For example, if Plim->MaxCurrent=60A, Aux->AuxFunct=AmpsLim, Vaux input voltage (min,max) is (0v,5v), and the POT input is adjusted to 2.5v (50% of 5v), then the controller will be limited to 50% of 60A or 30A. In lieu of a potentiometer, a few resistors/trimpots and an on-off-on SPDT switch can be used to provide the familiar LMH switch functionality.
cav3simplevauxlimiting.gif
cav3simplevauxlimiting.gif (19.22 KiB) Viewed 4979 times
Throttle Scaling

By setting both Aux->AuxFunct and the ThrI->CntrlMode to be associated with the same limiting parameter, the throttle will scale against the output of the Aux POT feature instead of the Limiting Parameter directly. This is shown in the last column of the table above.

For example, assuming Vbatt = 60v and Plim->MaxCurrent = 50A then Plim->MaxPower = 3000W . Because of Vbatt, the respective max current/power limits should have essentially identical effects, but the following example shows this may not be the case.
  • The question:
    What are the throttle response curves for an Aux POT 3-position LMH switch with values of 20%, 70%, and 100%?
Case A: DIFFERENT LIMIT PARAMETERS - The throttle limits current and Aux POT limits power. As shown below, when set to different Limiting Parameters, the throttle and Aux POT limits operate independently causing the throttle to try to follow the same slope curve ( 0 to Plim->MaxCurrent = 50A) in each switch setting. However, where Aux POT is less than 100%, the AUX Pot limit appears as a limiting ceiling where advancing the throttle has no effect. In these cases the diagonal curve flattens for the remainder of the throttle range of motion yielding a 'dead zone' in the same manner as legacy CA V2 limiting.
CaV3ThrottleAuxPotLimit-diff.gif
Differing Limit Modes: Throttle Limit = Current ... Aux Pot Limit = Power
CaV3ThrottleAuxPotLimit-diff.gif (7.73 KiB) Viewed 4741 times
Case B: IDENTICAL LIMIT PARAMETERS - Both the throttle and Aux POT limit current. The throttle is not limited by Plim->MaxCurrent but rather by (Plim->MaxCurrent) x (percentage of AuxPOT). As shown below this has the effect of scaling the entire throttle range of motion from 0 to Aux POT (switch) limit, eliminating dead zones. The WOT current limits are identical to those of Case A (10A, 35A, 50A), however, the throttle curves for Aux POT less than 100% are dramatically different, showing a uniform linear relationship between throttle and current with no dead zones. This scaling is similar to that of the Infineon controller 3-speed switch.
CaV3ThrottleAuxPotLimit-same.gif
Same Limit Mode: Throttle Limit = Current ... Aux Pot Limit = Current
CaV3ThrottleAuxPotLimit-same.gif (6.62 KiB) Viewed 4741 times
In Case B, the combined effects of the CA closed loop logic and the expanded range of motion make small speed adjustments at low power very much less challenging than in the open loop direct connect approach.
Last edited by teklektik on Jan 09 2013 8:56pm, edited 14 times in total.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
hillzofvalp   1 MW

1 MW
Posts: 1861
Joined: Dec 26 2010 2:09am
Location: Los Angeles, CA

Re: Cycle Analyst V3 preview and first beta release

Post by hillzofvalp » Oct 07 2012 12:53am

That is so useful. Thanks for the informative posts. :D very close to pulling the trigger.

User avatar
Diamondback   10 kW

10 kW
Posts: 525
Joined: Dec 15 2008 3:52am
Location: Sydney, Australia

Re: Cycle Analyst V3 preview and first beta release

Post by Diamondback » Oct 07 2012 2:06am

hillzofvalp wrote:That is so useful. Thanks for the informative posts. :D very close to pulling the trigger.

+ 1 for me too.

i intend to run the Thun BB and use a pot to set the assist level based upon the torque sensor in the BB.

i will leave the throttle connected also, but i am going to disable it (via Strt speed) until 3-4km/h.
with that set-up and some tweaks of the settings, i should have a system that behaves much like
the bionx does, but has more power (around 960W max) and i wont be locked into expensive proprietary
batteries and controllers.

i am just waiting until the beta is finished.

many many thanks to all who have contributed to testing and ironing out all of the little bugs in the FW.

Jason.
Ignorance can be solved, stupid is forever

User avatar
hjns   100 kW

100 kW
Posts: 1273
Joined: Aug 20 2011 11:05pm
Location: Basel, Switzerland

Re: Cycle Analyst V3 preview and first beta release

Post by hjns » Oct 07 2012 2:50am

Hi Teklektik,

Thanks again for the very comprehensive overview. I really think that this thread is like a super justification for you to be the main CAv3 consultant in the world.

Therefore, a small question from an electronics-noob, who can handle a soldering iron, but has no clue about circuits. What kind of pots and resistors and in what configuration would you recommend to adjust a conventional 3-way switch to work with the CAv3?

My 3-way switch is actually a ¦ A-0 ¦ A-B ¦ A-C ¦ switch, and works with my infineon based controllers. From what I see on the forums and the different e-bike shops, this is a very common switch.
Image

I was thinking that the ¦ A-0 ¦ setting would be equivalent to setting a pot meter to infinitely high resistance.
The A-B could be connected to a variable pot providing around 50% resistance.
The A-C could be connected to a variable pot providing around 0% resistance, or just remove the pot altogether.

Is this understanding correct? And in order to make this happen, what kind of pots should I use?
Henk


All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 07 2012 10:19am

Thanks for the enthusiastically kind words - there must be something in the air these last few days that's making us post all gushy-like :D.

Seriously though, I've been meaning to post some CAv3 LMH switch details for some months now, but it got back-burnered... I will get a post up straightaway with a couple of ways to do this that will play nice with the A/D converter impedance and on-board regulator capacity.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 07 2012 4:22pm

hjns wrote:My 3-way switch is actually a ¦ A-0 ¦ A-B ¦ A-C ¦ switch, and works with my infineon based controllers.
Hmm - perhaps you could verify my understanding of your switch operation. Conventional SPDT switches typically come in a center-OFF variety and are usually designated as on-off-on, however, it appears from your description that your switch is off-on-on.

(1) Can you please verify that the three switch positions have these make/break characteristics for connections (A,B,C):
  • (position I) no connections
    (position II) A to B; C not connected
    (position III) A to C; B not connected
(2) Which position do you want to be 'full power' or does it matter?

I ask because I purchased a similar-looking generic switch supposedly compatible with Crystalyte controllers and it is of the conventional on-off-on variety. I chugged out some simple dividers last summer that will configure such switches as either LMH or LHM and would like to see if one can be pressed into service for your switch without modification. If you are set up as I outlined above, it looks like the existing LHM divider might be directly usable giving you a setup where I=H, II=M, III=L (which might seem a little backwards, but it's all in the eye of the beholder :)...)
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
hjns   100 kW

100 kW
Posts: 1273
Joined: Aug 20 2011 11:05pm
Location: Basel, Switzerland

Re: Cycle Analyst V3 preview and first beta release

Post by hjns » Oct 07 2012 4:28pm

teklektik wrote:
hjns wrote:My 3-way switch is actually a ¦ A-0 ¦ A-B ¦ A-C ¦ switch, and works with my infineon based controllers.
Hmm - perhaps you could verify my understanding of your switch operation. Conventional SPDT switches typically come in a center-OFF variety and are usually designated as on-off-on, however, it appears from your description that your switch is off-on-on.

(1) Can you please verify that the three switch positions have these make/break characteristics for connections (A,B,C):
  • (position I) no connections
    (position II) A to B; C not connected
    (position III) A to C; B not connected
(2) Which position do you want to be 'full power' or does it matter?

I ask because I purchased a similar-looking generic switch supposedly compatible with Crystalyte controllers and it is of the conventional on-off-on variety. I chugged out some simple dividers last summer that will configure such switches as either LMH or LHM and would like to see if one can be pressed into service for your switch without modification. If you are set up as I outlined above, it looks like the existing LHM divider might be directly usable giving you a setup where I=H, II=M, III=L (which might seem a little backwards, but it's all in the eye of the beholder :)...)
You are completely right. I didn't think it would matter. I have a 3-switch (I, II, III) with 3 wires (A, B, and C), with the following possibilities: I = A-B, II = Off, III = B-C.

I prefer position I to be the lowest power, and III to be the highest power. However, that is a nice-to-have. Then again, with variable pots on all three of them, one could set them up however you want, right? I guess the II position would be a challenge....
Henk


All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 07 2012 4:56pm

hjns wrote:I have a 3-switch (I, II, III) with 3 wires (A, B, and C), with the following possibilities: I = A-B, II = Off, III = B-C.
I prefer position I to be the lowest power, and III to be the highest power.
Okay, this is good - it's a conventional on-off-on switch and it looks like you want a Low|Medium|High (LMH) configuration. There's not much to these and I don't really mind doing another but I'm happy to be able to skate with what is already in hand... :D
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Cycle Analyst V3 LMH/LHM Switch Support

Post by teklektik » Oct 08 2012 5:21pm

LMH/LHM Switch Support

As mentioned in an earlier post, the V3 can support on-the-fly selection of fixed percentages of a limit parameter (e.g. Plim->MaxCurrent) using a resistor divider and either a conventional SPDT on-off-on rocker/toggle switch or a commercially available ebike 3-position LMH/LHM switch. The switch positions may be arranged either as Low|Medium|High (LMH) or Low|High|Medium (LHM). The LHM configuration is perhaps more suitable for toggle switch installations where it is typically more difficult to hit the center position (H) but very simple to sweep the toggle to either extreme (L,M). This post presents some ways to hook this up.
LHM-switch.png
LHM-switch.png (3.56 KiB) Viewed 6919 times
There are two minor design considerations imposed by the CA:
  1. The stated max current available to power external circuits from the CA PCB +5v pads is 5ma. There is actually a little more headroom for lower voltage battery packs: The CA 5v linear regulator should be limited to 1.5W and the CA proper requires about 10ma to operate. The total available current to operate the rider throttle and Vaux divider is therefore roughly 1500mW/(Vbatt - 5v) - 10ma. So, for a pack voltage of 52v we get 1500/(52-5) - 10 ~= 20ma; for a 100v pack we get 1500/(100-5) - 10 ~= 6ma. A Magura throttle has a resistance of about 5K and so draws about 5v/5K = 1ma which must be subtracted from the total; we need to limit the divider to 19ma or 5ma for the 52v or 100v packs respectively. It's not hard to keep the total draw down to a few ma so we have a workable safety margin even for the worst case scenario with the big pack.
  2. The A/D converter input impedance should be limited to no more than 10K to achieve full 10bit accuracy. However, even if this limit is exceeded, the loss of a bit or two of accuracy will have negligible impact in this application.
There are many possible resistor/trimpot configurations - the dividers presented here were chosen largely because the two trimpot adjustments are non- or minimally interacting to simplify setup. Because of the range of ebike power and the desire by many folks to use parts on hand, each circuit is presented on an Excel worksheet that allows available parts to be substituted and evaluated.

The approach below is straightforward and allows the L and M settings to be adjusted to any 0-100% value. Even though most of the trimpot range is unused, 20-turn trimpots are very easy to adjust accurately. The three connections CA-5v, CA-POT, and CA-Gnd refer to the Potentiometer connections on the CA PCB.
resistorselector_ez_adj.gif
LMH <---> LHM
resistorselector_ez_adj.gif (7.87 KiB) Viewed 6919 times
The circuits below give more restricted adjustment range for the L and M trimpots and so will work accurately with single turn pots. The fixed resistors (R1/R4) are optional and can eliminated if multi-turn trimpots are used. This setup requires a little more effort to select parts that are appropriate so the pots can hit the desired target values but the spreadsheet makes this pretty easy.
resistorselector_adj.gif
LMH <---> LHM
resistorselector_adj.gif (8.44 KiB) Viewed 6919 times
Here's the Excel spreadsheet with the circuits above and two more versions that use fixed resistors in place of trimpots. Select the desired circuit on the worksheet tabs on the bottom. If you do not have Excel, download and install free Apache Open Office. The spread has been verified to work with it.
Resistor_Selector_for_CAv3-0_Limit_Switches_20121009.xls
corrected 2012-10-09
(75 KiB) Downloaded 225 times
The worksheets for the first two circuits above look like this:
cav3-EZ-adj_800_2.gif
cav3-EZ-adj_800_2.gif (85.68 KiB) Viewed 6876 times
Since the first two circuits require no customization to select parts to target particular LMH range adjustments, you can just build them with the values shown. If you have some notion of the power settings that you wish, plug the LMH values into the green cells at D16,D17,D18. The matching Vaux voltages will appear in the adjacent yellow cells (1.66v and 3.33v in the worksheet pages above). You can go into the CTRL section of CA Setup and adjust the pots so the screen value of Vaux matches the voltages on the spreadsheet. Done.

The other green cells can be adjusted to accommodate parts on hand and the max current draw will recalculate appropriately. Use this feature to tweak in the parts for the second two circuits. All the sheets work essentially the same and have instructions for use.

Since the trimpots are pretty much in the set-it-and-forget-it category, if you wish you can stash them away inside the CA case and rewire the existing Auxilliary Pot cable (white connector) to the divider to support direct connection to the external LMH switch.

The Setup parameters Aux->MinAuxin and Aux->MaxAuxIn relate only to external Aux POT circuitry and are independent of ThrI and ThrO voltage settings. If the switch circuits are connected as described above, configure these parameters to 0.0v and 4.99v respectively. Modified circuits or different (+/-) supply voltages may require different parameter values.
Last edited by teklektik on Dec 30 2012 6:49am, edited 13 times in total.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
hjns   100 kW

100 kW
Posts: 1273
Joined: Aug 20 2011 11:05pm
Location: Basel, Switzerland

Re: Cycle Analyst V3 preview and first beta release

Post by hjns » Oct 08 2012 5:53pm

Teklektik, you are the greatest. This is exactly what I was looking for! Thanks, man!

I like the idea of stashing it in the CA body. And I would love to try this as a 3-power switch in combination with a 3-speed switch connected directly to the controller. One switch to control power, and the other switch to control speed. Having a lot of power but with low maxspeed may help on the trails, whereas low power medium speed may help increase range. And of course, having high power and high speed when going full out!! All on the fly, without having to program anything!
Henk


All men dream: but not equally. Those who dream by night in the dusty recesses of their minds wake in the day to find that it was vanity: but the dreamers of the day are dangerous men, for they may act their dreams with open eyes, to make it possible. T.E. Lawrence

toolman2   1 kW

1 kW
Posts: 422
Joined: Feb 23 2010 9:34pm

Re: Cycle Analyst V3 preview and first beta release

Post by toolman2 » Oct 08 2012 7:20pm

fine work tek, man you are all over this.

just about to grab a v3 stand alone and was told by ben (on behalf of grin) that you cannot use the limiting functions with the v3 when its the stand alone version and you will need (to buy/join?) another shunt, or get a direct plug in. -hopefully this is just a misunderstanding.
seems strange as the stand alones have always had a shunt included, with all the limiting working, as its made to 'stand alone' from the controller?

on the other hand direct plug ins are such (directly pluging in to share the internal shunt etc) for just the kewin type controllers anyway arn't they?

hoping it is just confusion cos with a kelly there are no options left to use a v3 with limiting if he is right?

User avatar
teklektik   10 GW

10 GW
Posts: 4020
Joined: Mar 26 2011 1:15pm
Location: CT, USA

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Oct 08 2012 9:00pm

toolman2 wrote:just about to grab a v3 stand alone and was told by ben (on behalf of grin) that you cannot use the limiting functions with the v3 when its the stand alone version and you will need (to buy/join?) another shunt, or get a direct plug in. -hopefully this is just a misunderstanding.
seems strange as the stand alones have always had a shunt included, with all the limiting working, as its made to 'stand alone' from the controller?
...
hoping it is just confusion cos with a kelly there are no options left to use a v3 with limiting if he is right?
Gee - I can't speak for Grin, but as far as I know there is no CAV3-SA version - the shunt is a separate item (see items for sale) - I believe this is the point Ben was making.

I suspect the rest of the conversation was a simple V2 - V3 mixup about the term 'limiting functions' which classically for V2 was associated with the special throttle override connection accessible only via the DP cable and not directly available for the V2-SA version. Here I assume you used the term 'limiting functions' instead to refer to the V3 software current/power/speed limiting as expressed through a direct controller throttle hookup (not the legacy DP throttle override connection which is normally unused by the V3 anyway). Probably just a nomenclature thing...

As far as the V3 'limiting functions' are concerned, I am certain that they are fully available regardless of whether you use an external shunt or controller shunt via the DP connector - the same pads on the PCB are used in both cases (+S,-S). In fact, it seems that the new V3-SA shunt dongle add-on actually plugs into the DP connector instead of having a dedicated cable of its own. I think you want a CA3-DPS, a Shunt-SA, and of course, a CA3-USB (not sure if the programming cable comes with the CA3-DPS or not - I bought the special Beta Tester package back when...).

I migrated from a V2 to a V3 and from the start have run my V3 using an external shunt - I just discarded the DP cable that came with my beta V3 and used my old V2 external shunt - works fine... :D
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

toolman2   1 kW

1 kW
Posts: 422
Joined: Feb 23 2010 9:34pm

Re: Cycle Analyst V3 preview and first beta release

Post by toolman2 » Oct 09 2012 4:16am

again tek, you have excelled -we are away with a v3, shunt, and how to do it. thanks.

Post Reply