Page 2 of 3

Re: Prelude conversion project - some questions

Posted: Thu, 26 Apr 2018, 14:54
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 :)

Re: Prelude conversion project - some questions

Posted: Thu, 26 Apr 2018, 14:57
by jonescg
Proof that it works :)
Uno thermistor.jpg
Uno thermistor.jpg (120.01 KiB) Viewed 761 times

Re: Prelude conversion project - some questions

Posted: Thu, 26 Apr 2018, 16:59
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.

Re: Prelude conversion project - some questions

Posted: Thu, 26 Apr 2018, 20:34
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:

Re: Prelude conversion project - some questions

Posted: Thu, 26 Apr 2018, 20:47
by jonescg
Yes, correctly spotted ☺. Pin 5 wouldn't grip the solid core wire properly so I used 2 instead.

...pedant. 😆

Re: Prelude conversion project - some questions

Posted: Fri, 27 Apr 2018, 15:15
by jonescg
Updated the code and circuit to operate from four independent thermistors now.
Pumps on.jpg
Pumps on.jpg (161.64 KiB) Viewed 746 times
Pumps and compressor on.jpg
Pumps and compressor on.jpg (139.13 KiB) Viewed 746 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 Therm1Value = 0;  // 
int Therm2Value = 0;  // 
int Therm3Value = 0;  // 
int Therm4Value = 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 (coolant pump)
  pinMode(2, OUTPUT);      // declare pin 2 as an output (AC compressor)

}

void loop() {
  
  delay(150);
  Therm1Value = analogRead(Therm1);
  Therm2Value = analogRead(Therm2);
  Therm3Value = analogRead(Therm3);
  Therm4Value = analogRead(Therm4);
  delay(150);
  Therm1Value = analogRead(Therm1);
  Therm2Value = analogRead(Therm2);
  Therm3Value = analogRead(Therm3);
  Therm4Value = analogRead(Therm4);     // 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)
    digitalWrite(4, HIGH);      // if the reading exceeds 630, turn 4 on
  else
    digitalWrite(4, LOW);       // otherwise leave it off
    
  if (Therm1Value > HighT or Therm2Value > HighT or Therm3Value > HighT or Therm4Value > HighT)
    digitalWrite(2, HIGH);      // if the temperature sensor exceeds 640, turn 2 on
  else
    digitalWrite(2, LOW);       // otherwise leave it off
    
}

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...

Re: Prelude conversion project - some questions

Posted: Wed, 02 May 2018, 16:10
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 722 times
Prelude battery placement.jpg
Prelude battery placement.jpg (358.14 KiB) Viewed 722 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).

Re: Prelude conversion project - some questions

Posted: Mon, 14 May 2018, 21:28
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 654 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 654 times
9050135 (3).jpg
9050135 (3).jpg (27.45 KiB) Viewed 654 times
9050135 (4).jpg
9050135 (4).jpg (30.61 KiB) Viewed 654 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!

Re: Prelude conversion project - some questions

Posted: Tue, 15 May 2018, 14:35
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)

Re: Prelude conversion project - some questions

Posted: Thu, 17 May 2018, 10:52
by jonescg
So I bought one of these:
Strom-linie Astro water heater.jpg
Strom-linie Astro water heater.jpg (179.45 KiB) Viewed 589 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.

Re: Prelude conversion project - some questions

Posted: Thu, 17 May 2018, 18:05
by 4Springs
Details on that heat exchanger? It looks a neat little unit.

Re: Prelude conversion project - some questions

Posted: Thu, 17 May 2018, 18:21
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

Re: Prelude conversion project - some questions

Posted: Thu, 17 May 2018, 18:40
by jonescg
I might have bought a few of these too:
IMG_1421.png
IMG_1421.png (317.78 KiB) Viewed 565 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 565 times

Re: Prelude conversion project - some questions

Posted: Fri, 18 May 2018, 16:17
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 551 times
WURZ AC Compressor in an actual EV.jpg
WURZ AC Compressor in an actual EV.jpg (227.4 KiB) Viewed 551 times
At least they provided a wiring diagram!
Wurz Wiring diagram.JPG
Wurz Wiring diagram.JPG (41.46 KiB) Viewed 551 times
I got two - one for the Prelude and one for the CRX.

Re: Prelude conversion project - some questions

Posted: Wed, 23 May 2018, 16:55
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 512 times
After all, I'll need some cooling fans to suit, and these are already the right size...

Re: Prelude conversion project - some questions

Posted: Fri, 25 May 2018, 21:58
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 467 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.

Re: Prelude conversion project - some questions

Posted: Tue, 29 May 2018, 20:56
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 400 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 400 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.

Re: Prelude conversion project - some questions

Posted: Wed, 30 May 2018, 18:49
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 387 times
It begins in earnest :mrgreen:

Re: Prelude conversion project - some questions

Posted: Mon, 11 Jun 2018, 21:23
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 275 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?

Re: Prelude conversion project - some questions

Posted: Mon, 11 Jun 2018, 21:34
by coulomb
Legit in my opinion. So you'll still need a small pre-charge circuit.

Re: Prelude conversion project - some questions

Posted: Mon, 11 Jun 2018, 21:55
by jonescg
I could probably leave a resistor across the contactor since the master contactor will be open whenever the vehicle is vacant.

Re: Prelude conversion project - some questions

Posted: Tue, 12 Jun 2018, 07:13
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.

Re: Prelude conversion project - some questions

Posted: Tue, 12 Jun 2018, 08:47
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...

Re: Prelude conversion project - some questions

Posted: Tue, 12 Jun 2018, 08:56
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.

Re: Prelude conversion project - some questions

Posted: Tue, 12 Jun 2018, 09:03
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.