OpenInverter Mainboard in a Siemens Simotion?

Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

Hej,
It has been a while, so sorry for my late reply, but I have made some progress. I have now run the motor in manual mode for the first time, that was a very cool thing to see!

There are still a few things I would like to work on:
- The PWM outputs (inverted logic) are clean when coming out of the main board. However, when connected to the opto-couplers on the driver board, their amplitude decreases drastically (on both ends: the signal does not decrease to 0V and is only slowly reaching 5V, see oscilloscope screenshot attached).

- I don't really understand why there are two opto-couplers per channel, but I think they are part of the low-amplitude problem. If I do understand that circuit, I might be able to make a cleaner PWM signal to the drivers.

- Joromy: Unfortunately, I cannot find the desat fault signal, I have looked for it by forcing a short circuit in an IGBT pair (with a resistor in series with a battery) and trying to observe a change in any of the pins. Joromy: I do not really follow what you describe about your board, I have indeed two opto-couplers per driver channel (so for L1,2,3 Low,High), but I cannot see where the High and Low channels would communicate with each other in some AND gate or so to form the desat output signal? I am suspecting the desat signal might be formed on the control board instead?

- The IGBT on- and off switching times might be a bit long (4 microseconds), and with some irregularity. I have no experience with this, so it is hard to judge whether this is a real problem. The entire voltage difference between on and off is about 18 Volt. At about halfway closing, the driver voltage reaches a 'plateau' where the voltage is constant for a while, before slowly increasing to a fully 'closed' state. All in all, the switching takes about 4 microseconds. Is that particularly slow, or a common switching time? The opening of the IGBT takes about as much time, but occurs in one smooth line. This behaviour is similar in all transistors.

- There is also some 'ringing' in the transistors during closing, which is also observed in the PWM driver signals (see picture attached). Does anyone recognize this behavior?

- It seems that I can read out the current sensors, they come in two pairs, that run in anti-phase, such that their difference is quite a high-amplitude signal and the traces are quite clean. I hope I can reshape that signal to something that the OpenInverter board can read.

Joromy: I do recognize some components on that board, indeed.. However, I think I have much older components on it, like big (red) transformer boxes instead of DCDC converters :). They are both built at around the same time, but I guess my controller has been designed earlier.

- board with connectors
Attachments
There is little vertical space in my controller, so I used 90 degree angled connectors.
There is little vertical space in my controller, so I used 90 degree angled connectors.
Oscilloscope trace of the PWM channel when connected to the driver board: the horizontal cursor lines indicate the minimum and maximum potential when unconnected to the driver board, so a large reduction in amplitude.
Oscilloscope trace of the PWM channel when connected to the driver board: the horizontal cursor lines indicate the minimum and maximum potential when unconnected to the driver board, so a large reduction in amplitude.
Close up of the gate driver board
Close up of the gate driver board
Oscilloscope trace of the PWM channel (top) and IGBT closing (bottom) simultaneously. Note the synchronized 'ringing' when the IGBT reaches a 'plateau'.
Oscilloscope trace of the PWM channel (top) and IGBT closing (bottom) simultaneously. Note the synchronized 'ringing' when the IGBT reaches a 'plateau'.
Oscilloscope trace of one period of closing and opening of an IGBT.
Oscilloscope trace of one period of closing and opening of an IGBT.
Oscilloscope trace of one of the IGBTs opening.
Oscilloscope trace of one of the IGBTs opening.
Oscilloscope trace of one of the IGBTs closing.
Oscilloscope trace of one of the IGBTs closing.
Close up of one of the drive lines
Close up of one of the drive lines
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by joromy »

