1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

DIY MOSFET H-Bridge Driver

Discussion in 'DIY peripherals' started by Sieben, Apr 5, 2019.

  1. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Hello

    Decided to give a go with DIY H-bridge for the arduino DIY wheel, as an alternative replacement for BTS drivers.
    Just curious.

    The test with 5v to controll inputs, to change the directions.
    And 12V power supply.


    The schematic was taken from here.
    https://www.circuitlab.com/editor/#?id=m4c244

    Made with Manhattan components mounting style.
    The MOSFETS are: for P-channel IRF4905, and N-channel - IRF3205.
    As there were no slugs to isolate the mosfets from the radiator, made quickly and simply with thermal contraction tube and plumbing flax fiber.

    For better understanding of the layout, made simple 3d demonstration pics)

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]

    Now a question how that should be better connected with controller. Gues only with PWM left/right.
    Or should that be like with inverter PWM+Dir mode like here.



    Also should be tested with some PWM signals. )

    Please write your suggestions, on enhancements etc.

    Let the DIY Motor drivers threads be started!)
    • Like Like x 2
    Last edited: Apr 5, 2019
  2. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    The pwm from pin 10 works. It performs the soft lock and ffb in a game, ONE side. But just in a higher range of a signal as looks like and pretty strong.
    With spring effect it stars to kick at 15%of spring effect.
    But if pin 9 is attached, mosfets are just a toaster then. And all the same if just only one pin 9 is attached too.

    Is it a matter of PWM+Dir v.s. PWM +/- ?

    Some know how to make the isolation to mosfets on radiator )))
    [​IMG] [​IMG] [​IMG] [​IMG]
  3. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    "It". :D
    [​IMG]
    And soft lock.
  4. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
  5. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Well, got some progress with this thing. Checked and changed one of the 3205 and it starts to work much better, in terms, that now it performs the smooth work without any kicks as before. ( i.m. I check it with Wheelcheck "Simple Spring" mode on this sort of things) All the same picture as was with BTS7960 except the slightly 1% of the wheel turn with 900deg range deadzone. It is about 10deg of the wheel turn itself. Not to slightly, but still good to know. ) Now schematics looks like that, except the underlined 1k resistors out there. Should also try 1k instead of 4.7k, and smth less with of values to gates of 2n2222. May be will bring the dead zone to better picture. The 1k to gate of the low irf3205, as per initial schematics, brings no signal to it at all, so was excluded. At least all of this is true with 12V power supply.
    ScreenShot01592 — копия.jpg


    But still do not connect the other side to the pin 9 in arduino. )))
    • Like Like x 1
    Last edited: Apr 10, 2019
  6. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    That must be obvious)) I recall that short circuit an Arduino some time ago, and checked the 9 pin voltage. And that goes ~5Volts constantly on idle on that pin)) Will switch to STM32.
  7. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    As I mentioned in the nearby thread with Arduino DIY wheel, checked the STM32 board I've got, and it is 3.3 volts compared to Arduino's, that is used, with ~5V controlling signal. Some mosfet gate drivers should be made additionally. If not go to the Logic level Mosfets to work with STM32. Seems to be not the very best option.

    The gate drivers, if not going to IC's. Hope smth like that is suitable and will work.
    OBQ5E.png
    post-124881-0-36823500-1313857300.jpg

    Also fired up IRacing, and it gives good FFB. One side for now with cooked a bit, Arduiono). But it works allright absolutely. And no heat, at least in a short run. Don't know how will cope with full version, when both pins attached. Hope will be no conflicts, and fried mosfets due to that. But it is also, all is a sorted out issues.
  8. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Some pics.
    Add a fan to the driver with a button activation.

    [​IMG] [​IMG] [​IMG] [​IMG] [​IMG] [​IMG]


    And new arduino board with spring test. Mosfet gate drivers, itself required, seems to be, for a pin 9. Or another mosfet ) A bit less powered then another side.

    • Like Like x 1
  9. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Alright. A little sum up, for now. The driver is fully working!

    Got to solder the mosfets maybe more carefully, without overheating the pins of the device. Changed another side IRF3205 and here we go) Also added 47 ohms to the gates of the 3205 to eliminate, (must work) the "ringing" as an LC contour. )

    The step test with 300 ms & 600 ms.
    [​IMG] [​IMG]


    360 deg for 540ms = 1.8 rev.sec = 108 rev.min
    Half the standard from 200rev/mins. But at least there is a not bad result on the whole, concerning that mosfets operates with 4 volts on there gates. With the schematics just as is).

    Step test - 300ms / 600ms / Cycle.
    Last edited: Apr 19, 2019
  10. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Made the MOSFET gate driver. But it inverts the signal. So the invertor for the gate driver itself is required to this approach.
    [​IMG]
  11. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Have got an assumption, that can only put logic levels to the N side mosfets. Both P channels 4905 have about 11volts on the gates with no signal. So they must be opening with 0, and close with 1. If i got it right)
  12. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Regarding the mosfet gate driver from this schematic.
    [​IMG]
    https://radiohlam.ru/driver_polevikov/


    In order, there be no inversion of the signal, the required signal is on the vcc of the schematic. The one that is needed. And then the "out" should be connected to the common ground. The "P-channel connection". ))) Works with 3v input. And it might be even less. Logic level.)
  13. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Finally.

    I just took an optocoupler, and connected the "out" signal, to come from the emitter to the H-bridge. If from collector, it will give an inversion. And it works! The gates are fully opened. Can make 10-15v on them. In the example, it is fed with 12V small battery. )

    So no need in the other gate drivers)

    In the example, it is connected to the left side of the H-bridge.
    [​IMG] [​IMG] [​IMG] [​IMG]
    [​IMG]
    Last edited: Apr 30, 2019
  14. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    And with second "gate driver".


    600ms wheelcheck
    [​IMG] [​IMG] [​IMG]
  15. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Put 4 Farad condenser to the power line supply.
    Can tell that there are improvements in the response when a wheel fully consumes the power from PSU.

    CADENCE CAP4DR
    [​IMG] [​IMG] [​IMG] [​IMG]

    Also, it is required to have only 12-15V to power the motors but lots of Amps. New PS was taken: 400w 12v/33.3A.
    But, to maintain the experimental integrity, was tested with 12.5A, And with and without a wheel.

    600ms
    no wheel
    50% ffb gain/max force
    Delay 10ms
    360 deg for 258 ms = 3.8rev/sec = 228 rev.min

    no wheel 600 ms
    100% ffb gain/max force
    Delay 10ms
    360 deg for 194ms = 5.1rev/sec = 306 rev.min
    450 deg for 232ms


    300/600ms 100 FFB Gain.
    [​IMG] [​IMG]

    50% Gain.
    [​IMG] [​IMG]

    60% with wheel.
    [​IMG]

    39/49% with wheel
    [​IMG] [​IMG]

    With wheel 100%.
    [​IMG]

    100% no wheel no cap. Looks m.b even better. Whatever.
    [​IMG]

    Seems that no full power ffb gain can improve the results.
    https://drive.google.com/file/d/1054xri5aGpmV-5j0TXvKqddBkbnf8RdS/view?usp=sharing

    https://drive.google.com/file/d/1Wtaps8t1f8x2o20akkIN3kQpNMK6IJqM/view?usp=sharing
    https://drive.google.com/file/d/1dEj2sW1hDrma4RUT0iYICM9MO8dX2RL_/view?usp=sharing
    https://drive.google.com/file/d/1nc0DSMT2K4qfJLtc6Wdg3dOW72_FzRU5/view?usp=sharing
    https://drive.google.com/file/d/16DSXM4RC1nWzlr_HTRACaVhO1FXCJB3t/view?usp=sharing
    https://drive.google.com/file/d/15HC0HS7x7FRX5GACx5id21blnAdLonUh/view?usp=sharing

    [​IMG]
    Also tested with transistor instead of the optocoupler.
    [​IMG]

    The optocoupler works as if on&off. It is playable. All is well. But no smooth transition on ffb in center position. Transistor has it, but very small ffb amount present then. And that PWM sound on the motor. Need some tinkering.
    Last edited: May 5, 2019
  16. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Without optocouplers.

    [​IMG] [​IMG]

    Guess just need to put IRLB-3034 instead of IRF-3205, and that should go right without gate drivers things.
  17. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    And IRLB3034. Now that gives descent ffb )
    [​IMG] [​IMG]

    With wheel
    [​IMG]
    And just base.
    [​IMG] [​IMG] [​IMG]
  18. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    • Like Like x 1
    Last edited: May 7, 2019
  19. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Small nota bene.
    Made in accordance with this connections. Gives full mosfet openings, quick and powerfully. But on the whole a bunch of mosfets should be made in parallel for powerful motors to works as ffb wheel.

    [​IMG]
    And with 100% ffb.

    [​IMG]

    [​IMG]
  20. Sieben

    Sieben Active Member

    Joined:
    Nov 6, 2018
    Messages:
    395
    Balance:
    2,241Coins
    Ratings:
    +115 / 2 / -0
    Made up the parallel mosfets. Without heatsinks decided to conduct the spring test a bit, and burned'em down ) . :D
    [​IMG]