Cycle Analyst V3 preview and first beta release

A few more questions:
- I need to extend the 'speedo sensor'. Is this a normal pair of wires or is it shielded?

- In the 'battery config' screen, can I set a battery >99.0ah? Can I get an accurate battery icon without this matching my pack (120ah)? Maybe in a future release?

thanks for the help thusfar.
 
What he said ^^^

If you need the extension because of placing the pickup on the rear wheel or someplace closer to the controller than the CA, you may want to use the standard CA-DP wiring instead of the CA-DPS wiring and attach the pickup to the controller CA-DP connector to provide the Sp signal instead of using the controller hall signal. See the Guide "Appendix B. Add/Remove Wheel Speed Pickup Sensor" to restore the CA-DPS to CA-DP wiring.

The CA pickup wires are non-polarized so connect one to Gnd (black - pin 2) and the other to the CA Sp (yellow - pin 5) connection. The existing controller hall Sp signal is not used.

If you don't wish to modify the controller or CA DP connectors, you can fab a quick adapter to plug in-line - just be sure to get adapter connectors pin 1 to pin 1, etc or Bad Things will happen to your CA (ask me how I know this...).

CA-rearWheelPickupAdapter.png
 
Just got my first e-bike setup and was trying to connect my CA3-DP to my Mac (running macOS Sierra v10.12.1) with the ebikes.ca USB->serial cable.

C4825-GR Controller
w/ CA3-DP & CA-USB cablee

After turning on the CA3 with v3.01 firmware and plugging in the USB-> Serial cable I ran the Mac CA setup utility v1.31.
When I click "read setup from CA" I chose the /dev/cu.usbserial-DB00K1OV serial device and click ok.
After it says detecting CA version, then attempting to connect, then it changes to "reading data" but stays on that screen and doesn't proceed any further.

Then after a few seconds an error message pops up:
"Failed to read setup from Cycle Analyst! Please make sure you have selected the correct COM port and that your Cycle Analyst is turned on and properly connected, then try again".

Searching around I haven't found anything to tweak on the Mac side of things.. I am just using whatever stock USB-> serial driver the Mac comes with.

One site suggested doing a kextstat which lists:
295 0 0xffffff7f8323b000 0x7000 0x7000 com.apple.driver.AppleUSBFTDI (5.0.0) 797D6BEE-10AD-30B0-97AE-157463D700AF <116 19 5 4 3 1>

Each time I plug in the USB->Serial cable to the MAC it also shows "A new network interface has been detected. The 'FT230X Basic UART' network interface has not been setup. to setup use network preferences"

I tried at work with a Windows 7 Pro machine and was able to get things working with the same cable and changed some settings after downloading the stock 3.01 firmware and writing a few changes to the CA3.
At first it didn't connect on the Win7 machine (even after getting it to search Windows Update), but I found that after tweaking the timeout settings in the device manager for the USB COM port it worked. I set two settings to a 100ms timeout if I remember correctly.

Not sure if anyone else has the setup utility working with a newer MacOS?



Update on Dec 17 - FIXED was able to read values from CA:
------------------------------------------------------------------------

I followed the install guide for Mac OSX:
http://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf

I Plugged in the USB->TTL cable, then ran the command line kextunload command in Section 7.2 per "to use FTDI’s VCP, disable the Apple provided FTDI VCP driver as per section 7. " (page 23 of the install guide)

Then I downloaded and ran the Mac version 2.3 VCP driver installation from:
http://www.ftdichip.com/Drivers/VCP.htm

Rebooted (with the USB->TTL cable still plugged in)
Then ran the Mac CA setup utility v1.31 and successfully read the values from the CA3.

Hopefully this helps someone else on MAC.
 
I have a cav3 that i have just setup the AUX pot on. what i did is connect a hall sensor across the AUX input, so then when I put a magnet it goes from 0 to 5v latching on the aux pot input.

I setup the 2 aux pot numbers to = 1v min, and 4v max. and then I setup 2 profiles.

all seems to work well except that under high load it seems to switch by itself ! like I am switching the aux pot ! initially I thought It was magnet interference from somewhere, but then even if I put the hall sensor far away from the bike this sill happens.. but I found the pattern is it happens ONLY under high load ! so I was thinking its a voltage sag related issue? what could I do or change to make it work more stable ?? change setting or add a capacitor to the aux input pin ??
 
