Cycle Analyst V3 preview and first beta release

Man are you ever on top of this. The range mode indeed is not in the part of memory reserved for 'calibration' and hence would get overwritten with the default 'low' value, which would result in the RShunt being displayed decimal shifted after the reflash. Thanks for pointing that out!

Again I agree that it's annoying to have to go through and re-input this and all the other customization settings after each flash upgrade, so will do what I can to make it so that future releases can change the code only and leave all the settings memory alone.

-Justin

teklektik said:
It appears that the v3B19_NoCal version does not preserve Cal->Range but rather causes it to be set to Lo. Other Calibration parameters appear to be preserved properly.
 
Hey Justin, I am using the 'Throttle thru' method and occasionally when powering on my controller, I get a split second of full throttle causing the bike's front wheel to lift. Although it happens rarely, it's not ideal.
It probably has something to do with the controller's throttle pin's being joined to let the CA control the throttle.

Is there any way around this?
 
shorza said:
Hey Justin, I am using the 'Throttle thru' method and occasionally when powering on my controller, I get a split second of full throttle causing the bike's front wheel to lift. Although it happens rarely, it's not ideal.
It probably has something to do with the controller's throttle pin's being joined to let the CA control the throttle.

Is there any way around this?

Hey Shroza, can you tell me if this short burst happens:
a) Immediately after power on, before the splash screen even appears
b) While you see the text "Cycle Anlayst..." or
c) Just as the CA switches from the splash screen to the normal display ?

Also, some controllers internally pull the throttle to 5V rather than pulling to ground, so if you could measure the voltage on your throttle signal line when there is no CA or throttle attached to it that would be useful too. If that's the case installing like a 5K resistor between the throttle signal and ground pin would solve things.

-Justin
 
It seems to happen as soon as I either turn the controller on, or when I connect the battery, if the controller's already switched on.

It happens about once a month, so I can't replicate it easily. If i remember correctly, my throttle read just under 5 volts. I will try installing a resister next time i work on it.

Cheers.
 
Is there a way to easily turn off the throttle so I can only use the Thun? I have soldered my throttle to the CA3 so It's not easily disconnected. I guess I can change the minimum input voltage to 5v, but that isn't ideal.

justin_le said:
One thing I'm not sure if we included was adhesive shrink-wrap to cover up the tiny molex connectors between the thun sensor and the cable harness that goes to the CA. Since this bit is exposed to water spray from the front wheel, it will be important to properly seal the connector itself from any water exposure or else the pins will probably corrode away.
Shrink tube was not included, but that isn't a problem because I put the cable inside the frame so it shouldn't be exposed to any water.
View attachment 1

I had a maximum speed of 634kph yesterday according to the CA. Have you thought about implementing a filter that eliminates those kind of spikes?
 
lollandster said:
Is there a way to easily turn off the throttle so I can only use the Thun? I have soldered my throttle to the CA3 so It's not easily disconnected. I guess I can change the minimum input voltage to 5v, but that isn't ideal.


Set the start speed to some nominal figure of 4-5kph / mph ?

That way the throttle will do nothing unless the bike is already moving ?

Jason.
 
Diamondback said:
Set the start speed to some nominal figure of 4-5kph / mph ?

That way the throttle will do nothing unless the bike is already moving ?
I want the throttle to be completely disconnected so it's only the torque sensor that drives the motor.
 
lollandster said:
Diamondback said:
Set the start speed to some nominal figure of 4-5kph / mph ?

That way the throttle will do nothing unless the bike is already moving ?
I want the throttle to be completely disconnected so it's only the torque sensor that drives the motor.

Just curious as to why you need it different to the throttle being in the off position.

You could always solder a switch into the throttle single line, to disconnect it.
 
ashwright said:
Just curious as to why you need it different to the throttle being in the off position.
Partly it's because of legal reasons, to legally use the bike here the throttle can't drive the bike without also pedaling. But the main reason is just to force myself to actually pedal instead of using the throttle, it is very hard not to turn the throttle when it is there and ready to use. I don't want to remove the throttle completely because I'm sure I'll regret it if I do.
ashwright said:
You could always solder a switch into the throttle single line, to disconnect it.
That isn't a dumb idea. If the same switch also gives the correct input on the aux connector to limit the max speed to 25kpm I'll have a legalize button. I think I'll start on that now.
 
lollandster said:
ashwright said:
You could always solder a switch into the throttle single line, to disconnect it.
That isn't a dumb idea. If the same switch also gives the correct input on the aux connector to limit the max speed to 25kpm I'll have a legalize button.
Simply disconnecting the throttle may not be the best plan because of the floating CA throttle input. I might recommend instead that you mimic the CA throttle override concept that Justin describes in the first paragraph of this post. Here you might tie a 5K resistor in-line with your throttle signal and use the switch to bring the CA side of the resistor to Gnd.

