LTspice with 2 ground nodes doesn't work - Page 1
Forum section: electronics / projects

author: reyntjensm
author_rank: Regular Contributor
timestamp: September 30, 2020, 02:18:59 pm
content: Hello everyone,I'm working on a AC PWM controller with 2 mosfets. It took me a long time to get this to work in LTspice but i still can't get it to work. I send pulses to the mosfets to generate the PWM modulation on the AC side. Everything works until i want to implement an optical galvanization. For this i would need to define 2 grounds in LTspice and this is the point where things start to get weird. I've already looked on the internet for more information about this topic. In LTspice you can only define 1 ground node, this is the reference voltage from where LTspice starts to calculate. If i want to use a second ground i have to use the COM node. I tried to do this but it still doesn't work. I know my mosfet part works and i know my opto coupler part works. When i try to connect both LTspice starts to behave strange. I've connected the COM node and GND node with a 99M resistor( this was a solution i found online) but this doesn't work at all. How can i get this simulation to run? Attached are 2 print screens. The first is a working mosfet switch, the second is with the opto coupler.I hope somebody here can help me to get this to work.Thank you all!" alt="" class="bbc_img" />" alt="" class="bbc_img" />

author: Siwastaja
author_rank: Super Contributor
timestamp: September 30, 2020, 02:40:44 pm
content: Just connect the grounds together. You don't need isolation for safety in simulation.

author: Zero999
author_rank: Super Contributor
timestamp: September 30, 2020, 02:42:37 pm
content: The MOSFETs' gates have no discharge path. An opto-coupler is a poor choice for a MOSFET driver.

author: reyntjensm
author_rank: Regular Contributor
timestamp: September 30, 2020, 03:05:04 pm
content: Quote from: Zero999 on September 30, 2020, 02:42:37 pmI've added a 1K resistor between Gate and ground and this does the trick( according to LTspice). What's wrong with the optocoupler? As long as it can supply the current it should be fine I guess?

author: chris_leyson
author_rank: Super Contributor
timestamp: September 30, 2020, 03:15:08 pm
content: QuoteSlow turn off, You would be better off using an auxiliary supply, say 12V or 15V and a gate drive optocoupler, HCPL-3140 or similar.

author: reyntjensm
author_rank: Regular Contributor
timestamp: October 08, 2020, 02:21:46 pm
content: Quote from: chris_leyson on September 30, 2020, 03:15:08 pmIndeed the optocoupler was to slow. I managed to find the LTspice model for the HCPL-3140 but i don't get it to work. I first tried to implement it within my own circuit and it didn't worked. Now i'm trying the optocoupler on itself. It always shows the same error:Time step too small... I know this has something to do with the circuit i'm simulating but i can't figure out whats wrong.

author: Zero999
author_rank: Super Contributor
timestamp: October 08, 2020, 08:24:29 pm
content: Quote from: reyntjensm on October 08, 2020, 02:21:46 pmThe HCPL-3140 is a decent choice. I don't know why the simulation isn't working. Obviously you need a separate, isolated supply for the output side of the HCPL-3140.

author: SiliconWizard
author_rank: Super Contributor
timestamp: October 08, 2020, 11:46:09 pm
content: For isolated designs, I usually connect the ground from one side to the Spice ground, then the ground from the other side to the Spice ground through some high-value resistor, typically > 100 Meg.There's no way around it, Spice needs a single reference node.The high-impedance-between-grounds "trick" is not just a trick though - it actually models reality. Infinite impedance is just an ideal situation that you will never encounter in real life.You can of course model your isolation with some impedance that's more sophisticated than just a resistor, depending on what you want to simulate and the kind of isolation you're going to deal with.