Cycle Analyst V3 preview and first beta release

izeman said:
i have another concern: i use regen braking with a directly connected brake switch to the controller brake pads. so i'm not using the brake's connector of the ca, which can imho not be used for regen, but for cutting the throttle only. correct?
if i don't release the throttle and pull the brake, the throttle is cut and the wheel is in generator mode. one could "forget" to release the throttle completely when braking, and as soon as the brake is released, full throttle is applied from 0-100% in 0 seconds.
how can this be avoided?

This is a tricky situation since the CA has no idea that you are doing regen by squeezing the brakes, as opposed to say going fast on a downhill and getting regen currents that way. The best solution right now if you have the ebrake going to the controller is to also splice your brake signal up the CA's ebrake input too. Then it will disable the cruise and cutout the throttle etc. while the basic regen functionality of the ebrake signal going to the controller is unaffected.

The better solution will be to install a mini break-out board on the 6-pin connector that senses when the CA's throttle output goes to 0V (as opposed to the MinOutput value), and then triggers the controller ebrake input from that. I alluded to the fact that we'd be making such a mini 'interface' board last year and we've finally got them just about ready. Then you'll be able to get actual regen from the one CA-DP cable without an additional set of wires from the ebrakes to the controller.

-Justin
 
Hey guys, so this is the final day. At Teklektik's suggestion the firmware is called "V3.0 Prelim" just because we haven't had any widespread field testing, so just in case there are some silly things that slipped in with the recent changes we'll have a chance to fix that. But hopefully it'll be nothing and we drop the "prelim" qualifier pretty quick!

V3.0 Prelim.jpg

rscamp said:
To paraphrase very briefly his words, a firmware change was made to make the throttle output go to 0V to activate regen on a future product. With the PPM output, this makes for a 0ms pulse rather than Min Throttle so the R/C controller thinks it isn't getting any signal. A change will be made so the PPM output will go to minimum throttle when the brake is pulled which should cure the issue.

So what I decided to do here is add one more parameter in the Throttle Output menu, called "Ebrake Out". By default, this is 0V (or 0mS), but you can change it so that when the brakes are squeezed the CA's throttle output signal goes to any other voltage or pulse width.

Ebrake Out.jpg

So in the case of an RC controller that looses receiver sync, you would set this like so:
Ebrake Out mS.jpg

At the moment there isn't anything stopping you from setting the output _higher_ than the min throttle output if you want. So you could set the Ebrake Out to like 3.0V if you wanted, and then use it as a more general purpose button that drives the the output signal high rather than low.
 
Unfortunately I didn't get a chance to add a customizable cell voltage range for the battery state of charge graphic, but I did tweak the range of the stock lookup tables and also added a new chemistry choice called "RCLiP" for the high rate RC LiPo packs based on the discharge data that Merlin posted from his Turnigy battery.

RC LiPo.jpg

So for those who are curious, this is the internal lookup tables for the 6 different cell voltage profiles available:
 
mrbill said:
Today I rode for the first time since I updated to Beta23 on a ride longer than 99.9 miles. What happened to the tenths in the display when trip distance units roll past 99.9? I am fairly certain that tenths were displayed for mileages over 99.9 in Beta22, or I would have noticed their absence earlier. Are we already hard-up for memory that only 3 significant digits can be displayed for mileage (or "kilometerage")? I hope not.

Hey Bill, it's been like this in the V3 code for some time. Nothing to do with memory just with available display real estate on the screen. The addition of the throttle slider/ebrake graphic and human power meter meant that had to take one digit off the distance and Ah display, otherwise there would be no gap following the "W" or "A" symbol. However, if you go over to the 9th screen with the trip and total odometer stats, you can see the trip distance right do the 3rd decimal place.

Trip Dist.jpg

-Justin
 
justin_le said:
mrbill said:
Today I rode for the first time since I updated to Beta23 on a ride longer than 99.9 miles. What happened to the tenths in the display when trip distance units roll past 99.9? I am fairly certain that tenths were displayed for mileages over 99.9 in Beta22, or I would have noticed their absence earlier. Are we already hard-up for memory that only 3 significant digits can be displayed for mileage (or "kilometerage")? I hope not.

Hey Bill, it's been like this in the V3 code for some time. Nothing to do with memory just with available display real estate on the screen. The addition of the throttle slider/ebrake graphic and human power meter meant that had to take one digit off the distance and Ah display, otherwise there would be no gap following the "W" or "A" symbol. However, if you go over to the 9th screen with the trip and total odometer stats, you can see the trip distance right do the 3rd decimal place.