Bart wrote: Thu Jun 25, 2020 9:39 pm - The PWM outputs (inverted logic) are clean when coming out of the main board. However, when connected to the opto-couplers on the driver board, their amplitude decreases drastically (on both ends: the signal does not decrease to 0V and is only slowly reaching 5V, see oscilloscope screenshot attached).
What impedance do you measure, does the PWM signal go directly to the optocoupler and a resistor?
Spec on the optocoupler it may help. It's a "Gate Drive Interface Optocoupler"
https://docs.rs-online.com/5ebf/0900766b807796e2.pdf
Bart wrote: Thu Jun 25, 2020 9:39 pm - I don't really understand why there are two opto-couplers per channel, but I think they are part of the low-amplitude problem. If I do understand that circuit, I might be able to make a cleaner PWM signal to the drivers.
One of the optocoupler is OUT from the IGBT driver circuit!
Bart wrote: Thu Jun 25, 2020 9:39 pm - Joromy: Unfortunately, I cannot find the desat fault signal, I have looked for it by forcing a short circuit in an IGBT pair (with a resistor in series with a battery) and trying to observe a change in any of the pins. Joromy: I do not really follow what you describe about your board, I have indeed two opto-couplers per driver channel (so for L1,2,3 Low,High), but I cannot see where the High and Low channels would communicate with each other in some AND gate or so to form the desat output signal? I am suspecting the desat signal might be formed on the control board instead?
I think you must follow the signal that are coming OUT from IGBT driver (optocoupler OUT) it's probably going to some circuit for fault/desat. And it's a OR gate (not AND gate) any of the input will trigger.
Bart wrote: Thu Jun 25, 2020 9:39 pm Joromy: I do recognize some components on that board, indeed.. However, I think I have much older components on it, like big (red) transformer boxes instead of DCDC converters :). They are both built at around the same time, but I guess my controller has been designed earlier.
It's the same in my driver board, NO DC/DC, only one transformer and rectifiers for each isolated power supply channel.

BTW. The tl082mjg would be the voltage sense OpAmp.
https://uk.rs-online.com/web/p/op-amps/7968307/
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by johu »

Bart wrote: Thu Jun 25, 2020 9:39 pm - The IGBT on- and off switching times might be a bit long (4 microseconds), and with some irregularity. I have no experience with this, so it is hard to judge whether this is a real problem. The entire voltage difference between on and off is about 18 Volt. At about halfway closing, the driver voltage reaches a 'plateau' where the voltage is constant for a while, before slowly increasing to a fully 'closed' state. All in all, the switching takes about 4 microseconds. Is that particularly slow, or a common switching time? The opening of the IGBT takes about as much time, but occurs in one smooth line. This behaviour is similar in all transistors.
4us is quite slow, so you should probably run at 4.4kHz and high deadtime setting like above 180 or so. Otherwise it is normal, the plateau is called "Miller Knee" and can be observed on any IGBT.
Bart wrote: Thu Jun 25, 2020 9:39 pm - There is also some 'ringing' in the transistors during closing, which is also observed in the PWM driver signals (see picture attached). Does anyone recognize this behavior?
Doesn't look alarming.
Bart wrote: Thu Jun 25, 2020 9:39 pm - It seems that I can read out the current sensors, they come in two pairs, that run in anti-phase, such that their difference is quite a high-amplitude signal and the traces are quite clean. I hope I can reshape that signal to something that the OpenInverter board can read.
Check out the Prius board: viewtopic.php?f=14&t=701&start=80#p10140 it has two +-15V to 0-3.3V stages. Omit the second input, frankly.
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

Thanks Joromy and Johannes!

I have been trying to improve the amplitude of the PWM signals, but to no avail. For now, I don't see a real danger with using the system as is (the switching is on time, as well), but it doesn't feel quite right, especially considering disturbing electromagnetic noise in real life. It might also be just the LED inside the optocoupler that does not allow a larger voltage difference, in that case I should be safe, I guess.
joromy wrote: Fri Jun 26, 2020 7:16 am What impedance do you measure, does the PWM signal go directly to the optocoupler and a resistor?
There is a small 50 Ohms resistor in series with the PWM signal, but otherwise it does go directly to the opto-coupler. I have made a small schematic of the circuit around the optocoupler, I will upload it this weekend, when I have access to it.
joromy wrote: Fri Jun 26, 2020 7:16 am One of the optocoupler is OUT from the IGBT driver circuit!
Ok, do you know in your inverter what this output signal is used for?
About the AND/OR logic: I have no experience with these boards, but I was just imagining a logic scheme with both AND gates (between the signals of both high and low transistors of a single phase), and OR gates to have the Desat signal be triggered if one of these three detects a transistor high and low pair be closed simultaneously. I have attached a small drawing hopefully explaining what I mean.
joromy wrote: Fri Jun 26, 2020 7:16 am BTW. The tl082mjg would be the voltage sense OpAmp.
https://uk.rs-online.com/web/p/op-amps/7968307/
Thanks for sharing that information!
johu wrote: Fri Jul 03, 2020 7:36 am Check out the Prius board: viewtopic.php?f=14&t=701&start=80#p10140 it has two +-15V to 0-3.3V stages. Omit the second input, frankly.
Thanks for the tip! I am not quite sure what to do with my amp-signals, honestly; Their amplitudes are very high! At about 20 Amps, they show about 19 Volts peak-to-peak. I have to check their linearity, but if they are indeed linear, this will become about 400 Volt peak-to-peak at about 280 A (rated max current)! This seems absurdly high.
johu wrote: Fri Jul 03, 2020 7:36 am 4us is quite slow, so you should probably run at 4.4kHz and high deadtime setting like above 180 or so. Otherwise it is normal, the plateau is called "Miller Knee" and can be observed on any IGBT.
Thanks for the advice, I will stick to 4.4 kHz in that case.

