GS450h Buck/Boost Converter control

Topics concerning the Toyota and Lexus inverter drop in boards
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

GS450h Buck/Boost Converter control

Post by xp677 »

This converter can produce dangerous voltages from seemingly harmless low voltage supplies. Use at your own risk, you're responsible for your safety and your property. If there's a fault or mistake with the details in this thread, or my programming, and you destroy your converter or any attached hardware, injure yourself or someone else through bad electrical safety practices, etc, then you're on your own.

To complement the work on the GS450h inverter, here is the control method for the 30kW Buck/Boost converter.

I control this converter using a bare Arduino Nano mounted to the inverter control PCB.

The following pins need to be connected (for the attached sketch)
  • +5v
  • GND
  • HV Voltage Read (A0)
  • LV Voltage Read (A1)
  • PWM High (D6)
  • PWM Low (D5)
You can use any pins you like, you will need PWM pins for the PWM signals, and analog pins for the voltage readings.

Here's how I mounted my Nano:

Image


Here's where to get the 5V from. I found it hard to solder onto the SMD pads, I scuffed the coating from this PCB trace and use that as a pad:

Image


Here's where to find the HV reading. You can solder onto the pad for the 50-way connector, or strip and splice into the wire harness:

Image


Here's where to find everything else You can solder onto the pad for the 16-way connector, or strip and splice into the wire harness. The GND I referenced is just a convenient place to get GND for the Nano, you can ignore this and get GND from anywhere else of your choice:

Image

I de-pinned the PWM high and PWM low wires. I hear it works if you leave them fitted to the connector. Not tested.

I added CAN to my controller. I just used an eBay MCP2515 board. You can ignore this, it's up to you. If you don't want to use CAN, just delete all the relevant parts from the code.

To enable the converter, you need to do the following:
  • Remove R648.
  • Replace D14 with a 0R link (I used an 0805 0R resistor, you can use a piece of wire, blob of solder, etc).
Image Image

I do not know the function of this PCB modification. Thanks to Damien for the advice here. No idea what I did wit this modification, but it works.

I have not tested if the inverter still works after doing this modification.

The code is attached. It adjusts the voltage to your desired setpoint, and outputs diag data over serial and CAN.

I have left out the "decide what mode to use" function, you can finish that yourself using your own method.

This converter can easily produce dangerous voltages from seemingly harmless low voltage supplies. I've tested this at 180v from a 12v PSU. For that reason, I've left the code non-functioning (it will work fine but not enable Buck or Boost mode unless edited).

I added a few lines to keep the voltage within a max/min that you specify, but this in untested.

There is also a spreadsheet, which converts between the readings and actual voltages. I don't intend to do the conversion within the programming, because I do not know if my divisor and offset values are correct. Better to base it on the raw readings. I'll say again: The conversions in the spreadsheet may be incorrect. Test and verify with a multimeter before use.

Use at your own risk, you're responsible for your safety and your property. If there's a fault or mistake with the details in this thread, or my programming, and you destroy your converter or any attached hardware, injure yourself or someone else through bad electrical safety practices, etc, then you're on your own.
Attachments
converter conversions.xls
(130 KiB) Downloaded 405 times
gs450h_converter.txt
(5.25 KiB) Downloaded 427 times
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

Pictures from my testing:

Image

Image

Note that the two wire colours for the PWM signals in the below image are not correct. I originally used the wrong wires, and had to re-pin the connector in the converter housing to correct this. Follow my guide image above, which purposely does not mention wire colours for this reason.
Image

Image

Image
User avatar
Jack Bauer
Posts: 3582
Joined: Wed Dec 12, 2018 5:24 pm
Location: Ireland
Has thanked: 2 times
Been thanked: 141 times
Contact:

Re: GS450h Buck/Boost Converter control

Post by Jack Bauer »

Super work.
I'm going to need a hacksaw
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

