Cycle Analyst V3 preview and first beta release

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

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

CA3 Beta15c Code

Post by justin_le » Jun 27 2012 5:53pm

justin_le wrote: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.
The attached Beta15c is the same basic code but with several tweaks made to the battery SOC tables based on riding around with some different batteries and getting more data. The effect of voltage relaxation was having a particularly large effect in the LiFePO4 tables which are very voltage sensitive, so this one weights on the Ah data a more heavily.

-Justin
Attachments
CA3B15c_ES.zip
Beta15c version of the CA3 firmware with updated battery SOC tables.
(46.81 KiB) Downloaded 83 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
justin_le   10 MW

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

Re: Beta 15 oddity in wh/mile computation

Post by justin_le » Jun 27 2012 5:59pm

Joe Perez wrote:Just got back from my first ride on the b15 code. Still working nicely in current-throttle mode, but I do have one new bug to report:

When I got home and reviewed the data from the trip, the main screen told me that I'd ridden 11.4 miles (which is correct) and consumed 4.45 Ah (which is probably correct, based on past experience), however a few screens over it claimed that I'd achieved an efficiency of 13.8 watt-hours per mile. Given that I have a 52v LiFe battery, this is wrong. (Normally, the displayed wh/mile value matches a manual computation [Ah / miles * 51] and produces a value of around 20-23 depending on terrain and rider effort.)
Hey Joe, can you tell me what your CA has on record for the %regen and regen amp-hours? I haven't changed anything at all in the Wh/mi calculations so it's odd this would suddenly be off, but the calculation can get a bit non-intuitive when there is regen Ah in the picture.

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

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jun 27 2012 8:28pm

Joe Perez wrote: Nope. It does this each and every time, regardless of wheel position. The sensor wiring is undamaged, and the behavior is unchanged even if I unplug the sensor at the back of the CA.
Hey Joe, bug noted. It doesn't do this on any of the multitude of CA V3's I've got on the bench, but it implies there is some variable somewhere that isn't being initialized properly and in yours it happens to power on in an initialized state that gives a false speed reading. I am curious if you see the same thing, not just at power on, but also right after pressing and holding the reset button?

-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
MotoMel   100 mW

100 mW
Posts: 41
Joined: May 14 2012 10:46am
Location: South Central Oregon
Contact:

Re: Cycle Analyst V3 preview and first beta release

Post by MotoMel » Jun 27 2012 9:18pm

Is the v3 coming onto the market any time soon? Thx.

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 27 2012 9:25pm

Justin, I have a bit more data on the speedometer issue, but I'll address your question first:
I am curious if you see the same thing, not just at power on, but also right after pressing and holding the reset button?
It never happens after a reset. It always happens after a poweron.


Now, a bit more data:

1: If I am already moving forward at a decent rate of speed (pedaling) when I switch the unit on, I don't see the phenomenon as dramatically on the realtime speedo display (it might only get up to 50-100 MPH) however MaxS still records a peak in excess of 400 MPH.

2: If I switch speedo units to Km instead of Mi, the glitch goes away completely. When I switch back to Mi, it comes right back.

3: I may have been mistaken about this being new in b15. As I was poking around, I remembered that my MaxS reading has never been correct (going back to when I got the unit with, IIRC, b12 or b13 code.) It has always displayed a value in the neighborhood of 400+ MPH. I didn't know what to make of this at the time, but it now makes total sense, at that's around the peak it hits during this power-on glitch. I'd never noticed it before, but I'll bet this has been happening since I first installed the unit. I left my laptop at the office, but I'll try to revert back to b13 or b14 to test this theory.




As for the Wh/mi glitch I noted, I have been keeping a close eye on this, and I have not seen it re-occur since the original instance. I'm willing to write this one off to cosmic rays, or perhaps a sign that I should cut back on the amount of LSD I consume when I ride.
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:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jun 28 2012 1:43pm

