Encoder Studies

How It Started
After three years of spotless performance, this June the yellow wrench lamp lit up when I not even knew an Encodr fault message existed. As suggested by Mik I hesitantly opened the encoder cover and found a lot of fine black powder.

Mixed Results From Cleaning
The first time around, I just vacuumed the interior, used window cleaner and placed back the original seal,

Household cleaning the encoder cover, gromet and dust seal

gromet and plastic cover. After the test drive I felt elated about the total absence of the encoder faults.
However, they quickly returned. Following Doug Townley's advice and Mik's advice, I used contact cleaner spray and compressed air

More professional cleaning

to get rid of the dirt. I also dumped the original seal and used generous amounts of silicone to close the gap around the cable. Still, black dust kept accumulating inside. I now suspect it must have come from behind the encoder disc and board, or even deeper, from inside the motor cavity. I repeated this cleaning procedure twice without lasting effect. Strangely the Encodr fault occurred only above precisely 70 km/h, at that time.
In retrospect I suspect the contact cleaner might possibly have destroyed the glue by which the slotted encoder disc is attached to its bushing (see below).

A Visit To the Dealer
Next, I ordered a replacement encoder, cover and seal. I ferried my Vectrix to a shop in Linz (some 300 km from here). Their technician was enthused about electric bikes, a Vectrix fan, and very eager to help. He replaced the encoder, the slotted disk, the cover, the seal, ran the calibration procedures, and also adjusted my throttle, and replace my handle grips. We did find that the slotted disc had almost completely come off the bushing and was hanging there by a thread. This might have caused the Encodr faults at high speeds.
The exchange procedure proved tedious enough as initially we got quite severe jerks while starting or reversing. After several trials, setting the encoder disk again on the split shaft, running the calibration several times and adjusting the throttle several times, the bike did quite ok but during the test run there still on one occasion was the Encodr fault message.
I now know (but didn't then) that the technician should have used, but didn't have available, two tools specifically designed by Vectrix for correct setting of both the slotted disc and the encoder PCB.

More Problems
I thus returned home only to experience more and more Encodr fault messages (random at any speed), and even occasional CanBus faults, as well as a mild jerk when first starting forward or reverse. I talked to Vectrix Germany and there were suggestions of exchanging the motor controller, the whole rear swing arm assembly with motor, etc.

Finally Some Valuable Hints
It was only Steve Scott's formidable advice over the phone that got me on the right track. According to Scott both disc and board need to be aligned to exacting tolerances. So I tried to get my hands on the diagnostic software and acquired the CANBus adapter from PEAK.

Peak shipped within 24 hrs

Studying the Encoder
It proved fortunate that I still had the "faulty" encoder board and the loose disc for study.

Parts removed at the dealer's

I tried to measure its dimensions, determine the required distances, and compose a technical drawing for the fabrication of calibration tools.
I found six tracks on the disc:

Measures are guesswork at best, don't rely on them

(from inside to outside) Hall-A, Hall-B, Hall-C, A-B, and two others which are apparently not used on the Vectrix. Each of these is approx 0.1 mm wide, with the exception of the A-B track which is approx 1 mm wide. The latter is used to generate two signals (A and B, respectively) which are 90º phase shifted. They are processed by the DSP on the motor controller board to determine direction of rotation (to prevent reversal when regeneratively braking), speed (I suppose there is no speed control loop, but speeds in both forward and reverse are limited), and distance traveled for the telltale. Those A and B signals could - in future firmware versions - very easily also be used for anti-locking logic during regeneration and anti-slip logic while accelerating; and of course for cruise-control.
I call the innermost three tracks Hall because in earlier servo drives these signals were generated by Hall-Effect magnetic sensors. These signals were then used for hardware control of the drive's six IGBTs, to direct current to any two of the three motor windings. Then, the signals had to be perfectly alignment with permanent rotor poles. Clockwork precise mechanical adjustment was required.
Instead, Vectrix designers have opted for a more sophisticated software solution. A phase shift offset is stored on the motor controller board, based on counts generated from the A-B track. On the encoder PCB there is an integrated sensor chip with six sensitive areas, corresponding to the six tracks on the disc.

"Faulty" encoder printed board. Measures are guesswork at best, don't rely on them

There is no lens in front of these sensor surfaces so I conclude the slotted disc should be positioned as close as possible, that is without scraping on the chip's plastic housing (taking into account axial clearance of the motor's bearings). Handling an offset in software makes it possible to shift the phase dynamically, compensating for winding impedance, at higher speeds.

Unknown Geometry
I strove to measure the geometry of the disc and the PCB with crude tools . Shy of using a maco camera and microscopic projector for tool adjustment it proved impossible to arrive at precise enough dimensions. In any case, the dimensions cited by Mik do not match my parts: For one, the shaft diameter is approx Ø12.5 mm, not Ø14 mm on my bike.

Installing Diagnostic Software
On my Windows XP desktop the diagnostic software 2.1 ran right away, but on my son's Windows 7 laptop one MSVCR71.dll was missing. He simply pulled it from the Internet by name, and presto we had contact with the Vectrix' CANBus.

Fumbling like a Brain Surgeon
As luck would have it, I'm fairly short-sighted, which gives me, without glasses, a sort of built-in magnifying look at close-up objects. I figured I might just be able, to discern, through the slots in the encoder disc, the light sensitive areas on the chip, when correctly aligned.

Encoder PCB still wrongly aligned to the shaft

After some training of my right eye with the damaged parts, I carefully loosened the encoder PCB on the bike, and shifted it radially from the shaft. With a flash light and staring intently I indeed saw the stars align, ie saw the darker sensor spots appear right behind the slots. The PCB might have been off by as much as 0.3 mm from its correct radial distance to the shaft.
I elected not to shift the disc axially. I can flex the disc as much as to have it touch the sensor chip's plastic rim but there definitely is no contact normally and no scraping.
Finally I ran the encoder calibration routine.
This whole exercise took just five minutes.

Problem Solved
The first 150 km without Encodr messages in two months! I have a fairly good feeling that finally I also have got rid of the annoying jerks during start-up.

More pictures at: http://www.flickr.com/photos/53265378@N07/

before comments

Buy Ecotric bikes, get free accessories!

Who's online

There are currently 0 users online.

Who's new

  • flycutycatshop
  • JanJouke
  • Skutr469
  • Lokyee Tsai
  • earlr85944

Support V is for Voltage