Jack Bauer wrote: Sat Feb 15, 2020 6:29 pmSuper work.
Couldn't have done it without your help! I have no idea how you found that enable signal, especially as you didn't have a GS450h at the time to probe!
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

Update to the code for the CAN stuff, just makes it a bit more usable:

Code: Select all

void vcan_send()
{
  for (int i = 0; i < 8; i++) can_message[i] = 0;
  checksum = 0;

  can_message[0] = lv_voltage & 0xff;
  can_message[1] = lv_voltage >> 8;
  can_message[2] = hv_voltage & 0xff;
  can_message[3] = hv_voltage >> 8;
  can_message[4] = dutycycle;
  can_message[5] = mode;

  for (int i = 0; i < 6; i++)checksum += can_message[i];
  can_message[6] = checksum & 0xff;
  can_message[7] = checksum >> 8;


  vcan.sendMsgBuf(0x202, 0, 8, can_message);  // send data:  id = 0x00, standard frame, data len = 8, stmp: data buf
}

And in serial_diag()

Code: Select all

  Serial.print("CAN_ID:\t");
  Serial.print(CAN_ID, HEX);
  Serial.print(" |");
  for (int i = 0; i < 8; i++)
  {
    Serial.print("  ");
    Serial.print(can_message[i], DEC);
  }
  Serial.print("  Checksum: ");
  Serial.println(checksum);
I send the CAN wires out through the same connector as the inverter wiring. The point of the CAN is to see how the converter is doing, and to tell it whether it should buck or boost depending on BMS state.

You could alternatively tell it to buck or boost through digital inputs via optoisolators or whatever you like, you coudl run SPI out to an external screen and program that or whatever.

Since this microcontroller is going to spend its life enclosed within the inverter housing, and (for me at least) be the central point for all the high voltage management in the vehicle, I want to be able to see how, and what, it's doing.

You could also just use an if statement to choose the mode, and have the whole thing run standalone. For example:

if(HV bus > min battery voltage) and (LV bus < your desired LV bus) then buck
if(LV bus >= your charging voltage) then boost
if(out of sensible ranges) then off

This is all a bit too new and important for me to trust running standalone. For my project I'll control it via CAN from my BMS. For those who don't know, the code needed would be (in your loop() function):

Code: Select all

  if (CAN_MSGAVAIL == vcan.checkReceive() && vcan_ok)vcan_receive();

And the vcan_receive() function would be something like:

Code: Select all

long unsigned int vcan_id;
unsigned char vcan_len = 0;
unsigned char vcan_incoming[8];

void vcan_receive()
{
  vcan.readMsgBuf(&vcan_id, &vcan_len, vcan_incoming);

  switch(vcan_id)
  {
    case(BMS_ID that has a BMS mode in it):
    if(vcan_incoming[0 to 7] == whatever your charge mode is)
    {
      its in charge mode so boost;
    }
    
    else if(vcan_incoming[0 to 7] == whatever your drive mode is)
    {
      its in drive mode so buck;
    }
    
    else its in neither so off;
    break;
  }
}

All of that code is true for the MCP2515 library. For due_can, flexcan, etc, it's different, albeit similar code, so adjust accordingly.
RE3Rotor
Posts: 74
Joined: Thu Feb 06, 2020 11:37 pm
Location: Vancouver, Canada

Re: GS450h Buck/Boost Converter control

Post by RE3Rotor »

This is awesome. I would like to use this to power the AC compressor. But I am still ways away from getting there.
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

It would be fine for that. If you use the GS450h compressor, you can plug directly into the port on the inverter that is connected to the "lv" side.
User avatar
mfox
Posts: 148
Joined: Fri Apr 05, 2019 9:56 pm
Location: Croatia
Been thanked: 2 times

Re: GS450h Buck/Boost Converter control

Post by mfox »

I don't get it what is the puropse to boost voltage from low woltage to high (DC). If it can from high voltage to 12 V , that will be awesome ...
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: GS450h Buck/Boost Converter control

