If it's an Arduino , Habe you considered using a h bridge hat for the job.
Just so the TS isn’t confused, Arduinos don’t have hats. In the Arduino environment, stacking peripherals are called shields.If it’s an Arduino. Habe you considered a… hat for the job
Your original circuit isn't going to work well. The problem is, with pwm1 held at 0 and Q1 on, pwm2 should only turn on M3, but as you turn M3 off- slowly, M2 turns on at the same rate. So you are getting massive shoot-through - current through M2 is going through M3 to ground - see simulation below You need to control M. You need to actively control all 4 devices, or ensure sufficient gate-voltage management to ensure that top and bottom devices on one side are never on together.
I agree. Unless you have a strong desire to build you own (which WONT be cheaper than ready-made) the DIY v off-the-shelf war has long been won by single chip examples. The venerable bipolar L298 is as cheap as chips but limited, its MOSFET equivalent is only marginally better (L6203), but there are a slew of other options such as DRV8874, DRV8876, LMD18200, LMD18245 etc. As most are SMD parts its much easier to buy off-the-shelf boards in various form factors. A lot depends on the motor you are trying to drive and the demand you put on that motor - not knowing that, its hard to suggest further...You can roll your own from any of several online schematics or simply just buy an off the shelf H Bridge motor driver. When rolling your own just be sure your chosen design can handle the motor load to include start current. Also in your code consider if your chosen motor can go from FWD to REV less a delay in your code. A Google of H Bridge modules should bring up plenty of choices. The older L298 is used on many available online but there are newer versions. Most are 5.0 logic compatible suitable for uC boards like Arduino or similar. Most will also take a PWM input.
|Thread starter||Similar threads||Forum||Replies||Date|
|L||My microbit car motors has non-negative output driving emf, are there easy ways to measure the operating p.d.||General Electronics Chat||18|
|U||PWM driving 12V DC motors with 24V power supply||General Electronics Chat||3|
|E||MOSFETs used in driving BLDC motors||Power Electronics||6|
|Driving high power PMDC motors with STM32||Power Electronics||3|
|L298N IC driving 6V DC motors causing unpredictable behavior in robot||Automation, Robotics & Control||8|
|My microbit car motors has non-negative output driving emf, are there easy ways to measure the operating p.d.|
|PWM driving 12V DC motors with 24V power supply|
|MOSFETs used in driving BLDC motors|
|Driving high power PMDC motors with STM32|
|L298N IC driving 6V DC motors causing unpredictable behavior in robot|
by Jeff Child
by Jake Hertz
by Jake Hertz
by Jeff Child