The AuxPot input has only a weak pull-up to avoid affecting attached resistive devices. Chances are that your hall is an open collector device so that in the 'OFF' state the input lead presents a high impedence antenna for electrical noise. Although a small cap to GND is a way to go after the noise, I would recommend a pull-up to 5V on the input as a first approach to stiffen the 'OFF' condition. Something like 2.2K should work fine - you can jumper the part across the JST pins or tack it across the PCB POT pads if cabling is already tidied up.

CA3-AuxHallSensor.png
 
mrbill said:
Hi teklektik:

Justin discussed offering a technique of applying variable regenerative braking by sensing backwards crank spinning, where faster spinning commanded more regen, and slower spinning commanded less. I see this listed without an ID in the "planned features" list on Grin's CA3 page.

Hey mrbill and thanks for spotting and asking about this. This was a feature that I was pretty jazzed about exploring since I liked how it offered a tidy independent way of controlling regen with no additional sensors, kinda like a coaster brake. Pedal forwards for power and pedal backwards for braking/regen. And so I did play with this last year on a code branch that if it worked well could have been merged with Tek's 3.1 project.

However, what I found was that sustaining backwards pedaling and having the RPM level control the regen intensity is more than mildly awkward. With no resistance to the cranks spinning backwards it's hard to maintain a steady cadence. Going down long decents with slow reverse pedaling was OK but then spinning the cranks backwards fast while attempting to slow to a stop was really bizarre and never felt natural.

What I think might well work better is not having a reverse cadence to control the regen, but actually enabling the reverse position of the pedals to determine the regen force. So you might have 2 or 3 reverse pedal rotations take you to max regen. If you just want a small amount of regen, just back pedal 1/2 or 1 revolution. That would at least avoid the awkwardness of continuously turning the cranks backwards and still give good resolution over the regen intensity.

When there is time I would like us to explore this but it would be deferred to a later V3.2 firmware set.

I'm not sure how workable backward-pedaling regen is on some drivetrains as fast backward pedaling can throw a chain if the return chain run is long or the chain becomes stiff. But, I'd like to try it some day.

I didn't ever have issues with the chain throwing off and I do have a longtail bike with a long chainline which can be more prone to this, but that's just a sample case of 1 bike.

Regarding this question here
Would it be possible to add variable regeneration control to the AuxPot function?

One of the things planned for 3.1 is the option to enable the speed limit setpoint to control regen (allowing throttle out all the way down to 0V) rather than just forwards power. Then you can set your Aux Pot for speed control adjustment and going downhill you could dial this up and down so that the regen governs your bike at your desired speed. And then when you are otherwise cruising along just set the pot to maximum so that you don't have any forwards speed limit coming into play.
 
jPas said:
Update on Dec 17 - FIXED was able to read values from CA:
------------------------------------------------------------------------

I followed the install guide for Mac OSX:
http://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Installation_Guide_for_MAC_OSX.pdf
I Plugged in the USB->TTL cable, then ran the command line kextunload command in Section 7.2 per "to use FTDI’s VCP, disable the Apple provided FTDI VCP driver as per section 7. " (page 23 of the install guide)
Then I downloaded and ran the Mac version 2.3 VCP driver installation from:
http://www.ftdichip.com/Drivers/VCP.htm

Hopefully this helps someone else on MAC.

Awesome, thanks for sharing this solution for others who run into the same thing. It's difficult to have software with hardware drivers stay current with all the various OS updates. We'll be doing work soon on a fresh round of enhancements on the CA setup utility software and hopefully can make all the Windows/MacOS/Linux builds work easily out of the box with all the current machines. But no guarantee that OS updates in the coming years won't break things again!
 
adriftatsea said:
A few more questions:
- I need to extend the 'speedo sensor'. Is this a normal pair of wires or is it shielded?

Just a normal pair of wires, it does not need shielding and can be extended quite trivially.

- In the 'battery config' screen, can I set a battery >99.0ah? Can I get an accurate battery icon without this matching my pack (120ah)?

