Prelude conversion project - some questions

Technical discussion on converting internal combustion to electric
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Lo and behold I got there in the end :) Just using a 100 k NCT thermistor as a voltage divider and an Arduino to control a couple of digital outputs.

Code: Select all

//  This sketch is a simple if-then system.  If the analog input sensor exceeds the first setpoint, pin 4 goes high.
//  If the sensor exceeds the second setpoint, pin 2 goes high. 

int thermistorPin = A0;    // select the input pin for the potentiometer
int sensorValue = 0;  // variable to store the value coming from the sensor

void setup() {

  pinMode(4, OUTPUT);      // declare pin 4 as an output (coolant pump)
  pinMode(2, OUTPUT);      // declare pin 5 as an output (AC compressor)
  Serial.begin(9600);       //turn serial monitor on for double-checking.
}

void loop() {
  
  sensorValue = analogRead(thermistorPin); // read the value from the sensor
  Serial.print(sensorValue);               // print the sensor value on the screen
  Serial.println("");
  delay(500);                              // gives the sensor time to stabilise
  if (sensorValue > 625)
    digitalWrite(4, HIGH);      // if the reading exceeds 625, turn 4 on
  else
    digitalWrite(4, LOW);       // otherwise leave it off
    
  if (sensorValue > 640)
    digitalWrite(2, HIGH);      // if the temperature sensor exceeds 640, turn 2 on
  else
    digitalWrite(2, LOW);       // otherwise leave it off
    
}
I'm proud of myself anyway :)
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Proof that it works :)
Uno thermistor.jpg
Uno thermistor.jpg (120.01 KiB) Viewed 5532 times
AEVA National President, WA branch director.
rhills
Site Admin
Posts: 688
Joined: Fri, 25 Jul 2008, 01:57
Real Name: Rob Hills
Location: Waikiki, WA

Re: Prelude conversion project - some questions

Post by rhills »

Looks good to me.

One tweak you might consider is to move the Delay(500) to either the end or the beginning of the loop. The value of sensorValue isn't going to change after it is read at the first line of the loop() routine no matter how long you delay so to me it's more logical to read the value, process it, then delay before reading it again. I can't see that this has caused any problems in the code you have now, but if you needed to change the code later, you might slip in a bug by misintepreting the comment on your delay(500) line which implies that sensorValue might change during that delay.
Rob Hills
AEVA Webmaster
  • 2022 Tesla M3 MIC LR
  • 2014 Mitsubishi Outlander Aspire PHEV
    Petrol Usage to last refill: Jul 2014 - Jul 2022
    Total Petrol: 889.8L
    ODO: 88417
    Av Consumption: 1.01 L/100km
User avatar
coulomb
Site Admin
Posts: 6357
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Re: Prelude conversion project - some questions

Post by coulomb »

Isn't this a comment error? :oops:

pinMode(2, OUTPUT); // declare pin 5 as an output (AC compressor)

Later comments talk about pin 2.

Yes, I'm a pedant. :geek:
MG ZS EV 2021 April 2021. Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
Patching PIP-4048/5048 inverter-chargers.
If you appreciate my work, you can buy me a coffee.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Yes, correctly spotted ☺. Pin 5 wouldn't grip the solid core wire properly so I used 2 instead.

...pedant. 😆
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Updated the code and circuit to operate from four independent thermistors now.
Pumps on.jpg
Pumps on.jpg (161.64 KiB) Viewed 5518 times
Pumps and compressor on.jpg
Pumps and compressor on.jpg (139.13 KiB) Viewed 5518 times

Code: Select all

int Therm1 = A0;    // declare A0 as T1 input
int Therm2 = A1;    // declare A1 as T2 input
int Therm3 = A2;    // declare A2 as T3 input
int Therm4 = A3;    // declare A3 as T4 input
int Therm5 = A4;   // declare A4 as T5 input
int Therm6 = A5;   //declare A5 as T6 input
int Therm1Value = 0;
int Therm2Value = 0;
int Therm3Value = 0;
int Therm4Value = 0;
int Therm5Value = 0;
int Therm6Value = 0;  // Define values of thermistor inputs

