Cycle Analyst V3 preview and first beta release

Get real world experience and user feedback on the electric bicycle products.
Waldo   1 µW

1 µW
Posts: 3
Joined: Dec 07 2011 9:45am

Re: Cycle Analyst V3 preview and first beta release

Post by Waldo » Jun 16 2012 8:40am

AWESOME FEATURE REQUEST:

Separate shunt input that Monitors charging cycles so that cycle analyst always has an accurate measurement of SOC (within 1%) For example, if I simply want to bulk charge with a small charger in a parking garage but I do not know when I will be back to the bike, the cycle analyst will simply subtract the Wh charged from the Wh used, without affecting the Wh/mile figure, etc. displaying Ah remaining versus used I think would be more intuitive. I'm many pages behind, so sorry if I'm being redundant.
If the negative lead of the charger is connected to the load side of the current shunt inside the controller, and the cycle analyst is turned on when charging, then the charging current will be sensed and the Ah display will show correctly the state of charge.

Justin,

Can we get controllers that have been modified with a charger negative lead from the factory?

Thanks loads for making the CA tolerate mis-connections of sensors without damage.
CA-3 is awesome.

Waldo

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 » Jun 16 2012 11:51am

Only problem with doing that is that I would lose my Ah statistics.

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 » Jun 16 2012 1:44pm

Waldo wrote:
hillzofvalp wrote:AWESOME FEATURE REQUEST:
Separate shunt input that Monitors charging cycles so that cycle analyst always has an accurate measurement of SOC (within 1%) For example, if I simply want to bulk charge with a small charger in a parking garage but I do not know when I will be back to the bike, the cycle analyst will simply subtract the Wh charged from the Wh used, without affecting the Wh/mile figure, etc. displaying Ah remaining versus used I think would be more intuitive.
If the negative lead of the charger is connected to the load side of the current shunt inside the controller, and the cycle analyst is turned on when charging, then the charging current will be sensed and the Ah display will show correctly the state of charge.
hillzofvalp wrote:Only problem with doing that is that I would lose my Ah statistics.
From a hardware perspective this seems spot on, Waldo. This appears to be a sensible approach to achieve 95% of the value of the feature request without adding extra CA hardware to monitor a dedicated 'charging shunt'. Loss of the running Wh calculations does not seem too punishing. Simply starting with a CA-SA instead of a CA-DP(S) is a easy way to implement the necessary connections without modifying the controller (for 45-50A or less).
CA-DP-SA_v3.gif
CA-DP-SA_v3.gif (7.79 KiB) Viewed 4340 times
However, this still leaves the nagging question of accommodating the charging efficiency of the battery since not every Ah going in is stored as usable power. Although the CA v3 does know the general battery chemistry, added complications are the pack temperature as well as the possibility (in the general case) of accumulated errors from multiple partial charge/discharge cycles. Inaccuracies due to these factors can lead to incorrectly perceived SOC, although the LVC will still avoid battery damage for balanced packs (i.e. battery safety is not in question - just operator surprise :D). This matter of charging (not charger) efficiency deserves comment by Justin or someone with more specific working knowledge of various cell-level chemistries than I possess :wink:.

Perhaps I am too conservative, but my knee-jerk reaction is that this seems more like a 'known user hack workable with caveats' than a reliable supported product feature yielding clear business benefit...
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 » Jun 16 2012 3:10pm

Well, Kay.

But it could be pretty accurate especially if it's calibrated every time a charger kicks off at say 90% soc, which would probably be every other charge in most cases unless you're a delivery man. The temperature would be fairly constant with a cheap 200-400Wcharger for most packs I would think.

I suppose the cell level voltage curves in the new ca could be fairly accurate.

If my charger is outputting at say 400W (at the output leads), doesn't 398W-400W get applied to charging the battery especially for high c-rate packs being charged around .5-1C? I don't know enough about charging losses either.

User avatar
justin_le   10 MW

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

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jun 18 2012 4:32pm

teklektik wrote:
Tench wrote:Justin, is the std TTL/USB cable for the CA data logger the same as the one that is used for firmware updating of the V3?
I have tried to order one to bring my V3 upto date but when directed from ebikes.ca to PP the postage is not added so i didnt complete the order, or are they on free post :D and i should have gone ahead and completed it?
Or is this something i could quickly knock up myself from a usb lead?

Simon.
Justin may not yet be monitoring this thread, so an email to ebikes.ca will likely get you a faster response to specific questions, but no promises... Here's a best effort answer:

