Cycle Analyst V3 preview and first beta release

justin_le

Administrator
Staff member
Joined
May 28, 2007
Messages
2,299
Location
Vancouver
Here is a link to the now [strike]un[/strike]official user guide and other documents and thread index by Teklektik
http://www.endless-sphere.com/forums/viewtopic.php?p=571345#p571345
and the wiki
http://www.endless-sphere.com/w/index.php/Cycle_Analyst_v3_Setup
and the official CAv3 info page
http://www.ebikes.ca/product-info/grin-products/cycle-analyst-3.html

Here is a key post index graciously compiled by Teklektik to help people find things amongst the nearly 4000 posts on this thread - JLE

******************************** Back to original post that started this thread ************************************
Hey everyone, so I alluded back in the RC-CA thread last year that we'd basically hit the ceiling of what could be fit in that board layout and were working on a new model with more I/O functionality and software space. http://endless-sphere.com/forums/viewtopic.php?f=28&t=29846&start=145

There've been a few kinks to work out and board revisions since then, but we had a good demo built in time for the Taipei bike show earlier this month. Here was our ghetto booth setup were you could turn the crank, look at your human power generation on the CA and watch either the hub motor or the RC motor spin up in response:
Taipei Setup.jpg

The back end of the circuitboard now looks like this, with the top row having all the new input/output headers:
CA V3 Board Details.jpg

Communcation: There is an Rx / Tx and Gnd for hooking up a TTL->USB converter. This can be used for datalogging, plus bootloading new firmware, and configuring setup parameters from a computer rather than by pushing buttons through the setup menu.

Temperature:This input can be either a 10K NTC thermistor, or a linear temperature sensing IC like the LMx35 series. It has an onboard 1K pullup to 5V, so with a 10K thermistor you get good sensitivity in the 80-100 oC temperature range where it matters, and with the IC devices like the LM335 that act like a zener diode you don't need a separate 5V either, just the same 2pins.

Aux Pot Input: This is a general purpose 0-5V input that can be used either with a potentiometer or any number of 2/3/4 position switches with resistor dividers to scale any one of the limit parameters on the fly while biking.

Ebrake Cutoff: Brake inhibit input, has onboard pullup as well so you can use either a mechanical brake switch or a hall effect device. This way you don't need brake signal wires going all the way back to the controller, they can go into the CA and then the CA cuts the throttle signal.

RPM / Dir / Trq: The pedal assist connector was laid out primarily with the THUN torque sensing bottom brackets in mind, but will work fine with regular PAS cadence sensors, as well as the torque sensors we saw from two other companies at the Taipei show (FAG from germany and GreenTrans from taiwan). The 10V bus can power the THUN sensor directly provided you are using a pack that is 48V or less. For higher voltages the CA's regulator would get hot and you'd want to feed the THUN 12V power from a DC-DC. RPM is where the cadence pulses are measured, and the Dir input lets it distinguish between forwards and reverse pedal motion. So this works both with quadrature encoded signals like the THUN, or with regular PAS sensors that have pulses on one signal and a steady fwd/rev on another.

External VPack: Finally, the last input is for a separate battery voltage signal. For people running >100V, this gives the option of wiring up a resistive divider at your battery side for sensing the pack voltage and feeding just this signal to the CA, with the CA itself being powered from a lower 12V bus or similar. This is a much safer approach for higher voltage systems than powering the CA directly at those levels, and it means up to 650V packs could be supported.

One of the main objectives for all of this was so that we can consolidate all of the different ebike/human interface signals into the CA, have the CA act as a customizable brain for how these things should interact, and then provide a single command to the throttle input of any model of motor controller. That way litterally any existing ebike system could be upgraded for torque sensing PAS assist, over-temperature rollback etc. Like this:

 
One of the challenges with so many inputs and data is maintaining a clean interface. In this case, the setup menu is now a 2 layers deep, so at the top level you have this:

Calibration of RShunt, VSense, Offset Current etc:
View attachment 10

Setting up the wheel size, # poles, odometer:
Menu1 Speedo.jpg

Setting upper speed limit, minimum start speed, and PID feedback gains for speed loop
Menu1 SpeedLims.jpg

Setup of max current, max power, over temp current rollback, and associated feedback gains
Menu1 Pwr Lims.jpg

Setup of the input throttle signal range, and the functionality of input throttle:
Menu1 ThrotIn.jpg

Setup the throttle output signal range, can be either voltage signal or RC pulse, and also allows smoothing rate limits on output
Menu1 ThrotOut.jpg

Setup the pedal cadence sensor, #poles, polarity of direction input, threshold RPMs for starting and stopping
Menu1 RPM.jpg

Setup a torque sensor, customizable gain in N-m /V and customizable offset zero
Menu1 Trq.jpg

Select the vehicle control mode options (PAS control, pedal torque control, Throttle control, Aux voltage function)
Menu1 Cntrl.jpg

Input the battery pack chemistry, cell count, low voltage cutoff, internal resistance, and nominal Ah
Menu1 Battery.jpg

Customize the display screens to show / hide different parameters based on what you want to see
Menu1 Display.jpg
 
