Tesla Pump Speed Controller Project

The OSSEV® project philosophy is to open-source as much of our design and development work as possible and so we will publish all the designs associated with this project.

This project is part of our OSSEV cooling system design and is being developed as part of the MX-5e cooling project installation.

We are using the Tesla variable speed, electric water pump for the cooling systems in our MX-5e and the OSSEV®. It is readily available at a reasonable cost (new and second-hand) and combines good performance with useful features. It has a 19mm inlet and 19mm outlet which matches the Nissan Leaf motor/inverter we are using in our MX-5e and all the other elements of its cooling system.

Requirements

  1. If the Telsa pump doesn't get the right signal after about 4-7 seconds after applying power, it starts running at full speed. This is not desirable as it means the pumps will be drawing around 4.5A all the time they are on, whilst not really doing anything useful. So we need to apply the right signal, such that the pumps run at their slowest speed when power is applied.
  2. We need the pumps to always be on and circulating the coolant (when charging or driving the EV), so that it passes by the various temperature sensors. This is the only way to get an accurate view of the temperatures, so our controller must run the pumps at their slowest speed (25%) unless the Driver Control Unit (DCU) requests a faster speed.
  3. The Driver Control Unit (DCU) monitors the cooling system at four points and is best placed to decide how fast the two pumps should be running. It is also data logging this data for diagnostics purposes.
  4. The inverter and motor form one stream of the cooling system and the battery forms the second stream. Both streams have their own pump and independent controller. They merge to a common radiator and split from a common header tank, to minimise the weight of the cooling system.
  5. The controller will monitor the actual rotational speed of the pumps and report any issues via a red visual indicator on the instrument pod.
Note:  If the cooling system is running at 100% and temperature are still rising, the radiator fan will be switched on by the NOT DEFINED, based on measured temperatures. The fan relay also lights a green fan visual indicator on the dash. If the temperatures continue to rise beyond set limits, a red temperature warning visual indicator is illuminated on the dash and a warning message will appear on the OLED display.

Design

The control of this pump is well documented on the EV Create website. The nominal voltage is 13V (accepts 8V to 16V) and the maximum current draw is around 4.5A. This is quite a lot, so reducing the pump speed and current draw when possible is a good thing. The pump speed varies from 750rpm to 4700 RPM. We tested a pump without speed control and the current draw was 4.3A.

The pump speed is controlled operated by pulling the PWM input to GND and the pump requires a 2Hz PWM signal which is quite an unusual frequency. If you do not provide a normal speed control input, after a short startup and diagnostics time (4 to 7 seconds) the pump will start running at full speed. The operating voltage is 5V with a suitable pull-up resistor.

We do not need fine speed control for these pumps. We decided to develop a simple controller that runs the pump at four different speeds, roughly 25%, 50%, 75% and 100%. When power is applied, we want the pump to default to its slowest speed (25%), so that coolant is circulated past the temperature sensors in our cooling system and the pump is using minimal power.

Note: This pump speed controller does not allow the pump to be completely stopped. The only way to do this is to cut the power to the pump.

The speed control of the pump is well documented on the EV Create website and this diagram by EV Create summarises the valid input signals.

We want the pump to default to its lowest speed (PWM @ 20% giving 750rpm) with [00] on the speed control pins.

The speed controller will be manufactured as a custom PCB design. The controller requires 5V dc power and is not involved in the control of the 12V power to the Tesla pump.

SP1 & SP2
Digital inputs to select the required speed and accept either 5V logic levels. We are using a level shifter to interface them to the 3.3V ESP32 being used for our Driver Control Unit (DCU).
ERR
Digital open-collector output (active low), to signal an error with the pump. The use of an open-collector output enables the controller to be used with both 3.3V and 5V logic levels with local pull-up resistors.
CTL
Digital PWM control signal to the Tesla pump, generated by the controller.
SEN
Digital PWM speed sensing signal from the Tesla pump. It the controller sees something unexpected from the pump, then it signals this via the ERR pin.