Post by sfk »

There are some efficiencies to be had by using higher voltage, such as lower losses and use of smaller gauge wiring. The standard battery pack voltages for Toyota/Prius are only around 250V. And most use nickel battery chemistry though I think Toyota is shifting towards lithium?
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
JaniK
Posts: 395
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 55 times
Been thanked: 14 times

Re: GS450h Buck/Boost Converter control

Post by JaniK »

Superb looking work, If i understand correctly, one could use a lets say a 48volt solar battery system to charge EV battery pack at desired speeds under 30kw ??

This is huge!

Do correct me if I am wrong though..
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
User avatar
mfox
Posts: 148
Joined: Fri Apr 05, 2019 9:56 pm
Location: Croatia
Been thanked: 2 times

Re: GS450h Buck/Boost Converter control

Post by mfox »

JaniK wrote: Sun Feb 16, 2020 8:37 pm Superb looking work, If i understand correctly, one could use a lets say a 48volt solar battery system to charge EV battery pack at desired speeds under 30kw ??

This is huge!

Do correct me if I am wrong though..
This is great. didn't think about that : :D
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: GS450h Buck/Boost Converter control

Post by Dilbert »

I wonder if your running a high voltage pack, you could use this as a power factor correction device, so you could make sure your pulling mains current for the full duration of the cycle.
User avatar
sfk
Posts: 289
Joined: Mon Jan 14, 2019 8:29 pm
Location: Wellington, NZ
Has thanked: 2 times

Re: GS450h Buck/Boost Converter control

Post by sfk »

JaniK wrote: Sun Feb 16, 2020 8:37 pm Superb looking work, If i understand correctly, one could use a lets say a 48volt solar battery system to charge EV battery pack at desired speeds under 30kw ??
Not sure what you mean using the term "charge" and "speeds" together.
Do you mean to drive with just a 48V solar panel?
Or do you mean charge the battery with a 48V panel?

Either way, you'll need a VERY LARGE solar panel... :lol:
-< Mazda Eunos JC Cosmo rotary -> EV conversion w/ Lexus GS450H gear >-
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

mfox wrote: Sun Feb 16, 2020 6:44 pm I don't get it what is the puropse to boost voltage from low woltage to high (DC). If it can from high voltage to 12 V , that will be awesome ...
It can also work in reverse, converting higher voltage to lower voltage.

A good rule of thumb is to keep within 10x of the original voltage. This converter may be suitable for, say, a 144V pack converted down to 14V to use as a DCDC converter, but you won't get much performance out of a 144V pack on the Lexus GS motors.