Fantastic.

nice work Justin!

These new features look handy. Do you have a shipping date?

Can I make a suggestion that on the release versions you have some sort of cable reinforcement, as I just ripped out the speedo cable on my large screen CA.

Can you show what views are available on the screen? Watts, temperature, pedal input etc?
 
Another challenge with so much stuff being measured is to find a way to present it in a simple enough manner on the 16 character x 2 line LCD screen, without the need to scroll through a multitude of pages. This is where that is at right now, which I think nails it pretty well:



Some decimal points were dropped giving room to shift things to the right and free up some room on the left without causing too much clutter. That provided room for a battery fuel gauge graphic, while on the bottom left is a visual display of the input throttle position. Since the CA is now taking the throttle input directly and then feeding it's own signal to the controller, it useful both for troubleshooting and also just to give visual feedback about whats going on in the system to see this slider move up and down as you engage the throttle.

The human power it turns out fluctuates quite a bit from one pedal rotation to the next and is messy to display numerically, so the 2nd character is a bar graph that scales with a full bar being 400W of power. The two sides of the bar move up and down relative to each other at the approximate pedal cadence frequency to make it intuitive that that's your leg power being displayed.
 
Wow that is very nice..
Would it be possible to make the aux into a second thermo?? or possibly series connecting 2 probes and get a read out of the highest one? That is very cool. When do you think it will be available?
 
file.php

Congratulations on that Battery State Of Charge Indicator. I have been dreaming of a battery fuel gauge graphic exactly like shown in picture.

Will the Battery State Of Charge Indicator need any manual button pushing (reset) after battery is charged? Or will it be automatic like the fuel gauge in my car?

One more suggestion. How about a large screen showing graphics only? Battery State Of Charge Indicator, Throttle Position Slider, Human Power Bar Graph, and miles or kilometers per hour, (speed)
Like this:
g2console_black-white_02.jpg

g1_console_02.jpg
 
marty said:
Will the Battery State Of Charge Indicator need any manual button pushing (reset) after battery is charged? Or will it be automatic like the fuel gauge in my car?

Hey Marty, it will be automatic. You can still hit reset to clear the Ah and km data, but the fuel gauge will be unaffected by that.

For a long time I've resisted the frequent request to just show a %remaining indicator for the battery pack, because I know full well that a solution relying just on amp-hours will be fraught with problems, and a solution based just on voltage while OK for SLA and LiPo is of limited use on chemistries like LiFePO4 and NiMh which have long flat sections in their discharge curve. However, with proper accounting both of the open circuit and loaded battery voltage, plus the recent discharge history, and some knowledge about the pack's internal resistance and nominal capacity, it's possible to make the best of both approaches and have a reasonably good state of charge (SOC) estimation.

In this case, in the battery setup menu you can put in the chemistry (currently have LiPo, LiFe, LiMn, NiMh, and SLA modelled),
LiPo.jpg
View attachment 2

Plus the battery series cell count,
Cell Count.jpg

The nominal capacity of the pack in Ah
View attachment 3

And finally the approximate internal resistance of the battery in mOhm
RBatt.jpg

Towards the beginning or end of the discharge, when the pack voltage gives a very good indication whether a battery is mostly charged or mostly flat, then the CA relies almost entirely on this information to determine the state of charge display. However, during the middle of discharge, where the voltage is less of an indicator, then the CA relies more heavily on the accumulated amp hours to control when the bars go down. Once the CA senses that it is hitting the knee of the discharge curve, regardless of what the Ah data indicates, it will quickly move the display to the approriate near empty location if that's where the voltage data says it is at.

I haven't implemented it yet, but what I will soon do is make it so that the Cycle Analyst computes the battery resistance in real time based on how it sees the voltage change with changing currents. That way you'll be able to directly read out the battery's resistance from the CA, which is an an interesting characteristic to watch to understand how your battery is ageing and how it responds to different temperatures.

In principle the capacity of the pack could also be 'learned' this way, so that the only two things that the user needs to put in are the chemistry and cell count.
 
marty said:
One more suggestion. How about a large screen showing graphics only? Battery State Of Charge Indicator, Throttle Position Slider, Human Power Bar Graph, and miles or kilometers per hour, (speed)
Like this:

Unfortunately the CA doesn't use a graphics screen, so it can only show number and letter characters and then a few graphical 'hacks' within a 5x8 character grid which you see in this one here. It doesn't lend itself well to showing predominantly visual indicators. Someday Marty a full graphic display will be in the cards and you will get your long awaited wish, but not yet! gotta grow one step at a time.

What BionX and almost all other consoles do is use a custom segmented LCD screen tooled up that exactly matches the info they want to display. It's very economical in scale, you don't need to do any graphics processing in a CPU, but it's also single function in nature and so doesn't lend itself to the kind of multi-purpose display flexibility that the CA needs.

-Justin
 
I *like* it!

justin_le said:
Setup of max current, max power, over temp current rollback, and associated feedback gains
Will this allow setting Max Power in Watts instead of just Max Current in Amps? Voltage sag and normal discharge can make a current-only spec a bit sub-optimal in 2.23. Having the CA do the math on the fly could keep performance up while resources are being depleted.
 