Using a DPST switch, the throttle override approach, and discarding R2 in the first LHM switch circuit in a recent post should get you the desired 'Legal/WooHoo!' switch that you wish. :)
 
teklektik said:
Simply disconnecting the throttle may not be the best plan because of the floating CA throttle input. I might recommend instead that you mimic the CA throttle override concept that Justin describes in the first paragraph of this post. Here you might tie a 5K resistor in-line with your throttle signal and use the switch to bring the CA side of the resistor to Gnd.
You are probably correct. But since one of the main features of the CA is to monitor it is natural to think that all the inputs include pull-down resistors to make them optional.
 
lollandster said:
You are probably correct. But since one of the main features of the CA is to monitor it is natural to think that all the inputs include pull-down resistors to make them optional.
With a hall throttle the switched throttle approach will work.

I take your point and the assumption about the pull-down resistor is not unreasonable, however, in this case it turns out not to be true. The issue of the open circuit throttle input voltage being 0.37v instead of zero is mentioned in an earlier post in this thread and called out in the Unofficial Setup Notes (see the legacy throttle hook-up). This makes the switched solution unlikely to be applicable to installations with a resistive throttle (Magura) where ThrI->MinInput will be close to 0.0v. Explicitly pulling ThI to Gnd eliminates the assumption and the throttle type dependency.

In addition, assuming the mechanical switch is the most likely point of (intermittent connection) failure, the override approach ensures an uninterrupted wired throttle connection that will fail to 'throttle enabled' while the switched version fails to 'throttle disabled'.

Together these thoughts led me to the recommendation above.
 
I have been reading this thread since the link was posted on the e-bikes.ca home page what feels like years ago. I contacted Grin about this and did not get an answer I liked so I'm going to post here in hopes of getting a better answer.

I have an application that the customer wants a minimum input wattage from the rider and upon sustaining that wattage will cruise at a set speed. The numbers currently being bandied about are 100W to maintain 20 MPH. I have been putting the numbers through the simulator and this will result in a significant boost to assisted range, to about 100 miles with a 36V20Ah Ping pack in no wind dead flat conditions (riding inside on a large velodrome). Real world numbers would be a lot less, but still for most people this would be a bike they could ride all week to work with maybe one charge a week. Justin gave me a workaround that would require the user to reset the zero point for the Thun while holding a known force on the left pedal and use t*rpm*(constant) to have the required power for turning on the motor and getting the cruise control active. This won't work for 2 reasons:

1) Not knowing precisely how much force is being applied to the left pedal while the zero is being reset.

2) It requires user input for calibration when the user may just want to ride along without putting any power into the pedals at all.

Thus my conundrum. Justin already told me how to set the cruise control to a lower speed by using a throttle on the Aux input so the rider will still get assist when the input power levels are met, just at a lower speed as conditions dictate. (Imagine that, someone might want to ride slower than all out :shock: )

The bike is a 'bent that will be using the 2805 9C and a 20" front wheel, with the 35A controller and the aforementioned Ping pack. Without the assist pieces it weighs in just under 30 pounds ready to fly. I have done a test with the bike running the same gear as the assist model would use and the bike ballasted to 50 pounds (roughly the weight of the bike with all the assist pieces in place) and took it for a 8 mile ride through the neighborhood and too a local grocery store (not the store i usually use, the next store over) and discovered that you REALLY don't want to let the charge run out on this bike even without any cogging resistance from the motor, hence the immediate choice to install the CA and find a PAS controller so that customers will still have decent legs when the battery runs out. Then I saw the CAV3 and our worries were over (we thought). I still think that the CAV3 will be the solution to this problem, just not with the firmware as it exists. Of course if someone has a better idea, I'm all ears. :)
 
Maybe you can help clarify this for me...

Opus the Poet said:
I have an application that the customer wants a minimum input wattage from the rider and upon sustaining that wattage will cruise at a set speed.
...
This won't work for 2 reasons:
1) ...
2) It requires user input for calibration when the user may just want to ride along without putting any power into the pedals at all.
These appear to be conflicting statements unless your application merely requires the rider to develop the minimum wattage once to kick start a free ride from the motor. You go on to say that you are not cruising at a set speed, but a speed that is adjustable with a throttle:

Opus the Poet said:
Justin already told me how to set the cruise control to a lower speed by using a throttle on the Aux input so the rider will still get assist when the input power levels are met, just at a lower speed as conditions dictate.
So, saying this a different way, it seems that you want an ebike with a conventional speed throttle (i.e. throttle sets a desired speed) but that will only apply motor power if the rider pedals with at least some preset minimum effort. The assistance is not proportional - the motor will make up whatever the difference between the rider input and the throttle setting. It also has a 'cheat' mode that disables the mandatory pedaling requirement (so the rider can "ride along without putting any power into the pedals").