So - the Analogger uses standard cables but the CA programming cable is not something you can easily cobble together and the supplied CA female 3.5mm dongles differ. The USB/RS232 converter cable and dongle can be sourced elsewhere, but supporting ebikes.ca seems appropriate. :)
Hey everyone, I'm back again. It's possible to use any serial device that has a 0-5V TTL or CMOS output voltage to reprogram the CA. So if you have a programmer cable for infineon motor controllers or what have you then that should work fine. The USB->TTL serial cable that we sell is the TTL-232R-5V-AJ part direct from FTDI which is a bit pricey:
http://www.ftdichip.com/Products/Cables ... Serial.htm

So if all you need it this it would make most sense to order it direct, no need or or purpose at all in purchasing from us. If people have found and used other USB-> TTL UART cables with success then feel free to post the supply here as well. We haven't done much digging around yet but presumably there are some cheaper sources that could better serve people.

-Justin
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

Tench   100 kW

100 kW
Posts: 1033
Joined: Jul 13 2010 12:48pm
Location: Derby UK

Re: Cycle Analyst V3 preview and first beta release

Post by Tench » Jun 18 2012 5:26pm

Thanks Justin, i got your email the other day about this and sourced one locally, its on its way to me.

Simon.
Project one http://endless-sphere.com/forums/viewto ... ilit=tench
Project Two http://endless-sphere.com/forums/viewto ... =6&t=37489
The uk's first Stealth Bomber

There is a box inside your head, inside amongst others are the words "Wont fit" stop looking for answers in the box, there are no answers only excuses.

User avatar
justin_le   10 MW

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

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jun 18 2012 5:27pm

Doctorbass wrote:Justin, I tested all the ground on the cycle analyst and found that they are all common, including the ground for the V aux input.

So if someone have a let say 400V pack, a C-A and a DC-DC to supply it with the 12V out from the dc-dc, and connect it with resistor divider to that Aux input with the 400V battery , that mean that the 12V ground and the 400V ground will be linked ? :o so the dc-dc will lost his insolation advantage.
Yes, this is correct.
wich way would you suggest to use this Aux V input and keeping the HV and 12V isolated ?
We looked into having an isolated external VBatt input but it didn't make sense given how rarely this would get used. You could in principle make a small circuit using a linear opto-isloator like the IL300, and feed the now isolated signal from that into the CA's external voltage sensing pad, and then similarly use a scaled down hall device current sensor for the S+ and S- leads. That would provide the CA with both the voltage info and the amperage info while maintaining isolation with the battery ground.
mayube using a little DC-DC just for supplying the C-A board?
Exactly my main suggestion, if you don't want your vehicle's 12V DC-DC to be ground referenced, then you can either use a small isolating DC-DC off the 12V bus, or a nominal 90-240V AC input adapter off the battery bus. Then your 12V vehicle supply will stay isolated.
But in this case, all the other I/O of the C-A will be linked to the HV thru their ground..
Yes. In the world of ebikes and PEV's every signal in the controller is referenced to the battery ground so this makes sense, but in HV systems things are usually done electrically isolated. Right now, you can consider the CA as a low voltage device that is somewhat "hacked" to work with high voltage systems for those who need it, with some downsides like lack of isolation. If it was designed primarily as a high voltage monitor then we would have done things quite a bit differently.

-Justin
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

SamTexas   100 MW

100 MW
Posts: 2714
Joined: Dec 29 2010 5:34am
Location: Houston, Texas

Re: Cycle Analyst V3 preview and first beta release

Post by SamTexas » Jun 18 2012 5:34pm

Is now too early for you to give us a time and price estimate for this V3 CA?

User avatar
justin_le   10 MW

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

50 pcs Pilot Run Update

Post by justin_le » Jun 18 2012 5:42pm

Hey everyone, while I was away there was still a bunch of activity here at the shop and the 50 pcs pilot batch that I alluded to some time ago got completed last week, thanks largely to Michael and Mark. Here's the proof ;-)
Mr Vass with Pilot CA Rework.jpg
Mr Vass with Pilot CA Rework.jpg (28.5 KiB) Viewed 4263 times
V3 CA Pilot Run.jpg
V3 CA Pilot Run.jpg (50.51 KiB) Viewed 4263 times
These have all the auxilliary function wiring complete. We're still going through programming and calibration but expect they should start to ship in a day or two. There will also be a Beta15 version of the code to go with it that fully implements the battery fuel gauge SOC algorithm, which I'll post here as well so people can finally have their little battery glyph display more meaningfully.
Is now too early for you to give us a time and price estimate for this V3 CA?
The pilot (still beta) devices above will be $160 each. We're still scrambling with a few of the parts supplies but seem on schedule to have everything in place for full production in 1st-2nd week of July. We're also expecting our bulk order of THUN torque sensors by early next week.

