Hello Element 14!

In this blog post, I’ll be discussing how to control brushed DC motors.

For this project I have two goals:

1. Direction control using an h bridge.

2. Speed control using PWM.



An h bridge is a type of electronic circuit that allows you to apply voltage to a load in either direction.

As you may know, motors will rotate in a different direction depending on the polarity so, an h bridge is perfect for changing the direction of my motor.

Here is a simple H-Bridge circuit:

It is made up of four mosfets. two p-channel mosfets, and two n-channel mosfets.

When the transistors are turned on in this configuration:

Then the current will flow through the motor like this:

The motor has current going through it, so the motor will start to spin. We're making progress!

To change the direction the motor is rotating, all we have to do is turn on the other pair of mosfets like this:

Now, the current will flow through the motor in the opposite direction, which changes the direction the motor is rotating!

That's the basics of how an h bridge works.

Now, we just need a way of easily switching between the two directions.

We can easily accomplish that by connecting the mosfets in this configuration:

The resistors are there to keep the n-channel mosfets off when they're not in use.

The p channel mosfets are on unless voltage is applied to them, and the n-channel mosefts are off unless voltage is applied to them.

When voltage is applied to the gate of one side, the n channel will turn on, and the p-channel will turn off.

Since the p-channel on the opposite side is still on current will begin to flow.

This is the h bridge I'll be using in my circuit.


Controlling The Speed

For the speed part of the circuit, I decided to go with a PWM circuit based around the 555 timer because, they're easy to use, cheap, and readily available.

Here is the circuit:

Final Circuit:

Using an SPDT switch, we can connect the two parts together into the complete circuit.


Links to previous blogs:

Introduction to PWM

DIY Simple Lm386 Audio Amp


If you have any feedback on the project or content I would love to hear it!


Thanks for reading!