Return to Main Menu


CA Programming for TDCM BB

From the CAv3 manual:
16. Torque-based PAS -- Operation:
The CA takes the BB torque voltage, subtracts Trq->TrqOffst to normalize the voltage relative to the zero-torque signal level, and multiplies the result by Trq->TrqScale to convert to Nm of torque. Using this torque with the larger of 55rpm or rider cadence, it calculates a baseline 1x 'Assist Watts'. It subtracts Trq->AsstStart from this baseline assist power and multiplies the result by Trq->AsstFactr to determine the final assist power to deliver. The determined assist level is used to control the motor using the Power PID controller which is configured by PLim->MaxPower and Plim->WGain.

An external switch or pot hooked to the AuxPot input gives adjustable assist by scaling 0-100% and so scales the final assist power range 0-100% as well.

Teklektik's Explanation
How it Works:
The CA takes the adjusted BB torque signal and scales it according to the configured Trq->TrqScale to convert to Nm of torque. Using this torque with rider cadence, it calculates the rider contribution in 'Human Watts'. It subtracts Trq->AsstStart and multiplies the result by Trq->AsstFactr to determine the assist power to deliver. An external switch or pot hooked to the AuxPot input scales Trq->AsstFactr 0-100% to give adjustable assist based on the rider torque and cadence. The determined assist level is used to control the motor using a Power PID controller.


Preview line shows # of PAS poles, the state of both the PAS and DIR digital inputs (up arrow is 5V, down arrow is 0V), and the current PAS assist mode.

PAS Poles:

This is the number of pulses which corresponds to one full rotation of the pedal sensor.

It is 8 for a THUN sensor, 12 for a TDCM sensor, while the Chinese magnet ring PAS disks can vary from 5 all the way to 16 in some cases.

TDCM: 12

Dir Plrty

This controls whether 5V on the "Dir" pin is considered forward or reverse pedaling. If the Dir pin is not connected, then it should be set to 5V = Fwd. For a quadrature encoded device, you will tell from trial and error if this needs to be set to FWD or REV for your encoder setup.

For the Skybike with the TDCM, we are using the FWD setting now, even though originally only REV seemed to work.



(Not in Prelim6 Firmware)

This selects whether you have a single wire PAS sensor or a quadrature PAS sensor with 2 signal wires. The THUN, TDCM, and our 12 Pole PAS sensors are all qudrature devices and should use the 2-wire option, which will have the most responsive behavior and will prevent glitches if the pedals are rocked back and forth without actually turning.

If using a 3rd party PAS sensor with just one wire to the RPM pin of the CA, then select the 1-wire choice.

TDCM: 2 wire

Strt Thrsh

This sets the threshold RPM that you must be pedaling for the CA to assume you are turning the cranks and start powering the motor in one of the PAS modes. If it is set to a low RPM, then the motor will kick in sooner as you start to pedal from a standstill, but it can also take longer to shut off if you start and then stop pedaling. The more poles in the PAS magnet sensor the lower it can safely be.

For a 12 pole device (like the TDCM and our magnet ring PAS sensors) about 10 RPM is a good start point, while an 8 pole sensor like the THUN should be more like 15 rpm.

Since we're likely to want a very responsive start on the Skybike, which operates completely "fly-by-wire", we probably want this value as low as possible. We started with 10.

TDCM: 10

Stop Thrsh

This is the threshold RPM that is used to indicate you have stopped pedaling after you have made one full revolution of the cranks. A higher value will mean that in a PAS mode the motor power will cut off more abruptly once your pedals stop, while a low value can result in a noticeable lag for the power to shut off. Sensible values are usually between 1-2x the Strt Thrsh RPM.

TDCM: 10

PAS Mode -- Select which pedal assist (PAS) mode is used


PAS Watts

This option only shows up in the menu if "Auto PAS" mode is selected.

With it you set the target bike power that is achieved whenever you are pedaling without the throttle. It can be nice to set your PAS Watts to a nice background assist level, and then use the throttle whenever full power is needed.

TDCM: Not Used