-Justin
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

SamTexas   100 MW

100 MW
Posts: 2714
Joined: Dec 29 2010 5:34am
Location: Houston, Texas

Re: 50 pcs Pilot Run Update

Post by SamTexas » Jun 18 2012 5:45pm

justin_le wrote:... We're still scrambling with a few of the parts supplies but seem on schedule to have everything in place for full production in 1st-2nd week of July. We're also expecting our bulk order of THUN torque sensors by early next week.
-Justin
Excellent!

User avatar
teklektik   10 GW

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

Re: 50 pcs Pilot Run Update

Post by teklektik » Jun 18 2012 5:47pm

justin_le wrote:Hey everyone, while I was away there was still a bunch of activity here at the shop and the 50 pcs pilot batch that I alluded to some time ago got completed last week, thanks largely to Michael and Mark.
Thanks, Michael and Mark!
Much appreciated!!! :D
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
Doctorbass   100 GW

100 GW
Posts: 7425
Joined: Apr 08 2007 2:24am
Location: Quebec, Canada East
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by Doctorbass » Jun 18 2012 7:43pm

Hey Justin, That great awsome device is not on my zero motorcycle :mrgreen:

I also explaned how to connect it with detailed pictures :wink:

Seriously that's what is missing on a zero !

Link:
http://www.endless-sphere.com/forums/vi ... 10&t=40849


Image

Image



Doc
CURRENT PROJECT: 2WD duo MXUS/Max-E ebike 32kW
http://endless-sphere.com/forums/viewto ... =3&t=65764
-Fastest speed record 117 km/h on flat
-Fastest 1/4 mile@ 114km/h on flat and 16.316 sec
-Succeded to haul a 19200 pounds schoolbus!
113kmh Gianthttp://www.evalbum.com/3406
Mongoosehttp://www.evalbum.com/1947
YOUTUBE---https://m.youtube.com/user/Doctorbasss
http://twitter.com/DocbassMelancon
I speak FRENCH and english

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 » Jun 18 2012 8:43pm

Justin, glad to see you back. I've been thoroughly enjoying my CA3 for the past week or so since I've had the new bike finished- great performance on the temp gauge, the throttle re-scaling, and the current limiting. All very smooth.

Since you mentioned the battery SOC indication, and realizing that the SOC gauge in beta14 is known to be incomplete, I figured I'd share something odd I've noticed, on the off chance that this isn't already a known behavior. As background, I'm running Beta14, using a controller with a 1 mohm internal shunt, and a 16S LiFe battery (Cell_Man's triangle.) I have not yet calibrated Rbatt.

When I first start off the in the morning, battery voltage is high enough to drive the SOC gauge to full and keep it there. But once I've ridden a bit, and thus knocked the battery's voltage down far enough to get the SOC gauge off of full, I can see a very bizarre behavior. Essentially, the indicated SOC is positively tracking the current through the system. As current increases, the SOC gauge goes UP, even though battery voltage tends to decrease during this condition.

I took a short video to demonstrate this, in which I've disconnected the rear brake sensor so I can use the brake to force the system into a high-current condition, thus simulating an actual riding load. It is definitely tracking current rather than throttle, as I can hold the throttle at full and use the brake to modulate the current while both ThrottleIn and ThrottleOut remain constant. It helps if you can hear the audio as well, as listening the the motor while watching the Current and SOC gauges is easier than trying to read my annotations.



Does this seem odd?
The concept of "average" requires that 50% of the population be below it.

Tench   100 kW

100 kW
Posts: 1033
Joined: Jul 13 2010 12:48pm
Location: Derby UK

Re: Cycle Analyst V3 preview and first beta release

Post by Tench » Jun 19 2012 3:48am

I think the Rbatt setting is used by the CA to prevent this from happening, when the CA knows the packs IR it can compensate for the voltage drop under load to maintain the fuel gauge at the correct level.

I asked Justin a question about this, my question is at the bottom of page 21 of this thread and justins answer at the top of page 22.

Simon.
Project one http://endless-sphere.com/forums/viewto ... ilit=tench
Project Two http://endless-sphere.com/forums/viewto ... =6&t=37489
The uk's first Stealth Bomber

There is a box inside your head, inside amongst others are the words "Wont fit" stop looking for answers in the box, there are no answers only excuses.

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 » Jun 19 2012 9:29am

I saw that, along with his note that "If you are running LiFePO4 just ignore the fuel gauge until the Ah accumulation is integrated in the beta software here."

Since I am running a LiFePO4 battery, I understand that it's not up to par yet, this particular behavior just struck me as exceedingly odd. I'll try calibrating Rbatt and see if that makes it behave more logically- based on Justin's post on page 14 (where RBatt = (V1 - V2) / A) it looks like I should configure it as 066 (it's at the default 199 right now)
The concept of "average" requires that 50% of the population be below it.

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 » Jun 19 2012 11:33am