-Justin

OK, I found the 9th screen. And to the thousandth, too. I had suppressed it while moving.

That said, I think I'd rather see the tenths displayed on the main screen when distance rolls over 99.9 than to preserve the gap between the digits and the units (mi or km). When following a route sheet that has many turns at the end of a long ride, tenths may be significant, and having to click through to the ninth screen while moving is inconvenient. The loss of the gap between the numbers and the units bothers me less, especially since the units would abut the least significant digit only when trip distance rolls over 99.9. I suspect this accommodation would go unnoticed by most users but would be greatly appreciated by a few.
 
justin_le said:
Unfortunately I didn't get a chance to add a customizable cell voltage range for the battery state of charge graphic, but I did tweak the range of the stock lookup tables and also added a new chemistry choice called "RCLiP" for the high rate RC LiPo packs based on the discharge data that Merlin posted from his Turnigy battery.

View attachment 1

So for those who are curious, this is the internal lookup tables for the 6 different cell voltage profiles available:

Massive difference between the ebike LiPo and RC LiPo. I suspect the "C" rating of the ebike LiPo is much lower than the RC LiPo.

Nice addition to the ebrake option screens. Make this feature far more versatile.

When do you expect this release to be available?
 
I have setup an adjustable 3 way switch as per teklektik's drawings which works perfectly. However, I have added a small addition by fitting a remote adjustable pot to the high speed switch setting. This way I have 2 presets and one setting that can be adjusted on the fly. So I now have one preset to 250W (low), a second preset to 450W (Med) and a third setting that can be adjusted at the handle bars from zero to 750W. Gives me the best of both worlds. If I am running with PAS activated, I tend to set the adjustable setting to zero so I can switch the PAS off and still pedal. However when using the throttle I tend to leave it at 750W for max boost when I need it.

I am also using a button for throttle rather then a treditional throttle. The button provides a 4V signal with the CA's ramps keeping transitions nice and smooth. For a low powered setup, I am finding this really effective.

Below are a few pictures of the result plus the modified wiring diagram and the veroboard layouts.

IMG_2013.jpg

IMG_2019.jpg

IMG_2022.jpg

IMG_2027.jpg

IMG_2028.jpg

adjustable 3 speed switch.JPG

 
Kepler said:
... I have added a small addition by fitting a remote adjustable pot to the high speed switch setting.
First - thanks to you and others for the kind words a few posts back - very much appreciated! :D

A slick and stealthy installation - very much in keeping with the rest of the build. I particularly like the idea to add the adjustable pot to the High position of the switch - this lets throttle mode (non-PAS) operation be restored easily by setting the pot to the extreme position. This gives much better ease of use than my suggestion to replace one of the existing the Med or Low trimpots - which requires fiddling the pot to a proper midrange value to correctly restore throttle mode. Very nice!
 
Kepler said:
Massive difference between the ebike LiPo and RC LiPo. I suspect the "C" rating of the ebike LiPo is much lower than the RC LiPo.

That is definitely the case, but in theory a higher 'C' rating would mean less internal resistance, but it doesn't necessarily mean that the open circuit voltage profile should be any different. It just illustrates how much more there is to a battery than the nominal chemistry though, that's for sure.

When do you expect this release to be available?

So I've had a few days with it and haven't gotten any glitches of note so will post it here. The firmware file says B23 but the boot-up screen says V3 Prelim. In addition to the previously mention changes of a programmable "ebrake output" voltage, and the addition of an RCLiPo battery option, I've also made the following smaller updates:

  • Temperature Signal Filtering: People were commenting on the jitter in the last digit of the temperature reading, so now the temp signal is averaged and filtered just like the volts and amps, in accordance with the "averaging" value selected in the preferences menu.
  • PAS Modes: Now all 4 PAS modes make use of the MaxThrotSpeed, so in each of the RPM|Throt, RPM&Throt, Trq|Throt, or Trq&Throt, if you are travelling below the MaxThrotSpeed, then you can use the throttle without pedalling, but above MaxThrotSpeed you must be pedaling for the throttle to have an effect. Hopefully this will finally satisfy the various interpretations of the legal requirements for European riders.

Happy flashing, let me know your RC LiPo folks if the new profile is fitting you SOC expectations, and please let me know if anyone sees any anomalous behavior so that I can make sure that is fixed before dropping the "prelim".
 

Attachments

  • CA3_B23_NoCal.zip
    46.7 KB · Views: 152