Correct?
 
Oh boy... I am finally ready to start interfacing with the V3 CA. Been a long time coming. I finally got off my ass and ran a set of boards. I have had the parts on hand for what seems like a year now. But - boards landed today so no more excuses.

As soon as I have boiler-plate code running for wireless motor temperature monitoring I will post a link here and show how we can use the Arduino to condition that signal and emulate an RTD for the CA V3 input. Folks will also have access to an RTC for time-stamping CA data, uSD for custom storage, hall effect current sensors for non-contact current sensing, RTD's, serial LCD for expanded data display, analog in, analog out, digital in, digital out, opto-isolated PWM out, timers, counters, etc.

In the next few days I will start an interactive build thread + code repository

Super excited to see someone do a project that utilizes the V3 and an Arduino -> freshman project sort of thing -> use our work as a springboard to build something that really blows peoples minds and gets them involved in our movement.

file.php

file.php


You can see the uSD pads on the board - along with the pads for the coin cell for the real time clock. A lot of the other parts are on I2C - like a serial LCD and the temperature sensor.

Ok - Carry on. :mrgreen:

-methods
 
teklektik said:
I take your point and the assumption about the pull-down resistor is not unreasonable, however, in this case it turns out not to be true. The issue of the open circuit throttle input voltage being 0.37v instead of zero is mentioned in an earlier post in this thread and called out in the


Just to clarify, there most definitely IS a pull down resistor on the throttle input line. It is resistor R27 which is 100K pull down to ground. Why the displayed voltage on the CA screen shows somewhere between 0.2-0.3V is related to the the sample and hold time on that channel and 100K being too high of an impedance to effectively pull it to ground within the sampling time window. I'll be able to make it much closer to 0V with a software tweak in the ADC timing. In any case it is no problem to disconnect the throttle, it's not a floating signal that can drift around. The only input that does not have an explicit pull-up or pull-down resistor is the Aux potentiometer input, because that would potentially mess with people's voltage divider calculations.

Regarding your situation Jason, if you go into the setup menu and set the input throttle mode to "disabled", then that should achieve your goal no? The only thing you need to make sure is that one of the PAS modes is enabled first. If you disable the input throttle when there is no PAS mode selected, then it will behave as a legacy style CA where the output signal is high until one of the limits is exceeded. Many other software settings would work too, like setting the Throttle Fault voltage to 0.5V or whatever.

-Justin
 
I'm happy to leave my throttle connected, and just set a start speed of 3-4kmh.

That way the throttle is effectively disabled unless you are moving.
Though 99% of the time, I'll leave the motor control up to the Thun and CA.

Jason.
 
methods said:
As soon as I have boiler-plate code running for wireless motor temperature monitoring I will post a link here and show how we can use the Arduino to condition that signal and emulate an RTD for the CA V3 input.

Hey Methods, excited too to see your wireless motor-temperature monitoring boards come to life! And in case you didn't realize it yet, there's no need to emulate an RTD device as such, just a voltage that is linear with temp will work fine for the CA's temp sensor input.

-Justin
 
justin_le said:
Why the displayed voltage on the CA screen shows somewhere between 0.2-0.3V is related to the sample and hold time on that channel and 100K being too high of an impedance to effectively pull it to ground within the sampling time window. I'll be able to make it much closer to 0V with a software tweak in the ADC timing.
Justin-
Mystery solved - excellent news! Thanks!
BTW - I did not mean to imply that there was no pull-down, simply that the assumed effect of ThI=0v was not true.

In a related vein, the earlier recommendation for setting up legacy throttle relied on the default ThI being slightly positive to trick ThO to a nominal value of ThrO->MaxOutput, that is:

  • Set ThrI->CntrlMode=Disabled
    Set ThrI->MinInput = 0.00v
    Set ThrI->MaxInput = 0.02v
However, I notice that the present definition for ThrI->CntrlMode=Disabled on the Grin site is:
Disabled: User throttle is ignored. CA’s output will default to Max Throttle until one of the limits is exceeded.
So - this seems to mean that the legacy throttle setup no longer requires the particular ThrI->MinInput and ThrI->MaxInput settings - just ThrI->CntrlMode=Disabled will do the trick - correct?
 
Justin, for some reason my 'amps drawn' displays up to 0.25a either side of zero when first starting the bike. It seems to drift over time (or maybe temperature).

What causes this and will it effect my amp hours reading?
 
