Use NOR gates for PWM H-bridge driver while keep motor stopped

Thread Starter

us202000

Joined Jul 5, 2011
26
Hi, I am trying to use the CD4001 NOR gate chip to control the DIR and PWM of a H-bridge so that the motor can run at variable speeds in either direction. I found a very good article about this discussing in detail how this can be done at lamja.com http://www.lamja.com/?p=58. While everything makes sense, I am confused about how to keep the motor stopped. According to the truth table, the PWM would have to be set to 1 for the motor not running. However, when you initially turn on the power, isn't the PWM=0?, which would cause the motor running uncontrolled? Or did I miss something here? Similarly, what happens if the PWM input is lost? Will the motor run out of control?

I thought about adding an invert gate before the PWM input to make it PWM=0 means motor stopped, but I wasn't sure this is the way to do it. Any comments would be greatly appreciated. Thanks!
CD4001GateDIR_PWM.png
 

AlbertHall

Joined Jun 4, 2014
12,345
While there are no pulses on PWM, whether it sits high or low, the motor will not be rotating.
Remember a stepper motor needs the coils energised in order to make it turn.

[EDIT] Cancel that if it is not a stepper motor.
 

dendad

Joined Feb 20, 2016
4,451
Have pullup resistors on both inputs. Assuming you are driving it with an Arduino or similar, usually on reset, the ports are defaulting to inputs, so they will not drive the gates. The pullup resistors will keep the motor off.
Then, when your program starts, set both processor port pins high and outputs so the motor is still off, before you start to drive the motor.
In your program, the PWM can he high for 0% or low for 0%, it is up to how you write it.
 

KeithWalker

Joined Jul 10, 2017
3,063
The initial states of the nor gate inputs will depend on the turn on states of the outputs of whatever you are using to drive them.
Regards,
Keith
 

eetech00

Joined Jun 8, 2013
3,858
Hello

You'll need to control the mosfets individually.

Here's a table if using both 2-PMOS(high-side) and 2-NMOS (low-side) mosfets

1590251616378.png
1590251731562.png
 
Top