Joe Perez wrote: Now, a bit more data:
2: If I switch speedo units to Km instead of Mi, the glitch goes away completely. When I switch back to Mi, it comes right back.
Hey Joe, super valuable info, that's just what I needed to see what's going on and the problem is reproduceable here and will be fixed in the Beta16 code. Turns out in one of the attempts to more completely initialize all the memory on power-on to prevent this exact kind of thing, I was re-initializing to zero a byte that had previously been initialized to a different value.

Thanks for catching this, and no need to change your consumption habits, ;-)

-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
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 28 2012 3:09pm

No problem, glad it helped.

I actually feel kind of bad about being one of "those guys" who still use archaic systems of measurement. Oddly enough, I find myself easily working in °C, kPa, and millimeters when it comes to all things automotive and mechanical, but I've just never made to switch to thinking in Km and Km/H when it comes to distance and velocity.
The concept of "average" requires that 50% of the population be below it.

User avatar
scorpi00n   1 mW

1 mW
Posts: 13
Joined: Mar 30 2012 6:11am
Location: Melbourne. Down-Under

Re: Cycle Analyst V3 preview and first beta release

Post by scorpi00n » Jun 29 2012 3:21am

After destroying my old CA I purchased a CA V3 but seem to have a slight problem.
Ive flashed the CA to v3B15 and done the basic config. When I go to accelerate it feels like its on 5amps or something, its just crawling.
Ive got my RShunt to 0.950 and the rest of my setting exactly the same as in this post
http://endless-sphere.com/forums/viewto ... 05#p599109
And I'm getting really high speed reading soon as I touch the throttle. Something like 100-150km/h.

Ive read through the post in here but haven't seen anyone with the same issue. Have I missed something?

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 29 2012 9:50am

Okay - just to clarify some points (apologies for basic questions - just making sure of the setup :wink: )
  1. scorpi00n wrote:Ive flashed the CA to v3B15 and done the basic config.
  2. Do you have the throttle wired up with the classic Throttle override (i.e. throttle goes to controller, CA DP connector as original or eqivalent) or do you have the throttle wired into the CA?
  3. By 'basic config' do you mean the throttle and other setup steps described here?
    scorpi00n wrote:When I go to accelerate it feels like its on 5amps or something, its just crawling.
  4. Does the Throttle Out (To) voltage appear to properly follow the Throttle In (Ti) voltage on the voltage debug screen (1 screen left of Main)? Normally, Ti will follow the operator throttle between min and max config settings and the scaled To will follow it between the configured min and max output values. To will be reduced by the CA (will not follow Ti) if any of the configured limiting conditions come into play.
    scorpi00n wrote:And I'm getting really high speed reading soon as I touch the throttle. Something like 100-150km/h.
  5. Are you using the wheel pickup or the yellow DP wire for your speedo?
  6. Is Spd -> #Poles set appropriately?
I'm thinking the low power is a secondary symptom of the abnormally high speed reading. If the number of poles is incorrectly set (e.g. '1' poles with DP connection instead of something like '23'), the perceived speed will be too high, which will throw the CA into Speed Limiting and the CA will incorrectly but appropriately reduce To to slow down the 'speeding' bike. This will make the bike crawl along as the CA thinks it is limiting it to 99kph. Just a thought....
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
scorpi00n   1 mW

1 mW
Posts: 13
Joined: Mar 30 2012 6:11am
Location: Melbourne. Down-Under

Re: Cycle Analyst V3 preview and first beta release

Post by scorpi00n » Jun 29 2012 9:02pm

teklektik wrote:Okay - just to clarify some points (apologies for basic questions - just making sure of the setup :wink: )
  1. scorpi00n wrote:Ive flashed the CA to v3B15 and done the basic config.
  2. Do you have the throttle wired up with the classic Throttle override (i.e. throttle goes to controller, CA DP connector as original or eqivalent) or do you have the throttle wired into the CA?
  3. By 'basic config' do you mean the throttle and other setup steps described here?
    scorpi00n wrote:When I go to accelerate it feels like its on 5amps or something, its just crawling.
  4. Does the Throttle Out (To) voltage appear to properly follow the Throttle In (Ti) voltage on the voltage debug screen (1 screen left of Main)? Normally, Ti will follow the operator throttle between min and max config settings and the scaled To will follow it between the configured min and max output values.
    scorpi00n wrote:And I'm getting really high speed reading soon as I touch the throttle. Something like 100-150km/h.
  5. Are you using the wheel pickup or the yellow DP wire for your speedo?
  6. Is Spd -> #Poles set appropriately?
