+ Post New Thread
Results 1 to 5 of 5
  1. #1
    Advanced Member level 2
    Points: 3,130, Level: 13
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    622
    Helped
    49 / 49
    Points
    3,130
    Level
    13

    PIC18F based Motor Controller Design, Is it good?

    Hi,

    This is my PIC18F based Motor Controller Design. PIC18F circuit is not shown in the schematic because my question is with Motor Driver circuit.

    I want to know whether my circuit is good? What additional changes or improvements can I do?

    The motor runs fine in simulation but why I am not some spike signal at 100ms, 150ms,...?

    Circuit not yet tested on hardware. Have to design the PCB layout.

    I designed this circuit so that V GATE can be adjusted as needed, H-Bridge V+ can be changed as needed based on used Mosfet rating. The Mosfets can be changed as required based on the load voltage and current requirements.

    I didn't puto opto-isolators between L293D outputs and Gates becasue I need option to vary Gate voltage (V Gate) based on chosen Mosfets and also I didn't find any analog opto-isolators whose output is proportional to input.

    Later if there is any issue with the code, I will ask questions about it in this thread only.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 77,803, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,766
    Helped
    3590 / 3590
    Points
    77,803
    Level
    68

    Re: PIC18F based Motor Controller Design, Is it good?

    Hi,

    Why..why..why?
    In my eyes the whole circuit makes no sense.

    Why don't you use a proven circuit?
    Why do you try to re-invent the wheel?
    Why do you use a motor driver to drive MOSFET's gates? (It is slow, it is made for high continous currents, while the MOSFETs don't need continous current. They don't include dead time ..... and, and, and...)
    What's the use of adjustable gate voltage? (And you drive the high side gates in "gate to GND" manner instead of "gate to source". Thus tze HIGH side MOSFETs are lossy and you risk MOSFET (gate) damage in case the bridge supply voltage is down)
    Why the high side MOSFETs are wired as (lossy) source follower?
    And a lot more issues...

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


    1 members found this post helpful.

    •   AltAdvertisement

        
       

  3. #3
    Advanced Member level 2
    Points: 3,130, Level: 13
    baileychic's Avatar
    Join Date
    Aug 2017
    Posts
    622
    Helped
    49 / 49
    Points
    3,130
    Level
    13

    Re: PIC18F based Motor Controller Design, Is it good?

    I use a Motor Driver (L293D) to drive the MOSFETs because L293D cannot drive a 200V 10A or more DC motor. Gate of MOSFETs need say 10V or more (Vgs datasheet ratings usually +/-20V) so that the channel of Mosfets is opened fully so that current can flow more.

    L293D with V GATE voltage can allow me to adjust the Gate voltage based on the chosen H-Bridge Mosfets and Load current requirements.

    Explain my other issues more.

    Here is an updated circuit. I also want to be able to use a motor with encoder as the load. So, do I want another 6 opto-isolators to interface encoder outputs to PIC18F (microcontroller in general)? Because motor can get shorted and burn. What happens to encoder then? I know encoders are a separate part of the motor but still do I need isolation for them?

    In "Motor Driver-v1.1.pdf" all the circuit is same as in v1.0 but Motor has an encoder.

    Can you explain more about these and tell me where I am driving high side mosfets with respect to GND?

    (And you drive the high side gates in "gate to GND" manner instead of "gate to source". Thus tze HIGH side MOSFETs are lossy and you risk MOSFET (gate) damage in case the bridge supply voltage is down)
    Why the high side MOSFETs are wired as (lossy) source follower?
    Last edited by baileychic; 5th September 2019 at 07:39.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 77,803, Level: 68
    Achievements:
    7 years registered
    Awards:
    Most Frequent Poster 3rd Helpful Member

    Join Date
    Apr 2014
    Posts
    15,766
    Helped
    3590 / 3590
    Points
    77,803
    Level
    68

    Re: PIC18F based Motor Controller Design, Is it good?

    Hi,

    I really feel sorry for having no good news.

    I use a Motor Driver (L293D) to drive the MOSFETs because L293D cannot drive a 200V 10A or more DC motor.
    Read the voltmeters of your simulation.
    Don't you see that the motor voltage is just about 13V, even with 48V supply voltage.?
    --> Your circuit is not (never!) able to drive 200V, nor 10A.

    Gate of MOSFETs need say 10V or more (Vgs datasheet ratings usually +/-20V) so that the channel of Mosfets is opened fully
    Read the voltmeter of your simulation.
    Don't you see that V_gs of the high side Mosfet is just 4.4V?

    L293D with V GATE voltage can allow me to adjust the date voltage based on the chosen h-Bridge Mosfets and Load current requirements.
    No, with this circuit you maybe can control the LOW side V_gs in a useful manner, but never the high side V_gs. And you don't get the essential dead time..

    Sorry for this honest words:
    It makes no sense to go on with this circuit. It violates almost any rule on how to design a motor driver circuit.
    Believe me, it's a waste of time and money. You won't be satisfied by heating up and exploding MOSFETs...and - if ever - slowly turning motors....

    My recommendation:
    * Use a ready to buy module
    * or - if you really want to build your own - then learn the theory first. There are more than enough proven circuits, design notes, application notes. Every MOSFET manufacturer, MOSFET driver manufacturer, university provides good documents with good explanations.
    It's not a simple task. Don't expect to get a really reliably working 200V, 10A motor driver circuit within a couple if days.

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


    1 members found this post helpful.

  5. #5
    Member level 2
    Points: 715, Level: 5

    Join Date
    Jun 2017
    Location
    near the sea
    Posts
    51
    Helped
    12 / 12
    Points
    715
    Level
    5

    Re: PIC18F based Motor Controller Design, Is it good?

    Quote Originally Posted by baileychic View Post
    I use a Motor Driver (L293D) to drive the MOSFETs because L293D cannot drive a 200V 10A or more DC motor. Gate of MOSFETs need say 10V or more (Vgs datasheet ratings usually +/-20V) so that the channel of Mosfets is opened fully so that current can flow more.

    L293D with V GATE voltage can allow me to adjust the Gate voltage based on the chosen H-Bridge Mosfets and Load current requirements.

    Explain my other issues more.

    Here is an updated circuit. I also want to be able to use a motor with encoder as the load. So, do I want another 6 opto-isolators to interface encoder outputs to PIC18F (microcontroller in general)? Because motor can get shorted and burn. What happens to encoder then? I know encoders are a separate part of the motor but still do I need isolation for them?

    In "Motor Driver-v1.1.pdf" all the circuit is same as in v1.0 but Motor has an encoder.

    Can you explain more about these and tell me where I am driving high side mosfets with respect to GND?
    Hello, you have several problems there
    1/ The high side gate must be driven to Vgate + drain supply, you say 200V, an L293D cannot do that.
    2/ 4N37 or similar opto-couplers are very slow and will introduce severe bias distortion (differential ton/off) so you need a logic/digital coupler
    3/ There are no ringing suppression components across the motor load

    May I suggest you use two IRS2110 chips to drive each H-bridge (4 in total in your schematic) these will operate at up to 600V high side.
    If your micro ground is not the same as power ground you will need four digital opto's to isolate the drive signals otherwise they can be driven directly from the MPU. The mosfet drive power should be fixed at 15V and capable of supplying high current short period pulses (plenty of good local decoupling).
    Pay attention to your switching frequency and duty cycle with respect to the IRS2110 boost supply requirements as detailed in the various app notes, if you need to operate outside those bounds a separate isolated 15V supply wrt to motor supply will have to be provided but may be common to both H-bridges.
    Finally the feedback signal will not require isolation as normally the transducer is physically in a different place to the windings and such a s/c is unheard of.
    Good luck :)

    P.S. I should add this type of circuit with such a load is more than capable of generating severe EMI that will either upset your neighbors or indeed your own micro so you need to pay attention to that issue also. Layout is also very important with such circuits, if you don't have the experience expect to learn through blowing a lot of components :(
    Last edited by fourtytwo; 5th September 2019 at 08:06.


    1 members found this post helpful.

--[[ ]]--