+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Newbie level 4
    Points: 70, Level: 1

    Join Date
    Apr 2018
    Posts
    7
    Helped
    0 / 0
    Points
    70
    Level
    1

    Inverter design problem

    Hi, I'm trying to design an Inverter based on arduino, here's the schematic and the code:
    Click image for larger version. 

Name:	Cattura1.PNG 
Views:	23 
Size:	77.4 KB 
ID:	147193
    Click image for larger version. 

Name:	Cattura2.PNG 
Views:	11 
Size:	11.2 KB 
ID:	147194
    The problem is that, measuring the voltage right after Q1 and Q2, I get a strange graph as you can see in the first image, here's the graph I expected:
    Click image for larger version. 

Name:	Cattura3.png 
Views:	6 
Size:	7.4 KB 
ID:	147195
    My question is why do I get that?
    Sorry if I asked a stupid question, but I'm still learning electronics.
    Thank you in advance for the answers.

    •   AltAdvertisment

        
       

  2. #2
    Super Moderator
    Points: 64,787, Level: 62
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,153
    Helped
    3037 / 3037
    Points
    64,787
    Level
    62

    Re: Inverter design problem

    Hi,

    without knowing any voltage of your applicaiton ... all we can do is guess.

    ****
    Why making life harder than necessary?
    High side siwtiching usually is more complicated than low side switching.
    You will find a lot of similar applications all with low side switch....where the center tap of the tranformer is connected with the positive supply rail.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  3. #3
    Full Member level 6
    Points: 2,705, Level: 12

    Join Date
    Nov 2013
    Posts
    378
    Helped
    80 / 80
    Points
    2,705
    Level
    12

    Re: Inverter design problem

    You swapped the PMOS source and drain. Protection diode is forward biased.
    "Try SCE to AUX." /John Aaron/



    •   AltAdvertisment

        
       

  4. #4
    Super Moderator
    Points: 64,787, Level: 62
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    13,153
    Helped
    3037 / 3037
    Points
    64,787
    Level
    62

    Re: Inverter design problem

    Hi,

    true.

    and even then there are some issues:
    * cross conducting: There is a short time every cycle where both MOSFETs are ON. Causing short circuit currents to flow.
    * this needs 100% of processing time. The microcontroller is not able to do anything else without causing probems with the tranformer.

    Klaus
    Please don´t contact me via PM, because there is no time to respond to them. No friend requests. Thank you.



  5. #5
    Super Moderator
    Points: 73,168, Level: 66
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    11,982
    Helped
    3965 / 3965
    Points
    73,168
    Level
    66

    Re: Inverter design problem

    The fundamental problem is the Arduino output is probably below the Vgs threshold of the MOSFETS anyway and certainly won't be enough to drive them to full conduction, especially with the load in the source pin. Remember that the gate has to be above the source voltage by >Vgs threshold before it even starts to conduct, consider how that would be possible if you already raised the primary voltage to push current into the transformer.

    You might be able to connect +V to the transformer center, with the drain pins to the ends and source to ground but I would still have serious reservations about drive levels unless you employ an additional driver stage. As Klaus points out, you also need a 'dead time' at the start of the next MOSFET turning on so there is no chance of both being conductive at the same time.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  6. #6
    Advanced Member level 4
    Points: 7,788, Level: 21
    d123's Avatar
    Join Date
    Jun 2015
    Posts
    1,386
    Helped
    319 / 319
    Points
    7,788
    Level
    21

    Re: Inverter design problem

    Hi,

    The circuit needs a level shifter which would be a gate driver IC suited to 3.3V logic level inputs, if not a level shifter (a BJT or a logic level MOSFET with a very low VGSth ON) followed by a gate driver IC. I would even consider placing a cheap optocoupler between that MOSFET and the nasty transformer and the pretty little delicate Arduino - I doubt the Arduino will enjoy that circuit, to be honest...



    •   AltAdvertisment

        
       

  7. #7
    Newbie level 4
    Points: 70, Level: 1

    Join Date
    Apr 2018
    Posts
    7
    Helped
    0 / 0
    Points
    70
    Level
    1

    Re: Inverter design problem

    Hi, thank you all for the answers!
    I changed my circuit and code like this:
    Click image for larger version. 

Name:	Cattura1.PNG 
Views:	15 
Size:	69.2 KB 
ID:	147217
    Click image for larger version. 

Name:	Cattura2.PNG 
Views:	9 
Size:	25.5 KB 
ID:	147218
    Now it works, I added a level shifter and made inverter's controller asynchronous to use the arduino for other purposes also.
    Do you have any suggestion left?



--[[ ]]--