Basic L9110 fan propeller board control: Arduino Nano
by Floris Wouterlood – October 1, 2021
Summary
It is very easy to connect a propeller fan board an Arduino. These devices have on board a L9110 controller chip that reins the engine, notably spinning speed and spinning direction. Engine power can be obtained from the 5V pin of the Arduino. It is a matter of prudence to add an auxiliary power source since electric motors may lean too heavy on the Arduino’s power supply.
Introduction
A small, cheap and funny device for the Arduino is the L9110 DC propeller fan board. This gadget consist of a 4-pin breakout board with on it mounted a 5V DC motor, a L9110 control chip and, of course, a propeller (75 mm diameter; figure 1). The fan board has four pins marked GND, VCC, INA and INB. The pins GND and VCC are connected to the GND and 5V pins of the Arduino. INA is connected to pin D3 while INB is wired to pin D5. Note that D3 and D5 are pins that support pulse width modulation (PWM). While PWM can be used to control rotation speed its application is not discussed in this ‘bare basics’ paper.
figure 1. The 9110 fan board is controlled via two wires: INA to D3 and INB to D5. The 5V DC breadboard power supply provides additional engine power.
A word of caution
Electric motors are motors are notorious power consumers. The L9110 datasheet indicates that maximum power to be drawn by any DC motor controlled by this chip is limited to 800 mA. The 5V pin of the Arduino board delivers (on usb) 400 mA, with 900 mA on external power adapter. Although maximum power consumption by the small electric motor incorporated in the fan board is not documented it is a matter of prudence to have an external power supply at hand, here a 5V DC breadboard power supply. Besides the concern about power being drawn from the 5V pin, competing for power could also mean reducing power necessary for the main electronics of the Arduino board to perform normally. This might introduce irregular performance or even resets.
Do never try to draw power for the fan motor from any of the digital pins of an Arduino. These pins do not supply more than 40 mA which renders them unfit by design to power a motor.
Propeller spinning: OFF, ON, forward and reverse
Of course we are controlling the engine while we see the result as a spinning propeller. We will therefore refer to the propeller. Prop
speed and direction (clockwise or counterclockwise spinning, seen from the front) is controlled through digitalWrite() instructions via pins INA and INB.
Instruction basics: the following happens (observing the propeller from the front):
Example: digitalWrite (INA, LOW); digitalWrite (INB, HIGH) will let the propeller spin full speed, forward!
Prop in action
Here is a bare basic sketch to run a fan propeller on an L9110 board, This sketch is downloadable from the ‘Sketches’ section.
// most simple sketch for the L9110 engine-propeller fan board
// microprocessor board: not specific – say any Arduino type board
// 5V DC engine control by L9110 chip
// no library needed
// public domain
#define INA 3
#define INB 5
void setup()
{
pinMode (INA,OUTPUT);
pinMode (INB,OUTPUT);
}
void loop()
{
digitalWrite (INA,LOW);
digitalWrite (INB,HIGH);
delay (5000); // spin 5 seconds forward
digitalWrite (INA,HIGH);
digitalWrite (INB,LOW);
delay (5000); // spin 5 seconds reverse
}
Do a lot more: controlling spinning speed
A few words here about spinning speed control. Pins D3 and D5 of an Arduino support pulse width modulation (PWM). PWM is usually applied to ‘dim’ leds and to control servos but this method of digital signal manipulation can also be used to ‘throttle’ engines. With proper PWM instructions to the L9110 chip the prop spinning speed of the present board can eactly be tuned. A practical application of PWM is described in Chips &Props!(*) in which a plastic airplane model is retrofitted with electric engines and a L9110 chip to spin the plane’s propellers. An Arduino Nano placed in the fuselage does all the controlling work (*).
Sketch: basic_arduino_L9110_propeller.ino (zipped file)
References:
(*) Chips&Props! A DC3 scale model equipped with L9110 chips, electric engines for the props, some leds, and controlled by an Arduino Nano
by Floris Wouterlood – TheSolarUniverse, September 2, 2021