PC/CP320 Physical Computing

Controlling Power to a DC Motor Using an H-bridge


We have various output transducers whose power can be controlled using various techniques. The pairing of an output transducer and a control circuit is not limited to the ones you will be investigating; although some pairings make more sense than others. The specific objectives for this year are:


The breakout board has 2 H-bridges on it, labeled "A" and "B", so that one board can control two motors. The only things they have in common is the supply voltage and ground.

L9110 H-Bridge datasheet

DC motor

The shaft encoder connections are electrically separate from the motor connections.
DC motor with shaft encoder

These are the shaft encoder connections.
shaft encoder

Note the wire colours to identify each of the connections.
DC motor ??



Investigating the datasheet

Open the datasheet for the H-bridge and answer the following questions:
  1. Will external diodes need to be used across the motor, or are they included inside the H-bridge?
  2. What are the limits for the motor supply voltage? Will the fixed bench supplies be OK?
  3. What are the limits for the control signal voltage? Will the Raspberry Pi GPIO pins be OK?
  4. Are there any signals going back to the Pi? Will optoisolators be needed?
  5. Explain your findings to the lab supervisor.

DC motor direction

  1. Connect the two motor power pins to the screw terminals for one motor on the H-bridge. Use the 5V bench supply for power.

    DC motor with H-bridge
  2. Apply a positive signal to one input and ground to the other and note the direction the motor rotates.
  3. Now reverse the previous situation; apply ground to the first input and a positive signal to the other and note the directions the motor rotates.
    Does the behaviour match the data sheet?
    Demonstrate and explain your findings to the lab supervisor.

Speed control with PWM

  1. Create a 0-3.3V 1kHz square wave with the function generator and connect it to one of the control inputs of the H-bridge. Connect the other input to ground.
  2. Adjust the duty cycle of the signal and see how the motor speed changes.
    What is the smallest duty cycle which will keep the motor running?
  3. Now take the input which was tied to ground and tie it to 3.3V instead.
    Adjust the duty cycle of the signal and see how the motor speed changes.
    Did it operate as expected?
  4. Demonstrate and explain your findings to the lab supervisor.


To view pdf documents, you can download Adobe Acrobat Reader .
get Acrobat Reader
If you need to update a browser, you might try Firefox which is Get Firefox!
Since this page uses cascading style sheets for its layout, it will look best with a browser which supports the specifications as fully as possible.

If you are looking for an office package, with a word processor, spreadsheet, etc., you might try LibreOffice which is Get LibreOffice!

Go to the main page for the Department of Physics and Computer Science.

Valid XHTML 1.1

Valid CSS!

(Level AA)

Wilfrid Laurier University