Kepler said:
I have setup an adjustable 3 way switch as per teklektik's drawings which works perfectly. However, I have added a small addition.... Gives me the best of both worlds.
I am also using a button for throttle rather then a treditional throttle. The button provides a 4V signal with the CA's ramps keeping transitions nice and smooth. For a low powered setup, I am finding this really effective.

Hey Kepler, super nice work. This is _exactly_ the kind of customized input hacking that I was hoping to see people dial in via the Aux In and CA3 settings. I'm really glad that this worked out and helped you make such a streamlined ebike setup.

-Justin
 
justin_le said:
Happy flashing, let me know your RC LiPo folks if the new profile is fitting you SOC expectations, and please let me know if anyone sees any anomalous behavior so that I can make sure that is fixed before dropping the "prelim".

Hi Justin:

Thanks for issuing a new release and for tweaking the software to an improved state.

Did you make any changes to the cruise control locking behavior in connection with your testing with a thumb throttle?

I still have a hard time getting it to lock at 3 seconds and 0.15 volts. Hit and miss. Sometimes it locks the first time, but others I get the flashing box on the slider, only to have the lock fail when I release the throttle.

Thanks.
 
Weehoo, also just got delivery of a new stainless steel mount for the CA that fits around the steer tube of a bike. So for those wanting a more permanent and central mount of the CA3 on their handlebars this looks like it will do the trick quite nice! with less clutter than the conventional bracket around the stem

View attachment 1

And mounted on the bike:
Steer Mounted.jpg
 
Printable Setup Summary for CA v3.0 Prelim1 (aka B23Prelim1)

The setting summary for the newer v3.0 Prelim5 release is available here.
The setting summary for the previous v3B22 release is available here.
Unofficial User Guide is available here.
Please see the Grin Tech Site for a detailed explanation of Setup Parameters.

Distinguishes global from preset-specific parameters.
Printable versions for saving settings - tabular format for multiple presets (1UP.PDF, 2UP.PDF, XLS):View attachment CA_V3-0Prelim_ConfigSettings.zip
 
justin_le said:
So what I decided to do here is add one more parameter in the Throttle Output menu, called "Ebrake Out". By default, this is 0V (or 0mS), but you can change it so that when the brakes are squeezed the CA's throttle output signal goes to any other voltage or pulse width.

I tried this update just now and set Ebrake Out the same as the minimum throttle pulse width. Problem solved. Cheers!

Thanks also for adding the "RC" LiPo algorithm...
 
justin_le said:
  • Temperature Signal Filtering: People were commenting on the jitter in the last digit of the temperature reading, so now the temp signal is averaged and filtered just like the volts and amps, in accordance with the "averaging" value selected in the preferences menu.

  • reminds me of how it's done with car's temp gauges. nail them to 100°C and just let them move when something REALLY strange happens. under normal circumstances water temp varies quite a lot, and ppl would drive to the garage complaining all the time. before someone replies that the CA doesn't behave like that. i know that - just wanted to say that this is common practice everywhere.
    i welcome averaging the values. if this value changes one or twice a second it's much easier to read, and still accurate enough to see a trend.
 
justin_le said:
izeman said:
i have another concern: i use regen braking with a directly connected brake switch to the controller brake pads. so i'm not using the brake's connector of the ca, which can imho not be used for regen, but for cutting the throttle only. correct?
if i don't release the throttle and pull the brake, the throttle is cut and the wheel is in generator mode. one could "forget" to release the throttle completely when braking, and as soon as the brake is released, full throttle is applied from 0-100% in 0 seconds.
how can this be avoided?

This is a tricky situation since the CA has no idea that you are doing regen by squeezing the brakes, as opposed to say going fast on a downhill and getting regen currents that way. The best solution right now if you have the ebrake going to the controller is to also splice your brake signal up the CA's ebrake input too. Then it will disable the cruise and cutout the throttle etc. while the basic regen functionality of the ebrake signal going to the controller is unaffected.

The better solution will be to install a mini break-out board on the 6-pin connector that senses when the CA's throttle output goes to 0V (as opposed to the MinOutput value), and then triggers the controller ebrake input from that. I alluded to the fact that we'd be making such a mini 'interface' board last year and we've finally got them just about ready. Then you'll be able to get actual regen from the one CA-DP cable without an additional set of wires from the ebrakes to the controller.

-Justin

thanks! i'd like to try the "better than best solution" ;). do you have a layout / part list available so i can build one and try it out? if it's not public yet please PM me, and i'll be happy to beta test. if this is a no-go, i'll start with splitting the brake wire and feeding it to CA and controller.
 