int LowT = 630;     //Define the limit where coolant pumps turn on
int HighT= 640;     //Define the limit where the AC compressor comes on

void setup() {

  pinMode(4, OUTPUT);      // declare pin 4 as an output (battery coolant pump)
  pinMode(2, OUTPUT);      // declare pin 2 as an output (AC compressor remote on)

}

void loop() {
  
  delay(150);
  Therm1Value = analogRead(Therm1);
  Therm2Value = analogRead(Therm2);
  Therm3Value = analogRead(Therm3);
  Therm4Value = analogRead(Therm4);
  Therm5Value = analogRead(Therm5);
  Therm6Value = analogRead(Therm6);
  delay(150);
  Therm1Value = analogRead(Therm1);
  Therm2Value = analogRead(Therm2);
  Therm3Value = analogRead(Therm3);
  Therm4Value = analogRead(Therm4);
  Therm5Value = analogRead(Therm5);
  Therm6Value = analogRead(Therm6);  // As per Rob's suggestion, this stops flickering when close to the limit.
    
  if (Therm1Value > LowT or Therm2Value > LowT or Therm3Value > LowT or Therm4Value > LowT or Therm5Value > LowT or Therm6Value > LowT)
    digitalWrite(4, HIGH);      // if the reading exceeds 630, turn coolant pump on via digital output 4
  else
    digitalWrite(4, LOW);       // otherwise leave it off
    
  if (Therm1Value > HighT or Therm2Value > HighT or Therm3Value > HighT or Therm4Value > HighT or Therm5Value > HighT or Therm6Value > HighT)
    digitalWrite(2, HIGH);      // if the temperature sensor exceeds 640, turn A/C remote supply on via digital output 2
  else
    digitalWrite(2, LOW);       // otherwise leave it off
    
}
(edited to include 6 thermistors)

So far it works well. Next step is to include some maths so that I can enter a temperature in degrees Celsius rather than an arbitrary ADC value between 0 and 1023...
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

I use Sketchup a lot for drawing all sorts of stuff, and I was amazed to discover that some kind individual decided to draw an entire model of a 1988 Honda Prelude!
Prelude battery size up.jpg
Prelude battery size up.jpg (242.26 KiB) Viewed 5494 times
Prelude battery placement.jpg
Prelude battery placement.jpg (358.14 KiB) Viewed 5494 times
Perfect for sizing up the battery! It should fit neatly where the fuel tank was. I'll probably have to devise some kind of sub-structure in the floor of the car to which this battery would be bolted to. It would probably weigh in at about 140 kg all told, so some decent fixings will be needed. I'll try and make the enclosure out of composite like fiberglass or carbon - whatever is light / cheap / strong (or only two of the three).
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

The heat exchanger I ordered has arrived - looks to be quite a powerful one so I'll definitely be putting this on the end of the blower, not the start.
Heat exchanger.jpg
Heat exchanger.jpg (48.5 KiB) Viewed 5426 times
In other great news, the cells will be arriving in about 3-4 weeks time. Then we get busy in the shed each night...
9050135 (1).jpg
9050135 (1).jpg (34.25 KiB) Viewed 5426 times
9050135 (3).jpg
9050135 (3).jpg (27.45 KiB) Viewed 5426 times
9050135 (4).jpg
9050135 (4).jpg (30.61 KiB) Viewed 5426 times
The liquid cooled DC/DC converter and 6.6 kW onboard charger should be here very shortly too.

Brake vacuum pump and reservoir are in thanks to Graeme, so we're not far away from making it happen!
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Okay on the heating and cooling side of things I might have some productive leads:

@Victor336v from Metric Mind has designed these 360 V DC water heaters with integrated pump and thermostat:
http://www.metricmind.com/category/ev-fluid-heaters/

I hope he has progressed them because it would be perfect for the job. Otherwise I see a company in the EU stocks a 2 kW water heater with a very basic thermostat:
https://www.strom-linie.eu/produkte/dc- ... zer-temro/

Meanwhile, I also found some AC compressors on Alibaba specifically for electric vehicles.
https://www.alibaba.com/product-detail/ ... aeb4jKEvsh