/Bart
Attachments
Logic scheme of what a desat signal circuit might look like?
Logic scheme of what a desat signal circuit might look like?
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by johu »

Bart wrote: Tue Jul 14, 2020 8:30 pm
johu wrote: Fri Jul 03, 2020 7:36 am Check out the Prius board: viewtopic.php?f=14&t=701&start=80#p10140 it has two +-15V to 0-3.3V stages. Omit the second input, frankly.
Thanks for the tip! I am not quite sure what to do with my amp-signals, honestly; Their amplitudes are very high! At about 20 Amps, they show about 19 Volts peak-to-peak. I have to check their linearity, but if they are indeed linear, this will become about 400 Volt peak-to-peak at about 280 A (rated max current)! This seems absurdly high.
Try loading it down with a resistor. Like 10k or even down to 470 Ohm
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
User avatar
joromy
Posts: 371
Joined: Fri Jun 28, 2019 12:56 pm
Has thanked: 1 time
Been thanked: 3 times

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by joromy »

Bart wrote: Tue Jul 14, 2020 8:30 pm
joromy wrote: Fri Jun 26, 2020 7:16 am One of the optocoupler is OUT from the IGBT driver circuit!
Ok, do you know in your inverter what this output signal is used for?
Not sure but I would guess some fault/desat out signal from the HV side of the IGBT driver circuit.
In theory is should look something like this:
figure2.png
I'm wondering how to trigger a IGBT fault to see what happens with the "fault" out in a safe way, but have not found out how.

Would be nice to know how that "fault" output is behaving.
Maybe someone more knowledgeable can step in?
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

Hey,
Happy new year everyone, hopefully a better one than the past one. That was a while ago, I didn't have time for too long, but now I could do some things during holidays... I have built a small 'intermediate' board to make a connection between the Siemens driver board and logic board. In the end, I would like to design a larger board that fits in the place of the original logic board, in which the openinverter board can easily be fit. This could then also be useful for other projects involving this Siemens inverter. But for now, let's try to test and make things work with this board...

Heatsink thermistors
The thermistors in the IGBT transistors (heatsink) are indicated 'T+' and 'T-'. I connected 'T+' to JP7,13 and T- to GND.
I suspect that the heatsink thermistors are of the type KTY83: I measure about 880 Ohm at about 10 degrees Celcius, and when heating them up, their resistor value increases (PTC). Attached the schematic of how I connected it now.

Joromy: I saw that you connected the thermistor probe to a 1.2kOhm resistor to ground, and the other side (T+) of the thermistor to 5V, but then I'm aware that you have a different kind of thermistor, so I'm not sure whether I should do the same.

How can I choose the Kty83 as the heatsink thermistor in the software? In the file 'temp_meas.cpp' a table of thermistors is given, (around line 100), and it seems that only 0-6 can be choosen for 'snshs' in the web interface, even though the table has many more entries than that. Is there something I'm doing wrong?

Current sensors
As Johannes suggested, I tried to 'load down' the current sensor signals. Even connecting a 680 Ohm resistor had no effect on the voltage output, so I think I will try to make it using a voltage divider bridge to transform the signal to something that the openinverter board can deal with. Attached a suggested circuit, if there are any comments or suggestions, they are very welcome.

Also attached the current sensor outputs of L1 and L2. The signals are symmetric around GND, so the zero current line needs to be 'pulled up' to 1.65 V.

