Cycle Analyst Manual
Cycle Analyst Manual
Cycle Analyst Manual
User Manual
Table of Contents
1.
Basic Usage . . . . . . . . . . . . . . . . . . . . . . . . 3
2.
Device Summary . . . . . . . . . . . . . . . . . . . . 4
3.
Installation . . . . . . . . . . . . . . . . . . . . . . . . . 5
4.
Display Information . . . . . . . . . . . . . . . . . . 7
5.
6.
Setup Menu . . . . . . . . . . . . . . . . . . . . . . . . 10
7.
8.
9.
1.
Basic Usage
The Cycle Analyst will turn on automatically when more than 10V
appears across the circuit, and will turn off when this voltage is
removed. The default screen shows five pieces of information that are
most relevant to the rider. This includes three instantaneous
quantities: the voltage of the battery pack, the power output in watts,
and the speed of the vehicle; as well as two accumulated quantities:
trip distance and net amp-hours (Ah) from the battery.
Toggles Between
Ah and Distance
Press Buttons
to Change Display
A quick left or right press of the button will scroll through other display
screens of interest, while holding the right button will reset trip
statistics. The second display shows just the electrical information of
the battery pack, including the current in amps.
1.1
As a Fuel Gauge
Amp-hours (Ah) are the 'fuel' equivalent of a battery pack, but rather
than behaving like a fuel gauge and estimating how much fuel is left,
the Cycle Analyst instead tells you exactly how much you have used,
starting from 0 and counting upwards. For example, if you have an 8
Ah battery pack, and the Cycle Analyst shows 6.1 amp-hours
consumed, you would know there are just under 2 Ah remaining in the
battery. This will become quite intuitive after a few rides, and you will
be able to accurately gauge when the pack will run flat.
1.2
Resetting
After you have recharged the battery pack, you should reset the trip
statistics (Ah, Distance, and Time) to clear them all to zero. This is
done by pressing and holding the right button for 1 second, until the
message Reset shows up across the display.
1.3
Saving
The Cycle Analyst will automatically save all the statistics when power
from the battery pack is cut out. This allows you to turn off the vehicle at
any time and turn it on later without losing data.
2.
Device Summary
Like most electric monitoring devices, the Cycle Analyst measures the
battery current in amps by amplifying the small voltage produced
when current is made to flow across a shunt resistor.
Battery
Motor
Controller
Shunt Resistor
V+
Current Flow
Shunt +
Shunt -
Signals for
Cycle Analyst
This shunt resistor must be wired in series with the negative lead of the
battery pack. The power to run the Cycle Analyst then comes from the
connection to the positive lead of the battery.
The Stand Alone Cycle Analyst (CA-SA) includes a molded shunt
capable of 45 amps of continuous current (100 amps peak) while the
Direct Plug-in models (CA-DP or -DPS) requires access to the shunt
resistor inside your motor controller. The High Current model (CA-HC)
is supplied with terminals to connect to a larger user-supplied shunt.
60 Wire Typical
Display Box
Molded Shunt
for CA-SA
Ring Terminals
for CA-HC
Speedometer Pickup
(Not in CA-DP)
Connector
for CA-DP(S)
The Cycle Analyst picks up the vehicle speed information using either
a spoke magnet, or in the case of the CA-DP device, through the hall
sensor signals from a brushless motor controller.
3.
Installation
The Cycle Analyst display box comes with a mounting bracket for
installation on the handlebar of your bicycle. This bracket can rotate in
two axis to adjust the display position. Use rubber shims as required
around the tube if the clamp diameter is too large for your bar.
Rotate to Adjust
Handlebar
Cable Ties
Clearance
Spoke Magnet
In the case of the CA-SA, CA-DPS, and CA-HC models, there is also a
speedometer pickup cable and spoke magnet. The pickup attaches to
the fork with two cable ties, and must be mounted to pass within 2mm
of the magnet for the speed readings to register. For systems like
scooters or motorcycles that dont have spoked rims, a standard
magnet can be attached with epoxy to a suitable location on the wheel.
5
3.1
With the Direct Plug models, simply plug the 6-pin connector of the CA
into the matching 6-pin connector on the motor controller. Because
there are large voltages present through this connector, it is a good
idea to protect the pins with dielectric grease, particularly if it will be
exposed to wet conditions.
To Cycle Analyst
Motor
Controller
3.2
With the Stand Alone version, wire the molded shunt in between your
battery and the motor controller. This is most conveniently done by
attaching connectors on the shunt leads which match your battery
connectors. If you have a switch in the system, it is best to wire the
shunt after the switch so that the Cycle Analyst powers down.
CNTRLR
To Motor
Controller
- BATT +
(Fuse)
+
On/Off
Switch
Battery
Connectors
To Cycle Analyst
3.3
The High Current model attaches to a 3 party shunt resistor and the
positive battery lead. The shunt must be connected to the ground side
of the battery; connection of the shunt to V+ can damage the circuitry:
(Fuse)
Battery
+
Red to V+
On/Off
Switch
Motor
Controller
White to +Shunt
To Cycle Analyst
Blue and Black
to -Shunt
4.
Display Information
4.1
Watt-hrs: This is a measure of the total energy that has been pulled
out of the battery pack. One watt-hour is 1/1000th of a kWh and
slightly less than one food calorie. To a first approximation, the watthours available from a battery should be equal to the voltage of the
pack multiplied by its amp-hours, but it will typically be less than this
because of voltage droop caused by large current draw. Notice that
only the positive watt-hours pulled from the pack are recorded.
During regenerative braking when the watts are negative, the watthours value does not decrease.
Wh/km or Wh/mi: The watt-hours used per unit of distance travelled
is a measure of the average energy efficiency of your vehicle. With
this figure, you can readily quantify how different riding styles impact
your range and predict with high accuracy the expected travel
distance with any particular battery pack.
The Wh/km or Wh/mi figure is calculated taking into account current
that may have flowed back into the battery pack from regenerative
braking. The actual formula used is:
Wh
Dist
1
Wh FwdAh - RegenAh Dist
FwdAh
4.2
explicit regen braking can still produce negative current when they are
driven at high speeds. As well, vehicles with a freewheel in the drive
could regenerate for brief periods from the energy stored in the
motors inertia. The formula used for computing this percentage is:
%Regen
RegenAh
= FwdAh - RegenAh
X 100
Fwd Ah and Regen Ah : The actual forward amp hours and regen
(negative) amps hours to the nearest 0.0001 Ah alternate on the right
side of the screen. The net amp-hours shown on the main display is
the difference between these two.
4.3
4.4
Smax and Savg: The maximum and average speed of the vehicle in
the programmed units of km/hr or mi/hr.
0h00m00s: This is the trip time in hours, minutes, and seconds. It
counts only the time that the vehicle is in motion, and stops
incrementing once the speed falls to zero.
4.4
The final display screen provides the lifetime information of the battery
pack. These figures are especially useful in computing the lifecycle
costs of the vehicle and comparing the economics of different battery
chemistries. This display is not shown when the vehicle is in motion.
8
Cycl: The cycles value increments when the meter is reset. Provided
that the meter is reset each time the battery is charged then this will
indicate the number of charge and discharge cycles on the pack. In
order to prevent false cycle counts from cases where frequent
resetting is performed, the value is only incremented if more than 1.6
amp-hours was drawn at the time of the reset.
TotAh: The total battery amp-hours is a running sum of battery use
over its life to the nearest 1Ah.
TotMi or TotKm: This is the odometer function, showing the total
distance that has been travelled on the battery pack.
5.
In addition to a regular reset to clear the trip distance, time, and amphour data (see Section 1.2), there are two other reset possibilities.
5.1
Peak Reset
5.2
Full Reset
When it is time to switch battery packs, then the battery cycle count,
lifetime amp-hours, and total distance can be zeroed by performing a
full reset on the system. This is accomplished by continuing to hold the
button for 6 seconds after "RESET" is displayed. The message "FULL
RESET" will appear to indicate that all stored data has been cleared
from memory. Notice that a Full Reset does not restore any of the gain
or calibration values that may have been changed in the setup menu.
The default values for these are shown in Section 8.
6.
Setup Menu
There are many setup options that can be accessed at any time by
pressing and holding down the left button. Alternately, if only a single
button interface is desired, then holding the right button while power is
applied to the device will also enter the setup menu.
Hold Left
Button for
2 Seconds
or
Hold Right
Button while
Turning On
6.1
6.2
After units are input, you will be presented with 'Set Wheel' to input the
circumference of the tire. To change this to your actual wheel size,
hold the right button until _OK appears in the bottom right hand corner.
Then the first digit will flash, and you can cycle it through 0-9 with the
left and right buttons. When the correct value appears, hold down the
right button to save it and move on to the next digit.
Button
Increments
Selected
Digit
Hold Button
for _OK to
Save and go
to Next Digit
10
Circumference
Tire Size
Circumference
16 x 1.50
16 x 1 3/8
20 x 1.75
20 x 1-3/8
24 x 1-1/8
24 x 1-1/4
24 x 1.75
24 x 2.00
24 x 2.125
1185
1282
1515
1615
1795
1905
1890
1925
1965
26 x 1.25
26 x 1-1/8
26 x 1-3/8
26 x 1-1/2
26 x 1.50
700c x 23
700c x 28
700c x 32
700c x 38
1953
1970
2068
2100
2010
2097
2136
2155
2180
The next three setup items only matter to Cycle Analysts that have
been wired with the throttle over-ride signal connected to the motor
controller. The Direct Plug-in models already have this appropriately
connected, but the Stand Alone and High Current version require
additional wiring for these settings to have any effect.
6.3
Speed Limit
Set the maximum speed beyond which the motor controller will cease
to provide useful output power. The Cycle Analyst will vary the throttle
signal such that the vehicle will continue to cruise at this set point
speed.
6.4
Volts Limit
Program the low voltage rollback point for your battery pack. The
Cycle Analyst will reduce power drawn from the controller in order to
keep the battery voltage from dropping below this limit.
6.5
Max Amps
Set the upper current limit. If the Cycle Analyst senses current above
this value, it will scale down the throttle appropriately to reduce the
amperage draw.
11
6.6
Main Display
Finally, the last setup option allows the user to select whether the
primary display screen shows watts or amps in the bottom left corner,
nd
depending on the user preference. The 2 display screen will always
show both quantities.
Select
Watts
or
Amps
7.
A speed limit can help make any electric bicycle abide by the legal
speed caps that exist in most jurisdictions while not affecting
performance below that speed. It can also be useful for extending the
range or for taming a setup that is otherwise too fast for comfort,
without sacrificing hill climbing torque.
The voltage limit is used primarily to prevent the battery pack from
being over discharged which can be damaging to the cells. Typically,
you would set it between 29 to 31V for a 36V pack, and between 39 to
41V for a 48V pack.
7.1
To understand how the limiting features work, just imagine how you
would operate the throttle manually. If you are going over a desired
speed limit, you would back off the throttle. If the vehicle then reached
a hill and started to slow down from your target speed, you would
further engage the throttle, thus continuously adjusting the throttle
position to keep at your desired velocity.
12
The Cycle Analyst behaves similarly. When it senses that any one of
the limiting quantities has been exceeded, then the throttle over-ride
signal starts to decrease from its default resting value (usually
between 4 to 5V, determined by ITermMax). A simple circuit is required
so that the controller only sees the lower value of the throttle signal or
the Cycle Analyst signal. This is generally achieved with a diode as
follows:
Diode
5V
Throttle
Resistor
Throttle Over-ride
to Cycle Analyst
Throt Signal
Throttle Signal
inside Controller
2 - 10 k
There are various setup options which control the speed at which the
Cycle Analyst responds to these signals. If the settings are too fast,
then the control can be twitchy or oscillate around the desired value,
while gain settings that are too low will cause a long lag time before the
limiting kicks in.
7.2
PI Controller
Similar values are calculated with the current limit, and low voltage
limit, and the smallest of the three over-ride terms is output as a
voltage. If this output is less than the users throttle voltage, then it is
the Cycle Analyst which is ultimately controlling the vehicle.
7.3
The ability of the Cycle Analyst to limit the speed, current, or low
voltage in a fast yet smooth manner depends on setting the
appropriate Gain terms for the feedback loop. The default values work
well for ebike setups in the 300-600 watt power range. For more
powerful systems, they will usually lead to the vehicle oscillating
around the programmed set point rather than holding steady. In this
case, it is necessary to tone down the appropriate feedback gains in
the advanced setup menu.
13
8.
8.1
Range Mode
There are two mode settings that are available to accommodate the
wide scope of electric vehicles. The high range mode should be used
with shunts that are under 1mOhm, such as in electric motorcycles
and small electric cars that draw hundreds of amps. In this mode, the
Cycle Analyst will display current to the nearest 0.1 A and will show
power in kW. For shunts that are over 1 mOhm but less than 10 mOhm,
the LowRange mode must be selected. This will increase the
resolution to 0.01 A.
8.2
Averaging
8.3
Set Rshunt
14
8.4
Zero Amps
Over time and with temperature fluctuations, it is possible for the zero
point to drift, such that even when no current is flowing through the
shunt a small number (like 0.03A) is displayed. This can be reset to
zero by holding down the button after the 'zero amps' screen until the
_OK flashes on the bottom right. Note though that the wire shunts
used in motor controllers are prone to generating small thermoelectric
voltages for a short while after being used. This produces the
appearance of a lingering current that slowly decays back to zero, and
it should not be confused for a current offset in the Cycle Analyst.
8.5
Volts Sense
Changing this value will change the scaling of the battery voltage
displayed on the screen. This value can be modified either for
calibration or to display a voltage that is proportionally higher or lower
than the voltage powering the Cycle Analyst. The calibrated value is
close to 31.0, while 350V modified boards will be closer to 70 V/V.
8.6
Set # Poles
For Direct Plug-in units, this should be set to the number of hall effect
transitions per rotation of the wheel. Crystalyte 400 series hubs have
8, the 5300 series hubs have 12, and the Nine Continent 205 series
motors have 23 poles. For units that use a speedometer sensor and
spoke magnet, #poles should be set to 1, unless you have multiple
magnets on the wheel. The #poles setting can range from 1-99.
8.7
PSGain
Default = 0.08
This is the Proportional Speed Gain for the over-ride output. It can
decrease the response time and reduce overshooting the set point
speed, but at the risk of causing rapid vibrations if it is too high. The
range can vary from 0 to 0.99 V/kph or V/mph.
8.8
IntSGain
Default = 200
This value determines how rapidly the over-ride output will ramp down
when the speed of the vehicle exceeds the limit speed. Increasing this
value will speed up the response time for the speed control, but at the
risk of causing oscillations. Too low of a value will allow considerable
overshoot of the speed limit. The gain value can range from 0 to 999,
and the scaling is currently arbitrary.
15
8.9
IntAGain
Default = 300
This value determines how rapidly the over-ride output will ramp down
when the current from the battery pack exceeds the programmed
current limit. Too low of a value will result in considerable overshooting
of the set point current, while too large of a gain will cause the
controller to oscillate above and below the limit. The range of
allowable values is from 0 to 999.
8.10
IntVGain
Default = 800
This value determines how rapidly the over-ride output signal will
scale down when the pack voltage falls below the set low voltage
cutout. The range of allowable values is from 0 to 999, and the scaling
is arbitrary.
8.11
ITermMax
Default = 3.79V
This puts an upper limit on how high the throttle over-ride will drift
upwards when none of the limit values are being exceeded. Ideally this
value is set to the voltage that is considered full throttle by the
controller. For hall effect throttles, full power occurs at about 4V, and
limiting the ITerm to this value will speed up the response time of the
limiting features. Allowable values are from 0 to 4.99V.
8.12
ITermMin
Default = 0.0V
This value imposes a lower bound on how low the throttle over-ride
can drift downwards when one of the limiting values is being
exceeded. By preventing the over-ride signal from going all the way to
0V, you can decrease the recovery time for the signal to go back
upwards. Range is from 0 to 4.99V, and must be less than ItermMax.
8.13
Max Throttle
Default = 4.99V
This value puts a maximum cap on the throttle output signal. It can be
used to simulate a lower speed motor by simply clamping the throttle
signal to a value between 0 to 5V. Be aware that the majority of hall
effect throttles only operate from 1V to 4V, and so the desired setting to
reduce the speed would fall in this range (less the diode voltage drop).
16
8.14
Set Ratio
Default = 0.100
This is the amplification ratio between the high gain and low gain
current amplifiers on the circuit board. It is usually around 0.10, is
factory calibrated, and should not be changed.
8.15
Serial Output
Default = 1Hz
8.16
The next three screens enable you to preload or edit your life cycle
usage statistics: the total odometer distance, the total amp-hours you
have taken from the pack, and the total number of discharge and
charge cycles on the battery.
8.17
Default = OFF
This allows you to set the function of the auxiliary input voltage line
(Pad Vi) on the Cycle Analyst circuit board. You can choose whether
this line is ignored (default) or if it is used for on-the-fly regulation of
either the speed limit or the current limit via a variable voltage source.
8.18
Aux Threshold
Default = 0.99V
8.19
Vshutdown
Default = 10V
This setting controls the voltage point at which the CA saves all data
and powers down. If the value is too low, data may not save correctly. It
is possible to operate down to a 7V shutdown if the backlighting LED is
bypassed with a short.
17
9.
There are several advanced features on the Cycle Analyst, but making
use of these requires soldering to the circuit board. Incorrect wiring
can easily damage the unit and it is only recommended for those who
are familiar and comfortable with electronics.
9.1
The pad labeled Tx contains a serial data stream with the current
stats of the vehicle. The format is tab-deliminated ASCII text at a 9600
baud rate. After power-up, the CA outputs a header line, and then at a
rate of once a second or 5 times a second (see section 8.15) it
transmits the amp-hours, voltage, amperage, speed, and distance as
shown here:
Ah
3.296
3.299
3.302
3.306
3.308
3.307
:
V
47.62
47.49
47.43
47.85
49.36
49.55
:
A
10.04
13.22
13.45
6.02
-1.43
-3.69
:
S
15.32
16.41
17.30
17.52
17.17
16.05
:
D3
8.9132
8.9175
8.9220
8.9268
8.9317
8.9365
:
V+ G G Tx Vi 5V*
16
2
C1+ Vcc Vs+
3 C14
Vs- 6
C2+
5 C2- MAX232
11
T1out
T1in
14
2
5
15
18
Serial port on PC
9.2
(CA PCB)
V+ G G Tx Vi 5V*
R1
5K Potentiometer
9.3
Th Signal from CA
Motor
Controller
V+ G G Tx Vi 5V*
(Optional 5V
Throttle
Throttle Power)
Gnd
9.4
Firmware Programming
The set of 5 header pads on the bottom right of the PCB is used for
programming the microchip. The pinout is the same as recommended
by Microchips In-Circuit Serial Programming (ICSP) Guide and
is compatible with most in-circuit serial programmers. We usually
recommend the Microchip PICkit2, but many other programming
devices will work as well. The firmware can be flashed either with the
Cycle Analyst powered up, or from the 5V supply of the programming
device.
MCLR
5V
Gnd
Data
Clock
10.
Programming
Header
20
11.
Circuitboard Connections
Standard Connections
Precision Op-Amp
PIC16F690 Microchip
R-R Op-Amp
Advanced Connections
Standard Connections:
B1 = Primary button input
G = Ground
B2 = Secondary (back) button input
Sp = Speedometer pulse input. Can be either magnetic reed
switch to Gnd, or a 0-5V / 0-12V hall signal from the controller
G = Ground (black wire)
S- = Negative side of current sense Shunt Resistor. Must be within
400 mV of Gnd (blue wire)
S+ = Positive side of Shunt Resistor (white wire)
ThO = Throttle Over-ride output, same as Th signal but already
connected through a diode, to pull down users throttle
V+ = Positive lead to battery pack, can be shared with other devices
requiring battery power that draw less than 500mA (red wire)
Advanced Connections:
G = Ground
Tx = Serial data output signal, 9600 baud, 0-5V CMOS level
Vi = Auxiliary input voltage, 0-5V range. Voltages above 5V may
permanently damage the device
5V*= 5V source, user may draw up to 5mA from this line for
powering external circuits, such as a potentiometer or throttle.
Currents >5mA can overheat the linear regulator
Th = Throttle output, 0-5V analog throttle signal from CA
21
12.
Specifications
Voltage Range
7mA
Current Range
Trip Ah and Wh
Trip Distance
Wheel Size
Speed Range
Note that if any Ah, Wh, or Distance limits are exceeded, then the
calculated values such as Wh/km and average speed will be
incorrect. Be sure to reset after each battery recharge.
-1-2-3-4-5-6-
1 = Vbatt (Red)
2 = Ground (Black)
3 = Shunt - (Blue)
4 = Shunt + (White)
5 = Speed (Yellow)
6 = Throttle Over-ride (Green)
22