I'm thinking the low power is a secondary symptom of the abnormally high speed reading. If the number of poles is incorrectly set (e.g. '1' poles with DP connection instead of '23'), the perceived speed would be too high, which would throw the CA into Speed Limiting and the CA would incorrectly but appropriately reduce To to slow down the 'speeding' bike. This would make the bike crawl along as the CA thought it was limiting it to 99kph. Just a thought....
Ok to clear things up basically Ive connected the CA to my controller and havent really done much more other than; set wheel size, #poles to 23, Km, RShunt to 0.950 and battery setting to my batteries spec.

Ive taken some photos of screens to show you what it all looks like in my menus;
http://img513.imageshack.us/img513/7717/img0457hp.jpg
http://img836.imageshack.us/img836/8500/img0458lf.jpg
http://img193.imageshack.us/img193/7602/img0459so.jpg
http://img337.imageshack.us/img337/7399/img0460vt.jpg
http://img193.imageshack.us/img193/4043/img0461jn.jpg
http://img23.imageshack.us/img23/3230/img0462vi.jpg
http://img441.imageshack.us/img441/5272/img0463m.jpg
http://img641.imageshack.us/img641/7479/img0464fs.jpg
http://img43.imageshack.us/img43/7127/img0465thq.jpg
http://img233.imageshack.us/img233/3872/img0466ea.jpg
http://img140.imageshack.us/img140/9416/img0467f.jpg
http://img266.imageshack.us/img266/5084/img0468sm.jpg
http://img823.imageshack.us/img823/2862/img0469ul.jpg
http://img232.imageshack.us/img232/8926/img0470ls.jpg
http://img52.imageshack.us/img52/1070/img0471sn.jpg
http://img716.imageshack.us/img716/127/img0472ia.jpg
http://img715.imageshack.us/img715/3431/img0473zx.jpg
http://img694.imageshack.us/img694/4790/img0474d.jpg
http://img94.imageshack.us/img94/301/img0475pr.jpg
http://img6.imageshack.us/img6/7214/img0476it.jpg
Last edited by scorpi00n on Jun 30 2012 11:24pm, edited 1 time in total.

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 30 2012 1:36am

scorpi00n wrote:Ok to clear things up basically Ive connected the CA to my controller and havent really done much more other than; set wheel size, #poles to 23, Km, RShunt to 0.950 and battery setting to my batteries spec.
Since you did not mention the DP yellow wire, the wheel sensor, or any soldering, I'm assuming that you have one of the original beta V3 models and not the newer pilot run with attached cables. The original beta units had the speed input (Sp) wired up to the DP connector.

Your snaps show average and max speeds of 93.7kph and 179kph respectively. This is very curious and certainly fast enough to throw the CA into Speed Limiting at least part of the time (i.e. faster than default setting of SLim->MaxSpeed = 99.9kph).

But also:

Because you have not relocated your throttle connections to the CA, the unit must be operated in classic 'Throttle Override' mode which is not the default. To enable that legacy mode, I believe you will need to disable the dedicated throttle input by setting ThrI->Cntrl Mode=Disabled.