teklektik said:
justin_le said:
Why the displayed voltage on the CA screen shows somewhere between 0.2-0.3V is related to the sample and hold time on that channel and 100K being too high of an impedance to effectively pull it to ground within the sampling time window. I'll be able to make it much closer to 0V with a software tweak in the ADC timing.
Justin-
Mystery solved - excellent news! Thanks!

And I just confirmed that. With the Beta20 code in the works, the ThI voltage sits at 0.00V whenever the throttle is unplugged. You'll notice with the Beta19 that the small voltage you see with a disconnected throttle scales linearly with the pack voltage, so its about 0.3V on a 60V pack, ~o.2V at 40V etc, since the throttle voltage is being sampled right after the pack voltage.

However, I notice that the present definition for ThrI->CntrlMode=Disabled on the Grin site is:
Disabled: User throttle is ignored. CA’s output will default to Max Throttle until one of the limits is exceeded.
So - this seems to mean that the legacy throttle setup no longer requires the particular ThrI->MinInput and ThrI->MaxInput settings - just ThrI->CntrlMode=Disabled will do the trick - correct?

Yes, that is correct. It's actually what was intended from the get-go. But with all the various inputs and control options it's a bit tricky to get all of their interactions straight sometimes!
 
shorza said:
Justin, for some reason my 'amps drawn' displays up to 0.25a either side of zero when first starting the bike. It seems to drift over time (or maybe temperature).

By first starting the bike, you mean first applying throttle, or first powering it on?

What causes this and will it effect my amp hours reading?

There are a few things that can cause issues with the current offset
1) A controller with the CA-DP wiring done incorrectly where the white or blue sense wires aren't located right on the shunt itself, but are instead placed somewhere else on the circuitboard that is nominally equivalent but not exactly.
2) Any situation where you blue and white sense leads are joined to ground at any point other than right at the shunt resistor itself.
3) A shunt resistor made of constantan or other material with a thermoelectric effect in conjuction with copper. This makes temperature gradients across one side of the shunt and the other produce a tiny voltage with the CA would mistake for a small current.
4) Water on the actual CA circuitboard messing around with the signals
5) A bad/intermittent contact on one of the current sense leads (white or blue wire again)

How do you have your CA connected?
 
1) Not knowing precisely how much force is being applied to the left pedal while the zero is being reset.

The realtime torque sensor voltage and equivalent Nm is shown on the torque sensor setup menu and even on the torque zeroing screen, so it is indeed quite easy to see and adjust the pedal force to the desired value before zeroing it.

2) It requires user input for calibration when the user may just want to ride along without putting any power into the pedals at all.

As Teklectic said, this seems to be at odds with what you are asking. My impression was that you wanted a proportional torque PAS system, but where the the motor power only kicks in above a certain human power threshold. So if you pedal lightly, there is no assist, but then once you are more than say 100 watts, the electric motor start to engage. A system that can ride along without any power into the pedals would just be a throttle control, or a non-toque sensing PAS control, both of which are also quite easy to do.

Of course if someone has a better idea, I'm all ears. :)

I think it would be good to better spell out what you want. I DO find the idea somewhat intriguing of an ebike that tries indirectly to govern the human power input to keep a rider from over exerting. So once you start going over some exertion threshold (like 150W or so), then the motor power would very quickly ramp up and discourage you from pedaling much harder. That in principle is quite doable, and to make it clean instead of a slight hack I would just need to add an offset term to the mA/Nm assist factor.

-Justin
 
justin_le said:
I DO find the idea somewhat intriguing of an ebike that tries indirectly to govern the human power input to keep a rider from over exerting. So once you start going over some exertion threshold (like 150W or so), then the motor power would very quickly ramp up and discourage you from pedaling much harder. That in principle is quite doable, and to make it clean instead of a slight hack I would just need to add an offset term to the mA/Nm assist factor.

-Justin


this is pretty much exactly how i would want my set up. so i can pedal lightly (even at high cadence) and get zero assist from the motor.
but as soon as i start exerting torque on the cranks (say 100w-150W as i start climbing a hill for example) the motor would start to assist, up to a level that can be dialed in by the PAS knob...

if it's a fairly simple code change, i for one would vote for it...

Jason.
 
justin_le said:
... So once you start going over some exertion threshold (like 150W or so), then the motor power would very quickly ramp up ... That in principle is quite doable, and to make it clean instead of a slight hack I would just need to add an offset term to the mA/Nm assist factor.
Also - somewhat in the line of OtP's project - this seems like a valuable 'hyper-miling' feature that would find great appeal for small-battery assist situations to achieve a lighter more 'normal' bike. Light weight coupled with automagic operation would be big draw for many... particularly older pedallers.
 
Back
Top