As mentioned before, the motor is fitted for liquid cooling. Although it can even be operated “dry”, cooling prevents that the controller throttles down the motor at persistently high load, especially in hot weather.
In contrast to the motor, the controller is air cooled. It also tends to overheat under harsh conditions, so the cooling system includes forced air cooling of the controller. The cooler fan of the air conditioning system is reused for this purpose.
The fans and the coolant pump are independently controlled, depending on the temperature of motor respectively motor controller.
The motor cooler's circuitry is shown in below picture. The link below allows to download and view the diagram in full resolution.
On the left, we see two Microchip PIC16F690 microcontrollers. The upper one controls the A/C cooler fan, the lower controls both the motor cooler fan and the coolant pump. Each microcontroller has its dedicated temperature sensor on the motor respectively the motor controller. A third temperature sensor drives the coolant temperature gauge in the dashboard, when the heater is off (when the heater is on, the temperature of the coolant heater will be relayed to the gauge).
Both fans are driven by a 4kHz pulse-width modulated signal, amplified by MOSFET driver circuits at the right side of the diagram. The thermo switch at the top right of the diagram will interrupt power in emergency.
Below a view of the cooler controller. As usual, I have underestimated the space demand, so the board got quite “crowded” …
The “intermediate” DIP socket is connected to the PIC programmer, to re-flash the microcontroller on-board while writing the software.
The cooler controller is powered from the original air conditioning cable harness. Supply is tapped from the “Klemme 15A” wire - this is similar to “ignition”, but interrupted when the ignition key is in “start” position.
The A/C fan is also accessed over this cable harness. The motor cooler fan, coolant pump and sensors have dedicated wires. Since PWM signals have considerable high frequency portions, the wire pairs that supply the fans are twisted to minimize electromagnetic radiation.
Temperature sensors - The double sensor is glued to the motor. One of the NTCs is for the cooler controller itself.
The NTC sensor for the motor controller is fitted into a cable shoe and bolted to the motor controller's heat sink.
The output of the second NTC on the motor is relayed to the temperature gauge in the dashboard (as long as the coolant heater is off). I later added a second NTC mounted on the controller heat sink and connected in parallel to this one, so the temperature gauge actually gives an (exaggerated) “combined” temperature of both motor and controller.
At 50°C, the motor cooler fan will start at low speed (around 30% pulse width ratio). Up to 60°C, the pulse width ramps up linearly, and stays at 100% above 60°C. The coolant circulation pump will also be switched on at 50°C.
The motor controller cooler got a dedicated “sharper” charateristics - it now starts at 45°C heat sink temperature, and reaches 100% duty cycle at 50°C already.
When ignition is switched on, the pump and the fans will be switched on for a few seconds, for test purposes and to avoid that they seize due to long inactivity.
The controller also has two “test modes”. The first test mode switches on the coolant pump, the second test mode additionally runs the fans. The test modes can be selected by pressing a push button switch (under the cooler controller's cover). Pressing the push button a third time will reset the controller to normal mode. Otherwise, the test modes will automatically time out after a few minutes.
The numerous terminals and indicator lamps are quite disorderly arranged, below an explanation.
The PIC code was written in Assembler, with the MPLab developer environment.
I had initially tried to elegantly implement the switching between the maintenance modes via interrupts. Unfortunately I failed getting the memory allocation correct (so the linker would always complain about a conflict). So the status of the switch is now simply polled regularly.
Another unpleasant surprise was provided by the port register PORTC. I learned (this is of course already described elsewhere), that for setting a single output bit of the register, the whole register will be read, modified and written back. Consecutively setting different single bits of such a register may result (and it did) in unpredictable behavior due to timing issues. I have therefore implemented a “shadow register” PORTC_S, to which these bit operations are applied, and which as a whole is copied to the port register only once per main loop run.
Test arrangement - neat and tidy …
Driver output voltage (inverted, since the motors are switched against ground) at low, medium and high pulse-width ratio.
It turned out that both fans can be controlled well via PWM signal. However, both do emit quite some audible noise at pulsed operation.
The coolant liquid is circulated by an electric pump, through the motor and though a small radiator. Together with the heater circuit (which runs independently and has its own circulation pump), the cooling circuit is connected to the original coolant liquid reservoir. The air buffer in the reservoir will take up thermal expansion of the coolant liquid, and it can be pressurized to ease refilling and emptying of the two circuits.
Overview of the cooling system's components, ready for installing:
The cooler got a place near the front grille, at the passenger side. From it's scooter past, it already has a small fan attached.
DIY bleeder screw at the top of the cooler:
Coolant terminals on the motor. Please note that the fittings used in below foto turned out not to be tight - I have replaced them later. The new fittings have a flange to press a rubber gasket against the motor's case.
The coolant pump (again a Volkswagen Vanagon Turbo Diesel circulation pump, as for the heater circuit). This recent model by the way has a brushless motor with magnetic coupling to the pump chamber. It runs on very low current and appears quite long-lasting.
As usual, every component has its own flange diameter, and I needed to solder a couple of adapters. To start with, it is always good to have a plan of the puzzle:
The first picture shows two mistaken ones, corrected in the second picture. Note the additional small diameter pipe on one of the adapters. It connects the cooling circuit to the coolant reservoir via a thin hose.