Pico Motor Control Using the L9110 Control Board

A cheerful cartoon duck turns a control dial beside a spinning motor while an oscilloscope displays a squarewave showing PWM motor control.

In this tutorial we will control the L9110 motor control board using the Raspberry Pico. You might want to familiarise yourself with how DC motors work by reading this page before starting the tutorial, although it is not strictly necessary.

The L9110 control board is readily available from many shops and is an inexpensive way to control motors. It can control 2 motors simultaneously using the green terminals.

The board required a power-supply which can be taken from the supply to the Pico and 2 control wires for each motor. The wiring diagram is shown below.

In this configuration the control of motor A is performed by pins 26 / 27 and the control of motor B is performed by pins 20 / 21.

The control of the motors is performed by keeping one of the pins to the motor at 0 volts then modulating the voltage on the other pin, by turning it on and off. If the modulating pin is continually on the motor will turn at full speed. However, if it is on 50% of the time then it will run at half speed.

When both outputs of the L9110 are off, the pins stop driving the motor and become disconnected. The motor is still spinning, but there’s no electrical load on it, so it slows down naturally just from friction. It’s basically free to coast until it loses momentum.

When both outputs are set to the supply voltage, both motor wires are held at the same voltage. A spinning motor generates its own voltage, and with the wires tied together, that generated current has a path to flow. This creates a force that pushes against the motor’s rotation, which makes it slow down much more quickly. This is why the motor brakes instead of coasting.

Think of a bike wheel:

  • Coasting (both off): You stop pedalling and lift your feet off — the wheel turns freely.
  • Braking (both high): You clamp the brake pads — energy is dissipated, wheel slows fast.

Once the circuit is configured, and the Pico is set-up as described in the getting started tutorial, then the following code can be run on the Pico.

Assuming, everything is working correctly, both motors should gradually increase in speed then stop when they reach their maximum speed.

In order to reverse the direction of the motors the duty_cycle parameters can be swapped over.

Main Topic

The Raspberry Pi Pico

Raspberry Pi Pico on a breadboard with sensors and jumper wires arranged neatly on a desk, ready for an electronics project.

Raspberry Pi Pico is an affordable, efficient microcontroller offering flexible GPIO, strong performance, and versatile hardware features for beginner electronics projects.

Other Tutorials in this Topic

Cartoon Raspberry Pi Pico on a breadboard with glowing LED and wires beside a computer screen showing the Thonny picozero plugin installation.

Getting Started With The Raspberry Pico

Getting started guide showing how to set up a Raspberry Pi Pico on a breadboard and install…

A cheerful orange octopus adjusts wires on a breadboard with a Raspberry Pi Pico, potentiometer, and glowing LED beneath the text Basic Input / Output On the Pico.

Basic Input and Output With The Raspberry Pi…

The article explains how a Raspberry Pi Pico uses a potentiometer to control LED brightness, demonstrating basic…

Cartoon computer and Raspberry Pi Pico shout echo into a glowing cave with bold title Using Bluetooth On The Raspberry Pico.

Using Bluetooth on the Raspberry Pico

The article explains how to use Bluetooth Low Energy on the Raspberry Pi Pico, set up BLE…

Small educational robot uses ultrasonic sensor to navigate obstacles like cones and boxes while moving through a bright indoor course

Getting Started with an Ultrasonic Sensor Module on…

Beginner guide explaining how an ultrasonic sensor module works with Raspberry Pi Pico to measure distance using…

Cartoon robot spins happily while IMU detects z-axis rotation with arrows screens and motion lines in colorful laboratory scene background

Using the MPU6050 Gyro With Raspberry Pi Pico

The article explains how the MPU6050 IMU measures motion and rotation and communicates with microcontrollers using the…

Cartoon LCD on breadboard shows Hello from Tinkimo heart while silly banana sparks and googly eyed hammer watch Pico project

Using an LCD with the Pico

Beginner friendly guide explains using an LCD with the Raspberry Pi Pico for wiring, control signals, and…

Raspberry Pi Pico on breadboard drives LCD showing Hello message surrounded by colourful wires LEDs creating playful beginner electronics scene

Controlling an ST7789 Display With a Raspberry Pi…

Beginner guide explains using an ST7789 LCD with a Raspberry Pi Pico to create simple colourful display…