All the best,
Bart
Attachments
My first PCB from PLC :)
My first PCB from PLC :)
The thermistor schematic as I connected it now...
The thermistor schematic as I connected it now...
Thermistor_schematic.png (5.23 KiB) Viewed 3266 times
A suggestion for the current sensor interface between Siemens driver board and openinverter
A suggestion for the current sensor interface between Siemens driver board and openinverter
Current_sensor_suggested_schematic.png (6.49 KiB) Viewed 3266 times
A screenshot of the current sensors L1 and L2, with the AC current read by the multimeter on the side.
A screenshot of the current sensors L1 and L2, with the AC current read by the multimeter on the side.
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

For future reference, these are the 40 pins connectors/receptacles/flat cables used for the communication from logic board to gate driver board:

https://www.digikey.com/en/products/det ... =349559234
https://www.digikey.nl/products/nl?keywords=A31868-ND
https://www.digikey.com/en/products/det ... =349559722

/Bart
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

Hey everyone,

I have now finished a draft version for the Siemens replacement board. I have made it by shamelessly stealing the drawings from Johannes (thanks for sharing), and adding the footprints and additional parts around it. Since I am not a master in handling microcontrollers, I have added an Arduino Nano for everything around the inverter functions.
In my case, those extra functions are mostly concerned with temperature control (reading all three heat sink temperature probes, controlling the water pump, fan, AC), so the board becomes more of a VCU in a sense.
It is one of my first times designing a PCB, so a lot to learn :). I added some redundant parts, and room for 'experiments' to do on the board later on, in case needed. If anyone has any tips/remarks, let me know :).
I will now proceed to try to make it ready to order. I will also make it available on GitHub.

Cheers,
Bart
Attachments
3D snapshot of the unpopulated board
3D snapshot of the unpopulated board
PCB_layout_Logic_Board_v0_03-2021.pdf
PCB layout (without the GND and VCC mask)
(285.59 KiB) Downloaded 134 times
Schematic_Logic_Board_v0_03-2021.pdf
Schematic layout, with the dashed square the part that Johannes has designed.
(424.93 KiB) Downloaded 137 times
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by johu »

Nice ripoff :)
But you followed the rules: kept name and logo, thumbs up :)
The series resistors before your ULN2003 may be a good idea. I have seen a blown STM in reaction to a short circuit on the ULN. Sent 12V straight back through the input pins :(
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

Hey all,

I have now placed the order at JLCPCB. The files are also placed on GitHub for anyone to use. Note that this project is now converted to KiCAD, which means I had to make some adjustments to the component positioning and adding the JLCPCB (LCSC) codes to components in the schematic. I have added things around the board, but these files might save time for people working on a different version of the board in KiCAD.

In the order process, I thought I was going crazy because the STM32 chip seems to have been renamed overnight by JLCPCB. As far as I can see, the old name (LCSC code C8735) is not recognized by them anymore, instead it has changed to the name C46034.... Maybe I am doing something wrong, because it seems very strange to change the name of a component. Anyway, if they did then it is important to know for those of you ordering openinverter boards from JLCPCB...

All the best,
Bart
User avatar
johu
Site Admin
Posts: 5682
Joined: Thu Nov 08, 2018 10:52 pm
Location: Kassel/Germany
Has thanked: 153 times
Been thanked: 960 times
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by johu »

They have removed the RBT6 from their parts!
You ordered the R8T6 which only has 64k flash. Thats ok, but you'll have to change the flash pages where parameters and CAN mapping is stored.
Hmm, I'll either have to detect the flash size or it's time to move to another processor
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
Bart
Posts: 25
Joined: Fri Feb 07, 2020 1:23 pm
Location: Netherlands
Contact:

Re: OpenInverter Mainboard in a Siemens Simotion?

Post by Bart »

ImageHey all,
After a long silence I can now report a bit of progress. I have built in the newly built PCB. Everything fits mechanically, so that is already a big relief.
I have flashed the microcontroller, and now I hope I can set up the WiFi transmitter as well. Also the connector to the control board seems to fit.

I realized that the motor FWD direction is actually backwards in the car. Either the original motor is built into the Think car the other way around, or the convention is somehow opposite. Right now it is not really a relevant problem yet, but I just wonder what would be the best solution: to flip two phase cables (seems a bit 'dirty' solution), or can I deal with it through software?
EDIT: I just read in another forum that one can set dirmode to "SwitchReversed" if you don't want to pull wires. So I guess this is what I will do, thanks!

Attached some pictures of the new board. Thanks again for your help!
Bart
Attachments
Control board in the controller lid
Control board in the controller lid
Control board with main connector soldered
Control board with main connector soldered
Post Reply