Even though the nominal Ah is limited to 99Ah, with most chemistries it won't affect the readings and display of the battery icon gauge at all since it always levels itself to the open circuit pack voltage at the end of the day. But if you have a LiFePO4 battery, then this could introduce some error, though with a 120Ah pack I don't think you'd notice it.

Maybe in a future release?
But there is no reason we shouldn't enable a higher nominal Ah setting, especially at least if you are in high-range mode when most of everything else becomes scaled by 10. So yeah we should be able to fit this in. It's come up with a few other people too.
 
teklektik said:
lightrush said:
Guys, is the following a correct implementation of the digital-only UP/DOWN circuit using a momentary rocker?

View attachment 4
Exactly right. Thanks for the helpful illustration! :D
(I jazzed it a tiny bit so folks could cut 'n paste it into other posts as needed...)

larghio said:
Bought dual wuxing buttons, they seem like a good fit for auxd mod...
Wow, those are a great find!
I think I've looked at 1000 different button thingies, but this Wuxing DK-11 has nice buttons you can hit with gloves and lots of room for a couple of parts inside.

Hey guys and thanks so much for all the input here in testing and building up homebrew digi aux switches for the CA 3.1 firmware. The DK-11 wuxing switch suggestion was really spot on as an effective and low cost piece of hardware to get this project rolling (as opposed to tooling up our own, which would be nice but development time + $$ means not likely in foreseeable future).

Anyways we tried to see if Wuxing would be willing to to make these switches with the approriate resistors and diodes inside the housing for a plug and play CA3 digi-aux, and the answer was a flat-out no. But they did offer to supply us empty unassembled switch housings and hardware so that we could do this ourselves, and after concluding that stuffing in leaded parts was a mild disaster we realized there was just enough room to fit in a PCB with the appropriate resistors and diodes and convenient connection points for the wires
DigitAuxPCB.jpg
DigitAux Assembled.jpg

If anyone who's been experimenting with the CA3.1 firmware builds has a DK-11 switch we'll happily mail out these populated PCBs so you can assemble in this way. We decided to go with Schottky diodes rather than conventional diodes so that the overall voltage span used by the digital zone would be lower and there would be less temperature sensitivity of the analog range.

At the other end the cable is terminated with both male and female JST-SM plugs so that any existing aux pot or 3-position CA switches can easily be plugged in at the same time.
View attachment 2

Anyways we've just this week started finalizing the bulk assembly of this part and have them available here for people who want to use this feature and experiment/contribute to the CA3.1 testing and development:
http://www.ebikes.ca/shop/electric-bicycle-parts/ca-accessories/aux-input/ca3-daux.html
 
Ham said:
Can anyone assist me with a question regarding "idle watts":
Earlier in thread Justin suggested a way to reduce transmission shock by adjusting the minimum throttle input to allow the motor continue spinning on a very low power when you are freewheeling. This was set with a watts throttle set up.
Does anyone know a way in which a similar situation could be created with a R/C pulse throttle set up?

It would be the same process whether you have an RC Pulse throttle output on the CA3 or a voltage output. One way would be to set the CA3 so that the throttle _input_ is a power or current throttle, and configure your throttle input voltage mapping so that when you let go of the throttle instead of it going down to 0% it goes to a small value that is commanding a bit more than the no-load watts of your motor. So if the motor draws 50 watts unloaded, set it so that when the throttle is released it is still commanding like 60 watts. This will work fine with the CA3 prelim firmwares, but with the current release FW there is a throttle fault error that will flash if the CA sees a throttle voltage higher than the min throttle when it is first powered up, so you'd need some other button to momentarily bring the throttle signal down to gnd to clear this fault.

Another probably better approach if you are mostly pedaling the bike would be to use a PAS sensor and just set the PAS watts to to your no load motor amperage. Then so long as you are pedaling the motor is just slightly engaged, and you can hit the throttle at any point to deliver full power without worrying about a sudden impact on the drive chain once it catches up.

Or, you can just use throttle up ramp rate limiting to reduce transmission shock, but this can introduce some delay sensation from when you apply throttle and feel the power.

-Justin
 
justin_le said:
Regarding this question here
mrbill said:
Would it be possible to add variable regeneration control to the AuxPot function?

One of the things planned for 3.1 is the option to enable the speed limit setpoint to control regen (allowing throttle out all the way down to 0V) rather than just forwards power. Then you can set your Aux Pot for speed control adjustment and going downhill you could dial this up and down so that the regen governs your bike at your desired speed. And then when you are otherwise cruising along just set the pot to maximum so that you don't have any forwards speed limit coming into play.

Hi Justin:

Thanks for planning this for v3.1.

Would it be possible to allow AuxPot to control both regeneration speed and forward power (or current or speed), per user preference, as is currently allowed? If that's not possible, perhaps the AuxPotD could be set up to adjust regeneration speed and AuxPot to adjust Power (as mine now does)?

I never liked speed control for forward applied power on a bike, finding that even small (<1kph) speed adjustments due to slightly varying terrain produce extreme power surges as an otherwise well-adjusted control system alternates between full power and zero power in an attempt to hold vehicle speed constant. Aside from reduced efficiency the feel is annoying. I would like not to be restricted to a single mode of control for both forward driving and regeneration.
 
I always forgot to mention this...

Since FW v3.1b8 or b9, the PAS sensor 'animation graph' (next to the throttle graph) is gone from the CAv3 display screen.

My setups on three bikes:
CAv3 (v3.1b10 and b11) with PAS sensor (AutoPAS, PAS noTrq), throttle (pass-through), AuxA with Grin Poti (to set PAS Level), AuxD off, Regen off.
 
Marc S. said:
Since FW v3.1b8 or b9, the PAS sensor 'animation graph' (next to the throttle graph) is gone from the CAv3 display screen.

My setups on three bikes:
CAv3 (v3.1b10 and b11) with PAS sensor (AutoPAS, PAS noTrq), throttle (pass-through), AuxA with Grin Poti (to set PAS Level), AuxD off, Regen off.
Hey Marc-
Reproduced this problem on the bench. It seems things work when a torque signal is present even when in NoTRQ mode, so it looks like the noTRQ setting is not properly switching the PAS display to RPM mode.

Fixed. The repair has been added to the upcoming b12 release (should be next week).
Thanks for the post and clear problem report. :)
 