I just gave this a try and things did not work as I expected. With ThI disconnected:
  • If ThrI->Cntrl Mode = Pass-thru , the CA will fix the Throttle Out voltage (To) to a value corresponding to the scaled Throttle In voltage (Ti) of 0.37v (default voltage when disconnected). This will in turn clamp the operator throttle to To plus one diode drop which will likely limit your bike to a low speed. This limiting mechanism is detailed in the CA v2.23 Manual Section 7.1. Your screen snap shows To equal to ThrO->MinOutput or 0.90v so your operator throttle will never be allowed to exceed about 0.9v+0.7v ~= 1.6v.

    (The default Ti of 0.37v when disconnected seems odd - I would have expected it to be pulled down to 0v, but that's another question not directly related to this situation....)
  • If ThrI->Cntrl Mode = Disabled, I expected ThrO->MinOutput and ThrO->MaxOutput to take on the roles of ITermMin and ITermMax in the CA v2.23 (see section 8.11 + 8.12 of the CA v2.23 Manual) -- that is, I expected To to nominally equal ThrO->MaxOutput (3.74v in your case) to allow the operator throttle voltage to the controller to vary without clamping. However, To actually seems to stay pinned at ThrO->MinOutput exactly as in the case of ThrI->Cntrl Mode=Pass-thru. This seems puzzling...
So, the reason for the low speed seems due to a low fixed To clamp voltage and possibly due to sporadic Speed Limiting, but the procedure to properly configure the v3 for legacy Throttle Override mode needs clarification from Justin. I pinged him to take a break from coding B16 and help out with this configuration...

Until this gets cleared up, you can temporarily get your bike running with CA monitoring but w/o CA limiting by either:
  1. configuring ThrO->MinOutput = ThrO->MaxOutput = 4.99v (should work by tricking the CA into never lowering the Throttle Out voltage even when it should be clamping), or
  2. unsoldering the green ThO wire (from the DP connector) on the CA PCB.
Or - you could sidestep this question and move the throttle connections to the CA to get all the new features... :)
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

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 30 2012 3:48pm

lizardboy wrote:Well the new software sure changed things.

Now it cuts out every single time. I have all limiters turned off no speed or power limiting. I power up apply full throttle and it cuts out either right away or in a few seconds. Curiously if I baby it it seems last a bit longer but I get the same total distance up the road when it dies, weird.
Hey Lizardboy, can you tell me if you are setup in miles rather than km? If so, can you switch to km and see if this changes things? I'll need to check but I have a hunch these issues might be related. -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
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 30 2012 5:33pm

teklektik wrote:Until this gets cleared up, you can temporarily get your bike running with CA monitoring but w/o CA limiting by either:
  1. configuring ThrO->MinOutput = ThrO->MaxOutput = 4.99v (should work by tricking the CA into never lowering the Throttle Out voltage even when it should be clamping), or
  2. unsoldering the green ThO wire (from the DP connector) on the CA PCB.
