In this article I am explaning how to drive 5V DC Motor using Orange Pi and Dual chanel Motor driver L9110.
This is the GPIO PIN diagram for Orange Pi. Orange Pi has 40 GPIO PINs which can be used for Embedded programing.
I am using GPIO PIN PA7 and PA8(PIN 29 & 31) for this demo to send controll signal to Motor driver L9110.
L9110 can be used to drive two motors, DC or stepper Motors. In this demo I am using 5V DC motor.
Green socket in this picture is connected to DC motor two wire each. L9110 has four input PINs, as shown in picture Motor A and Motor B input signal can be given to controll two Motors. In this Demo pins are connected as below
1. Motor A 1A is connected to GPIO PIN PA7 from Orange PI
2. Motor A 1B is connected to GPIO PIN PA8 from Orange PI
3. Ground from external powersupply
4. VCC 5V from external powersupply
5. Motor B 2A is not used in this demo
6. Motor B 2B is not used in this demo
Connection is as shown in below picture, I am using power bank with two 5V powersupply one for Orange PI and other for driving Motor. powersupply from Orange PI GPIO PIN is not recommended.
Once connection is done as explained above, write this simple python code in vi Editor( vi Motor.py). In this code first i setup PA7 & PA8 using setcfg and then i send high & low to move Motor in anticlockwise direction.
sleep for 5min and send LOW & HIGH signal for clockwise direction. Run the code with below command. Motor will rotate for 5sec, stop, clockwise rotation for 5sec and stop.
Check Demo video in youtube and subscribe my channel for more robotic video. Please check other Blog post in this website.
If you like it please comment below, share and like in FaceBook. Thank you for reading.