mrbill said:
I never liked speed control for forward applied power on a bike, finding that even small (<1kph) speed adjustments due to slightly varying terrain produce extreme power surges as an otherwise well-adjusted control system alternates between full power and zero power in an attempt to hold vehicle speed constant.
mrbill-
Distinct from your enhancement request, it looks like your speed tuning needs a little more adjustment. The hard surging you describe looks like too much PSGain and possibly not enough DSGain. The first yields a strong and immediate response to speed errors and the second prevents the CA from damping hard acceleration. If you rely a bit more heavily on IntSGain instead of PSGain, the correction builds more slowly as the error increases which can yield a less aggressive response.

In any case, speed tuning can be challenging - I spent a lot of time getting a heavy 2WD cargo bike dialed in - lots of torque and lots of momentum - two things that are hard to get the PID controller to understand... It regulates smoothly now, but it was a bit of lengthy argument.
 
Spent ages on mates bike today...mac8t 14s9p 30q ca v3 three speed switch and pas. Trying to get a nice gentle pas ramp up for city bike path riding.

So set pas to Torqpas. This allows for 'set assist' at up to 55rpm and then progressive assist up from 55rpm to 90rpm. Set assist set to 250W. At 90rpm set to 750W. Power settings now ok but still surging.

Went searching and found that surging can be reduced by lowering dsgain. So I reduced it from 109 to 70, Road tested, still surging but less, then 50, Road tested, no surging, yeah!!!

Changed battery on Garmin to pick up cadence, went for road test, surging back!!

Chucked bike in bin and called it a day. Have checked things like speed pickup magnet clearance etc. anyone got a definitive simple how to prevent pas surging?
 
Tats said:
anyone got a definitive simple how to prevent pas surging?

WGain, not DSGain! You are in constant watts mode for PAS assist so it's your watts limiting loop that is coming into play.

Also, install the latest V3.1 firmware build once Teklektik posts it here. This makes the 3 position switch much easier to configure and doesn't require any 'hacks' to get proportional RPM behavior, you can explicitly set your relationship in Watts/RPM with the autoPAS mode.
 
I have a question about the CA's internal voltage regulator in combination with 13s battery (54V fully charged):

will it provide sufficient current for powering:

-Thun Torque sensor
-Hall Throttle
-5k auxiliary pot

I know that there is a list in the manual and regarding to it those parts will take to much current, but on mine it works and i measured the hall based throttle drains 5mA or something like that, and not 20mA like specified in the manual.

What happens if the maximum current limit at given voltage is exceeded?
Is it safe to use the CA like this, or should i power it with an additional 12V dcdc and convert it to "Vex" for voltage monitoring?
 
madin88 said:
What happens if the maximum current limit at given voltage is exceeded?
I know from experience that if you power the THUN from the CA at too high a pack voltage, it will pop the CA's regulator. Then you will need to power the whole CA from a lower-voltage source, or have it repaired. :(

Unless the design of the CAv3 changed from mine (pretty early one) then you will want to power the THUN from a separate power supply, and not from the CA.

Then the CA can still run off pack voltage like normal, and power your throttle and auxpot just fine.
 
teklektik said:
mrbill said:
I never liked speed control for forward applied power on a bike, finding that even small (<1kph) speed adjustments due to slightly varying terrain produce extreme power surges as an otherwise well-adjusted control system alternates between full power and zero power in an attempt to hold vehicle speed constant.
mrbill-
Distinct from your enhancement request, it looks like your speed tuning needs a little more adjustment. The hard surging you describe looks like too much PSGain and possibly not enough DSGain. The first yields a strong and immediate response to speed errors and the second prevents the CA from damping hard acceleration. If you rely a bit more heavily on IntSGain instead of PSGain, the correction builds more slowly as the error increases which can yield a less aggressive response.

In any case, speed tuning can be challenging - I spent a lot of time getting a heavy 2WD cargo bike dialed in - lots of torque and lots of momentum - two things that are hard to get the PID controller to understand... It regulates smoothly now, but it was a bit of lengthy argument.

Hi teklektik:

Thanks for the suggestion. What values of PSGain, DSGain, and IntSGain do you use? I'm using 2.40, 400, and 400 for these and found them by following your tuning advice in the Unofficial User Guide when using a speed limit of 20mph--just one single, small overshoot of the speed before settling to the set speed quickly and holding that speed within 1 mph on flat ground. Other values cause more surging, oscillation or sluggish response. But, it's quite possible I missed another workable combination.

I tried reducing PSGain and increasing DSGain, as you suggest, separately and together. Reduced the former to 1.20 and the latter to 800 and 1600. Changing PSGain didn't have much effect, but increasing DSGain caused a perceptible increase in oscillation.

The problem may be that my PAS Watts is set to 1000. So, when the system senses speed falling below the set point, it quickly slams to 1000 watts. This is a problem when accelerating from a stop. The moment my pedal RPM rises above the start threshold, power goes to 1000 watts until I reach the set speed. It's like having a button instead of a variable throttle to apply power.

I tried lower power (500 watts) and this dulls the surging somewhat. The problem is that I need 1000 watts if the hill gets steep. It's one reason I don't like using speed control when the motor is driving I need to be able to vary the applied power. With the adjustable speed limit I don't feel like I'm riding a power-limited bike but more like driving a motor vehicle with a stiff cruise control that can't be turned off.

I would prefer to be able adjust the power when driving and the speed when regenerating.
 
madin88 said:
I have a question about the CA's internal voltage regulator in combination with 13s battery (54V fully charged):
will it provide sufficient current for powering:
-Thun Torque sensor
-Hall Throttle
-5k auxiliary pot

In spite of what other posters may have implied here, the answer is that with a 13s battery pack, yes this combination of accessories is just fine. Even at 14s you can generally run a thun torque sensor and throttle device and aux pot and not have any issues with the regulator overheating unless you happen to be in a place with very hot ambient conditions. So go ahead and do it, and I'll personally express ship you a new replacement CA3 if it causes any problem. An external voltage supply is needed for sure when you are >60V with a Thun and throttle, but with 13s there isn't any worries.

We are working on having a dc-dc converter onboard for the next board revision so that this is no longer a consideration, but this comes with potential limitations to the total voltage range. With the current system using the depletion mode mosfet as regulator transistor it's possible for the CA to operate equally well down to 10V and up to 150V, while it's tricky to do a DC-DC input that would work over such a span. Might be more like 15V-100V.
 
Back
Top