Arduino processors cannot multitask, so it is good practice to off-load things like PWM timing and rotational speed monitoring to a secondary processor. It could be done using interrupts on our main Driver Control Unit (DCU) processors but, it is just simpler this way. The ATtiny85 is just about the smallest Arduino processor you can buy an has exactly the right number of IO pins for this application. It has five usable IO pins and uses a 5V dc power supply and logic.

Pins

The pin labelling on the ATtiny85 can get a little confusing, so these are how we are using the pins:

  1. PB5 = Reset pin and is not used
  2. PB3 = SP1 input for speed control
  3. PB4 = SP2 input for speed control
  4. GND
  5. PB0 = CTL output for Tesla pump speed control
  6. PB1 = ERR output to signal pump error
  7. PB2 = SEN input to monitor pump rotational speed
  8. VCC = 5V dc power

Programming

We are using an Arduino UNO shield to program the ATtiny85 processor. This one was designed and built by a friend but, you can buy things like this on eBay.

We are not going to cover the programming process in depth here as it well described on sites like Instructables.

Testing

We initially developed and tested our code using an Arduino processor Uno because it has the ability to generate debugging information via the serial port monitoring. This approach also makes it much quicker to modify our code and test it. The 2Hz CTL signal is clearly visible when using an LED connected to the CTL pin (with a 1KΩ resistor in series) and it clearly shows the changes of the PWM with input changes on the SP1 and SP2 pins. We used a multimeter to check the frequency and it showed 1.998Hz which is perfect.

This approach also allows us to measure the Tesla Pump in-situ to capture real performance data and thus calibrate the error sensing.

We used this simple setup to test the pump speed control, current draw and speed feedback mechanism. On applying power, the pump runs at 100% for less than one second, then adapts to the PWM signal coming from the speed controller.

From this testing, at 100% speed, the coolant is rushing through the header tank very quickly and our chosen tank might be a little bit too small, especially as we potentially have two pumps (inverter/motor & battery pack) drawing from the one outlet.

Note: The SEN signal is a 5V PWM signal at 2Hz and the ratio provides a measure of the pump speed. This line is pulled up to 5V with a pull-up resistor and our code times how long the signal is both LOW and HIGH, to give a 'SEN ratio'. We used this ratio to calibrate our controller, so it knows when to active the ERR output signal.

Based on our testing, we would improve our initial PCB V1.1 design:

PCB Design

We have designed an initial prototype PCB (V1.1) that enables two pumps to be independently controlled. The ERR pins are connected via diodes, to optionally enable either/both pumps to illuminate a common red visual indicator.

Note: We have used through-hole technology (THT) over surfaced mount (SMT/SMC) because it is just much easier to program the ATtiny85 in this DIL format and this and the connectors make up most of the PCB surface area.

Our V1.1 prototype board allows us to check the ATtiny85 has been programmed correctly and behaves as expected.

V2.0 of the PCB V2.0 also uses THT, simply to make it easier for others to reuse our shared design and code. It adds the following:

Application

Our MX-5e is a typical application of this pump speed controller. When the ignition is switched on, 12V dc is provided to pump and a 5V dc-dc converter, the latter powering the pump speed controller. Both are powered via a suitable fuse. With no inputs connected, the pump will run at 25% which is 750rpm.

The Driver Control Unit (DCU) is interfaced to the pump speed controller via the three pins: SP1, SP2 and ERR. Based on observed temperatures in the MX-5e cooling system, the DCU will control the speed via the SP1 & SP2 pins: [00] = 20% PWM and 750rpm, [01] = 40% PWM and 2000rpm, [10] = 60% PWM and 3300rpm, [11] = 80% PWM giving the maximum speed of 4700rpm.

If the sensed speed of the Tesla pump (via SEN pin) is out of the expected range, then the ERR pin is pulled low by the control and the Driver Control Unit (DCU) will then flag the error to the driver.

Open Source

The OSSEV® philosophy is to open-source our designs and once we are happy our development and testing is complete, we will share our PCB designs and all the software we have developed for our DCU.