Amazing improovement Justin!
That's a great surprize :wink:

These new features now make it 100% competitive with all other EV monitoring device!

Electric car guys of 400V+ no longer will have to worrie for that..

Plus the temp sensing WILL be really usefull for some of us 8)

The state of charge indication IS something we will all appreciate!

Did you ever thought about including a programmable BEEP piezo alarm option we could setup for ex low SOC alarm etc?
 
Serious brain cramps, but I'm loving all of this. I'll be looking forward for the new version to come out.
 
Fishmasterdan said:
Wow that is very nice..
Would it be possible to make the aux into a second thermo?? or possibly series connecting 2 probes and get a read out of the highest one?

In principle Aux could be made as a 2nd thermometer though I haven't coded for that. But your other suggestion actually works OK with NTC thermistors. If you get two 20K thermistors and wire them up in parallel, then it behaves like a single 10K thermistor that (due to the high nonlinearity) is mostly weighted to show the higher of the two temps.

You could also have two semiconductor resistors that have a voltage output and link them up to the temp input via a diode, and then just the highest one would show.

I think in most setups:

motor winding temp > controller temp >> battery temp,

so it's usually the motor that hits thermal issues first. Interestingly though, both the controller and the motor have the same primary heating source (I^2R on the phase current), so limiting and regulating one will also limit the other in tandem.

-Justin
 
Wow this CA has a lot of new sensor inputs... which opens up a lot more feedback control possibilities. And I love the little segmented battery and throttle gages. Nice touch and way to go on thinking ahead to improve an already awesome design Justin! :D
 
Great additions! I'll be waiting for the final versions to carry in my store. Until then I will keep getting the regular versions!


All around, what a great product you have Justin. And even better support and development!
 
teklektik said:
Will this allow setting Max Power in Watts instead of just Max Current in Amps?

Like this: ?


(don't you tell me it needs one more digit ;) )

Voltage sag and normal discharge can make a current-only spec a bit sub-optimal in 2.23. Having the CA do the math on the fly could keep performance up while resources are being depleted.

I originally went just with a current limit because I figured most people would be using this feature for the sake of protecting / babying their batteries, and in that case regulating amps makes the most sense for sure. But that was circa 2005 / 2006 when batteries were the main limiting factor in ebike performance. Now batteries can do 40C discharge rates while barely getting warm and it's the motor people are trying to protect, and for that limiting the watts certainly makes the most sense.

-Justin
 
justin_le said:
Like this: ?


(don't you tell me it needs one more digit ;) )

YES!!! its needed... also add another digit to the Amp limit so i goes all the way to 999amps. :twisted: :twisted: :evil:
 
justin_le said:
(don't you tell me it needs one more digit ;) )

Yess too!

It would be also usefull for the moto and electric car!.. this folk is also great number buyer for the C-A :wink:

some TTXGP guys also use it!.. even.. the Killacycle was using it.. but i agree showing 0.3MegaWatts might be rare case :mrgreen:

I can count 7 more free digit on the 2nd line.. leaving enough space for displaying 90 000 000 000Watts (90 Gigawatt) :mrgreen:

Doc
 
justin_le said:
...Like this? ...limiting the watts certainly makes the most sense.
:!: :mrgreen:

There are so many well-considered improvements - it's the re-evaluation and evolution of past designs into a tidy cohesive product instead of a patchwork of odd features that really makes this effort impressive.
 
Doctorbass said:
Did you ever thought about including a programmable BEEP piezo alarm option we could setup for ex low SOC alarm etc?

I think we need to be careful making sound noises. Certainly my tendency is to want to smash electronic devices that beep at me, so it's unlikely that the idea of a piezo buzzer would make it into the design!

However, I think we could do a compromise Stéphane where parts of the display would then flash when a hard limit is hit? so for instance if LVC is reached then the battery indicator blinks, if overtemp is reached then the temperature readout flashes etc. That would also be useful to tell people what is going on when the CA starts to throttle back the power output, and it shouldn't be too difficult to implement.
 
Doctorbass said:
justin_le said:
(don't you tell me it needs one more digit ;) )
I can count 7 more free digit on the 2nd line.. leaving enough space for displaying 90 000 000 000Watts (90 Gigawatt) :mrgreen:
Doc

Ha, you guys are all a little crazy. Good news is that now with the bootloader we can do a custom "DoctorBass" firmware mod that anyone can install which will show all your power stats in gigawatts, your distance in light-years, and your speeds measured in units of c (as in 3x10^8 m/s). The day your ebikes become certified rocketships, the CA will be there for the ride... -J
 
Justin, you are our true God hero etc! :wink:

The idea of making the display to flash is perfect!

The Bootloader personal options would be the cherry on the sunday!

I am already wondering if i will order one or two :mrgreen:

That first one will be on my Zero DS 2011 motorcycle for sure!

The second one.. ( reserved for a Top secret project!) :wink:

Doc
 
Back
Top