Precharge and Contactor Control [SOLVED]
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Precharge and Contactor Control
Hi everyone. I am using a Leaf Gen 2 board, but I thought this might be more of a general question, so I dropped this in the General category. Firmware that shipped with the board was 5.14 and I have not changed it.
I am using the below pictured opto-isolated relay board between my contactors and the Openinverter Leaf adapter board. I was concerned about the continuous power draw from the contactor and did not want to damage the Openinverter outputs.
Contactors are both TE 2098190-1 with economizers. Precharge relay is a Panasonic AEV52012. Precharge resistor is TE 100 ohm chassis mount HSC100100RJ.
I've noticed a strange behaviour during bench testing and now while testing with low voltage (40V) in the car. When I turn on the ignition switch that powers the inverter and relay board ---- the positive contactor "pulses" on/off for a split second. Then the precharge relay turns on and the system waits until I apply the start signal. After which the precharge relay turns off and the positive contactor engages. So the overall function seems normal - except for that "pulse" when switched on. I also verified the pulse with a scope and no relay board - so its definitely something with the Openinverter control.
Why does the positive contactor "pulse" ? Is there a floating pin somewhere on my Openinverter board? I already tried a 5K pullup resistor on that pin, but it didn't work. I can't imagine the inverter capacitors liking the sudden jolt of 310V. Not to mention the contacts inside the contactor - which I've already read about people having those get welded shut! Do I need to test some kind of RC delay ciruit? Has anyone else seen this?
Comments/suggestions?
I am using the below pictured opto-isolated relay board between my contactors and the Openinverter Leaf adapter board. I was concerned about the continuous power draw from the contactor and did not want to damage the Openinverter outputs.
Contactors are both TE 2098190-1 with economizers. Precharge relay is a Panasonic AEV52012. Precharge resistor is TE 100 ohm chassis mount HSC100100RJ.
I've noticed a strange behaviour during bench testing and now while testing with low voltage (40V) in the car. When I turn on the ignition switch that powers the inverter and relay board ---- the positive contactor "pulses" on/off for a split second. Then the precharge relay turns on and the system waits until I apply the start signal. After which the precharge relay turns off and the positive contactor engages. So the overall function seems normal - except for that "pulse" when switched on. I also verified the pulse with a scope and no relay board - so its definitely something with the Openinverter control.
Why does the positive contactor "pulse" ? Is there a floating pin somewhere on my Openinverter board? I already tried a 5K pullup resistor on that pin, but it didn't work. I can't imagine the inverter capacitors liking the sudden jolt of 310V. Not to mention the contacts inside the contactor - which I've already read about people having those get welded shut! Do I need to test some kind of RC delay ciruit? Has anyone else seen this?
Comments/suggestions?
-
- Posts: 3411
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 97 times
- Been thanked: 297 times
- Contact:
Re: Precharge and Contactor Control
Yea all the time with my mazda inverter... check your uln2003 chip, maybe you can use its diode to keep relays from chattering.
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Thanks for the quick reply arber333. That is very interesting. I do not have any chatter - just a single pulse. And only when ignition initially turned on. Very strange. I will keep trying to solve this before I wire full voltage.
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Hi 900, they are not latching. Are you thinking the response time of a latching relay is slower, so the signal "pulse" coming from the control board might not affect them? Or what other advantage would that have? Please elaborate.
My first reaction is that a latching relay would be an extremely bad idea. Any problem or issue with the control signals could leave the contactors permanently closed since the relay would be latched. Currently, simply cutting power will disconnect the contactors (unless, of course THEY fail and have welded contacts).
My first reaction is that a latching relay would be an extremely bad idea. Any problem or issue with the control signals could leave the contactors permanently closed since the relay would be latched. Currently, simply cutting power will disconnect the contactors (unless, of course THEY fail and have welded contacts).
Re: Precharge and Contactor Control
I am no expert by any means but use of latching relays was proposed by Arber. It depends on how you're going to drive the relays I guess, latching relay needs a single pulse and it remains closed until you cut the power to it. In my understanding losing power to contactors mid drive would kill the inverter so it's kind of a safety feature and latching relays would disengage when you remove power to them too. You can make a latching relay from a normal DPDT relay by looping ground to one of the normally open pins to the ground pin of the coil.E46Driver wrote: ↑Wed Jun 08, 2022 1:52 pm My first reaction is that a latching relay would be an extremely bad idea. Any problem or issue with the control signals could leave the contactors permanently closed since the relay would be latched. Currently, simply cutting power will disconnect the contactors (unless, of course THEY fail and have welded contacts).
-
- Posts: 3411
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 97 times
- Been thanked: 297 times
- Contact:
Re: Precharge and Contactor Control
To chime in here...900 wrote: ↑Wed Jun 08, 2022 2:12 pmI am no expert by any means but use of latching relays was proposed by Arber. It depends on how you're going to drive the relays I guess, latching relay needs a single pulse and it remains closed until you cut the power to it. In my understanding losing power to contactors mid drive would kill the inverter so it's kind of a safety feature and latching relays would disengage when you remove power to them too. You can make a latching relay from a normal DPDT relay by looping ground to one of the normally open pins to the ground pin of the coil.E46Driver wrote: ↑Wed Jun 08, 2022 1:52 pm My first reaction is that a latching relay would be an extremely bad idea. Any problem or issue with the control signals could leave the contactors permanently closed since the relay would be latched. Currently, simply cutting power will disconnect the contactors (unless, of course THEY fail and have welded contacts).
You could make those relays latching. You would just need to connect two relays according to drawing i made in the other thread. Be aware those relays are SPDT!
But i would again advise against it. If you consider they use transistors and optoelectronics which could be another point of failure in hot enviroment. Those are good for giving single pulse but prolonged ON use could weaken them...
I would advise use of similar relays with casing... You can use 12Vdc coil, but i would advise 24Vac coil. It works the same, but it dies not heat up like 12V does.
Two relays should be sufficient with one being precharge and other DC contactor relay. Last one turned into latching circuit.
https://www.newark.com/phoenix-contact/ ... din%20rail
https://www.amazon.com/Relay-Mount-4-Ch ... B07WYD15RY
https://export.rsdelivers.com/product/f ... nt/4572773
Re: Precharge and Contactor Control
So this little automotive 12V relay that I was going to turn into a latching relay and drive main contactor is no go then?
- johu
- Site Admin
- Posts: 6259
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 236 times
- Been thanked: 1286 times
- Contact:
Re: Precharge and Contactor Control
I had similar behaviour when driving high impedance loads from the uln2003. In my case it was a P-channel mosfet and completely different software (stm32-car). Directly on power on I got like 0.5s pulse, after that everything operates normally. Except the contactor was then welded... when driving a relay coil directly, all is well. Needs research.
Can someone scope the chain? STM32 pin, uln pin, I'm out of lab for a while
Can someone scope the chain? STM32 pin, uln pin, I'm out of lab for a while
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
-
- Posts: 3411
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 97 times
- Been thanked: 297 times
- Contact:
Re: Precharge and Contactor Control
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
I am lucky to be testing with low voltage. Not surprised this led to a welded contactor if you had full pack voltage. It will be a couple of days before I can get back into the shop and dig out my digital scope. I feel like its a glitch with one of the chips - specifically under certain startup conditions. Perhaps something like a high impedance load as you suggest. Will continue to research and report back. Thanks for the responses and ideas, guys!johu wrote: ↑Thu Jun 09, 2022 4:12 am I had similar behaviour when driving high impedance loads from the uln2003. In my case it was a P-channel mosfet and completely different software (stm32-car). Directly on power on I got like 0.5s pulse, after that everything operates normally. Except the contactor was then welded... when driving a relay coil directly, all is well. Needs research.
Can someone scope the chain? STM32 pin, uln pin, I'm out of lab for a while
Re: Precharge and Contactor Control
I got the same problem with high impedance load.
Could be "crosstalk" but not sure?
A 10k pulldown worked for me.
Also very important to have 12V all time on COM of the ULN chip!!!
Measurements:
OUT_DCSW PC13 coming 3.3V 500mS pulse at powerup.
Reduced to 530mV with a 10k pulldown! (HIGH = 3.26V)
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Hey joromy, thats interesting. I tried both a 10K pulldown and pullup - but neither worked for me. However, I did that AFTER the ULN chip. Did you install an extra pulldown directly on pin13 BEFORE the ULN???
I have some Arduino development experience, but I am not familiar with the STM32 environment. One item I found in some research is regarding the actual point in the program flow where a pin is declared an output. These 2 articles suggest declaring the pin state BEFORE changing it to an output. I need to scope the pin as per johu's suggestion to see if its an actual signal problem.
https://community.st.com/s/question/0D5 ... er-startup
https://www.reddit.com/r/ECE/comments/8 ... i_want_it/
This phenomenon does not seem to be a problem with the precharge though. I see from the schematic its controlled from PB1 while DCSW is PC13. So is there a difference in their declaration? I will try make some sense of the source files - need more research.
I have some Arduino development experience, but I am not familiar with the STM32 environment. One item I found in some research is regarding the actual point in the program flow where a pin is declared an output. These 2 articles suggest declaring the pin state BEFORE changing it to an output. I need to scope the pin as per johu's suggestion to see if its an actual signal problem.
https://community.st.com/s/question/0D5 ... er-startup
https://www.reddit.com/r/ECE/comments/8 ... i_want_it/
This phenomenon does not seem to be a problem with the precharge though. I see from the schematic its controlled from PB1 while DCSW is PC13. So is there a difference in their declaration? I will try make some sense of the source files - need more research.
Re: Precharge and Contactor Control
You must put pulldown on the STM chip!!
And it's not pin13 is pin2.
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Got it - physical pin 2. GPIO PC13.You must put pulldown on the STM chip!!
And it's not pin13 is pin2.
Is STM driving MOSFET directly? If so, 10K pulldown directly on pin 2 should solve this. I will try.
But doesn't STM have internal pulldown 30K already?
-
- Posts: 47
- Joined: Fri Mar 22, 2019 7:44 pm
Re: Precharge and Contactor Control
I think you need an antikickback diode on the Panasonic's coil. Cathode to + and anode to -. Rule of thumb is at least 6x the applied fed voltage as its rating.
The kick from it is likely messing up the economizer circuits of its little friends.
The kick from it is likely messing up the economizer circuits of its little friends.
Friends don't let software friends do hardware design
Re: Precharge and Contactor Control
Yes, don't know if that is enabled, but this is a mystery?
Thomas A. Edison “I have not failed. I've just found 10,000 ways that won't work"
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
The pulse occurs before the precharge is engaged, so I don't think thats the cause. However, a flyback diode is a very good suggestion on any relay. And particularly in this case considering the potential for interference with the economizer.remy_martian wrote: ↑Tue Jun 14, 2022 6:12 am I think you need an antikickback diode on the Panasonic's coil. Cathode to + and anode to -. Rule of thumb is at least 6x the applied fed voltage as its rating.
The kick from it is likely messing up the economizer circuits of its little friends.
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Some scope shots with only the Leaf board powered. No other connections
1. Power up - Pin 2 on STM32 2. Power up - DCSW_OUT And faster time scale OK, for the most part, these look normal.
With the little relay board now connected. It is on the same 12V/Gnd connection as the Leaf board. PRE_OUT and DCSW_OUT are connected to the relay board.
1. Power up - Pin 2 on STM32 was the same as above
2. Power up - DCSW_OUT But now look at it with a negative trigger: So what I came to realize is this:
1. Power up - Pin 2 on STM32 2. Power up - DCSW_OUT And faster time scale OK, for the most part, these look normal.
With the little relay board now connected. It is on the same 12V/Gnd connection as the Leaf board. PRE_OUT and DCSW_OUT are connected to the relay board.
1. Power up - Pin 2 on STM32 was the same as above
2. Power up - DCSW_OUT But now look at it with a negative trigger: So what I came to realize is this:
- Power is applied to the Leaf board and the relay board simultaneously.
- OUT_DCSW is grounded before the STM32 boots up
- The relay board responds almost instantly to the 12V power
- The opto on the relay board sees the ground from OUT_DCSW for a split second before the STM32 finishes booting
- The relay clicks on for approximately 2ms during the boot process - thus pulsing the main contactor
- STM32 finishes booting and sets OUT_DCSW high, thus turning off the relay and corresponding contactor
-
- Posts: 3411
- Joined: Mon Dec 24, 2018 1:37 pm
- Location: Slovenia
- Has thanked: 97 times
- Been thanked: 297 times
- Contact:
Re: Precharge and Contactor Control
Hm... i think you could put one pullup resistor on each relay channel that would keep it off untill high enough signal would appear. Try experimenting with resistor values. I bet 1k pullup will do the job.
Or you can simply use 24Vac relay in a din housing.
Or you can simply use 24Vac relay in a din housing.
- johu
- Site Admin
- Posts: 6259
- Joined: Thu Nov 08, 2018 10:52 pm
- Location: Kassel/Germany
- Has thanked: 236 times
- Been thanked: 1286 times
- Contact:
Re: Precharge and Contactor Control
Thanks for scoping.
Do you have the newer Leaf board with Mini mainboard? Then you could add some significant capacity between gate and source of the corresponding mosfet. On the V3 mainboard version you could do the same modification as DC switch is also on a mosfet. Not sure about the value, maybe 10uF
Do you have the newer Leaf board with Mini mainboard? Then you could add some significant capacity between gate and source of the corresponding mosfet. On the V3 mainboard version you could do the same modification as DC switch is also on a mosfet. Not sure about the value, maybe 10uF
Support R/D and forum on Patreon: https://patreon.com/openinverter - Subscribe on odysee: https://odysee.com/@openinverter:9
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
I tried 10K and 5K. Never went as low as 1K.
Read your other post regarding the 24Vac - that might be a good way, especially if it doesn't overheat.
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
I have the V3 board, not the mini.johu wrote: ↑Sat Jun 18, 2022 9:36 am Thanks for scoping.
Do you have the newer Leaf board with Mini mainboard? Then you could add some significant capacity between gate and source of the corresponding mosfet. On the V3 mainboard version you could do the same modification as DC switch is also on a mosfet. Not sure about the value, maybe 10uF
Everything I've read about MOSFETS suggests keeping gate capacitance to a minimum and using high current drivers for high speed switching. Normally, this is in high power PWM applications. Which is not our case here - so perhaps it could work. But then I thought it would be good to have a current limiting resistor to prevent frying the gate. And then maybe a diode to prevent back-feeding to the STM pin. And then another high value bleed down resistor to drain the cap. So suddenly, there are alot of components to delay the gate drive.
I settled on this relay board for now. No mods to any control boards. And its easy to vary the delay timing in case I run into problems during the cold winter months. I'll see how it goes once I have everything wired and connected to HV. Currently I am finishing the mods to the Leaf inverter case so that I can fit it into the previous location occupied by my Soliton.
- Renegate2020
- Posts: 52
- Joined: Tue Dec 01, 2020 6:20 am
- Location: Odessa UA
- Has thanked: 1 time
- Contact:
Re: Precharge and Contactor Control [SOLVED]
I had a similar problem. I went the easy way - I bought a relay with a delay timer on Ali Express and installed it on the control output of the main contactor. Set a delay of 1 second. Now, when an impulse arrives, the relay simply does not turn on due to a delay.
- E46Driver
- Posts: 33
- Joined: Fri Sep 17, 2021 3:51 am
- Location: Alberta
- Has thanked: 2 times
- Been thanked: 5 times
Re: Precharge and Contactor Control
Good to know! How long has your setup been running that way?Renegate2020 wrote: ↑Thu Jun 23, 2022 7:18 pm I had a similar problem. I went the easy way - I bought a relay with a delay timer on Ali Express and installed it on the control output of the main contactor. Set a delay of 1 second. Now, when an impulse arrives, the relay simply does not turn on due to a delay.