The purpose is to allow people with a GS450h inverter and motor setup to run battery packs with higher pack voltages than most OEM EV hardware is designed for. For example, PTC heaters, DCDC converters, AC Compressors, AC chargers. Most of the options available from the big manufacturers operate at between 280V and 360V. The GS450h system allows for much higher bus voltages, if you want run the system at higher voltages (AND YOU DON'T HAVE TO!), then you may find this buck/boost converter to be of use for running the rest of the car.
JaniK wrote: Sun Feb 16, 2020 8:37 pm Superb looking work, If i understand correctly, one could use a lets say a 48volt solar battery system to charge EV battery pack at desired speeds under 30kw ??
Yes you could. You could step up that 48V to your pack voltage using this converter.
Dilbert wrote: Sun Feb 16, 2020 8:47 pm I wonder if your running a high voltage pack, you could use this as a power factor correction device, so you could make sure your pulling mains current for the full duration of the cycle.
Maybe? It's designed for DC inputs, I've never heard of or seen one running on AC. It may try to chase the waveform. You would need to rectify it, of course, and you may need additional smoothing capacitors (there are capacitors onboard as well).

I will do a write-up of the hardware soon, and put it in the Wiki.
Dilbert
Posts: 410
Joined: Mon Aug 12, 2019 7:21 pm
Location: Dublin, Ireland
Been thanked: 4 times

Re: GS450h Buck/Boost Converter control

Post by Dilbert »

yes boost converter would need to be synchronized with the incoming mains so the system draws sinusoidal current in phase with the sinusoidal voltage.

Other option might be two packs, high voltage pack with limited capacity and a lower voltage pack with more capacity.
JaniK
Posts: 395
Joined: Sun Aug 25, 2019 12:39 pm
Location: Finland
Has thanked: 55 times
Been thanked: 14 times

Re: GS450h Buck/Boost Converter control

Post by JaniK »

sfk wrote: Sun Feb 16, 2020 8:55 pm
JaniK wrote: Sun Feb 16, 2020 8:37 pm Superb looking work, If i understand correctly, one could use a lets say a 48volt solar battery system to charge EV battery pack at desired speeds under 30kw ??
Not sure what you mean using the term "charge" and "speeds" together.
Do you mean to drive with just a 48V solar panel?
Or do you mean charge the battery with a 48V panel?

Either way, you'll need a VERY LARGE solar panel... :lol:
I ment Charging from a 48v battery pack that has been charged with solar panels previously.

By speeds under 30kw I mean: Charging speed choices under 30kw. So would work as a 6kw charger or 22kw or...
Any opinions are my own, unless stated otherwise. I take no responsibility if you follow my way of doing things and it doesn't work. Please double check with someone who knows what they are doing.
User avatar
mfox
Posts: 148
Joined: Fri Apr 05, 2019 9:56 pm
Location: Croatia
Been thanked: 2 times

Re: GS450h Buck/Boost Converter control

Post by mfox »

One thing is not clear to me. Original lexus have arround 280V battery pack and it boost voltage to 650V for motor running... How can he have more power from that boosted voltave then 30kw (or 37 kw ) from converter that is rated as 30kw max...
arber333
Posts: 3435
Joined: Mon Dec 24, 2018 1:37 pm
Location: Slovenia
Has thanked: 101 times
Been thanked: 304 times
Contact:

Re: GS450h Buck/Boost Converter control

Post by arber333 »

mfox wrote: Fri Feb 21, 2020 10:25 am One thing is not clear to me. Original lexus have arround 280V battery pack and it boost voltage to 650V for motor running... How can he have more power from that boosted voltave then 30kw (or 37 kw ) from converter that is rated as 30kw max...
It is not. Usually by the time motors spin up boost converter reaches 600Vdc and ICE joins in. 30KW at 10000rpm is not so low at least with inertia.
But i agree when you have 420Vdc battery and use FW to spin up the motors to their max speed power/torque should not be limited by electronics anymore.
User avatar
celeron55
Posts: 801
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 37 times
Been thanked: 131 times
Contact:

Re: GS450h Buck/Boost Converter control

Post by celeron55 »

As JaniK brought solar panels up, I'll hijack the thread for one question that dosn't (yet) seem worthy of a full thread:

I've been considering solar panels for my conversion (it's a van, can fit multiple square meters), but I'm concerned about electrical isolation. It feels totally wrong to have solar panels outside the vehicle galvanically connected to the HV system, which is what a Toyota boost converter would do.

Of course solar panels are isolated to like 1000V and if the rest of the system is intact you could splice and hold the solar panel wires and the chassis in your hands and be fine, but even a small HV leak elsewhere to the chassis would make that potentially fatal. An isolated boost converter will be hard to find and expensive. Thoughs?
rikohm
Posts: 29
Joined: Tue Feb 26, 2019 8:08 pm
Location: Piteå, Sweden

Re: GS450h Buck/Boost Converter control

Post by rikohm »

celeron55 wrote: Fri Feb 21, 2020 7:00 pm As JaniK brought solar panels up, I'll hijack the thread for one question that dosn't (yet) seem worthy of a full thread:

