GRIN TECHNOLOGIES DRAFT The V4 Baserunner Motor Controller User Manual
- June 5, 2024
- GRIN TECHNOLOGIES
Table of Contents
GRIN TECHNOLOGIES DRAFT The V4 Baserunner Motor Controller
Introduction
Thank you for purchasing a Baserunner, Grin’s state-of-the-art compact field
oriented motor controller (FOC). We’ve worked hard to make this a versatile
after-market device that can be mated with a wide range of ebike motors and
battery packs. This manual covers the V4 models of our Baserunner_Z9 and
Baserunner_L10 controllers, first released in 2021.
Features of the V4 Baserunner include:
- Compact flat form factor can fit in downtube battery casings
- User programmable parameters for customized tuning
- Wide operating voltage (24V – 52V nominal batteries)
- Compatible with both Cycle Analyst display and 3rd party displays
- Supports, Throttle, PAS and Torque sensor control
- Waterproof design with potted electronics
- Proportional and powerful regenerative braking
- Smooth and quiet field oriented control
- Protect motors from overheating with thermal rollback
- Remote forwards/reverse input
- Field weakening to boost top speed
- Sensor less operation with high eRPM motors
Unlike standard trapezoidal or sine wave controllers, the Baserunner is a field oriented controller that must be tuned to your motor, battery, and performance requirements. We will look at this process in Section 4, Parameter Tuning.
Connectors
The V4 Baserunners achieve maximum versatility with minimal wiring. A pair of +- battery leads supply power, an single over molded cable carries all motor signals, and three waterproof signal plugs support a range of hookup strategies.
Battery Leads
The short 5cm leads for the battery pack emerge on the back end of the
controller. When supplied with a downtube battery these leads will be soldered
to the
mating cradle connectors, while they may be unterminated or fitted with
Anderson Power poles when purchased alone.
Motor Cable
The motor connection has 38cm lead to either a HiGo L1019 connector or a Z910 connector depending on the model. This length is sufficient to reach a rear hub motor on most bikes with the controller mounted on the downtube or seat tube. Front hub installations are supplied with a 60cm motor extension cable.
Baserunner_L10 Motor Plug Pinout
The Higo L1019 cable has three motor phase pins capable of 80 amps peak,
along with 7 small signal wires for hall position, speed encoder, and motor
temperature.
Baserunner_Z9 Motor Plug Pinout
The Z910 cable has three motor phase pins capable of 55 A peak, and just 6
signal wires, 5 for the hall sensors and the one additional wire can be either
motor speed, motor temperature, or combined speed and temperature.
Cycle Analyst WP Plug
CA-WP Pinout
The connector for the Cycle Analyst cable uses the waterproof 8-pin Z812
Higo standard.
This connector taps into the controller’s shunt resistor for analog current
and power sensing, with signals for speed and temperature from the motor and a
hookup for throttle control.
Mains Signals Plug
Mains Plug Pinout
New to the V4 devices is a Cusmade Signal D 1109 Connector that supports
conventional ebike wiring strategies for 3rd party display consoles. This
connector shares many signals with the CA-WP plug, but rather than using the
shunt resistor for current sensing, it has TX and RX pins that communicate
digitally to the display.
Generally this connector will pair to a harness that splits out separate lower
pin count display, throttle, and ebrake plugs at the handlebar.
PAS / Torque Plug
PAS Plug Pinout
The V4 Baserunners include a 6 pin HiGo MiniB Z609 plug for direct connection
of a PAS sensor or Torque Sensor, even without the use of a Cycle Analyst
device.
Note that the Torque signal links to the controller’s throttle input, and and
the 2nd PAS signal can be configured as a FWD/REV input instead.
Communication Port
The TRRS jack embedded in the controller may be used for connecting to a computer, Android smart phone, or potential Bluetooth dongle.
The communication standard uses a 0-5V level serial bus. Grin sells a 3m long TTL->USB adapter cable to connect the unit with the USB port of a standard computer. This is the same communication cable used with the Cycle Analyst and Satiator products. Third party USB->Serial cables, such as FTDI’s part number TTL-232R-5V-AJ are also compatible. A USB-OTG adapter then is needed to connect to an Android smartphone via the phone’s smaller Micro USB or USB-C port.
Wiring Strategies
The V4 Baserunners can be hooked up to to the controls of an ebike system in one of three ways. Either under the control of a V3 Cycle Analyst, under the control of a 3rd party display, or headless with no display at all.
CA Based Hookup
The setup using a Cycle Analyst provides the most versatility with mode presets, and customizable for PAS behavior, advanced regen features, and permits easy performance adjustment on the road.
The CA3-WP device is plugged into the matching connector. All throttles,
ebrakes, and PAS or Torque sensors are plugged in directly to the Cycle
Analyst.
The 6 pin PAS plug of the controller is not typically used. However, a short
adapter is provided that should be plugged into the 9 pin Mains cable. This
adapter serves two purposes
- It links together the ebrake and throttle signals of the controller so that the throttle output of the CA can be used for both throttle and regenerative braking control,
- It provides a convenient tap point for supplying power to a rear bike light via a 2-pin Higo plug.
3rd Party Display Hookup
The Baserunner can be used with 3rd party displays (King Meter, Bafang, Eggrider etc.) that communicate with a range of digital protocols through the use of the 9 pin Mains cable and a custom made cable harness and splitter junction. Typically these displays are powered from a 5 pin plug, while other cables for ebrakes, throttle, and front lights would also emerge from a junction. Most systems like this will include a PAS or Torque sensor that is hooked up directly to the 6 pin PAS plug on the controller, with the Baserunner controller specially configured to respond to PAS signals.
At present Grin only provides support for this hookup to OEM customers purchasing complete systems with 3rd party displays using the KM5s protocol, and does not offer support or the components for this at the retail level. In this wiring approach, the 8 pin CA-WP plug is not required, but it can be used as a convenient tap point to power a rear bike light as well.
Headless System
Finally, the Baserunner can be run with only a PAS / Torque sensor wired up to
the 6 pin PAS plug, or just a throttle on the Mains plug. In this arrangement,
it is essential to wire up the on/off power switch on either the CA plug or
the Mains connector for the controller to turn on.
There will not be any ability to modulate the PAS power assist level or other
system behavior in this minimal approach.
Controller Mounting
The Baserunner’s low profile allows it to just fit inside a modified baseplate of Reention and Hailong downtube battery casings. Grin supplies these modified controller housings with their pockets hogged out to fit the Baserunner.
For use in other applications, Grin also produces mounts to secure the Baserunner to a flanged plate, a round tube, and a the fender bolt of a Brompton
For optimal performance, the controller should be installed such that the
metal mounting plate is exposed to airflow to keep the controller cool. This
will noticeably improve the maximum power at thermal rollback compared to a
controller that is in still air.
Parameter Tuning
If you purchased the Baserunner as part of a complete conversion kit that
includes a battery, motor, and so on, the controller should already be
configured to match the motor by the vendor. Grin conversion kits are sold
preconfigured. If you bought the Baserunner separately, or are changing your
set-up, you should configure the controller to your motor and battery pack
once it is installed and connected up on your bike. You will need a computer,
a TTL-USB programming cable and the Phase runner Software Suite. Phase runner
software is available for Linux, Windows, MacOS and Android from our webpage:
http://www.ebikes.ca/product-info/phaserunner.html
Please Note: When configuring your Baserunner via the software suite, it
is essential that your bike is propped up so that the powered wheel can rotate
freely, both forwards and backwards. With a rear hub motor, also ensure that
the cranks can rotate freely. With the Baserunner powered on, plug in the
TTL->USB cable from your computer to the Baserunner. When you launch the Phase
runner software, it should open to the “Basic Setup” tab and indicate that the
“Baserunner is connected.”
If you see “Controller is not connected,” check that the selected serial port
is correct and that the USB->TTL device shows up in your device manager as a
COM port (Windows), ttyUSB (Linux), or cu.usbserial (MacOS). If your system
does not recognize the USB serial adapter, or has frequent com timeouts, then
you may need to download and install the latest virtual COM port drivers
directly from FTDI:
http://www.ftdichip.com/Drivers/VCP.htm
Importing Default Parameters
The Phase runner Software Suite comes equipped with default settings for many common motors. With your Baserunner connected, click on “Import Defaults” and select your motor’s manufacturer and model number from the new window. Clicking on “Apply” will return you to the “Basic Setup” tab with all the motor’s parameter-fields populated to their correct values.
Install these new settings to the Baserunner via the “Save Parameters” button. Apply some throttle and your motor should run smoothly. If so, you can now skip over the “Motor Autotuned” section, and proceed to “Battery Limits.” If your motor is not listed on the “Import Defaults” window, try choosing “Download Latest Defaults from Grin” and follow the prompts. If default settings for your motor are still not available, proceed to the “Motor Autotuned” section that follows.
Motor Autotuned
Basic Setup tab The Autotuned routine can automatically detect motor parameters like the motor windings constant (kV), resistance of one motor phase to neutral (Rs), and the Ls value, the inductance of motor phase to neutral at the nominal commutation frequency of the motor.
The start of the Autotuned process asks for your best guess of the motor’s kV
in rpm/V, as well as the number of pole pairs in the motor. The firmware uses
these initial parameters for determining the test current frequency. If you
have the information at hand, you can input values that are close to the
expected ones.
The Autotuned routine will usually work fine even if your initial guess for
the kV value is off. Most ebike hub motors fall within 7-12 rpm/V. An initial
guess of 10 should work for most situations. The effective pole pairs is a
count of how many electrical cycles corresponds to one mechanical revolution
of the motor. The Baserunner needs this information to correlate it’s
electrical output frequency with the wheel speed. In a direct drive (DD)
motor, it is the number of magnet pairs in the rotor, while in a geared motor
you need to multiply the magnet pairs by its gear ratio. The following table
lists the effective pole pairs for many common motor series.
Motor Family | # Poles |
---|---|
Crystalyte 400, Wilderness Energy | 8 |
BionX PL350 | 11 |
Crystalyte 5300, 5400 | 12 |
TDCM IGH | 16 |
Crysatlyte NSM, SAW | 20 |
Grin All Axle, Crysatlyte H, Nine Continent, MXUS and Other 205mm DD Motors |
23
Magic Pie 3, Other 273mm DD Motors, RH212| 26
Bafang BPM, Bafang CST| 40
Bafang G01, MXUS XF07| 44
Bafang G02, G60, G62| 50
Shengyi SX1/SX2| 72
eZee, BMC, MAC, Puma, GMAC| 80
Bafang G310, G311| 88
Bafang G370| 112
For motors not listed, either: open the motor to count the magnets pairs (and
gear ratio), or count the number of hall cycles that take place when you
manually turn the wheel one revolution. You can monitor the number of hall
transitions via the “Dashboard” tab of the software suite.
Once the “kV” and the “Number of Pole Pair” values are entered, launch the
“Static Test.” This test will produce three short buzzing sounds, and
determine the inductance and resistance of the motor windings. The resulting
values will be shown on the screen. Next, launch the ‘Spinning Motor Test,”
which will cause the motor to rotate at about half speed for 15 seconds.
During this test, the controller will determine the exact kV winding constant
for the hub, as well as the pinout and timing advance of the hall sensors, if
present. If the motor spins backwards during this test, check the box “Flip
Motor Spin Direction on Next Autotuning?” and relaunch the “Spinning Motor
Test.”
During the spinning test, the Baserunner will start the motor in sensor less mode. If the motor fails to spin and just starts and stutters a few times, adjust the sensor less starting parameters as described in section 5.5, “Tuning the Sensor less Self Start,” until the motor is spinning steadily.
If the spinning test detects a valid hall sequence, the final screen will show the hall offset, and that the “Position Sensor Type” is “Hall sensor start and sensor less run.”
Battery Limits
Basic Setup tab
With the controller mapped to your motor and spinning correctly, you should now set the battery voltage and current settings to appropriate values for your pack. Set “Max Current” to a value that is equal to or less than the battery’s rating. Higher battery currents will result in more power, but can also stress the battery cells, resulting in shorter battery life. Excessively higher values can also cause the BMS circuit to trip, shutting down the pack. We recommend setting “Max Regen Voltage (Start)” to the same value as the full charge voltage of your battery, with the “Max Regen Voltage (End)” to about 0.5V higher than full charge. This will ensure you can do regen even with a mostly charged battery. The “Low Voltage Cutoff (Start)” and “Low Voltage Cutoff (End)” values can be set just above the BMS cutoff point of your battery. If your setup uses a Cycle Analyst, we recommend leaving these values at the default 19.5/19.0 volts and use the CA’s low voltage cutoff feature instead. That way you can change the cutoff voltage on the fly. If you are setting up a system with regenerative braking, and a BMS circuit that shuts off if it detects excessive charge current, then you may also need to limit the “Maximum Regen Battery Current” that will flow into your pack.
Motor Phase Current and Power Settings
Basic Setup tab
In addition to regulating the current flowing in and out of the battery pack, the Baserunner can independently control the maximum phase currents that flow to and from the motor. It is the motor phase current that both generates torque and causes the motor windings to heat up. At low motor speeds this phase current can be several times higher than the battery current you see on a Cycle Analyst.
The “Max Power Limit” sets an upper limit on the total watts that will be
allowed to flow into the hub motor. This value has a similar effect to a
battery current limit, but it is dependent on voltage. A value of 2000 Watts
will limit battery current to 27 amps with a 72V pack, while a 48V battery
will see over 40 amps. “Max Phase Current” determines the peak amps, and hence
torque, put through the motor while accelerating at full throttle of the power
limit is not reached. The “Max Regen Phase Current” value directly sets the
peak braking torque of the motor at full regen. If you want a strong braking
effect, then set this to the full 55 or 80 amps. If the maximum braking force
is too intense, then reduce its value. The following graph illustrates the
interplay between motor phase current, battery current, and motor output power
for a typical setup. When riding at full throttle, low speeds will be phase
current limited, medium speeds will be battery current limited, and high
speeds will be limited by the voltage of your battery pack.
Tuning the Sensor less Self Start
Advanced Setup
If you are running in sensor less mode, then you may need to tweak the sensor
less self start behavior. If a brushless motor is run without hall sensors and
started from a complete stop, the motor controller attempts to ramp up the
motor’s rpm to a minimum speed so that it can latch onto the rotation (closed
loop). It does this by first injecting a static current into the phase
windings to orient the motor into a known position. The controller then
rotates this field faster and faster until reaching the “AutoStart Max RPM”
value.
As initial values, set the “AutoStart Injection Current” to half your maximum phase current, an “AutoStart Max RPM” about 5-10% of the running motor rpm, and an “AutoStart Spin up Time” anywhere from 0.3 to 1.5 seconds, depending on how easily the motor can propel the bike up to speed. On bikes that you pedal to help get you underway, a short 0.2-0.3 second ramp will often work best,
Throttle and Regen Voltage Maps
Advanced Setup tab
With most ebike controllers, the throttle signal controls the effective
voltage and hence unloaded rpm of the motor. With a Baserunner, however, the
throttle is directly controlling the motor torque. If you pick the motor off
the ground and give it just a tiny amount of throttle, it will still spin up
to full rpm as there is no load on the motor which often confuses people into
thinking it has an all-or-nothing throttle response. If you apply partial
throttle while riding, you will get a steady torque from the motor which will
stay constant even as the vehicle speeds up or slows down. This is different
from standard ebike controllers, where the throttle more directly controls
motor speed. By default, the Baserunner is configured so that active throttle
starts at 1.2V, and full throttle is reached at 3.5V, which is broadly
compatible with Hall Effect ebike throttles. The Baserunner has an analog
ebrake line which is tied to the throttle line in the Cycle Analyst hookup
scheme via the 9 pin Mains adapter cable. The regen voltage is mapped by
default so that regenerative braking starts at 0.8V and reaches maximum
intensity at 0.0V.
With the brake and throttle lines tied together into a single signal, the Baserunner can support variable regen either through bidirectional throttles or a V3 Cycle Analyst.
Field Weakening for Speed Boost
Basic Setup tab
The Baserunner can boost the top speed of your motor beyond what is
normally possible from your battery voltage. This is accomplished through
injecting a field weakening current that is perpendicular to the torque
producing current. This approach will have the same end effect as advancing
the commutation timing.
The amount of boost received for a given field weakening current will depend
on the characteristics of your particular motor and cannot be easily
predicted. A conservative trial and error approach of small increments is
recommended for determining a suitable value. Increasing a motor’s top speed
in this way is less efficient than using a higher voltage pack or a faster
motor winding, but for a speed boost of 15-20%, the additional losses are
quite reasonable.
The following graph shows a large direct drive hub motor’s rpm as a function
of field weakening current. The upper black line is the motor’s measured rpm,
while the initially lower yellow line is the no-load current draw, reflecting
the amount of extra power lost due to field weakening. We can see that at 20
amps of field weakening, the motor speed increases from 310 rpm to 380 rpm,
while the no load current draw is still just under 3 amps.
Virtual Electronics Freewheeling
Dashboard/Basic Setup tabs
The Baserunner controller can be set to inject a small amount of current into
the motor, even when the throttle is off. When properly tuned, this current
injection can overcome the drag torque present in hub motors capable of
regenerative braking, allowing them to spin freely when pedaling without any
throttle.
To setup this feature, we recommend first going to the “Dashboard” tab. With the system throttle at full, note the “Motor Current” value. Navigate back to the “Basic Setup” tab, check “Enable Virtual Freewheeling,” and set “Electronic Freewheeling Current” to a value slightly less than that of the observed motor current. The “Motor Stall Timeout” setting determines when this injection current will stop once the motor comes to a stop. Once the values for “Virtual Electronic Freewheeling” are set, the controller will draw about 10-40 watts in order to overcome the motor’s drag. Regenerative braking should recapture more energy than lost due to the injection current. Users of mid- drive motors can also use this feature to keep the drive train always engaged, eliminating windup delay and harsh clutch engagement when throttle is applied and the motor comes up to speed.
Additional Details:
Reverse Mode
The signal PAS 2 used in the 6 pin PAS plug is electrically equivalent to the FWD/REV plug in the 9 pin Mains cable. This input can be configured either as a reverse switch input or as the secondary signal of a quadrature PAS sensor in the Phaserunner software suite.
Motor Temperature Sensing
The V4 Baserunners have an onboard decoding chip to measure the signal present on the temp/speed wire and split this if necessary into a steady temperature voltage and a pulsed speed output. These signals are fed both to the Baserunner controller as well as to the Cycle Analyst. To use the controller’s built in motor temperature rollback, it is necessary to create a voltage / temperature map of this signal
Regenerative Braking
The Ebrake signal on the 9 pin Mains cable is an analog input that provides proportional braking control if desired. This is pulled high internally, while the throttle signal is pulled low. If the throttle and ebrake signal are shorted together, then the signal level will sit at 1.0V, allowing a single wire bidirectional torque control with 0-0.9V mapped to regenerative braking, and 1.1-4V mapped to forwards torque. If instead these signals are not shorted together then a simple ebrake switch to ground will activate maximum regen. Alternatively a secondary throttle can be wired to this input to achieve proportional braking without a Cycle Analyst, in which case the regenerative brake mapping should be reconfigured to have similar start and end voltages as the throttle signal.
Cycle Analyst Settings
Current Sensing [ Cal->RShunt ] The Baserunner uses a 1.00 mOhm precision shunt resistor for current sensing. In order to have an accurate readout of this current, ensure that the Cycle Analyst’s “RShunt” value is set to 1.000 mOhm, its default value. Throttle Out [ ThrO->Up/Down Rate ] [ SLim->Int,D,PSGain ] Because the Phaserunner uses a torque throttle rather than a voltage throttle, the entire throttle voltage range is always active. Optimal settings for the throttle output on a V3 Cycle Analyst will differ than that for generic ebike controllers. The ramp up and ramp down rates as well as the feedback gain settings (AGain, WGain, IntSGain, DSGain, PSGain) can be set much higher than with a conventional controller with a voltage throttle.
LED Flash Codes
The embedded LED on the side of the controller provides a useful status indicator. It will flash according to the following table if the controller detects any faults. Some faults will clear automatically once the condition clears, such as “Throttle Voltage Outside of Range,” while other faults may require turning the controller off and on.
1-1 | Controller Over Voltage |
---|---|
1-2 | Phase Over Current |
1-3 | Current Sensor Calibration |
1-4 | Current Sensor Over Current |
1-5 | Controller Over Temperature |
1-6 | Motor Hall Sensor Fault |
1-7 | Controller Under Voltage |
1-8 | POST Static Gate Test Outside Range |
2-1 | Network Communications Timeout |
2-2 | Instantaneous Phase Over Current |
2-3 | Motor Over Temperature |
2-4 | Throttle Voltage Outside of Range |
2-5 | Instantaneous Controller Over Voltage |
2-6 | Internal Error |
2-7 | POST Dynamic Gate Test Outside Range |
2-8 | Instantaneous Controller Under Voltage |
3-1 | Parameter CRC Error |
3-2 | Current Scaling Error |
3-3 | Voltage Scaling Error |
3-4 | Headlight Under Voltage |
3-5 | Torque Sensor |
3-6 | CAN Bus |
3-7 | Hall Stall |
4-1 | Parameter2CRC |
The LED may also flash several different warning codes. In general, these warnings will appear as various limits are reached, but may be safely ignored.
5-1 | Communication Timeout |
---|---|
5-2 | Hall Sensor |
5-3 | Hall Stall |
5-4 | Wheel Speed Sensor |
5-5 | CAN Bus |
5-6 | Hall Illegal Sector |
5-7 | Hall Illegal Transition |
5-8 | Low Voltage Rollback Active |
6-1 | Max Regen Voltage Rollback Active |
6-2 | Motor Overtemperature Rollback |
6-3 | Controller Overtemperature Rollback |
6-4 | Low SOC Foldback |
6-5 | Hi SOC Foldback |
6-6 | I2tFLDBK |
6-7 | Reserved |
6-8 | Throttle fault converted to warning |
Specifications
Electrical
Peak Battery Current | Programmable up to 55A (Z9) or 80A (L10)* |
---|---|
Peak Phase Current | Programmable up to 55A (Z9) or 80A (L10)* |
Peak Regen Phase Current | Programmable up to 55A (Z9) or 80A (L10)* |
Continuous Phase Current | Approximately 35A (Z9), 50A (L10) at thermal |
rollback, varies with air flow and heat sinking
Phase Current Rollback Temp| 90°C Internal Temp (casing ~70°C)
Max Battery Voltage| 60V (14s Lithium, 17s LiFePO4)
Min Battery Voltage| 19V (6s Lithium, 7s LiFePO4)
eRPM Limit| Not recommended above 60,000 ePRM, though it will continue
to function beyond this.
RShunt for Cycle Analyst| 1.000 mΩ
- Thermal rollback will typically kick in after 1-2 minutes of peak phase current, and current will then automatically reduce to maintain controller rollback temperature.
Mechanical
Dimensions LxWxH | 98 x 55 x 15 mm |
---|---|
Weight | 0.20 / 0.25kg (Z9 / L10) |
Signal Cable Lengh | 15cm to Connector End |
Motor Cable Length | 38cm to Connector End |
Waterproofing | Fully Potted Circuitry, IP rated signal plugs |
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>