izeman said:
justin_le said:
  • Temperature Signal Filtering: People were commenting on the jitter in the last digit of the temperature reading, so now the temp signal is averaged and filtered just like the volts and amps, in accordance with the "averaging" value selected in the preferences menu.

  • reminds me of how it's done with car's temp gauges. nail them to 100°C and just let them move when something REALLY strange happens. under normal circumstances water temp varies quite a lot, and ppl would drive to the garage complaining all the time. before someone replies that the CA doesn't behave like that. i know that - just wanted to say that this is common practice everywhere.
    i welcome averaging the values. if this value changes one or twice a second it's much easier to read, and still accurate enough to see a trend.



  • Funny. Ever since I have the CA - temp limiting in place, I only look at the temperature if I have the feeling the bike is less powerful than it should be. Usually, after climbing a big mountain or so, and then I pretty much know what to expect.

    In other words, Justin designed the CA so damn well, that I don't care anymore about "jittering" or "averaging" of my temps..... But it is nice to look at after the ride, anyway.
 
I have installed a Thun Torque sensor today. Generally quite pleased with the results. Few questions though even after a good search through this thread.

Firstly, I noticed that setting the number of poles not only has an effect on the measured cadence but also how smoothly the torque sensor controls. A higher count smooths out the operation but gives an incorrect cadence reading. I am a bit confused why this setting even has an effect on a torque sensor. I thought it would be a fixed number.

Other issue is voltage. I run 18S LiPo (75V hot off the charger.) No good for running a Thun and have dropped down to 12S which is still on the edge. I need a easy solution to use my 18S and Thun Setup. Something that is nice and compact that I can hopefully fit inside the CA.

Any suggestions greatly appreciated.
 

Attachments

  • IMG_2038.jpg
    IMG_2038.jpg
    54.7 KB · Views: 7,674
Try a small 12v dc-dc converter. It does not have to be big, because current draw on the thun is so little.

I'm running 12S with my thun and ca v3. Justin has told me that the thun is ok up to about 54v.

Just updated my ca to the latest FW today. All went well.

Jason.
 
Kepler said:
Firstly, I noticed that setting the number of poles not only has an effect on the measured cadence but also how smoothly the torque sensor controls. A higher count smooths out the operation but gives an incorrect cadence reading. I am a bit confused why this setting even has an effect on a torque sensor. I thought it would be a fixed number.

That is correct. What the CA does is average the torque signal over the previous complete pedal rotation. Or more precisely, it time averages the torque between each PAS sensor pulse, and then does a spacial average of these to cover one full pedal turn based on the #poles setting. That way in theory the averaging is perfectly aliased to your pedal cadence, and you don't get any undulations in the power output. However, there is enough variation between one pedal stroke to the next that I agree it's not as smooth as ideal, and I often end up using the ramp rate settings to keep it steadier still. If you have it set to say 16 poles, but use an 8 pole sensor (like the THUN), then it would be averaging the last two complete pedal strokes and that would help the smoothness a lot. But if say you set it to 12 poles, then your average signal would be much worse than with 8 because you could be alternating between two down strokes and one up stroke, then two up strokes and one down stroke etc.

Torque Sensor Averaging.gif

If you simply time average the torque signal, then there would always be pulsations in power at your cadence frequency.

Other issue is voltage. I run 18S LiPo (75V hot off the charger.) No good for running a Thun and have dropped down to 12S which is still on the edge. I need a easy solution to use my 18S and Thun Setup. Something that is nice and compact that I can hopefully fit inside the CA.

It's quite possible to make a tiny DC-DC that fits in the casing, but most off-the-shelf ones are too tall in their form factor to fit in the box OK. For the simplist and most compact approach that would fit in the casing, one possibility is to use a resistor inline with the V+ signal to drop the voltage going into the CA's power mosfet. With the THUN sensor and throttle plugged in, you would have a total draw of about 32 mA, so if you have a 1K resistor, of at least a 1 or 2 watt rating, then that would drop 32V between your pack and the CA's power input.

Then in order to sense the correct voltage on the CA you'd wire up a pack voltage divider to the Vex input. There are a few circuitboard hacks you could do to decouple the onboard voltage divider from the V+ power input so that you don't even need to hook up a pack voltage sense to Vex, but I'd need to go over the layout a bit to see what would be easiest.

-Justin
 