Doctorbass wrote:Hey Justin, That great awsome device is now on my zero motorcycle :mrgreen:
Very slick and polished installation - it looks like OEM equipment... :D.
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 » Jun 19 2012 11:50am

justin_le wrote:
marty wrote: 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 still think simple sliders are very doable on this CA.. They don't have to be super pretty but they could be big enough to be useful. Even the battery indicator as is to me is not something that would give me enough resolution as a casual observer.

It looks like horizontal indicators would be most practical to use and easy to program. Maybe there could be an option to dedicate the top or bottom half of the screen to a parameter option. Even dividing the bottom half into too sliders could be easy to program.

I have not seen your code but obviously requires some rework, so I can maybe see it as a low priority. I would think the code would be redundant enough to make it less taxing

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 » Jun 19 2012 9:19pm

Joe Perez wrote:(...) I'll try calibrating Rbatt and see if that makes it behave more logically- based on Justin's post on page 14 (where RBatt = (V1 - V2) / A) it looks like I should configure it as 066 (it's at the default 199 right now)
Well that's just darned interesting. With Rbatt set to 066, the strange behavior in the SOC indicator went away. I'd really love to know what the algorithm is which is driving that display. (edit: Oh, I get it now. Rbatt is used as a compensation relative to instantaneous current, to compensate for voltage sag under load. That way the gauge doesn't fluctuate as the load causes battery voltage to go up and down. Genius!)

Ah, well. All in all, this CA3 is just absolutely phenomenal.

Something amusing occurred to me over the weekend. When I saw a lot of folks in this thread making impassioned suggestions about table-based (or otherwise non-linear) throttle scaling, I couldn't figure out what the big deal was. Of course, at that time I was riding with an Amped Bikes direct-drive motor (2807) and an anemic 36v bottle battery, so for me, the idea that you'd ever need anything less than 100% throttle all the time seemed unfathomable. (translation: the Amped system is weaksauce.) Now that I've upgraded to a 10T geared MAC and a Cell_Man 52v battery, I suddenly understand what all the fuss is about. It's kind of hard to keep this thing from wheelieing if you accidentally apply more than 0.05% throttle from a stop. :mrgreen:

Actually, now that everything is up and running, I probably need to experiment with current-mode throttle, as opposed to pass-through as I have it now. That alone would probably make things a lot easier. Off to do more reading.


At any rate, Justin, this is a hell of a great product. I seriously cannot express in words how much I like what you've created here.
The concept of "average" requires that 50% of the population be below it.

User avatar
justin_le   10 MW

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

RBatt

Post by justin_le » Jun 19 2012 11:59pm

Joe Perez wrote:I saw that, along with his note that "If you are running LiFePO4 just ignore the fuel gauge until the Ah accumulation is integrated in the beta software here."
Since I am running a LiFePO4 battery, I understand that it's not up to par yet, this particular behavior just struck me as exceedingly odd. I'll try calibrating Rbatt and see if that makes it behave more logically- based on Justin's post on page 14 (where RBatt = (V1 - V2) / A) it looks like I should configure it as 066 (it's at the default 199 right now)
Hi Joe, indeed this behaviour is coming from an incorrect (too high) battery resistance value. When you are drawing current, the CA tries to extrapolate what the actual pack voltage would be with no current before it references the lookup table. So suppose you are drawing 10A, and reading 47V from the pack. If RBatt was set to 200 mOhm, then the CA would assume your actual battery voltage is:
47 +10A*0.2 Ohm = 49V

If your actual RBatt is only say 100mOhm, then the actual open circuit voltage of the pack is more like 48V
47 +10A*0.1 Ohm =48V

If you then increase the current draw to 20A, the voltage on the pack would fall down from 47V to 46V, but the CA would overcompensate even further when extrapolating the open circuit pack voltage, now to:
46 + 20A * 0.2 Ohm = 50V.

So this is why with RBatt too high, you have an effect where drawing more current causes the battery indicator to go up. Once you play around with it you can find a value that causes the graph to neither go up or down with increased load.

This is however somewhat moot as the Beta15 code no longer lets you input the RBatt value. Instead, it computes it in real time, and this allows it to track your changing battery resistance both as it ages and as it varies with temperature and state of charge. So there is now a new screen which lets you see the instantaneous RBatt value that the CA has deduced from watching the recent voltage/current history, and you as a user no longer need to worry about setting this up:
CA3_BattSOC.jpg
CA3_BattSOC.jpg (18.83 KiB) Viewed 7170 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
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 » Jun 20 2012 12:05am

That is super cool. Thanks for including that.

User avatar
justin_le   10 MW

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

Algorithms

Post by justin_le » Jun 20 2012 12:16am

Joe Perez wrote: I'd really love to know what the algorithm is which is driving that display. (edit: Oh, I get it now. Rbatt is used as a compensation relative to instantaneous current, to compensate for voltage sag under load. That way the gauge doesn't fluctuate as the load causes battery voltage to go up and down.


This came in after I had already written but forgot to submit the previous post, but yes spot on. However, the Beta15 algorithm does things on the display quite a bit differently in that it is also looking at your amp-hour history. The look-up table approach gets increasingly inaccurate as you draw more and more current, so in this situation the CA3_B15 weights more heavily towards looking at your change in amp-hours to determine how the SOC should go down, and increasingly ignores the look-up table value.

At the end of the day though, amp-hours can go in and out of the pack without the CA knowing and this in and of itself causes an amp-hour based approach to SOC display to fail. So whenever there is relatively little current draw, then the CA will see where the open circuit pack voltage is at and gradually cause the SOC graph to drift towards that.

It's the kind of thing that was conceptually pretty straightforward to work out, but a bit of a challenge to implement on an 8-bit micro, so that's why it's taken a while to roll this out.

Now that I've upgraded to a 10T geared MAC and a Cell_Man 52v battery, I suddenly understand what all the fuss is about. It's kind of hard to keep this thing from wheelieing if you accidentally apply more than 0.05% throttle from a stop. :mrgreen:


Indeed had to have a similar realization test riding other people's ebikes before appreciating this too ;-). That happened after years of wondering what the fuss was about 3-speed switches.

-Justin
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
justin_le   10 MW

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

CA3 Beta15 Code

Post by justin_le » Jun 20 2012 12:33am

So attached here is the B15 version of the CA3 code. Please note that I've only had a few hours to field test on the bike and haven't run through nearly all usage scenarios, so there may be newly introduced bugs but to a first order it seems OK.

Differences with Beta14 are:

1) No longer a field to input RBatt
2) Battery SOC algorithm now takes into account the pack capacity in Ah, so be sure to input this value in the battery setup.
3) Display Screen # 10 shows Volts, Amps, RBatt, and %SOC
4) Serial data output stream has been modified to include the throttle input and throttle output voltages as well, and gets rid of the instantaneous torque (but still includes average torque). A screen capture of the data stream looks like this:
CA_V3_Output.gif
CA_V3_Output.gif (8.68 KiB) Viewed 7166 times
Attachments
CA3B15b_ES.zip
Newer 15c firmware version available with better SOC tables
(46.79 KiB) Downloaded 84 times
Last edited by justin_le on Jun 27 2012 5:37pm, edited 2 times in total.
Reason: Minor tweak to a looktable in the firmware, now 15b
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: CA3 Beta15 Code

Post by hjns » Jun 20 2012 1:31am

Very nice, very useful. V3 keeps getting better and better, and I love it! Thanks, Justin!
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
johnrobholmes   1.21 GW

1.21 GW
Posts: 3940
Joined: Jul 07 2008 2:19pm
Location: Missouri
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by johnrobholmes » Jun 20 2012 7:27am

What is the time span the torque is averaged over?

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 » Jun 20 2012 9:53am

justin_le wrote:Differences with Beta14 are:
...
4) Serial data output stream has been modified to include the throttle input and throttle output voltages as well,...
...
Thanks, Justin - much appreciated!!! :D
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

Post Reply