Waiting to hear back from these folks, but it would seem it's fed by a 360 V DC supply. I presume the power is varied with 0-5 V, or PWM, or a digital signal.

Great to finally have a mature EV manufacturing industry around the world; it means purpose built parts are starting to find their way into the hands of DIY'ers.
[/quote]

(Edited to update Victor's product details)
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

So I bought one of these:
Strom-linie Astro water heater.jpg
Strom-linie Astro water heater.jpg (179.45 KiB) Viewed 5362 times
It's got a really basic contactor which is modulated by a bimetallic thermostat. I'm assuming the contactor is rated to the task.

Still chasing AC compressors, but it looks like there are some good 5-6 kW, 380 V DC powered options around.
AEVA National President, WA branch director.
User avatar
4Springs
Site Admin
Posts: 923
Joined: Thu, 23 Dec 2010, 01:14
Real Name: Christopher Walkden
Location: Selbourne, TAS

Re: Prelude conversion project - some questions

Post by 4Springs »

Details on that heat exchanger? It looks a neat little unit.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

4Springs wrote: Thu, 17 May 2018, 18:05 Details on that heat exchanger? It looks a neat little unit.
Bought it here: https://www.fishpond.com.au/Kitchen/Dud ... 9129425010
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

I might have bought a few of these too:
IMG_1421.png
IMG_1421.png (317.78 KiB) Viewed 5344 times
We'll see how they go. 36 cc/rev displacement, and will run on a DC bus up to 500 VDC.
AC_Compressor_Specs.JPG
AC_Compressor_Specs.JPG (93.02 KiB) Viewed 5344 times
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Well after not getting enough assurance that this compressor would be suitable for the job, I went for a different vendor who offered far more information.
WURZ AC Compressor.jpg
WURZ AC Compressor.jpg (266.58 KiB) Viewed 5330 times
WURZ AC Compressor in an actual EV.jpg
WURZ AC Compressor in an actual EV.jpg (227.4 KiB) Viewed 5330 times
At least they provided a wiring diagram!
Wurz Wiring diagram.JPG
Wurz Wiring diagram.JPG (41.46 KiB) Viewed 5330 times
I got two - one for the Prelude and one for the CRX.
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Water pumps have been ordered - I got three of the Davies Craig 15 litre per minute pumps. I suspect one of these pumps will be powerful enough for the inverter + motor + DC/DC converter. But not sure sure if they're up to the task of the charger + battery cooling loop. They sell a 23 litre per minute one as well - might be ideal for this loop given the large amount of plumbing involved.

If you don't subscribe to the Weber Auto youtube channel, I highly recommend you do. He does a teardown of a late model Prius and covers the radiator extensively. Interestingly, the radiator has two sections - an upper section for the IC engine coolant, and a lower (smaller) section for the inverter and DC/DC converter loop. I'm tempted to fit a Prius radiator to the Prelude and take advantage of this 2-in-1 radiator. The large radiator seems excessive for the battery, but it's probably not going to matter too much.
113296_Prius_radiator.jpg
113296_Prius_radiator.jpg (55.5 KiB) Viewed 5291 times
After all, I'll need some cooling fans to suit, and these are already the right size...
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

On second thoughts, a new Honda prelude radiator would make more sense. It comes with it's own fans and all the bolt holes match up. Instead of a two-part radiator, I might just put a full-sized automatic transmission radiator in front of the main radiator. If I'm not mistaken, the air conditioning condenser is off to one side.

The basic block diagram of wiring looks like this:
Main block diagram of Prelude.jpg
Main block diagram of Prelude.jpg (52.15 KiB) Viewed 5244 times
Where thick lines - high current or high power, orange is high voltage and black is 12 V. There's obviously a stack of signal wiring and switches to tap into, but all in good time.

Next job is to draw the cooling/heating plumbing.
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

So the way I have drawn this ^ would mean the inverter, DC/DC converter, water heater (although switched separately) and AC compressor is only able to be activated when the vehicle is switched on, that is, the main contactor is closed. I'm wondering if it's worth having a separate HV supply from behind the main contactor for the DC/DC converter, just as I do for the charger. Not like I'm running much from the 12 V system whenever the car is parked, but it would be nice to be able to keep the battery coolant pumps and charger cooling loop circulating while it charges, particularly on a hot day.

In any case, the DC/DC inverter has arrived :D
20180529_174946.jpg
20180529_174946.jpg (92.62 KiB) Viewed 5177 times
Likewise the 6.6 kW (or 7 kW on a sunny day) charger has arrived!
20180529_173810.jpg
20180529_173810.jpg (159.08 KiB) Viewed 5177 times
Both are CAN 2.0 capable, and both have a low voltage V digital enable feature. I will be asking lots of questions about these in the near future.
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Holden Astra electric Power steering pump arrived today too. And.... this lovely letter :D
20180530_183126.jpg
20180530_183126.jpg (146.85 KiB) Viewed 5166 times
It begins in earnest :mrgreen:
AEVA National President, WA branch director.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

OK, a few ideas please.

I have been planning on using a master contactor inside the traction battery enclosure for safety, but it turns out the inverter I'll be using manages precharge itself.

So I was thinking of setting it up a bit like this:
HV distribution.png
HV distribution.png (25.43 KiB) Viewed 5055 times
This way any time I want to charge, the master contactor needs to close (relay logic will drive this) but it also powers up the DC/DC converter for running pumps and the compressor if need be. The second drive contactor is controlled by the inverter itself.

I'm worried about capacitance in the AC compressor and DC/DC converter being a bit of an issue with welding contactors. Unfounded or legit?
AEVA National President, WA branch director.
User avatar
coulomb
Site Admin
Posts: 6357
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Re: Prelude conversion project - some questions

Post by coulomb »

Legit in my opinion. So you'll still need a small pre-charge circuit.
MG ZS EV 2021 April 2021. Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
Patching PIP-4048/5048 inverter-chargers.
If you appreciate my work, you can buy me a coffee.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

I could probably leave a resistor across the contactor since the master contactor will be open whenever the vehicle is vacant.
AEVA National President, WA branch director.
User avatar
coulomb
Site Admin
Posts: 6357
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Re: Prelude conversion project - some questions

Post by coulomb »

But then there is hazardous voltage in the vehicle 24/7, and the DC-DC might try to use the energy, possibly hiccuping.
MG ZS EV 2021 April 2021. Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
Patching PIP-4048/5048 inverter-chargers.
If you appreciate my work, you can buy me a coffee.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Sorry I meant putting a resistor across the contactors of the AC and DC/DC converter, while leaving the master contactor as is. I will draw another diagram...
AEVA National President, WA branch director.
User avatar
coulomb
Site Admin
Posts: 6357
Joined: Thu, 22 Jan 2009, 20:32
Real Name: Mike Van Emmerik
Location: Brisbane
Contact:

Re: Prelude conversion project - some questions

Post by coulomb »

jonescg wrote: Tue, 12 Jun 2018, 08:47 Sorry I meant putting a resistor across the contactors of the AC and DC/DC converter, while leaving the master contactor as is.
Oh, of course. That resolves the main problem, hazardous voltage about the vehicle 24/7. It means that the DC-DC and Air Conditioner inverter will see power all the time when the main contactor is on. No problem for the DC-DC, which will always be on with the main contactor on. The A/C inverter will see more energising than it needs to, but that may not be much of a problem.
MG ZS EV 2021 April 2021. Nissan Leaf 2012 with new battery May 2019.
5650 W solar, 2xPIP-4048MS inverters, 16 kWh battery.
Patching PIP-4048/5048 inverter-chargers.
If you appreciate my work, you can buy me a coffee.
User avatar
jonescg
Senior Member
Posts: 4715
Joined: Thu, 21 Jan 2010, 23:05
Real Name: Chris Jones
Location: Perth, WA.
Contact:

Re: Prelude conversion project - some questions

Post by jonescg »

Yeah, the AC and DC/DC converter can be 'enabled' via a low voltage signal, so once their caps are charged there shouldn't be any significant energy consumption outside of the need to charge the 12 V auxiliary battery.
AEVA National President, WA branch director.
Post Reply