I've been considering solar panels for my conversion (it's a van, can fit multiple square meters), but I'm concerned about electrical isolation. It feels totally wrong to have solar panels outside the vehicle galvanically connected to the HV system, which is what a Toyota boost converter would do.

Of course solar panels are isolated to like 1000V and if the rest of the system is intact you could splice and hold the solar panel wires and the chassis in your hands and be fine, but even a small HV leak elsewhere to the chassis would make that potentially fatal. An isolated boost converter will be hard to find and expensive. Thoughs?
Thinking... wouldn't a cheap offgrid solar inverter do that for you. Step up to 350-400vdc before it makes the 240vac?
User avatar
celeron55
Posts: 801
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 37 times
Been thanked: 131 times
Contact:

Re: GS450h Buck/Boost Converter control

Post by celeron55 »

Wait we already have a topic for solar converting here, let's continue there if something comes to mind: viewtopic.php?f=9&t=492
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

mfox wrote: Fri Feb 21, 2020 10:25 am One thing is not clear to me. Original lexus have arround 280V battery pack and it boost voltage to 650V for motor running... How can he have more power from that boosted voltave then 30kw (or 37 kw ) from converter that is rated as 30kw max...
By using the petrol engine.
RE3Rotor
Posts: 74
Joined: Thu Feb 06, 2020 11:37 pm
Location: Vancouver, Canada

Re: GS450h Buck/Boost Converter control

Post by RE3Rotor »

If I would like to use the buck converter to drive the AC compressor, I will be using the connection on the top of this picture? Does it work by default or do I need to modify the buck/boost converter per your instructions?

Image
xp677
Posts: 437
Joined: Sat Jul 27, 2019 10:53 am
Location: UK
Has thanked: 1 time
Been thanked: 13 times

Re: GS450h Buck/Boost Converter control

Post by xp677 »

Just a heads up that the current method of control, when run at higher DC voltages (tested >300VDC), can cause the converter to explode unexpectedly. I am not sure why it does this.

For now, I recommend fusing your converters as sparingly as possible, and definitely within 80A (or for 30kW, whichever is lower) for now. For those using the complte GS450h unit, this would involve removing/cutting the internal bus bar. For me, I removed the internal bus bar/link, and have a separate input/output for the converter. (you should do this anyway)

Note that if you don't do this, you are exposing the converter to full pack voltage and current. The converter in the picture below blew a 350A fuse at 630VDC, you can see that it was able to vaporise the steel shield above it.

https://imgur.com/a/27bV9Ge

The failure mode of this converter was a short to ground on the HV side, i.e both IGBTs were "on" at the same time. Even though it was previously discussed that this is not possible, please note that it does appear to be possible. Also note that this is not the first time I've seen a converter with the appearance of this failure.

At the time, the converter was bucking 630V down to 320V, and running a 200 ohm resistive test load. It had previously run a Chevrolet Volt APU at 320V with no issues for several hours. The unit had been working fine for approx 6 hours prior, with an occasional "ping" sound which I was trying to eliminate. This "ping" was accompanied by spikes of electrical noise on the voltage feedback inputs to the microcontroller, which in turn upset the feedback significantly enough to momentarily destabilise the output voltage.

I have another two converters on the shelf and will continue work on this shortly. Likely I will need to dig further into the control PCB and the IPM. Either that or I was just unlucky and have had a faulty converter all along!
User avatar
celeron55
Posts: 801
Joined: Thu Jul 04, 2019 3:04 pm
Location: Finland
Has thanked: 37 times
Been thanked: 131 times
Contact:

Re: GS450h Buck/Boost Converter control

Post by celeron55 »

xp677 wrote: Tue Jun 02, 2020 10:35 pm Also note that this is not the first time I've seen a converter with the appearance of this failure.
...
or I was just unlucky and have had a faulty converter all along!
So has there been another case of this or not?
Post Reply