Ground Embedded KO Subscribe

3D Labs

DC Motor and H-Bridge

Combine four MOSFETs into forward, reverse, brake and coast, and watch the current path, motor speed and back-EMF together.

Switch combination

Switch states

Q1 (upper left)
Q3 (upper right)
Q2 (lower left)
Q4 (lower right)

Motor state Model values

Average voltage
Current
Speed
Back-EMF

Try this

  1. Alternate Forward and Reverse. The diagonal pair of MOSFETs that is on swaps, and the current through the motor reverses.
  2. While the motor is spinning fast, press Brake. The two low-side switches tie the motor terminals together and the current driven by back-EMF (light blue) stops the motor. Watch the current swing the other way in the graph.
  3. In the same situation press Coast. The current dies quickly and the motor slows down by inertia alone. Compare the stopping time with braking.
  4. Raise the load torque: speed drops and current rises, because torque is proportional to current.
  5. Q1+Q2 (forbidden) turns on the upper and lower switch of the same side. The supply shorts without passing through the motor. This is why real circuits need dead time.

Motor equations

V = R·i + L·di/dt + Ke·ω       (electrical)
J·dω/dt = Kt·i − B·ω − T_load  (mechanical)

Raise the voltage and speed rises; as speed rises, back-EMF Ke·ω grows and current falls. With no load, speed settles where back-EMF approaches the supply voltage.

FREE PDFGet the 3 free ebooksIf you want what you just ran written down: BLDC motor control, serial communication and sensors at book length. PDFs are in Korean.Get them free →

This lab is also available in Korean. More labs: all 3D labs.