Hi Justin, I am wondering, How the CA 3.x detect battery SOC fall down, and Do they automatically shut off the controller to prevent the battery reach to the death zone?
 
Will this support the adjustment stem? What I looked this picture seems only fixed stem without adjustment.

Let me know thanks.

justin_le said:
Weehoo, also just got delivery of a new stainless steel mount for the CA that fits around the steer tube of a bike. So for those wanting a more permanent and central mount of the CA3 on their handlebars this looks like it will do the trick quite nice! with less clutter than the conventional bracket around the stem

View attachment 1

And mounted on the bike:
 
justin_le said:
Kepler said:
Firstly, I noticed that setting the number of poles not only has an effect on the measured cadence but also how smoothly the torque sensor controls. A higher count smooths out the operation but gives an incorrect cadence reading. I am a bit confused why this setting even has an effect on a torque sensor. I thought it would be a fixed number.

That is correct. What the CA does is average the torque signal over the previous complete pedal rotation. Or more precisely, it time averages the torque between each PAS sensor pulse, and then does a spacial average of these to cover one full pedal turn based on the #poles setting. That way in theory the averaging is perfectly aliased to your pedal cadence, and you don't get any undulations in the power output. However, there is enough variation between one pedal stroke to the next that I agree it's not as smooth as ideal, and I often end up using the ramp rate settings to keep it steadier still. If you have it set to say 16 poles, but use an 8 pole sensor (like the THUN), then it would be averaging the last two complete pedal strokes and that would help the smoothness a lot. But if say you set it to 12 poles, then your average signal would be much worse than with 8 because you could be alternating between two down strokes and one up stroke, then two up strokes and one down stroke etc.

View attachment 1

If you simply time average the torque signal, then there would always be pulsations in power at your cadence frequency.



Other issue is voltage. I run 18S LiPo (75V hot off the charger.) No good for running a Thun and have dropped down to 12S which is still on the edge. I need a easy solution to use my 18S and Thun Setup. Something that is nice and compact that I can hopefully fit inside the CA.

It's quite possible to make a tiny DC-DC that fits in the casing, but most off-the-shelf ones are too tall in their form factor to fit in the box OK. For the simplist and most compact approach that would fit in the casing, one possibility is to use a resistor inline with the V+ signal to drop the voltage going into the CA's power mosfet. With the THUN sensor and throttle plugged in, you would have a total draw of about 32 mA, so if you have a 1K resistor, of at least a 1 or 2 watt rating, then that would drop 32V between your pack and the CA's power input.

Then in order to sense the correct voltage on the CA you'd wire up a pack voltage divider to the Vex input. There are a few circuitboard hacks you could do to decouple the onboard voltage divider from the V+ power input so that you don't even need to hook up a pack voltage sense to Vex, but I'd need to go over the layout a bit to see what would be easiest.

-Justin

Thanks for that Justin.

So just to be perfectly clear with using a resistor and the Vex input to get around the HV issue, I presume the drawing below is what you mean. Basically I am turning it into a HV setup but using a dropdown resistor rather then a DC-DC converter, correct?
 
Kepler said:
Thanks for that Justin.
So just to be perfectly clear with using a resistor and the Vex input to get around the HV issue, I presume the drawing below is what you mean. Basically I am turning it into a HV setup but using a dropdown resistor rather then a DC-DC converter, correct?

Yes, that is it exactly. If the resistor is going inside the casing, I would try to locate off to the far side of the enclosure just to spread out the location of hot spots in the device and better help with the heat dissipation. I'd use 5K for R2, and 100K for R1, and your calibrated V/V setting will be around 21.

-Justin
 
izeman said:
The better solution will be to install a mini break-out board on the 6-pin connector that senses when the CA's throttle output goes to 0V (as opposed to the MinOutput value), and then triggers the controller ebrake input from that. I alluded to the fact that we'd be making such a mini 'interface' board last year and we've finally got them just about ready.

thanks! i'd like to try the "better than best solution" ;). do you have a layout / part list available so i can build one and try it out? if it's not public yet please PM me, and i'll be happy to beta test. if this is a no-go, i'll start with splitting the brake wire and feeding it to CA and controller.

It's really just a single comparator IC that compares the throttle signal to a 0.5V reference, and if the CA's throttle is less than 0.5V then the output of the comparator gets asserted low, turning on the regen input of the controller. The boards are done with SMT parts that don't have a thru-hole equivalent, so if you want to build one I'd find any readily available single supply comparator available in an 8-DIP package, like the LM393, and breadboard around that.
 
Back
Top