This is the maximum speed at which you can use the throttle without pedaling in one of the PAS modes. It is there to support certain European pedalec legislation which requires you to pedal the bike for motor power, but provides an exemption below a certain speed (like 6kph) in which case use of a throttle only is permitted.

TDCM: Not Used


Preview line shows the measured voltage from the torque sensor signal.

If the torque sensor is enabled, then it also shows the corresponding calculated N-m (Newton meters) of torque applied to the cranks via the pedals.

Sensr Type

TDCM: Custom

Trq Scale

This only shows up if you have "Custom" torque sensor selected, and it sets the scaling factor for converting voltage from the torque sensor into Newton meters.

For devices that sense torque on only one side of the crank, it should be doubled in order to simulate the net left and right pedal torques.

The value can be set either positive or negative.

For TDCM Sensors, it is approximately the same as the number of teeth on the front chainring. So a 44T chainring would be about 44 Nm/V.

The torque scaling can be adjusted with an external pot as 'Assist level', including the Grin 3-way handlebar switch.

TDCM: 42

Trq Offset

This only displays if you have a torque sensor enabled, and it sets the current voltage reading on the torque sensor to the 0 torque value.

The number on the left shows the torque offset stored in memory, while the number on the right is real-time voltage reading from the sensor.

Holding the (left) button will shift the real-time reading into the new offset value.

Note that magnetostrictive torque sensors (like THUN and FAG) don't return to the same zero point very well after high torque excursions.

TDCM: Set/Reset using live data from CA; about 2.67 volts

Asst Factr

This sets the amount of proportional assistance that is provided to your pedal input.

It is a multiplier of the human watts, so a setting of 2.00 means the electrical motor watts will be double your human power.

TDCM: 3.25

Asst Start

This enables you to set a threshold human power before the proportional torque assist will kick in.

If it is set to 100 watts, then any time you are pedaling lightly you won't get assist, and only when your human effort exceeds 100W will the proportional motor torque kick in.

This value can be set negative, which will have the natural effect of providing motor power even if you are turning the cranks with almost no effort.

If AsstStart = 100W, you will need to apply 100W of human power before Assist begins. Regardless of any adjustment you make to the Assist Level knob, your contribution must be maintained at greater than 100W or assist will cut out.

Finally stumbled on the "key" setting: the "Trq->AsstStart" (Torque Assist Start Threshhold) defaults to to +100 watts.
This setting is defined as the amount of human power (in watts) that needs to be contributed before the electric assist kicks in. We were never reaching this minimum of 100 watts human power, so the throttle signal never went over zero. The manual says this value can be stated as a negative number to make the assist kick in much sooner -- without really depending on human power to be measured first. Rather than keeping this a negative number, experience is showing us that it's much better (smoother acceleration) to increase the "human watts" produced by raising the resistance to the pedals being rotated.

TDCM: +6

Asst Avg

This value lets you control over how much of the pedal rotation to average the torque signal, as measured by the number of PAS pulses.

Because the pedal torque pulsates heavily with each turn of the cranks, it is essential to average the signal to prevent corresponding pulses of motor torque too.

For a sensor like the THUN which only measures the left side pedal torque, this should be a multiple full rotations, so either 8, 16, or 24.

A higher value leads to smoother power output but also a slower response to changes in pedal effort.

For the 12-pole TDCM sensor which senses both left and right torque, it can be set in multiples of half pedal rotations, so 6, 12, 18 etc.

We started with 18 - probably not "responsive" enough...

TDCM: 18 (try 6)


Generally we connect all of our throttle inputs (manual and PAS/Torque) to the CA to take advantage of its throttle control features. This is opposed to connecting the manual throttle directly to the (typical for Infineon) Red/Black/Green wires of the motor controller. The wiring convention for the CA throttle connector is a JST-SM 3 wire, with the throttle side being the male pins.

There are some "limit" settings for the throttle, including legal, safety, and performance considerations. To minimize issues with running into two different limits that are trying to do the same thing, leave settings at the default or maximum unless necessary.

"Pass Through" settings

Return to Top of Page
Return to Main Menu