Or - you could sidestep this question and move the throttle connections to the CA to get all the new features... :)
Okay - Justin cleared this up:
In the event of a normally wired v3 bike (throttle wired into the CA) where the operator accidentally set ThrI->CntrlMode=Disabled, the bike would just take off at WOT if ThrI->CntrlMode=Disabled simply forced ThrO to ThrO->MaxOutput. For safety reasons, the proper procedure for legacy operation requires a couple of extra settings to try to ensure this is intentional.
  • To set up v3 for legacy 'Throttle Override' operation:
    1. Set ThrI->CntrlMode=Disabled
      (ThrI->CntrlMode = Pass-thru seems a viable alternative - I'm waiting for an answer on that one)
    2. Set ThrI->MinInput = 0.00v
    3. Set ThrI->MaxInput = 0.02v
With ThI disconnected, the default 0.37v input will exceed ThrI->MaxInput = 0.02v forcing ThrO to ThrO->MaxOutput until circumstances force a limiting condition.

So, scorpi00n, give this a whirl - it should cure the low power issue or at least let us move on to the flukey speed issue...
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
teklektik   10 GW

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

Re: Cycle Analyst V3 preview and first beta release

Post by teklektik » Jun 30 2012 7:34pm

The unofficial basic setup instructions have been expanded to additionally cover setup for legacy mode (Throttle Override) operation.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

User avatar
scorpi00n   1 mW

1 mW
Posts: 13
Joined: Mar 30 2012 6:11am
Location: Melbourne. Down-Under

Re: Cycle Analyst V3 preview and first beta release

Post by scorpi00n » Jun 30 2012 10:58pm

teklektik wrote:
teklektik wrote:Until this gets cleared up, you can temporarily get your bike running with CA monitoring but w/o CA limiting by either:
  1. configuring ThrO->MinOutput = ThrO->MaxOutput = 4.99v (should work by tricking the CA into never lowering the Throttle Out voltage even when it should be clamping), or
  2. unsoldering the green ThO wire (from the DP connector) on the CA PCB.
Or - you could sidestep this question and move the throttle connections to the CA to get all the new features... :)
Okay - Justin cleared this up:
In the event of a normally wired v3 bike (throttle wired into the CA) where the operator accidentally set ThrI->CntrlMode=Disabled, the bike would just take off at WOT if ThrI->CntrlMode=Disabled simply forced ThrO to ThrO->MaxOutput. For safety reasons, the proper procedure for legacy operation requires a couple of extra settings to try to ensure this is intentional.
  • To set up v3 for legacy 'Throttle Override' operation:
    1. Set ThrI->CntrlMode=Disabled
      (ThrI->CntrlMode = Pass-thru seems a viable alternative - I'm waiting for an answer on that one)
    2. Set ThrI->MinInput = 0.00v
    3. Set ThrI->MaxInput = 0.02v
With ThI disconnected, the default 0.37v input will exceed ThrI->MaxInput = 0.02v forcing ThrO to ThrO->MaxOutput until circumstances force a limiting condition.

So, scorpi00n, give this a whirl - it should cure the low power issue or at least let us move on to the flukey speed issue...
Did what you said and its all fine now :D
At least this way it will keep me going until I get around to connecting the throttle to the CA.

Thanks!

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 » Jul 01 2012 9:28am

Excellent news! This was a good line of questions that cleared up the legacy mode configuration.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

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 » Jul 01 2012 10:05am

teklektik wrote:(The default Ti of 0.37v when disconnected seems odd - I would have expected it to be pulled down to 0v, but that's another question not directly related to this situation....)
I'm going to take a wild guess and say that this may be related to hardware rather than software.

When I was tinkering with my CA3 to accomodate an LM35 temperature sensor (as opposed to the officially-sanctioned LM335 or NTC sensors) I found that even after removing the "NTC" pullup resistor, my Temp input tended to float high and was influenced by the throttle. (Higher throttle input = higher Temp indication.)

Apparently there is some crosstalk between the various analog inputs (or at least between the throttle in and the Temp in) owing the multiplexed nature of the A-D converter. Since the LM35 I was using is a current source but cannot sink current, this crosstalk was not masked as it would have been otherwise. In my case, this was solved by placing a ~390 ohm pulldown resistor between the "NTC" pad and ground.

Could it be that in the absence of an actual throttle sensor that the same phenomenon is taking place on the throttle input line? I'll bet you €1 that putting a resistor between the throttle input and ground will make this go away. As a test, it can be done externally at the throttle input connector.
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 » Jul 01 2012 12:28pm

Joe Perez wrote:I'm going to take a wild guess and say that this may be related to hardware rather than software.

When I was tinkering with my CA3 to accommodate an LM35 temperature sensor (as opposed to the officially-sanctioned LM335 or NTC sensors) I found that even after removing the "NTC" pullup resistor, my Temp input tended to float high and was influenced by the throttle.

Apparently there is some crosstalk between the various analog inputs (or at least between the throttle in and the Temp in) owing the multiplexed nature of the A-D converter. ... In my case, this was solved by placing a ~390 ohm pulldown resistor between the "NTC" pad and ground.

Could it be that in the absence of an actual throttle sensor that the same phenomenon is taking place on the throttle input line? I'll bet you €1 that putting a resistor between the throttle input and ground will make this go away.
I remembered your experience and believe this to be hardware-related. I recently had a similar experience while hooking up the Analogger to record my external Vaux limit switches - even the same open-circuit voltage. A pulldown was one effective solution with that issue as well, although I went a different way in the end.

On the other hand, this voltage is only manifest when Thi is disconnected. Although the non-0 value at first just appeared harmless and curious, it actually turns out to play a key role in the settings required for legacy Throttle Override operation. Forcing Thi to zero will break the current configuration solution, requiring implementation of a software alternative. So - assuming there is a good electrical reason for this phenomenon (i.e. it's not just an accidental component side-effect), it seems best to leave things as they are and continue to exploit the default open-circuit voltage as part of the legacy software config.
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

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 » Jul 01 2012 4:11pm

Well, yeah. The best thing, obviously, would be to have the throttle actually connected to the CA3 as it's intended to be. Most (all?) throttles I've seen, be they hall or resistive, seem to be perfectly capable of sinking tiny amount of current on their input, which would make this leakage a non-issue when "used as intended."

Maintaining legacy compatibility like this is always a constraint in any integrated system design.
The concept of "average" requires that 50% of the population be below it.

User avatar
courcheval   10 W

10 W
Posts: 80
Joined: Apr 25 2011 4:54pm

Re: Cycle Analyst V3 preview and first beta release

Post by courcheval » Jul 07 2012 7:29am

Joe Perez wrote:Justin, I have a bit more data on the speedometer issue, but I'll address your question first:


1: If I am already moving forward at a decent rate of speed (pedaling) when I switch the unit on, I don't see the phenomenon as dramatically on the realtime speedo display (it might only get up to 50-100 MPH) however MaxS still records a peak in excess of 400 MPH.

2: If I switch speedo units to Km instead of Mi, the glitch goes away completely. When I switch back to Mi, it comes right back.
On my first trial of Tench s prototype, the Max Speed indicated was 601 Km/h. I have a serious problem since the max speed on highways is 130 km/h!
Tench s prototype Number 2 : http://www.electricbike.com/specialized-super-charged/ In repairs
Stealth Bomber Number 170 -working-
Stealth Fighter Number 099 -Stolen (Chile)-

lizardboy   10 mW

10 mW
Posts: 34
Joined: May 31 2011 6:19pm

Re: Cycle Analyst V3 preview and first beta release

Post by lizardboy » Jul 10 2012 1:00am

Hi Justin;

I'm setup in miles not Kms sorry. Although I have switched back and forth before

I had a unrelated problem recently where the bike cut out and would only run the motor for a quick jolt. I checked the output signal in the real time menu and it was working perfectly. It seemed exactly like there was a problem with the hall sensor wiring so I checked everything and found nothing wrong. I'd been wanting to shorten the motor wiring for a while so I did. I also changed the setting for the voltage that the CA shuts down. It had been 10 volts and I set it to 26 volts. I don't seem to have the problem now as bad. if I stick to only using the keyswitch to turn all the power off I'd say it working 100%
the odd time that I've tried the throttle button, the system it seems to work after but is a bit jerky in current throttle and will cut out once in a while but can be reactivated by twisting the throttle. Cycling the main power seems to eliminate it. I've still got all the limiting turned off.

Perhaps because my throttle is powered by the controller and not by the CA there is a power sequencing issue introduced. Not sure but currently it works pretty well.

User avatar
justin_le   10 MW

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

Beta16 Firmware

Post by justin_le » Jul 11 2012 2:36am

Hey guys, sorry for the long lapse since last update, had a lot of other engineering projects on the burner needing attention.

Attached is a Beta16 version of the code. EDIT, Firmware had corrupted Zero Amps routine, please download more recent file
Some of the minor things changed since Beta15:

* Erroneously high max speed glitches fixed. Both the problem with with it booting up in ~400mph when in the miles, and an issue that could cause high MaxS if wheel was spinning while the CA was being powered on.
* Increased the window for showing low speeds, so for a standard 26" wheel it can now work down to ~3mph OK
* Modified the display for the "Set Temperature" window so it shows in realtime not just the voltage but also the calculated temperature
* Leading zeros are eliminated for items in the setup menu. I'm not 100% sure about this, the leading zeros always bugged me a bit, but then toggling digits into a 'blank' space has some oddness too.
* Made the state of charge algorithm better detect when it thinks that system power is being shut off so it doesn't go towards 0% SOC as power unplugged.

Plus two more significant updates:

#1) New Display for showing the diagnostics which should help with some system debugging. The top line shows the reatime input and output throttle voltages. The bottom left has a set of characters showing which if any limits are currently active. Each of the overcurrent current, power limit, max speed, low voltage, and threshold temperature, are represent by their respective letters, and go from lower to upper case when limits are reached.
CA Limit Flags.jpg
CA Limit Flags.jpg (62.26 KiB) Viewed 5600 times
#2) Addition of two battery presets. At the start of the battery setup menu, you can choose if you are currently dealing with battery A or battery B. The CA then keeps a separate set of settings for each battery, so the chemistry, cell count, nominal amp-hours, total cycles, low voltage cutoff, and total amp-hours are all specific to pack A or pack B. This will naturally be appreciated by people who run a couple different batteries with their ebike, and is also something of a precursor to having a similar set of "mode presets". At the moment you can only change between batteries in the setup menu, but it's in the works to do it via a 2-button sequence as a shortcut.
Battery A or B.jpg
Battery A or B.jpg (18.56 KiB) Viewed 5600 times
-Justin
Last edited by justin_le on Aug 11 2012 4:32pm, edited 1 time in total.
Reason: Corrupted firmware file deleted
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:

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jul 11 2012 2:43am

MotoMel wrote:Is the v3 coming onto the market any time soon? Thx.
I've been holding off saying anything to this because it's always a jinx to publicly or even privately post a timeline. But, it is looking like everything is properly in place for the first production units to be finished and available by the end of this month. In the meantime, we still have a couple dozen from the Pilot batch which will now be programmed with the Beta16 code and made available again for beta testers. More details on that tomorrow.

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

Re: Cycle Analyst V3 preview and first beta release

Post by justin_le » Jul 11 2012 3:05am

lizardboy wrote:Hi Justin;

I'm setup in miles not Kms sorry. Although I have switched back and forth before

I had a unrelated problem recently where the bike cut out and would only run the motor for a quick jolt. I checked the output signal in the real time menu and it was working perfectly. It seemed exactly like there was a problem with the hall sensor wiring so I checked everything and found nothing wrong.
I would check that the output of the CA isn't hitting the throttle input fault voltage of your controller. Set the CA's throttle output to go all the way to 5V. Then slowly ramp the throttle up until the controller shuts down from throttle overvoltage fault, note where it happens and set the max throttle output of the CA at least 0.25V less than this. Most of the infineon style controllers have their throttle powered from about 4.3V instead of 5V, so the throttle input range is 0.8-3.6V instead of the more common 0.9-4.1V, and we've seem some go into a fault mode at 3.7V.
the odd time that I've tried the throttle button, the system it seems to work after but is a bit jerky in current throttle and will cut out once in a while but can be reactivated by twisting the throttle. Cycling the main power seems to eliminate it. I've still got all the limiting turned off.
Let me know if you still have this occurrance with the B16 firmware. And if so, hopefully the diagnostic screen that shows which limits are kicking in will be able to shed some light!


-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
teklektik   10 GW

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

Re: Beta16 Firmware

Post by teklektik » Jul 11 2012 3:23am

justin_le wrote:#1) New Display for showing the diagnostics which should help with some system debugging. The top line shows the reatime input and output throttle voltages. The bottom left has a set of characters showing which if any limits are currently active. Each of the overcurrent current, power limit, max speed, low voltage, and threshold temperature, are represent by their respective letters, and go from lower to upper case when limits are reached.
This is huge! Very slick and compact view into the inner workings... :D
Visit Grin Technologies at www.ebikes.ca
Build Thread: 2WD Yuba Mundo V4

Post Reply